Skip to content

October 3, 2013

25

Wireless BCM4312 with the 3.10, 3.11, 3.12 and 3.13 kernels

Broadcom Chipset BCM4312
The hybrid driver from Broadcom was updated again in September (2013) with all the previous patches and a few other fixes as well. This brings them up to support linux kernel 3.9, which is very much welcome.

Sadly it breaks again with >= 3.10 with many warnings and errors which isn’t good considering that Ubuntu (13.10) Saucy Salamander is about to be released.

We do have a patch for you though that gets us working again up to the 3.11 kernel.

Chipsets supported by “Broadcom’s IEEE 802.11a/b/g/n hybrid Linux® device driver” are: BCM4311, BCM4312, BCM4313, BCM4321, BCM4322, BCM43224, BCM43225, BCM43227 and BCM43228.


The error you will run into:

bcurtis@Aria:~/Workspace/wl.orig$ make
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/linux-headers-3.11.0-11-generic’
CFG80211 API is prefered for this kernel version
Using CFG80211 API
LD /home/bcurtis/Workspace/wl.orig/built-in.o
CC [M] /home/bcurtis/Workspace/wl.orig/src/shared/linux_osl.o
CC [M] /home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.o
/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.c: In function ‘wl_tkip_printstats’:
/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.c:3246:7: warning: passing argument 1 of ‘wl->tkipmodops->print_stats’ from incompatible pointer type [enabled by default]
wl->tkip_bcast_data[idx]);
^
/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.c:3246:7: note: expected ‘struct seq_file *’ but argument is of type ‘char *’
/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.c:3249:4: warning: passing argument 1 of ‘wl->tkipmodops->print_stats’ from incompatible pointer type [enabled by default]
wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data);
^
/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.c:3249:4: note: expected ‘struct seq_file *’ but argument is of type ‘char *’
/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.c: In function ‘wl_reg_proc_entry’:
/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.c:3470:2: error: implicit declaration of function ‘create_proc_entry’ [-Werror=implicit-function-declaration]
if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
^
/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.c:3470:22: warning: assignment makes pointer from integer without a cast [enabled by default]
if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
^
/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.c:3475:16: error: dereferencing pointer to incomplete type
wl->proc_entry->read_proc = wl_proc_read;
^
/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.c:3476:16: error: dereferencing pointer to incomplete type
wl->proc_entry->write_proc = wl_proc_write;
^
/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.c:3477:16: error: dereferencing pointer to incomplete type
wl->proc_entry->data = wl;
^
cc1: some warnings being treated as errors
make[2]: *** [/home/bcurtis/Workspace/wl.orig/src/wl/sys/wl_linux.o] Error 1
make[1]: *** [_module_/home/bcurtis/Workspace/wl.orig] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.11.0-11-generic’
make: *** [all] Error 2

The rundown:

  1. Download the 32 or 64-bit version:
    http://www.broadcom.com/support/802.11/linux_sta.php
  2. Download the patch: wl_3.10.patch
  3. Extract the sources:
    cd ~/Downloads; mkdir -p wl; cd wl; tar xf ../hybrid-*.tar.gz
  4. Patch and compile the sources: patch -p2 < ~/Downloads/wl_3.10.patch; make; sudo make install; sudo depmod; sudo modprobe wl

Give Ubuntu a few seconds after loading the “wl” kernel module, then eventually the Network Manager will start looking for wireless networks.

TL;DR: These patches are required for a working wl kernel module for the 3.10 and 3.11 kernel series.

Update (2014-04-22): Known to also work with Raring (14.04) that uses the 3.13 kernel.

25 Comments Post a comment
  1. Jest
    Oct 10 2013

    Thank you very much.

    Reply
  2. Sisyph.
    Oct 12 2013

    Thanks a lot.

    Reply
  3. Peter
    Oct 22 2013

    Thanks, much appreciated. Just the job.

    Reply
  4. tomasz
    Nov 11 2013

    You’re big man. Works for me. Kernel 3.10.3, debian testing (jessie)

    Reply
  5. bcmuser
    Nov 18 2013

    I was wondering if this patch will (likely) work for 3.12 kernels as well. I will try once the 3.12 version of the liquorix kernel package is released.

    Reply
    • chris
      Nov 22 2013

      Thanks a lot. Works for me. Kernel 3.12 from upubuntu.com with Linux mint 13 LTS.

  6. josif
    Nov 30 2013

    Mmm…mod is loaded but network manager shows nothing. Nor does lspci. Any ideas what to look for? Wireless was working fine before 3.11 upgrade (which, btw, is a great kernel upgrade otherwise)

    Reply
  7. Dec 3 2013

    thanks… its works with kernel 3.11 !

    Reply
  8. Geladriet
    Jan 28 2014

    I still get thousands of these:

    [ 535.529296] ERROR @wl_cfg80211_get_station : Wrong Mac address
    [ 545.454404] ERROR @wl_cfg80211_get_station : Wrong Mac address
    [ 545.454441] ERROR @wl_cfg80211_get_station : Wrong Mac address
    [ 547.523460] ERROR @wl_cfg80211_get_station : Wrong Mac address
    [ 547.523500] ERROR @wl_cfg80211_get_station : Wrong Mac address
    [ 553.522446] ERROR @wl_cfg80211_get_station : Wrong Mac address
    [ 553.522487] ERROR @wl_cfg80211_get_station : Wrong Mac address

    Damn you broadcom!!!

    Reply
  9. Sergio
    Feb 9 2014

    Thanks! Works like a charm

    Reply
  10. Feb 17 2014

    I am getting a null file for the patch — is it hosted anywhere else?

    Reply
    • Feb 18 2014

      Something on your end, because Google cache and two separate locations get the file without a problem.

  11. pan
    Mar 3 2014

    Thanks! It works perfectly with Arch 3.11

    Reply
  12. le_mac
    Mar 8 2014

    This worked great for my Lenovo G510 laptop with Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] wireless card!
    Fedora 20 3.13.5-202.fc20.x86_64

    finally.. thanks

    Reply
  13. pratheek
    Mar 30 2014

    It works for BCM4313 also. Awesome work..

    Reply
  14. Dmitry
    Apr 13 2014

    ubuntu 13.10, kernel 3.13.2-031302-generic x86 best working.

    Reply
  15. tvorog
    Apr 20 2014

    after upgrade ubuntu 13.10 to 14.04 i’m lost wifi drivers((
    BCM4313
    but your patch save my internet connectrion!!!
    thank’s ;)

    Reply
  16. Konstantin
    May 3 2014

    Thanks for info – working fine on Wheezy backported kernel 3.13-0.bpo.1-686-pae.

    Reply
  17. Martii
    May 3 2014

    Worked great for Crunchbang (debian based) with 3.13-0.bpo kernel. Thanks.

    Reply
  18. John
    May 14 2014

    Works also with 3.14 (Fedora 20). Thanks!!!

    Reply
  19. lordvampire
    Jul 7 2014

    doenst work with 3.15, i get following error at “make”

    sudo make
    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
    make[1]: Entering directory `/usr/src/linux-3.15.3-1.g42bf625-obj/x86_64/desktop’
    CFG80211 API is prefered for this kernel version
    Using CFG80211 API
    CC [M] /home/faruk/wldriver/src/wl/sys/wl_linux.o
    CC [M] /home/faruk/wldriver/src/wl/sys/wl_iw.o
    CC [M] /home/faruk/wldriver/src/wl/sys/wl_cfg80211_hybrid.o
    /home/faruk/wldriver/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_notify_connect_status’:
    /home/faruk/wldriver/src/wl/sys/wl_cfg80211_hybrid.c:1844:4: warning: passing argument 3 of ‘cfg80211_ibss_joined’ makes pointer from integer without a cast [enabled by default]
    cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
    ^
    In file included from /home/faruk/wldriver/src/wl/sys/wl_cfg80211_hybrid.c:33:0:
    /usr/src/linux-3.15.3-1.g42bf625/include/net/cfg80211.h:3933:6: note: expected ‘struct ieee80211_channel *’ but argument is of type ‘unsigned int’
    void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,
    ^
    /home/faruk/wldriver/src/wl/sys/wl_cfg80211_hybrid.c:1844:4: error: too few arguments to function ‘cfg80211_ibss_joined’
    cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
    ^
    In file included from /home/faruk/wldriver/src/wl/sys/wl_cfg80211_hybrid.c:33:0:
    /usr/src/linux-3.15.3-1.g42bf625/include/net/cfg80211.h:3933:6: note: declared here
    void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,
    ^a
    make[4]: *** [/home/faruk/wldriver/src/wl/sys/wl_cfg80211_hybrid.o] Error 1
    make[3]: *** [_module_/home/faruk/wldriver] Error 2
    make[2]: *** [sub-make] Error 2
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/usr/src/linux-3.15.3-1.g42bf625-obj/x86_64/desktop’
    make: *** [all] Error 2

    Reply
    • Peter
      Sep 9 2014

      I don’t know if you’re still having this problem but the following patch has allowed me to build since 3.15 – a few warnings are produced in 3.16 but it compiles and seems to work just the same.

      — src/wl/sys/wl_cfg80211_hybrid.c 2013-08-01 08:52:22.000000000 +0200
      +++ src/wl/sys/wl_cfg80211_hybrid.c 2014-06-17 21:32:57.473939488 +0200
      @@ -1841,7 +1840,8 @@
      wl_get_assoc_ies(wl);
      memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
      wl_update_bss_info(wl);
      – cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
      + //cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
      + cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, &(wl->conf->channel), GFP_KERNEL);
      set_bit(WL_STATUS_CONNECTED, &wl->status);
      wl->profile->active = true;

    • Peter
      Sep 9 2014

      Sorry I screwed up the tags (html is not my strong suit).

Trackbacks & Pingbacks

  1. Error compile wireles driver from source : Wl-sta driver linux_kernel 3.10 & 3.11 | writingwolking
  2. broadcom wireless BCM43142 does not discover all wireless networks in range - Tech Forum Network

Share your thoughts, post a comment.

(required)
(required)

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments