FS#54789 - [broadcom-wl-dkms] Broken with Kernel 4.12

Attached to Project: Community Packages
Opened by autarch princeps (autarchprinceps) - Thursday, 13 July 2017, 15:38 GMT
Last edited by Alexander F. Rødseth (xyproto) - Sunday, 16 July 2017, 23:26 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description: The broadcom driver does not compile with kernel 4.12 leading to no WiFi on the devices that rely on this driver.

Additional info:
* package version(s): linux-4.12.1-1 as well as linux-zen-4.12.1-1 and broadcom-wl-dkms-6.30.223.271-12

Steps to reproduce:
* Install kernel 4.12 and broadcom-wl-dkms, it breaks in post-transaction hook "Install DKMS modules"

DKMS make.log for broadcom-wl-6.30.223.271 for kernel 4.12.1-1-ARCH (x86_64)
Do 13. Jul 17:17:29 CEST 2017
make: Verzeichnis „/usr/lib/modules/4.12.1-1-ARCH/build“ wird betreten
CFG80211 API is prefered for this kernel version
Using CFG80211 API
LD /var/lib/dkms/broadcom-wl/6.30.223.271/build/built-in.o
CC [M] /var/lib/dkms/broadcom-wl/6.30.223.271/build/src/shared/linux_osl.o
CC [M] /var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_linux.o
CC [M] /var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_iw.o
CC [M] /var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.o
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_linux.c: In Funktion »wl_pci_probe«:
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_linux.c:772:2: Warnung: diese »if«-Klausel beschützt nicht … [-Wmisleading-indentation]
if ((val & 0x0000ff00) != 0)
^~
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_linux.c:774:3: Anmerkung: … diese Anweisung, aber letztere ist verwirrend eingerückt, als wäre sie abhängig von »if«
bar1_size = pci_resource_len(pdev, 2);
^~~~~~~~~
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c:1798:25: Fehler: Initialisierung von inkompatiblem Zeigertyp [-Werror=incompatible-pointer-types]
.change_virtual_intf = wl_cfg80211_change_iface,
^~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c:1798:25: Anmerkung: (nahe der Initialisierung für »wl_cfg80211_ops.change_virtual_intf«)
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c: In Funktion »wl_bss_roaming_done«:
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c:2406:4: Fehler: Übergabe des Arguments 2 von »cfg80211_roamed« von inkompatiblem Zeigertyp [-Werror=incompatible-pointer-types]
&wl->conf->channel,
^
In file included from /var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c:33:0:
./include/net/cfg80211.h:5435:6: Anmerkung: »struct cfg80211_roam_info *« erwartet, aber Argument hat Typ »struct ieee80211_channel *«
void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
^~~~~~~~~~~~~~~
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c:2408:4: Warnung: Übergabe des Arguments 3 von »cfg80211_roamed« erzeugt Ganzzahl von Zeiger ohne Typkonvertierung [-Wint-conversion]
(u8 *)&wl->bssid,
^
In file included from /var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c:33:0:
./include/net/cfg80211.h:5435:6: Anmerkung: »gfp_t {alias unsigned int}« erwartet, aber Argument hat Typ »u8 * {alias unsigned char *}«
void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
^~~~~~~~~~~~~~~
/var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c:2404:2: Fehler: zu viele Argumente für Funktion »cfg80211_roamed«
cfg80211_roamed(ndev,
^~~~~~~~~~~~~~~
In file included from /var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.c:33:0:
./include/net/cfg80211.h:5435:6: Anmerkung: hier deklariert
void cfg80211_roamed(struct net_device *dev, struct cfg80211_roam_info *info,
^~~~~~~~~~~~~~~
cc1: Einige Warnungen werden als Fehler behandelt
make[1]: *** [scripts/Makefile.build:302: /var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_cfg80211_hybrid.o] Fehler 1
make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....
make: *** [Makefile:1512: _module_/var/lib/dkms/broadcom-wl/6.30.223.271/build] Fehler 2
make: Verzeichnis „/usr/lib/modules/4.12.1-1-ARCH/build“ wird verlassen

This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Sunday, 16 July 2017, 23:26 GMT
Reason for closing:  Fixed
Comment by autarch princeps (autarchprinceps) - Thursday, 13 July 2017, 15:42 GMT
FYI it works fine with 4.11.8-1 (zen and default kernel)
Comment by Eli Schwartz (eschwartz) - Thursday, 13 July 2017, 16:17 GMT
  • Field changed: Status (Unconfirmed → Assigned)
  • Field changed: Category (Packages → Packages: Testing)
  • Field changed: Architecture (x86_64 → All)
  • Field changed: Severity (Critical → High)
  • Task assigned to Alexander F. Rødseth (xyproto)
This is hardly critical: https://wiki.archlinux.org/index.php/Reporting_bug_guidelines#Severity

As is not uncommon with minor kernel releases, something changed in the kernel and this module needs to be patched again to compile on the latest kernel.
https://github.com/gentoo/gentoo/blob/master/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.271-r4-linux-4.12.patch
Comment by autarch princeps (autarchprinceps) - Thursday, 13 July 2017, 20:32 GMT
Well it does make the system unusable, since without network one can't even download an update that might then fix the problem. I was lucky to see it and downgrade my kernel again before rebooting, or I would have had to jump through a lot of hoops to get my system working again.
Anyway, thanks for looking at it so quickly. Given that this is a somewhat proprietary driver, I was afraid it might take a while to see a response from them to this very much new kernel release, but it looks like the patch you mention really addresses exactly that issue. I was really hoping to get to test 4.12, because it supposedly fixes audio on some Ryzen boards.
Comment by Eli Schwartz (eschwartz) - Thursday, 13 July 2017, 20:55 GMT
If worst came to worst, since this didn't cause a "System crash, [or] severe boot failure that is likely to affect more than just you" you could always downgrade the kernel... after you successfully rebooted with no problems other than WiFi failure. At least, I hope you aren't in the habit of cleaning out your pacman CacheDir without testing your upgrades. :)

As for the patch, you can often find such things if you look at packages for other distros. You can wait for the Arch package to be updated by the maintainer, or alternatively, add the patch to /usr/src/broadcom-wl-6.30.223.271/patches/ and /usr/src/broadcom-wl-6.30.223.271/dkms.conf yourself if you don't want to wait.
Comment by Alexander F. Rødseth (xyproto) - Sunday, 16 July 2017, 12:15 GMT
Updated the package in [community]. Please confirm that it now works as it should with Linux 4.12.
Comment by Håvard Pettersson (haavard) - Sunday, 16 July 2017, 14:47 GMT
Does not work for me. I've attached make.log which details the errors in the build process. Kernel 4.12.2, broadcom-wl-dkms 6.30.223.271-13.
   make.log (3.6 KiB)
Comment by loqs (loqs) - Sunday, 16 July 2017, 17:55 GMT
https://git.archlinux.org/svntogit/community.git/tree/trunk/dkms.conf.in?h=packages/broadcom-wl-dkms&id=494397cb624da1e4f243a8181871e91bd386a9fe
is missing PATCH[6]="007-linux412.patch"
007-linux412.patch will not apply cleanly due to differing context on hunk three due to previous patches https://github.com/manjaro/packages-extra/blob/master/broadcom-wl-dkms/007-linux-4.12.patch applies cleanly.
Comment by Ryan Petris (ryanpetris) - Sunday, 16 July 2017, 22:32 GMT
The 4.12 patch from broadcom-wl appears to work as well; the linux-macbook (aur) package was updated to 4.12 today and after updating 007-linux12.patch with the contents of the below patch it compiled successfully and appears to be working properly.

https://aur.archlinux.org/cgit/aur.git/tree/linux412.patch?h=broadcom-wl
Comment by Alexander F. Rødseth (xyproto) - Sunday, 16 July 2017, 22:58 GMT
Thanks, Ryan. Updated the package to use the patch from the AUR package.
Comment by loqs (loqs) - Sunday, 16 July 2017, 23:03 GMT
dkms.conf.in is still missing PATCH[6]="007-linux412.patch"
Comment by Ryan Petris (ryanpetris) - Sunday, 16 July 2017, 23:14 GMT
I had to edit the dkms.conf file as well... sorry I forgot to mention that.
Comment by Alexander F. Rødseth (xyproto) - Sunday, 16 July 2017, 23:16 GMT
I only have access to a virtual host with Arch Linux right now, where kernel 4.12 is not available yet in a straightforward manner. Will have access to my normal system tomorrow. Thanks for testing!

Fixed dkms.conf.in, thanks loqs. The updated package will appear in [community] in minutes, and hopefully work as expected now. Please confirm.
Comment by Ryan Petris (ryanpetris) - Sunday, 16 July 2017, 23:18 GMT
Thanks Alexander, much appreciated!
Comment by loqs (loqs) - Sunday, 16 July 2017, 23:21 GMT
broadcom-wl-dkms-6.30.223.271-15 builds and installs without error under 4.12
Comment by Alexander F. Rødseth (xyproto) - Sunday, 16 July 2017, 23:25 GMT
Great, thanks for testing!

Loading...