bcmwl kernel module does not build with 5.6.0 kernel

Bug #1872908 reported by Vincent Gerris on 2020-04-15
This bug affects 4 people
Affects Status Importance Assigned to Milestone
bcmwl (Ubuntu)
Alberto Milone

Bug Description

After kernel update to 5.6.0-1007-oem wifi stopped working.
Turned out dkms is unable to build the bcmwl module.

The make log shows:

ubuntu@ubuntu-inspiron-5482:~$ cat /var/lib/dkms/bcmwl/
DKMS make.log for bcmwl- for kernel 5.6.0-1007-oem (x86_64)
ons 15 apr 2020 09:19:05 CEST
make: Entering directory '/usr/src/linux-headers-5.6.0-1007-oem'
CFG80211 API is prefered for this kernel version
Using CFG80211 API
  AR /var/lib/dkms/bcmwl/
  CC [M] /var/lib/dkms/bcmwl/
  CC [M] /var/lib/dkms/bcmwl/
  CC [M] /var/lib/dkms/bcmwl/
  CC [M] /var/lib/dkms/bcmwl/
/var/lib/dkms/bcmwl/ In function ‘osl_reg_map’:
/var/lib/dkms/bcmwl/ 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/ 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));
      | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/bcmwl/
/var/lib/dkms/bcmwl/ In function ‘wl_set_auth_type’:
/var/lib/dkms/bcmwl/ warning: this statement may fall through [-Wimplicit-fallthrough=]
   52 | if (wl_dbg_level & WL_DBG_DBG) { \
      | ^
/var/lib/dkms/bcmwl/ note: in expansion of macro ‘WL_DBG’
  816 | WL_DBG(("network eap\n"));
      | ^~~~~~
/var/lib/dkms/bcmwl/ note: here
  817 | default:
      | ^~~~~~~
/var/lib/dkms/bcmwl/ In function ‘wl_attach’:
/var/lib/dkms/bcmwl/ 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/ 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/ In function ‘wl_pci_probe’:
/var/lib/dkms/bcmwl/ warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  780 | if ((val & 0x0000ff00) != 0)
      | ^~
/var/lib/dkms/bcmwl/ 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/ 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/ In function ‘wl_reg_proc_entry’:
/var/lib/dkms/bcmwl/ 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/
./include/linux/proc_fs.h:59:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
   59 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
      | ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:275: /var/lib/dkms/bcmwl/] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from ./include/linux/bitmap.h:9,
                 from ./include/linux/cpumask.h:12,
                 from ./arch/x86/include/asm/cpumask.h:5,
                 from ./arch/x86/include/asm/msr.h:11,
                 from ./arch/x86/include/asm/processor.h:22,
                 from ./arch/x86/include/asm/cpufeature.h:5,
                 from ./arch/x86/include/asm/thread_info.h:53,
                 from ./include/linux/thread_info.h:38,
                 from ./arch/x86/include/asm/preempt.h:7,
                 from ./include/linux/preempt.h:78,
                 from ./include/linux/spinlock.h:51,
                 from ./include/linux/seqlock.h:36,
                 from ./include/linux/time.h:6,
                 from ./include/linux/stat.h:19,
                 from ./include/linux/module.h:13,
                 from /var/lib/dkms/bcmwl/,
                 from /var/lib/dkms/bcmwl/
In function ‘strncpy’,
    inlined from ‘_wl_add_monitor_if’ at /var/lib/dkms/bcmwl/
./include/linux/string.h:284:9: warning: ‘__builtin_strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
  284 | return __builtin_strncpy(p, q, size);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/bcmwl/ In function ‘_wl_add_monitor_if’:
./include/linux/string.h:305:10: note: length computed here
  305 | return __builtin_strlen(p);
      | ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:275: /var/lib/dkms/bcmwl/] Error 1
make: *** [Makefile:1695: /var/lib/dkms/bcmwl/] Error 2
make: Leaving directory '/usr/src/linux-headers-5.6.0-1007-oem'

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: bcmwl-kernel-source
ProcVersionSignature: Ubuntu 5.6.0-1007.7-oem 5.6.2
Uname: Linux 5.6.0-1007-oem x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu26
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Wed Apr 15 09:21:58 2020
InstallationDate: Installed on 2019-12-17 (119 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
SourcePackage: bcmwl
UpgradeStatus: No upgrade log present (probably fresh install)

Vincent Gerris (vgerris) wrote :
Vincent Gerris (vgerris) wrote :

other info:
ubuntu@ubuntu-inspiron-5482:~$ dkms status
bcmwl,, 5.3.0-26-generic, x86_64: installed
bcmwl,, 5.3.0-40-generic, x86_64: installed
bcmwl,, 5.4.0-1002-oem, x86_64: installed
bcmwl,, 5.4.0-21-generic, x86_64: installedError! Could not locate dkms.conf file.
File: /var/lib/dkms/evdi/5.2.14/source/dkms.conf does not exist.

evdi, 1.6.0+dfsg, 5.4.0-1002-oem, x86_64: built

The hardware is a Dell DW1560.

Tried to reinstall with:
sudo dkms install bcmwl/

which gave above output.

satmandu (satadru-umich) wrote :

So until the package gets updated do this:

Add this line to /usr/src/bcmwl-


Save the patch at https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1872908/+attachment/5356260/+files/broadcom-wl-dkms-arch-patch as this file:


then do this:

sudo dkms install bcmwl/ -k all

(this appears to work for 5.7-rc1 too.)

Launchpad Janitor (janitor) wrote :

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

Changed in bcmwl (Ubuntu):
status: New → Confirmed
Vincent Gerris (vgerris) wrote :

Thank you for the workaround and the patch.
I tested this and got :

ubuntu@ubuntu-inspiron-5482:~$ sudo dkms install bcmwl/ -k all
Error! Your kernel headers for kernel all cannot be found.
Please install the linux-headers-all package,
or use the --kernelsourcedir option to tell DKMS where it's located

Then I did :
sudo apt install --reinstall linux-headers-5.6.0-1007-oem
(because I didn't know the location)
and it worked.

Does anyone know where the patch can be applied to?
I will ping the maintainer I had contact with in the past for Ubuntu so I hope this can be merged soon.

Thanks a lot for your contribution !

Changed in bcmwl (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Changed in bcmwl (Ubuntu Focal):
status: New → Triaged
Changed in bcmwl (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → Medium
Changed in bcmwl (Ubuntu Focal):
importance: Undecided → Medium
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bcmwl -

bcmwl ( groovy; urgency=medium

  * debian/dkms.conf.in,
    debian/patches/0028-add-support-for-linux-5.6.patch (LP: #1872908):
    - Add support for Linux 5.6.

 -- Alberto Milone <email address hidden> Mon, 04 May 2020 13:23:19 +0200

Changed in bcmwl (Ubuntu):
status: In Progress → Fix Released
aradapilot (aradapilot) wrote :

I see in packaged.ubuntu this is only available for groovy by default, will it be backported to focal at least?
Be nice to have it from a regular repo, for those of us who are constantly booting with different kernels

satmandu (satadru-umich) wrote :

The patch in doesn't appear to work when installed on focal:

sudo dpkg -i bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu6_amd64.deb
(Reading database ... 170331 files and directories currently installed.)
Preparing to unpack bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu6_amd64.deb ...
Removing all DKMS Modules
Unpacking bcmwl-kernel-source ( over ( ...
Setting up bcmwl-kernel-source ( ...
Loading new bcmwl- DKMS files...
Building for 5.4.0-31-generic
Building for architecture x86_64
Building initial module for 5.4.0-31-generic
Error! Application of patch 0028-add-support-for-linux-5.6.patch failed.
Check /var/lib/dkms/bcmwl/ for more information.
dpkg: error processing package bcmwl-kernel-source (--install):
 installed bcmwl-kernel-source package post-installation script subprocess returned error exit status 6
Errors were encountered while processing:

John Scott (fyrbrds) wrote :

Used the patch link and instructions above for 5.6.13. Worked like a charm. Thanks satmandu.

Russ Burghorn (alienwar) wrote :

Used patch for 5.7.1-050701-generic it worked , thanks for helping out!

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

Other bug subscribers