Wireless BCM4312 with the 3.4 and 3.5 kernel

The hybrid driver from Broadcom is still a bit behind in terms of support for the latest kernels but there are workarounds. This particular issue also effects other kernel modules such as the out of tree Nvidia and ATI blobs that require the asm/system.h file in their includes.
I’ve had success with replacing it with asm/switch_to.h which seems to have fixed things for now. The cause for this can be found on the LKML.
Chipsets supported by “Broadcom’s IEEE 802.11a/b/g/n hybrid Linux® device driver” are: BCM4311, BCM4312, BCM4313, BCM4321, BCM4322, BCM43224, and BCM43225, BCM43227 and BCM43228.
Errors:
bcurtis@ronin:~/workspace/wl$ make
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-030500rc3-generic’
Wireless Extension is the only possible API for this kernel version
Using Wireless Extension API
LD /home/bcurtis/workspace/wl/built-in.o
CC [M] /home/bcurtis/workspace/wl/src/shared/linux_osl.o
CC [M] /home/bcurtis/workspace/wl/src/wl/sys/wl_linux.o
/home/bcurtis/workspace/wl/src/wl/sys/wl_linux.c:43:24: fatal error: asm/system.h: No such file or directory
compilation terminated.
make[2]: *** [/home/bcurtis/workspace/wl/src/wl/sys/wl_linux.o] Error 1
make[1]: *** [_module_/home/bcurtis/workspace/wl] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-030500rc3-generic’
make: *** [all] Error 2
The rundown:
- Download the 32 or 64-bit version:
http://www.broadcom.com/support/802.11/linux_sta.php - Download my patches: bc_wl_abiupdate.patch and switch_to.patch
- Extract the sources:
cd ~/Downloads; mkdir -p wl; cd wl; tar xf ../hybrid-portsrc*.tar.gz - Patch and compile the sources:
patch -p0 src/wl/sys/wl_linux.c < ~/Downloads/switch_to.patch; patch -p0 src/wl/sys/wl_linux.c < ~/Downloads/bc_wl_abiupdate.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.4 and 3.5 kernel series.
Update: Also verified to work with Linux 3.6 series.





It’s like this tip was made just for me. It worked like a charm after I used the mentioned directory structure. Thanks!
Thanks! Wifi finally works now. BCM4313 with kernel 3.4.4 on debian Squeeze.
Thanks! Wifi works now. BCM4312 with kernel Thanks! Wifi finally works now. BCM4313 with kernel 3.4.4.2 i 686 on opensuse 12.1.
very very very cool baby!!!
thanks a lot!!!!!
it works on my
- Fedora 16, 32 bit
- kernel 3.4.6
- Broadcom BCM4313
Great!

I dont know how to thank you, man! Straight from brazil here, really thankfull for this! Using BCM4313 and Ubuntu 12.04
Nice man, thanks a lot, I love compile the kernel and broadcom always is problem.
And is more 1 brazilian here
my kernel 3.5.1
Thank you, it works for me.
It works perfect, thanks so much
Great tip, thought I would never get it working Thanks
Awesome man, finally because of you I can upgrade my kernel after an year.
Thanks a lot !!!
Not working for me in Ubuntu 12.04 with 3.5 kernel……
worked in 3.4 kernel..
This post also might prove useful:
https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/994255
Considering that 12.04 uses the 3.2 kernel by default, if you are using mainline kernel 3.5 (also from Ubuntu but meant for Quantal), this also works as I’ve just tested it. It also works against kernel 3.6 without problems. If you want, please post the output you are seeing here and I can have a look at it.
Hi,
I’m running Ubuntu 11.10 with kernel 3.6.2-030602-generic i386
Before I found your page I messed up big time.
I ended up in a situation where kernel 3.6.2 had no internet connection (wired or wireless) and I had to blacklist wl in order to get wired back.
Now I tried to remove all packages I could think of related to b43 and followed your instruction.
after I copy wl.ko (according to the instructions in http://www.broadcom.com/docs/linux_sta/README.txt)
# cp wl.ko /lib/modules/3.6.2-030602-generic/kernel/drivers/net/wireless/wl.ko
# depmod
# modprobe wl
at this stage the GUI breaks, I have no wireless and every command related to wireless (e.g. iwconfig) hangs (I tried from an ssh connection since I have no more GUI).
any idea?
thank you!
rookie mistake…
$ sudo find / | grep wl.ko
/home/alfonso/wifi/wl/wl.ko
/home/alfonso/wifi/wl/.wl.ko.cmd
/lib/modules/3.6.2-030602-generic/updates/dkms/wl.ko
/lib/modules/3.6.2-030602-generic/kernel/drivers/net/wireless/wl.ko
I copied /home/alfonso/wifi/wl/wl.ko on /lib/modules/3.6.2-030602-generic/kernel/drivers/net/wireless/wl.ko instead of copying it to /lib/modules/3.6.2-030602-generic/updates/dkms/wl.ko
now it works! thanks!!!
Glad to hear that you got it sorted out. Did you happen to have any problems with the 3.5 series like jane above you had? I cannot reproduce the issue.
didn’t try with 3.5 – I just swtiched to 3.6
thank you for the great post!
thanks!! is workign on linux 3.6
After adding the switch_to.patch into the patches directory, and editing dkms.conf to use the new patch, wl module finally built and installed correctly. Network-manager seems to find the device and autoscan for networks a lot slower than under 3.2, but at least it works after a delay!
Thanks for this writeup
Your patch works great on a openSUSE 12.2 x86 system! Thanks a lot for your efforts, really appreciated!
Thanks =D
Ubuntu 12.04
BCM4313
kernel 3.5.0
Hello!
I tried to follow many times your solution, but things won’t work…
I’m under Linux 3.6.2, amd_64, and when I try to run “sudo modprobe wl”, I get this error :
“ERROR: could not insert ‘wl’: Unknown symbol in module, or unknown parameter (see dmesg)
libkmod: ERROR ../libkmod/libkmod-module.c:925 command_do: Error running install command for wl
ERROR: could not insert ‘wl’: Operation not permitted”
I blacklisted compat and bcma, since I thought they could disturb wl, but I still get this error.
Does someone know what’s happening?
When I run dmesg, I get
”
[ 186.462566] wl: disagrees about version of symbol lib80211_get_crypto_ops
[ 186.462573] wl: Unknown symbol lib80211_get_crypto_ops (err -22)
[ 591.873883] wl: disagrees about version of symbol lib80211_get_crypto_ops
[ 591.873887] wl: Unknown symbol lib80211_get_crypto_ops (err -22)
[ 770.760994] wl: disagrees about version of symbol lib80211_get_crypto_ops
[ 770.761002] wl: Unknown symbol lib80211_get_crypto_ops (err -22)
“
I just tested with 3.6.2-030602-generic and everything compiled and installed without a problem. In dmesg I see:
From looking at your output: either there is something wrong with your kernel headers not matching your currently running kernel, or you have forcefully injected wl or some other kernel module that was not made for your currently running kernel and wl is complaining.
I hope you can figure it out.
Thanks a lot for the tip, worked like a charm! BCM43228/Ubuntu 12.10.
Worked. Slackware 64 14. Kernel 3.7.1
Thanks! help me with my Ubuntu 12.04 GNU/Linux 3.5 kernel
Broadcom BCM4315 802.11 Hybrid Wireless Controller 5.100.82.112
Thank you !!!
Awesome !! Thank you.
Works on 3.7 Ubuntu 13.04!!!
Works on Ubuntu 12.04 + 3.7.2-030702-generic
Thank you! I finally made my Broadcom 4322 up & running. I will make a simple post on my blog just to have a manual what to do next time I have to install it
Of course I will credit you! You are my savior!
I am having the same issue wuthe Netxtreme 5708 Server Driver. It does not compile with 3.5. Is it possible that you point me in the right direction as to how to make this work?
I’m not sure I can help you, but if the your error is similar to the one I posted about, then you can try it for yourself. The patches above won’t be a 100% match, but you can patch the files manually by looking at what I did. Good luck!
I wish to hire you to write patch for me.
Please contact me via email at venefax at gmail and I can give you the credentials. I pay via Paypal.
Hi,
I tried your method but got the following error at the make stage:
ld: Relocatable linking with relocations from format elf64-x86-64 (/home/user/Downloads/hyb/wl/lib/wlc_hybrid.o_shipped) to format elf32-i386 (/home/user/Downloads/hyb/wl/wl.o) is not supported
Any help will be appreciated!!
That is because you are mixing 32 and 64bit. Did you download the correct version from the website for your machine? You can find out by running ‘uname -a’, i386 is 32b and x86_64 is 64. Good luck!
`uname -a` gave me “Linux elbis 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:32:08 UTC 2012 i686 i686 i686 GNU/Linux”
Is it 32b or 64?
i686 is still 32 bit. Cheers!
Bret! Thanks for following up. I also figured out after your comment.
The problem is even after downloading 32bit package and following your suggestions, i’m’ not able to get my wifi working.
lsmod | grep wl
wl 2442848 0
lib80211 14040 1 wl
It looks like you got it to compile and loaded into your kernel without problems. You either need blacklist one of the other kernel modules that is trying to initialize your wireless or your wireless isn’t supported.
Try this:
http://askubuntu.com/questions/240124/what-do-i-type-to-blacklist-b43-in-an-installed-ubuntu-system
Success!
If you’re running Ubuntu 12.10, broadcom-sta-dkms is supposed to provide and build this driver.
But it’s broken, as outlined on this webpage (above.)
But not in quantal-backports:
sudo aptitude -t quantal-backports install broadcom-sta-dkms
You’re right, sadly it isn’t in earlier Ubuntu releases and some of us still have to use the LTS.
Thanks a lot!!
Confirmed to work on Linux 3.8.2-030802-generic (Ubuntu 12.04 LTS). Thank you very much for this!!!!!!
Thanks man
Thank you ! This worked under gentoo amd64 kernel 3.8.2.
Thanks, it worked perfectly.
The kernel patch solved my problem of no wifi with a siduction 3.5 kernel on a debian system with broadcom 43228 wireless.
Sticking to 3.5 for now since it’s (unofficially) supported till Mar 2014 and 3.7 is already EOL.
Thanks man!
For anybody who just installed Ubuntu 13.10 Saucy Salamander daily build this works for the 3.9.0.0 kernel.
Thanks bret, great patch
Unbelievable, I have no idea what I just did there (cut, paste in terminal, hope for the best)
Thank you for the help, now using fixed wifi to post this. This fix worked on perfect on Ubuntu Studio 13.04.
#sudo modprobe wl
ERROR: could not insert ‘wl’: Exec format error
libkmod: ERROR ../libkmod/libkmod-module.c:925 command_do: Error running install command for wl
ERROR: could not insert ‘wl’: Operation not permitted
bcm43225
ubuntu 13.04 Kernel 3.5.0-17-generic
64 bits
Alguien me ayuda??
Have you tried ‘sudo make install’ and ‘sudo depmod’ before running ‘sudo modprobe wl’ ?