Broadcom wireless

From ArchWiki
Revision as of 04:57, 2 February 2011 by Karper (Talk | contribs) (Loading the wl kernel module)

Jump to: navigation, search

Introduction

Broadcom has been notorious in its support for its wifi cards on linux. Until recently, most Broadcom chips were entirely unsupported or required the user to tinker with firmware. A limited set of wireless chips were supported by various reverse-engineered drivers (brcm4xxx, b43 etc). The reverse engineered b43 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 linux. These are restrictively licensed drivers, but Broadcom promised to work towards a more open approach in the future. They do not work with hidden ESSID's.

In September 2010, Broadcom finally released fully open source drivers for its hardware. This driver, brcm80211 has been included into the kernel since 2.6.37.

At the time of writing, there are three choices for users with Broadcom wifi chips:

  • brcm80211
  • broadcom-wl
  • b43

Determine which driver you need/can use

First, let's 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 brcm80211 driver:

[14e4:4727]   BCM4313 
[14e4:4353]   BCM43224 
[14e4:4357]   BCM43225 

A more up-to-date list may be found here.

If your card is in the following list, you can use the broadcom-wl driver:

[14e4:4311]   BCM4311
[14e4:4312]   BCM4311
[14e4:4313]   BCM4311
[14e4:4315]   BCM4312
[14e4:4727]   BCM4313
[14e4:4328]   BCM4321
[14e4:4329]   BCM4321
[14e4:432a]   BCM4321
[14e4:432b]   BCM4322
[14e4:432c]   BCM4322
[14e4:432d]   BCM4322
[14e4:4353]   BCM43224
[14e4:4357]   BCM43225
[14e4:4358]   BCM43227
[14e4:4359]   BCM43228

A more up-to-date list may be found here.

If your card is not in the above lists, you may need to use the b43 or b43legacy drivers. A somewhat more complete list of supported hardware can be found here. Note that several cards are supported by more than one driver.

Getting the driver

brcm80211/b43/b43legacy

The brcm80211 driver and the b43/b43legacy drivers are already included in the kernel. No further action is necessary on the part of the user.

broadcom-wl

For users of the broadcom-wl driver, there is a PKGBUILD available in AUR. You can also download this driver directly from Broadcom. However, the PKGBUILD method is strongly encouraged, as that way, pacman will track all the files.

Loading the wl kernel module

The wl module needs to be manually loaded. Before doing so, remove b43 or any other module you may be using:

# rmmod b43

Load the wl module

# modprobe wl

The wl module should autoload lib80211 or lib80211_crypt_tkip. Check with lsmod to see if this is the case. If not, you may need to add that module 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 wl (and lib80211/lib80211_crypt_tkip, if needed) to your modules array in rc.conf:

MODULES=(... wl ...)

Troubleshooting

Interfaces swapped every time

This is a common problem with this driver. And the next process works for me with the BCM4312 following the udev post:

Create a file called /etc/udev/rules.d/10-network.rules 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"

Where:

  • NAME="eth0" is the name of the interface that you want, for example the same name "eth0". You can use other names, for example "lan0" for eth0 or "wlan0" for eth1.
  • To get the MAC address of each card, use this command: udevadm info -a -p /sys/class/net/<yourdevice> | grep address. Please, note that this is case sensitive and you must use lower-case.

But first you need know if eth0 isn't eth1 or vice versa, you can perform a scan: iwlist scan So if eth0 is really eth1 then the MAC of eth1 is that of eth0.

Don't forget to update your /etc/rc.conf and other config files using the old ethX notation!

Module wl does not work after a kernel upgrade

This is because the driver is compiled with the current kernel, you need recompile the driver with the new kernel for the module to function properly. Bear this in mind when doing kernel updates.

Device not showing up

Be sure of trying "ifconfig -a", "ifconfig" only shows interfaces that are active.

Here is one short script that helped me out, because I was loading modules incorrectly:

#!/bin/bash

rmmod b43 ssb wl lib80211_crypt_tkip lib80211

modprobe lib80211_crypt_tkip
modprobe wl

depmod -a

This helped me when sometimes I couldn't get the interface to show up. Else, I recommend adding the modules in rc.conf:

MODULES=([...] !b43 !ssb !lib80211 lib80211_crypt_tkip wl)

Worked for me in a Dell Latitude 2100 with Broadcom BCM5764M (eth) and BCM4312 (wifi). Also works in a HP Compaq 6715s with Broadcom BCM4311 (wifi).

Also works on the HP Mini 110-1020LA netbook using BCM4312 chipset.

The above did not work for me (Broadcom 4312 [14e4:4315]) however if I removed the exclamation mark infront of lib80211 then everything works fine.

Original b43, ssb, and lib80211 won't go away

If you've followed the Speed_Up_udev advice, you'll see that the modules you try to prevent loading with a ! will load anyway. That's because the steps on that page (and I missed this reading it the first time) will effectively bypass the MODULES=() line in Template:Filename.

Yeah, there's a section that explains what you need to do if you're blacklisting modules, but honestly I didn't notice any boot-time savings so I reverted to the original Template:Filename.