How do I install this patched b43 driver?

Recently I purchased a Macbook Pro that has a BCM4331 802.11a/b/g/n WiFi card that does not work with the default kernel.

  • sudo dmidecode -s system-product-name

    MacBookPro8,2

    lspci |grep 4331

    03:00.0 Network controller: Broadcom Corporation BCM4331 802.11a/b/g/n (rev 02)

    lspci -n |grep 4331

    03:00.0 0280: 14e4:4331 (rev 02)

After doing some initial research I came across this article that gave step by step instructions on patching the latest compat-wireless which should support the 4331 device:

However, following those instructions results in the following dmesg errors when I attempt to modprobe the patched module into the latest Ubuntu 11.10 kernel (3.0.0-12-generic)

[ 5373.408581] b43: Unknown symbol bcma_core_disable (err                                                              
[ 5373.408685] b43: Unknown symbol bcma_core_pll_ctl (err 0)
[ 5373.408695] b43: disagrees about version of symbol bcma_driver_unregister
[ 5373.408698] b43: Unknown symbol bcma_driver_unregister (err -22)
[ 5373.408712] b43: disagrees about version of symbol bcma_core_enable
[ 5373.408715] b43: Unknown symbol bcma_core_enable (err -22)
[ 5373.408727] b43: disagrees about version of symbol bcma_core_is_enabled
[ 5373.408730] b43: Unknown symbol bcma_core_is_enabled (err -22)
[ 5373.408745] b43: disagrees about version of symbol bcma_chipco_gpio_control
[ 5373.408747] b43: Unknown symbol bcma_chipco_gpio_control (err -22)
[ 5373.408782] b43: disagrees about version of symbol__bcma_driver_register
[ 5373.408784] b43: Unknown symbol __bcma_driver_register (err -22)
[ 5373.408796] b43: Unknown symbol bcma_core_set_clockmode (err 0)
[ 5373.408822] b43: Unknown symbol bcma_core_dma_translation (err 0)
[ 5373.408878] b43: Unknown symbol bcma_core_pci_irq_ctl (err 0)

Can anyone point me in the right direction to help get this module to load properly?


First make sure you don't have any b43 drivers install in your machine... use software center and search b43 if there are any uninstall it

  • compat-wireless: go to Linux Wireless and download compat-wireless-2.6.tar.bz2
  • the latest version of bw43-fwcutter (version 015)
  • Broadcom's proprietary driver to extract the firmware

all files can be stored in -home-youruser-downloads....

Extract with nautilus this tree files....

Next, enable the b43 driver.

$ cd compat-wireless-2011-11-04
$ scripts/driver-select b43

Make sure PHY_HT is enabled. In the file config.mk, the following line should be present and uncommented:

sudo nano config.mk

...

CONFIG_B43_PHY_HT=y

...

Compile and install the driver:

$ make
$ sudo make install
$ cd ..

compile b43-fwcutter:

$ cd b43-fwcutter-015
$ make

the firmware:

$ export FIRMWARE_INSTALL_DIR="/lib/firmware"
$ sudo ./b43-fwcutter -w "$FIRMWARE_INSTALL_DIR"  /home/YOURUSER/Downloads/broadcom-wl-5.100.138/linux/wl_apsta.o
$ cd ..

Unload all modules related to wireless and make sure ndiswrapper is not loaded:

$ cd compat-wireless-2011-11-04
$ sudo make wlunload
$ sudo rmmod ndiswrapper

add to line at the end of the file :

sudo nano /etc/modprobe.d/blacklist.conf

...

blacklist ndiswrapper

...

To be sure that none of the old modules are still loaded, it is probably best to reboot the system. Now you should be able to load and use the freshly compiled b43 module:

$ sudo modprobe b43

You might want to add b43 to the list of modules which are loaded on startup (at the moment, the module is not automatically loaded). For Ubuntu, add this line at the end of the file :

sudo nano /etc/modules

...

b43

...

The driver does not play nice with suspend and hibernate. It is necessary to unload the module before putting the laptop to sleep and to reload it after wakeup. For Ubuntu, it is sufficient to create the file (or append to the file)

sudo /etc/pm/config.d/default

...

SUSPEND_MODULES="b43"

...

NOTE: that after every kernel update you will have to recompile the module for the new kernel:

$ cd compat-wireless-2011-11-04
$ make clean
$ make
$ sudo make install

P.S : Is like the original post i only adapt extension of the configuration file because there are missing, fix other things and error....

enter image description here


Make sure to also blacklist ssb and bcma. Bcma causes problem with the 3.0.0 kernel. You might just have to blacklist the modules 'b43, ssb, bcma' then do a depmod -a and modprobe wl then another depmod -a or reinstall the package and reboot. I hope this helps.