Wireless BCM4312 with the 3.10, 3.11, 3.12 and 3.13 kernels
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:
[email protected]:~/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:
- Download the 32 or 64-bit version:
http://www.broadcom.com/support/802.11/linux_sta.php
- Download the patch: wl_3.10.patch
- Extract the sources:
cd ~/Downloads; mkdir -p wl; cd wl; tar xf ../hybrid-*.tar.gz
- 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.
Thank you very much.
Thanks a lot.
Thanks, much appreciated. Just the job.
You’re big man. Works for me. Kernel 3.10.3, debian testing (jessie)
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.
Thanks a lot. Works for me. Kernel 3.12 from upubuntu.com with Linux mint 13 LTS.
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)
thanks… its works with kernel 3.11 !
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!!!
Thanks! Works like a charm
I am getting a null file for the patch — is it hosted anywhere else?
Something on your end, because Google cache and two separate locations get the file without a problem.
Thanks! It works perfectly with Arch 3.11
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
It works for BCM4313 also. Awesome work..
ubuntu 13.10, kernel 3.13.2-031302-generic x86 best working.
after upgrade ubuntu 13.10 to 14.04 i’m lost wifi drivers((
BCM4313
but your patch save my internet connectrion!!!
thank’s 😉
Thanks for info – working fine on Wheezy backported kernel 3.13-0.bpo.1-686-pae.
Worked great for Crunchbang (debian based) with 3.13-0.bpo kernel. Thanks.
Works also with 3.14 (Fedora 20). Thanks!!!
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
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;
Sorry I screwed up the tags (html is not my strong suit).
it’s give an error
[email protected]:~/Downloads/wl# patch -p2 < ~/Downloads/wl_3.10.patch
patching file src/wl/sys/wl_linux.c
Hunk #1 FAILED at 3229.
Hunk #2 FAILED at 3242.
Hunk #3 FAILED at 3401.
Hunk #4 FAILED at 3424.
Hunk #5 FAILED at 3455.
5 out of 5 hunks FAILED — saving rejects to file src/wl/sys/wl_linux.c.rej
It has been a few years since I’ve touched this patch-set, I assume it is now out of date with upstream.
sir am using bcm43142 wireless card, in kali its not detecting wireless card plz send me step by step to solve it…..
Thank you……
Guys i cannt see and i cannt intall wifi drivers in bcm43142
I need even more idiot-proof help.
Have lubuntu on an old Samsung notebook.
lspci -vvnn | grep -A 9 Network
05:00.0 Network controller [0280]: Broadcom Limited BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)
Subsystem: Askey Computer Corp. BCM4313 802.11bgn Wireless Network Adapter [144f:7179]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <tabort- SERR- <perr- intx-="" latency:="" 0,="" cache="" line="" size:="" 32="" bytes="" interrupt:="" pin="" a="" routed="" to="" irq="" 16="" region="" 0:="" memory="" at="" f0100000="" (64-bit,="" non-prefetchable)="" [size="16K]" capabilities:=""
Kernel driver in use: bcma-pci-bridge
Kernel modules: bcma
With wifi enabled I can tether to my phone and get online, but if I choose any other wifi (the place I’m currently staying has a 2.4 and 5Gb wifi that doesn’t need a password – one of my phones sees both and connects straight to the 5Gb – the other only sees the 2Gb) and doesn’t connect
I downloaded the 32 bit driver to the lubuntu machine (so had hybrid-v35-nodebug-pcoem-6_30_223_271.tar.gz in download)
The instructions say
Extract the sources:
cd ~/Downloads; mkdir -p wl; cd wl; tar xf ../hybrid-*.tar.gz
Didn’t understand, but extracted the .gz file (with directory structure) into a wl folder off download.
downloaded broadcom-sta_4_kernel-2.6.38.patch into the same folder.
The next instruction was
Patch and compile the sources:
patch -p2 < ~/Downloads/wl_3.10.patch; make; sudo make install; sudo depmod; sudo modprobe wl
didn't understand, but entered:
/Downloads/wl$ patch -p2 < broadcom-sta_4_kernel-2.6.38.patch
and got:
can't find file to patch at input line 3
Perhaps you used the wrong -p or –strip option?
The text leading up to this was:
————————–
|— wl/src/wl/sys/wl_linux.c 2010-12-15 03:01:09.000000000 +0100
|+++ temp/src/wl/sys/wl_linux.c 2011-03-04 11:02:12.754753700 +0100
————————–
File to patch:
Struggling…