Broadcom wireless: Difference between revisions

From ArchWiki
(→‎Getting the driver: Rename section to installation.)
(→‎brcmsmac/brcmfmac: Rename section to general name brcm80211 and touch-ups.)
Line 32: Line 32:
== Installation ==
== Installation ==


=== brcmsmac/brcmfmac ===
=== brcm80211 ===
The {{ic|brcm80211}} drivers are included in the kernel. They are named {{ic|brcmsmac}} for PCI cards and {{ic|brcmfmac}} for SDIO devices.


These drivers should be automatically loaded during start-up and no further action should be required of the user. If the driver does not load automatically, simply [[Kernel modules#Loading|load]] it manually.
Included in the kernel, the open source drivers are named '''brcmsmac''' for PCI backends and '''brcmfmac''' for SDIO/USB backends. Upon boot they should be detected and the driver [[Kernel_modules#Loading loaded]].
 
{{Note|1=Since {{pkg|linux}}>=3.3.1, the {{ic|brcmsmac}} driver depends on the {{ic|bcma}} module; therefore, make sure the {{ic|bcma}} module is not [[Kernel_modules#Blacklisting|blacklisted]].}}
 
{{Note|[http://wireless.kernel.org/en/users/Drivers/brcm80211 wireless.kernel.org] states that brcm80211 does not support older PCI/PCI-E chips with SSB backplane.}}


=== b43/b43legacy ===
=== b43/b43legacy ===

Revision as of 18:02, 23 February 2015

zh-CN:Broadcom wireless This article details how to install and setup a Broadcom wireless network device.

History

Broadcom has a noted history with its support for Wi-Fi devices regarding GNU/Linux. For a good portion of its initial history, Broadcom devices were either entirely unsupported or required the user to tinker with the firmware. The limited set of wireless devices that were supported were done so by a reverse-engineered driver. The reverse-engineered b43 driver was introduced in the 2.6.24 kernel.

In August 2008, Broadcom released the 802.11 Linux STA driver officially supporting Broadcom wireless devices on GNU/Linux. This is a restrictively licensed driver and it does not work with hidden ESSIDs, but Broadcom promised to work towards a more open approach in the future.

In September 2010, Broadcom released a fully open source driver. The brcm80211 driver was introduced in the 2.6.37 kernel and in the 2.6.39 kernel it was sub-divided into the brcmsmac and brcmfmac drivers.

The types of available drivers are:

Driver Description
brcm80211 Kernel driver open-source version
b43 Kernel driver reverse-engineered version
broadcom-wl Broadcom driver restricted-license

Driver selection

To know what driver(s) are operable on the computer's Broadcom wireless network device, the device ID and chipset name will need to be detected. Cross-reference them with the driver list of supported brcm80211 and b43 devices.

$ lspci -vnn | grep 14e4:

Installation

brcm80211

Included in the kernel, the open source drivers are named brcmsmac for PCI backends and brcmfmac for SDIO/USB backends. Upon boot they should be detected and the driver Kernel_modules#Loading loaded.

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 b43 or b43legacy) to prevent possible problems/confusion. For instructions, see Kernel_modules#Blacklisting.

This article or section needs expansion.

Reason:
  • The official repository package contains b43-fwcutter which is supported but not mentioned below yet.
    • How does it relate to the external scripts and/or the AUR packages listed?
    • Can it be used to replace the manual download explained below?
  • Discussion: b43 firmware & fwcutter (Discuss in Talk:Broadcom wireless)

Install the appropriate b43-firmwareAUR or b43-firmware-legacyAUR package from the AUR.

If you have a low-power version of a b43-supported device, you will need to install special firmware. A quick way to check whether you have a low-power chip is by running lspci | grep Broadcom | grep LP-PHY. You can install it by downloading the appropriate package and using b43-fwcutter as outlined below, or by using this installation script.

To install the LP-PHY firmware, perform the following:

curl -LO http://downloads.openwrt.org/sources/broadcom-wl-4.178.10.4.tar.bz2
tar xjf broadcom-wl-4.178.10.4.tar.bz2
cd broadcom-wl-4.178.10.4/linux
b43-fwcutter -w /lib/firmware wl_apsta.o

After installing the firwmare, you can now configure your device.

Note: If the b43 module appears to be loaded and functional but the device is inaccessible, you may need to blacklist the bcma module. See Section 4.1.

broadcom-wl

Warning: Even though this driver has matured a lot throughout the years and works quite well now, its usage is recommended only when neither of the two open-source drivers support your device. Please refer to project b43's page for list of supported devices.

For users of the broadcom-wl driver, there are packages available in the AUR named broadcom-wlAUR, or, for those who prefer to use DKMS, broadcom-wl-dkmsAUR.

Loading the wl kernel module

The wl module may need to be manually loaded if there are other usable modules present. Before loading the wl module, remove the b43 or other module that may have been automatically loaded instead:

# rmmod b43

Also unload ssb, if loaded:

# rmmod ssb
Note: Failure to unload ssb may result in the wireless interface not being created.

Load the wl module

# modprobe wl

The wl module should automatically load lib80211 or lib80211_crypt_tkip. Check with lsmod 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, refer to Kernel modules.

You can also blacklist other modules (to prevent them from interfering) in /etc/modprobe.d/modprobe.conf. To blacklist a module, refer to Kernel modules#Blacklisting.

Note: Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] does not work with blacklisting b43 and ssb.

Troubleshooting

Wi-Fi card does not seem to even exist

This article or section needs expansion.

Reason: no solution provided (Discuss in Talk:Broadcom wireless)

Some users with newer cards like the Broadcom BCM43241 will experience an issue where lspci or lsusb will not show any trace of the card. A solution to this will be posted when found.

Wi-Fi card does not work or show up after 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.

Note: This affects only Linux kernels 3.0, 3.1, and 3.2. Since kernel 3.3, the brcmsmac module actually uses bcma, so bcma needs to be unblacklisted or the Wi-Fi interface will not appear.

Wi-Fi card does not work/show up (broadcom-wl)

Check if you are loading the correct modules. You may need to blacklist the brcm80211, b43, and ssb kernel modules to prevent them from loading automatically. For instructions, see Kernel_modules#Blacklisting.

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

Check if you updated your module dependencies:

# depmod -a
  • Verify that your wireless interface(s) appear using ip addr.
  • You may need to restart your machine to see the device appear in iwconfig or ip addr.
  • If you have recently upgraded your kernel, you need to rebuild the broadcom-wl package with the new kernel installed to update the module.

Interfaces swapped (broadcom-wl)

Users of the broadcom-wl driver may find their Ethernet and Wi-Fi interfaces have been swapped. See Network configuration#Device_names for solution.

Suppressing console messages

You may continuously get some verbose and annoying messages during the boot, similar to

phy0: brcms_ops_bss_info_changed: arp filtering: enabled true, count 0 (implement)
phy0: brcms_ops_bss_info_changed: qos enabled: false (implement)
phy0: brcms_ops_bss_info_changed: arp filtering: enabled true, count 1 (implement)
enabled, active

To disable those messages, increase the loglevel of printk messages that get through to the console.

Create a file in /etc/sysctl.d/ called printk.conf or something similar:

printk.conf

kernel.printk = 3 3 3 3

Refere to StackExchange thread for an explanation of this variable.

Interface is showing but does not allow connections

Append the following to your kernel command line:

b43.allhwsupport=1

Miscellaneous user notes

See Talk:Broadcom wireless.