Broadcom wireless
Contents
Introduction
Broadcom has been notorious in its support for its Wi-Fi cards on GNU/Linux. Until recently, most Broadcom chips were either entirely unsupported or required the user to tinker with firmware. A limited set of wireless chips were supported by various reverse-engineered drivers (Template:Codeline, Template:Codeline, etc.). The reverse-engineered Template:Codeline drivers have been in the kernel since 2.6.24.
In August 2008, Broadcom released the 802.11 Linux STA driver officially supporting Broadcom wireless hardware on GNU/Linux. These are restrictively licensed drivers, but Broadcom promised to work towards a more open approach in the future. Further, they do not work with hidden ESSIDs.
In September 2010, Broadcom finally released fully open source drivers for its hardware. This driver, Template:Codeline, has been included into the kernel since 2.6.37. With the release of 2.6.39, these drivers have been renamed to Template:Codeline and Template:Codeline.
At the time of writing, there are three choices for users with Broadcom Wi-Fi chipsets:
Determine which driver you need/can use
First, determine your card's PCI-ID. Type the following (case-sensitive) command into a console:
$ lspci -vnn | grep 14e4
If your card is in the following list, you can use the [[#brcmsmac.2Fbrcmfmac|Template:Codeline driver]]:
PCI-ID | Name |
---|---|
Template:Codeline | BCM4313 |
Template:Codeline | BCM43224 |
Template:Codeline | BCM43225 |
If your card is in the following list, you can use the [[#brcmsmac.2Fbrcmfmac|Template:Codeline SDIO driver]]:
Name |
---|
BCM4329 |
A more up-to-date list may be found here.
If your card is not in the above lists, you need to use the older Template:Codeline or Template:Codeline driver, wich supports following devices.
PCI-ID | Name | Notes |
---|---|---|
Template:Codeline | BCM4301 | legacy-only |
Template:Codeline | BCM4306 | ?legacy |
Template:Codeline | BCM4306 | |
Template:Codeline | BCM4311 | |
Template:Codeline | BCM4311 | |
Template:Codeline | BCM4311 | |
Template:Codeline | BCM4312 | Not in kernel26-lts |
Template:Codeline | BCM4318 | |
Template:Codeline | BCM4318 | |
Template:Codeline | BCM4306 | ?legacy |
Template:Codeline | BCM4321 | Not in kernel26-lts |
Template:Codeline | BCM4306 | legacy-only |
Template:Codeline | BCM4306 | legacy-only |
Template:Codeline | BCM4321 | Not in kernel26-lts |
Template:Codeline | BCM4321 | Not in kernel26-lts |
Template:Codeline | BCM4321 | |
Template:Codeline | BCM4322 | Not in kernel26-lts |
Template:Codeline | BCM4322 | |
Template:Codeline | BCM4322 | |
Template:Codeline | BCM43227 | |
Template:Codeline | BCM43228 |
?legacy means that there are devices with same PCI-IDs, but with differend hardware awaiable. Some of these work with the Template:Codeline driver, but some might need Template:Codeline driver. legacy-only means that you need to use the Template:Codeline driver.
A more up-to-date list may be found here.
If your card is in the following list, you can use the [[#broadcom-wl|Template:Codeline driver]]:
PCI-ID | Name |
---|---|
Template:Codeline | BCM4311 |
Template:Codeline | BCM4311 |
Template:Codeline | BCM4311 |
Template:Codeline | BCM4312 |
Template:Codeline | BCM4313 |
Template:Codeline | BCM4321 |
Template:Codeline | BCM4321 |
Template:Codeline | BCM4321 |
Template:Codeline | BCM4322 |
Template:Codeline | BCM4322 |
Template:Codeline | BCM4322 |
Template:Codeline | BCM43224 |
Template:Codeline | BCM43225 |
Template:Codeline | BCM43227 |
Template:Codeline | BCM43228 |
A more up-to-date list may be found here.
Getting the driver
brcmsmac/brcmfmac
The Template:Codeline drivers have been included in the kernel since 2.6.37. Since the release of 2.6.39, they have been renamed to Template:Codeline (for PCI cards) and Template:Codeline (for SDIO).
These drivers should be automatically loaded during startup and no further action should be required of the user.
b43/b43legacy
The drivers are included in the kernel since 2.6.24.
Loading the b43/b43legacy kernel module
Verify which module you need by looking up your device here. You can also check by computer model here. Blacklist the other module (either Template:Codeline or Template:Codeline) to prevent possible problems/confusion. For instructions, see Kernel_modules#Blacklisting.
Install the appropriate Template:Package AUR or Template:Package AUR package from the AUR.
You can now configure your device.
broadcom-wl
For users of the Template:Codeline driver, there is a PKGBUILD available in the AUR (Template:Package AUR). You can also download this driver directly from Broadcom. However, the PKGBUILD method is strongly encouraged, as that way will have pacman track all of the files.
Loading the wl kernel module
The Template:Codeline module may need to be manually loaded if there are other usable modules present. Before loading the Template:Codeline module, remove the Template:Codeline or other module that may have been automatically loaded instead:
# rmmod b43
Also unload Template:Codeline, if loaded:
# rmmod ssb
Load the Template:Codeline module
# modprobe wl
The Template:Codeline module should automatically load Template:Codeline or Template:Codeline. Check with Template:Codeline to see if this is the case. If not, you may need to add one of those two modules as well.
# modprobe lib80211
or
# modprobe lib80211_crypt_tkip
If you installed the driver directly from Broadcom, you may also need to update the dependencies:
# depmod -a
To make the module load at boot, add Template:Codeline (and Template:Codeline/Template:Codeline, if needed) to your MODULES array in Template:Filename.
MODULES=(... wl...)
You can also blacklist other modules (to prevent them from interfering) in Template:Filename. To blacklist a module just append a new line with the syntax Template:Codeline:
blacklist b43 blacklist ssb
Troubleshooting
Wi-Fi card does not work or show up since kernel upgrade (brcmsmac)
This is caused by the kernel using the bcma
module instead of the brcmsmac
module. The solution is to blacklist the bcma
module. For instructions, see Kernel_modules#Blacklisting.
Wi-Fi card does not work when resuming from suspend (brcm80211)
The Template:Codeline module needs to be unloaded before suspend and reloaded upon resume, otherwise Wi-Fi will not come back up. This is printed by Template:Codeline:
wlc_coreinit: ucode did not self-suspend! wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on. psmdebug 0x000f8773, phydebug 0x00000000, psm_brc 0x0000
The pm-utils page explains how to do this. If the file does not already exist, create a file called Template:Filename or Template:Filename in Template:Filename and add/modify the following line:
SUSPEND_MODULES="brcm80211"
Now, the card should resume working correctly.
An alternative procedure:
1. Create the new file Template:Filename
2. Insert this code and save:
#!/bin/bash # Simple Bash script to fix resume from suspend issues... # Place this script in /etc/pm/sleep.d/ # then chmod +x /etc/pm/sleep.d/brcm.sh case $1 in hibernate) /sbin/modprobe -r brcm80211 ;; suspend) /sbin/modprobe -r brcm80211 ;; resume) /sbin/modprobe brcm80211 ;; thaw) /sbin/modprobe brcm80211 ;; esac
3. Make it executable:
chmod +x /etc/pm/sleep.d/brcm.sh
Wi-Fi card does not work/show up (broadcom-wl)
Check if you are loading the correct modules. You may need to blacklist the Template:Codeline, Template:Codeline, and Template:Codeline kernel modules to prevent them from loading automatically. For instructions, see Kernel_modules#Blacklisting.
Check if you updated your module dependencies:
# depmod -a
- Verify that your wireless interface(s) appear using Template:Codeline.
- You may need to restart your machine to see the device appear in Template:Codeline or Template:Codeline.
- If you have recently upgraded your kernel, you need to rebuild the Template:Codeline package with the new kernel installed to update the module.
Interfaces swapped (broadcom-wl)
Users of the Template:Codeline driver may find their Ethernet and Wi-Fi interfaces have been swapped. The udev page explains how to resolve this. Create a file named Template:Filename and bind the MAC address of each of your cards to a certain interface name:
SUBSYSTEM=="net", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="eth0" SUBSYSTEM=="net", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="eth1"
Ensure that the interface name appears correctly in Template:Filename and other configuration files that refer to it.
Miscellaneous user notes
- In my Dell Inspiron Laptop, I have a Broadcom BCM4401 Ethernet card and a Broadcom BCM4328 wireless card. If I just remove Template:Codeline, I can load the Template:Codeline driver, but no wireless card shows up. However, if I first remove the Template:Codeline (and Template:Codeline) driver for my Ethernet card, and then load the Template:Codeline driver, I get a wireless device using the name eth0. Afterwards, I can load Template:Codeline again, to have an Ethernet eth1 device.
- I could not get the BCM4313 chip on a Lenovo B560 to work before following these steps:
- "Load defaults" in the BIOS. After that, the wireless was working under MS Windows. There are not many options in there, so I do not know what the reset may have changed, but it did the trick.
- Blacklist the Template:Codeline module. For testing, you can add the following to the kernel line in GRUB: Template:Codeline
- I have found that to get the Template:Codeline drivers working for the Broadcom 4313 chip, you need to blacklist Template:Codeline along with Template:Codeline and Template:Codeline.
- If you notice slow wireless speeds when your laptop/netbook is not connected to AC power, you may need to disable Wi-Fi power management by adding the following line (assuming wlan0 is your wireless device) Template:Codeline to Template:Filename and create an empty file Template:Filename. In case you also experience interface swapping (discussed above), you might want to add another line for the second interface name as well. The command will have no effect on the wired interface.