bcmwl-kernel-source 6.30.223.271+bdcom-0ubuntu5: bcmwl kernel module failed to build

Bug #1906745 reported by Scott Stensland
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
bcmwl (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

apt-get upgrade caused crash of wireless bcmwl

afterwards my wifi fails to work

before updates had

x86_64
5.4.0-57-generic
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

apt-get upgrade

The following NEW packages will be installed:
  linux-headers-5.8.0-32-generic linux-hwe-5.8-headers-5.8.0-32 linux-image-5.8.0-32-generic linux-modules-5.8.0-32-generic
  linux-modules-extra-5.8.0-32-generic
The following packages will be upgraded:
  linux-generic-hwe-20.04 linux-headers-generic-hwe-20.04 linux-image-generic-hwe-20.04 wireless-regdb

Setting up linux-modules-5.8.0-32-generic (5.8.0-32.34~20.04.1) ...
Setting up linux-hwe-5.8-headers-5.8.0-32 (5.8.0-32.34~20.04.1) ...
Setting up linux-headers-5.8.0-32-generic (5.8.0-32.34~20.04.1) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.8.0-32-generic

Kernel preparation unnecessary for this kernel. Skipping...
applying patch 0002-Makefile.patch...patching file Makefile
Hunk #1 succeeded at 113 with fuzz 1.
Hunk #2 succeeded at 132 with fuzz 2 (offset 1 line).

applying patch 0003-Make-up-for-missing-init_MUTEX.patch...patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 111 with fuzz 2 (offset 12 lines).

applying patch 0010-change-the-network-interface-name-from-eth-to-wlan.patch...patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 221 (offset -14 lines).

applying patch 0013-gcc.patch...patching file Makefile

applying patch 0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch...patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 2169 (offset 12 lines).

applying patch 0020-add-support-for-linux-4.3.patch...patching file src/shared/linux_osl.c

applying patch 0021-add-support-for-Linux-4.7.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c

applying patch 0022-add-support-for-Linux-4.8.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 2391 (offset 3 lines).
Hunk #2 succeeded at 2501 (offset 3 lines).
Hunk #3 succeeded at 2933 (offset 9 lines).

applying patch 0023-add-support-for-Linux-4.11.patch...patching file src/include/linuxver.h
patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 2919 (offset 4 lines).

applying patch 0024-add-support-for-Linux-4.12.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 55 (offset 5 lines).
Hunk #2 succeeded at 472 (offset 5 lines).
Hunk #3 succeeded at 2371 (offset 5 lines).
Hunk #4 succeeded at 2388 (offset 5 lines).

applying patch 0025-add-support-for-Linux-4.14.patch...patching file src/shared/linux_osl.c
Hunk #1 succeeded at 1080 (offset 4 lines).

applying patch 0026-add-support-for-Linux-4.15.patch...patching file src/wl/sys/wl_linux.c
Hunk #2 succeeded at 2306 (offset 4 lines).
Hunk #3 succeeded at 2368 (offset 4 lines).

applying patch 0027-add-support-for-linux-5.1.patch...patching file src/include/linuxver.h
Hunk #1 succeeded at 595 (offset 4 lines).

Building module:
cleaning build area...
make -j8 KERNELRELEASE=5.8.0-32-generic -C /lib/modules/5.8.0-32-generic/build M=/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.8.0-32-generic (x86_64)
Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more information.
   ...done.
Setting up linux-image-5.8.0-32-generic (5.8.0-32.34~20.04.1) ...
I: /boot/vmlinuz.old is now a symlink to vmlinuz-5.4.0-57-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-5.4.0-57-generic
I: /boot/vmlinuz is now a symlink to vmlinuz-5.8.0-32-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.8.0-32-generic
Setting up linux-headers-generic-hwe-20.04 (5.8.0.32.34~20.04.19) ...
Setting up linux-modules-extra-5.8.0-32-generic (5.8.0-32.34~20.04.1) ...
Setting up linux-image-generic-hwe-20.04 (5.8.0.32.34~20.04.19) ...
Setting up linux-generic-hwe-20.04 (5.8.0.32.34~20.04.19) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for linux-image-5.8.0-32-generic (5.8.0-32.34~20.04.1) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.8.0-32-generic

Kernel preparation unnecessary for this kernel. Skipping...
applying patch 0002-Makefile.patch...patching file Makefile
Hunk #1 succeeded at 113 with fuzz 1.
Hunk #2 succeeded at 132 with fuzz 2 (offset 1 line).

applying patch 0003-Make-up-for-missing-init_MUTEX.patch...patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 111 with fuzz 2 (offset 12 lines).

applying patch 0010-change-the-network-interface-name-from-eth-to-wlan.patch...patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 221 (offset -14 lines).

applying patch 0013-gcc.patch...patching file Makefile

applying patch 0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch...patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 2169 (offset 12 lines).

applying patch 0020-add-support-for-linux-4.3.patch...patching file src/shared/linux_osl.c

applying patch 0021-add-support-for-Linux-4.7.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c

applying patch 0022-add-support-for-Linux-4.8.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 2391 (offset 3 lines).
Hunk #2 succeeded at 2501 (offset 3 lines).
Hunk #3 succeeded at 2933 (offset 9 lines).

applying patch 0023-add-support-for-Linux-4.11.patch...patching file src/include/linuxver.h
patching file src/wl/sys/wl_linux.c
Hunk #1 succeeded at 2919 (offset 4 lines).

applying patch 0024-add-support-for-Linux-4.12.patch...patching file src/wl/sys/wl_cfg80211_hybrid.c
Hunk #1 succeeded at 55 (offset 5 lines).
Hunk #2 succeeded at 472 (offset 5 lines).
Hunk #3 succeeded at 2371 (offset 5 lines).
Hunk #4 succeeded at 2388 (offset 5 lines).

applying patch 0025-add-support-for-Linux-4.14.patch...patching file src/shared/linux_osl.c
Hunk #1 succeeded at 1080 (offset 4 lines).

applying patch 0026-add-support-for-Linux-4.15.patch...patching file src/wl/sys/wl_linux.c
Hunk #2 succeeded at 2306 (offset 4 lines).
Hunk #3 succeeded at 2368 (offset 4 lines).

applying patch 0027-add-support-for-linux-5.1.patch...patching file src/include/linuxver.h
Hunk #1 succeeded at 595 (offset 4 lines).

Building module:
cleaning build area...
make -j8 KERNELRELEASE=5.8.0-32-generic -C /lib/modules/5.8.0-32-generic/build M=/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build...(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/bcmwl-kernel-source.0.crash'
Error! Bad return status for module build on kernel: 5.8.0-32-generic (x86_64)
Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more information.
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.8.0-32-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.8.0-32-generic
Found initrd image: /boot/initrd.img-5.8.0-32-generic
Found linux image: /boot/vmlinuz-5.4.0-57-generic
Found initrd image: /boot/initrd.img-5.4.0-57-generic
Found linux image: /boot/vmlinuz-5.4.0-56-generic
Found initrd image: /boot/initrd.img-5.4.0-56-generic
Adding boot menu entry for UEFI Firmware Settings
done

here is crash file

olof@hofn ~ $ cat /var/crash/bcmwl-kernel-source.0.crash
ProblemType: Package
DKMSBuildLog:
 DKMS make.log for bcmwl-6.30.223.271+bdcom for kernel 5.8.0-32-generic (x86_64)
 Thu 03 Dec 2020 08:50:14 PM EST
 make: Entering directory '/usr/src/linux-headers-5.8.0-32-generic'
 CFG80211 API is prefered for this kernel version
 Using CFG80211 API
   AR /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/built-in.a
   CC [M] /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.o
   CC [M] /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.o
   CC [M] /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_iw.o
   CC [M] /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.o
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c: In function ‘osl_reg_map’:
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:949:10: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
   949 | return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
       | ^~~~~~~~~~~~~~~
       | ioremap_cache
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:949:10: warning: returning ‘int’ from a function with return type ‘void *’ makes pointer from integer without a cast [-Wint-conversion]
   949 | return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
       | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c: In function ‘wl_attach’:
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:593:20: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
   593 | if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
       | ^~~~~~~~~~~~~~~
       | ioremap_cache
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:593:18: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   593 | if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
       | ^
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c: In function ‘wl_pci_probe’:
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:780:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   780 | if ((val & 0x0000ff00) != 0)
       | ^~
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:782:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   782 | bar1_size = pci_resource_len(pdev, 2);
       | ^~~~~~~~~
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:783:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   783 | bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
       | ^
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c: In function ‘wl_reg_proc_entry’:
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:3376:58: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  3376 | if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) {
       | ^~~~~~~~
       | |
       | const struct file_operations *
 In file included from /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:38:
 ./include/linux/proc_fs.h:102:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
   102 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
       | ^~~~~~~~~~~~~~~~
 In file included from /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c:40:
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_set_auth_type’:
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.h:52:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
    52 | if (wl_dbg_level & WL_DBG_DBG) { \
       | ^
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c:816:3: note: in expansion of macro ‘WL_DBG’
   816 | WL_DBG(("network eap\n"));
       | ^~~~~~
 /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c:817:2: note: here
   817 | default:
       | ^~~~~~~
 cc1: some warnings being treated as errors
 make[1]: *** [scripts/Makefile.build:288: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.o] Error 1
 make[1]: *** Waiting for unfinished jobs....
 cc1: some warnings being treated as errors
 make[1]: *** [scripts/Makefile.build:288: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.o] Error 1
 make: *** [Makefile:1780: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build] Error 2
 make: Leaving directory '/usr/src/linux-headers-5.8.0-32-generic'
DKMSKernelVersion: 5.8.0-32-generic
Date: Thu Dec 3 20:50:17 2020
DuplicateSignature: dkms:bcmwl-kernel-source:6.30.223.271+bdcom-0ubuntu5:/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:949:10: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
Package: bcmwl-kernel-source 6.30.223.271+bdcom-0ubuntu5
PackageVersion: 6.30.223.271+bdcom-0ubuntu5
SourcePackage: bcmwl
Title: bcmwl-kernel-source 6.30.223.271+bdcom-0ubuntu5: bcmwl kernel module failed to build

after reboot have
x86_64
5.8.0-32-generic
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"

before upgrade wifi was OK now wifi fails to work

Revision history for this message
Scott Stensland (scottstensland) wrote :

lspci | grep -i network
03:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4322 802.11a/b/g/n Wireless LAN Controller (rev 01)

SOLUTION

sudo apt-get purge bcmwl-kernel-source

sudo apt-get install broadcom-sta-source broadcom-sta-dkms broadcom-sta-common

reboot

now wifi is OK

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bcmwl (Ubuntu):
status: New → Confirmed
Revision history for this message
Leo (llenchikk) wrote :

Confirm that.
Solution from Scott works.
Thank you!

Revision history for this message
saba46 (hpbiege) wrote :

Scott's solution works also with me! Thanks a lot!

Revision history for this message
usergn2 (usergn2) wrote :

Confirmed, Scott Stensland's solution works for me.

Ubuntu 20.04 LTS
image 5.8.0.36

$ lspci | grep -i network
Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 01)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.