Broadcom wireless

From ArchWiki
Revision as of 23:45, 12 October 2011 by Code m (Talk | contribs) (brcmsmac/brcmfmac)

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

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.

Note: The Template:Codeline module can prevent some cards from showing up and may need to be blacklisted.
Note: Wireless.Kernel.org states that brcm80211 does not support older PCI/PCIe chips with ssb backplane

b43/b43legacy

The drivers are included in the kernel since 2.6.24.

Loading the Template:Codeline/Template:Codeline 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

Warning: This driver is more likely to cause problems than to resolve them. Most of the problems reported by users on Broadcom chips are caused by this driver. Using this is HIGHLY NOT recommended. Before you even think of trying out this one, make sure to try the other drivers first.

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 Template:Codeline 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
Note: Failure to unload Template:Codeline may result in the wireless interface not being created.

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
Warning: Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] does not work with blacklisting Template:Codeline and Template:Codeline.

Troubleshooting

Wi-Fi card does not work/show up since kernel upgrade (Template:Codeline)

Note: This affects Linux kernel 3.0.

This is caused by the kernel using the Template:Codeline module instead of the Template:Codeline module. The solution is to blacklist the Template:Codeline module. For instructions, see Kernel_modules#Blacklisting.

Wi-Fi card does not work when resuming from suspend (Template:Codeline)

Note: This issue only affects Linux kernels 2.6.38 and earlier.

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 (Template:Codeline)

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.

Note: You may not have to blacklist the Template:Codeline driver; although as of 2011-06-20, it will still default to loading the Template:Codeline module before the Template:Codeline driver, which prevents Template:Codeline from being used.

Check if you updated your module dependencies:

# depmod -a

Interfaces swapped (Template:Codeline)

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

  • I could not get the BCM4313 chip on a Lenovo B560 to work before following these steps:
    1. "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.
    2. Blacklist the Template:Codeline module. For testing, you can add the following to the kernel line in GRUB: 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.