Difference between revisions of "Broadcom wireless"

From ArchWiki
Jump to: navigation, search
(Wi-Fi card does not work/show up since kernel upgrade (brcmsmac): updated templates; updated Note box to include Linux kernel 3.1 because it suffers from the same problem; slight revision to heading name)
(new templates, rm gaps, see Help:Style)
Line 4: Line 4:
 
== Introduction ==
 
== 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 ({{Codeline|brcm4xxx}}, {{Codeline|b43}}, etc.). The reverse-engineered [http://wireless.kernel.org/en/users/Drivers/b43 {{Codeline|b43}}] drivers have been in the kernel since 2.6.24.
+
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 ({{ic|brcm4xxx}}, {{ic|b43}}, etc.). The reverse-engineered [http://wireless.kernel.org/en/users/Drivers/b43 {{ic|b43}}] drivers have been in the kernel since 2.6.24.
  
 
In August 2008, Broadcom released the [http://www.broadcom.com/support/802.11/linux_sta.php 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 August 2008, Broadcom released the [http://www.broadcom.com/support/802.11/linux_sta.php 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 [http://thread.gmane.org/gmane.linux.kernel.wireless.general/55418 finally released] fully open source drivers for its hardware. This driver, [http://wireless.kernel.org/en/users/Drivers/brcm80211 {{Codeline|brcm80211}}], has been included into the kernel since 2.6.37. With the release of 2.6.39, these drivers have been renamed to {{Codeline|brcmsmac}} and {{Codeline|brcmfmac}}.
+
In September 2010, Broadcom [http://thread.gmane.org/gmane.linux.kernel.wireless.general/55418 finally released] fully open source drivers for its hardware. This driver, [http://wireless.kernel.org/en/users/Drivers/brcm80211 {{ic|brcm80211}}], has been included into the kernel since 2.6.37. With the release of 2.6.39, these drivers have been renamed to {{ic|brcmsmac}} and {{ic|brcmfmac}}.
  
 
At the time of writing, there are three choices for users with Broadcom Wi-Fi chipsets:
 
At the time of writing, there are three choices for users with Broadcom Wi-Fi chipsets:
  
* {{Codeline|brcmsmac}}/{{Codeline|brcmfmac}}
+
* {{ic|brcmsmac}}/{{ic|brcmfmac}}
* {{Codeline|b43}}
+
* {{ic|b43}}
* {{Codeline|broadcom-wl}}
+
* {{ic|broadcom-wl}}
  
 
== Determine which driver you need/can use ==
 
== Determine which driver you need/can use ==
Line 21: Line 21:
 
  $ lspci -vnn | grep 14e4
 
  $ lspci -vnn | grep 14e4
  
If your card is in the following list, you can use the [[#brcmsmac.2Fbrcmfmac|{{Codeline|brcmsmac}} driver]]:
+
If your card is in the following list, you can use the [[#brcmsmac.2Fbrcmfmac|{{ic|brcmsmac}} driver]]:
 
{| border="1"
 
{| border="1"
 
! PCI-ID !! Name
 
! PCI-ID !! Name
 
|-
 
|-
| {{Codeline|[14e4:4727]}} || BCM4313
+
| {{ic|[14e4:4727]}} || BCM4313
 
|-
 
|-
| {{Codeline|[14e4:4353]}} || BCM43224  
+
| {{ic|[14e4:4353]}} || BCM43224  
 
|-
 
|-
| {{Codeline|[14e4:4357]}} || BCM43225
+
| {{ic|[14e4:4357]}} || BCM43225
 
|}
 
|}
If your card is in the following list, you can use the [[#brcmsmac.2Fbrcmfmac|{{Codeline|brcmfmac}} SDIO driver]]:
+
If your card is in the following list, you can use the [[#brcmsmac.2Fbrcmfmac|{{ic|brcmfmac}} SDIO driver]]:
 
{| border="1"
 
{| border="1"
 
! Name
 
! Name
Line 39: Line 39:
 
A more up-to-date list may be found [http://linuxwireless.org/en/users/Drivers/brcm80211 here].
 
A more up-to-date list may be found [http://linuxwireless.org/en/users/Drivers/brcm80211 here].
  
 
+
If your card is not in the above lists, you need to use the older {{ic|b43}} or {{ic|b43legacy}} driver, wich supports following devices.
If your card is not in the above lists, you need to use the older {{Codeline|b43}} or {{Codeline|b43legacy}} driver, wich supports following devices.
+
 
{| border="1"
 
{| border="1"
 
! PCI-ID !! Name !! Notes
 
! PCI-ID !! Name !! Notes
 
|-
 
|-
| {{Codeline|[14e4:4301]}} || BCM4301 || legacy-only
+
| {{ic|[14e4:4301]}} || BCM4301 || legacy-only
 
|-
 
|-
| {{Codeline|[14e4:4306]}} || BCM4306 || ?legacy
+
| {{ic|[14e4:4306]}} || BCM4306 || ?legacy
 
|-
 
|-
| {{Codeline|[14e4:4307]}} || BCM4306 ||
+
| {{ic|[14e4:4307]}} || BCM4306 ||
 
|-
 
|-
| {{Codeline|[14e4:4311]}} || BCM4311 ||
+
| {{ic|[14e4:4311]}} || BCM4311 ||
 
|-
 
|-
| {{Codeline|[14e4:4312]}} || BCM4311 ||
+
| {{ic|[14e4:4312]}} || BCM4311 ||
 
|-
 
|-
| {{Codeline|[14e4:4313]}} || BCM4311 ||
+
| {{ic|[14e4:4313]}} || BCM4311 ||
 
|-
 
|-
| {{Codeline|[14e4:4315]}} || BCM4312 || Not in kernel26-lts
+
| {{ic|[14e4:4315]}} || BCM4312 || Not in kernel26-lts
 
|-
 
|-
| {{Codeline|[14e4:4318]}} || BCM4318 ||
+
| {{ic|[14e4:4318]}} || BCM4318 ||
 
|-
 
|-
| {{Codeline|[14e4:4319]}} || BCM4318 ||
+
| {{ic|[14e4:4319]}} || BCM4318 ||
 
|-
 
|-
| {{Codeline|[14e4:4320]}} || BCM4306 || ?legacy
+
| {{ic|[14e4:4320]}} || BCM4306 || ?legacy
 
|-
 
|-
| {{Codeline|[14e4:4321]}} || BCM4321 || Not in kernel26-lts
+
| {{ic|[14e4:4321]}} || BCM4321 || Not in kernel26-lts
 
|-
 
|-
| {{Codeline|[14e4:4324]}} || BCM4306 || legacy-only
+
| {{ic|[14e4:4324]}} || BCM4306 || legacy-only
 
|-
 
|-
| {{Codeline|[14e4:4325]}} || BCM4306 || legacy-only
+
| {{ic|[14e4:4325]}} || BCM4306 || legacy-only
 
|-
 
|-
| {{Codeline|[14e4:4328]}} || BCM4321 || Not in kernel26-lts
+
| {{ic|[14e4:4328]}} || BCM4321 || Not in kernel26-lts
 
|-
 
|-
| {{Codeline|[14e4:4329]}} || BCM4321 || Not in kernel26-lts
+
| {{ic|[14e4:4329]}} || BCM4321 || Not in kernel26-lts
 
|-
 
|-
| {{Codeline|[14e4:432a]}} || BCM4321 ||
+
| {{ic|[14e4:432a]}} || BCM4321 ||
 
|-
 
|-
| {{Codeline|[14e4:432b]}} || BCM4322 || Not in kernel26-lts
+
| {{ic|[14e4:432b]}} || BCM4322 || Not in kernel26-lts
 
|-
 
|-
| {{Codeline|[14e4:432c]}} || BCM4322 ||
+
| {{ic|[14e4:432c]}} || BCM4322 ||
 
|-
 
|-
| {{Codeline|[14e4:432d]}} || BCM4322 ||
+
| {{ic|[14e4:432d]}} || BCM4322 ||
 
|-
 
|-
| {{Codeline|[14e4:4358]}} || BCM43227 ||
+
| {{ic|[14e4:4358]}} || BCM43227 ||
 
|-
 
|-
| {{Codeline|[14e4:4359]}} || BCM43228 ||
+
| {{ic|[14e4:4359]}} || BCM43228 ||
 
|}
 
|}
 
?legacy means that there are devices with same PCI-IDs, but with differend hardware awaiable.
 
?legacy means that there are devices with same PCI-IDs, but with differend hardware awaiable.
Some of these work with the {{Codeline|b43}} driver, but some might need {{Codeline|b43legacy}} driver.
+
Some of these work with the {{ic|b43}} driver, but some might need {{ic|b43legacy}} driver.
legacy-only means that you need to use the {{Codeline|b43legacy}} driver.
+
legacy-only means that you need to use the {{ic|b43legacy}} driver.
  
 
A more up-to-date list may be found [http://linuxwireless.org/en/users/Drivers/b43 here].
 
A more up-to-date list may be found [http://linuxwireless.org/en/users/Drivers/b43 here].
  
 
+
If your card is in the following list, you can use the [[#broadcom-wl|{{ic|broadcom-wl}} driver]]:
If your card is in the following list, you can use the [[#broadcom-wl|{{Codeline|broadcom-wl}} driver]]:
+
 
{| border="1"
 
{| border="1"
 
! PCI-ID !! Name
 
! PCI-ID !! Name
 
|-
 
|-
| {{Codeline|[14e4:4311]}} || BCM4311
+
| {{ic|[14e4:4311]}} || BCM4311
 
|-
 
|-
| {{Codeline|[14e4:4312]}} || BCM4311
+
| {{ic|[14e4:4312]}} || BCM4311
 
|-
 
|-
| {{Codeline|[14e4:4313]}} || BCM4311
+
| {{ic|[14e4:4313]}} || BCM4311
 
|-
 
|-
| {{Codeline|[14e4:4315]}} || BCM4312
+
| {{ic|[14e4:4315]}} || BCM4312
 
|-
 
|-
| {{Codeline|[14e4:4727]}} || BCM4313
+
| {{ic|[14e4:4727]}} || BCM4313
 
|-
 
|-
| {{Codeline|[14e4:4328]}} || BCM4321
+
| {{ic|[14e4:4328]}} || BCM4321
 
|-
 
|-
| {{Codeline|[14e4:4329]}} || BCM4321
+
| {{ic|[14e4:4329]}} || BCM4321
 
|-
 
|-
| {{Codeline|[14e4:432a]}} || BCM4321
+
| {{ic|[14e4:432a]}} || BCM4321
 
|-
 
|-
| {{Codeline|[14e4:432b]}} || BCM4322
+
| {{ic|[14e4:432b]}} || BCM4322
 
|-
 
|-
| {{Codeline|[14e4:432c]}} || BCM4322
+
| {{ic|[14e4:432c]}} || BCM4322
 
|-
 
|-
| {{Codeline|[14e4:432d]}} || BCM4322
+
| {{ic|[14e4:432d]}} || BCM4322
 
|-
 
|-
| {{Codeline|[14e4:4353]}} || BCM43224
+
| {{ic|[14e4:4353]}} || BCM43224
 
|-
 
|-
| {{Codeline|[14e4:4357]}} || BCM43225
+
| {{ic|[14e4:4357]}} || BCM43225
 
|-
 
|-
| {{Codeline|[14e4:4358]}} || BCM43227
+
| {{ic|[14e4:4358]}} || BCM43227
 
|-
 
|-
| {{Codeline|[14e4:4359]}} || BCM43228
+
| {{ic|[14e4:4359]}} || BCM43228
 
|}
 
|}
 
A more up-to-date list may be found [http://www.broadcom.com/docs/linux_sta/README.txt here].
 
A more up-to-date list may be found [http://www.broadcom.com/docs/linux_sta/README.txt here].
 
  
 
== Getting the driver ==
 
== Getting the driver ==
  
 
=== brcmsmac/brcmfmac ===
 
=== brcmsmac/brcmfmac ===
The {{Codeline|brcm80211}} drivers have been included in the kernel since 2.6.37. Since the release of 2.6.39, they have been renamed to {{Codeline|brcmsmac}} (for PCI cards) and {{Codeline|brcmfmac}} (for SDIO).
+
The {{ic|brcm80211}} drivers have been included in the kernel since 2.6.37. Since the release of 2.6.39, they have been renamed to {{ic|brcmsmac}} (for PCI cards) and {{ic|brcmfmac}} (for SDIO).
  
 
These drivers should be automatically loaded during startup and no further action should be required of the user.
 
These drivers should be automatically loaded during startup and no further action should be required of the user.
  
{{Note|The {{Codeline|bcma}} module can prevent some cards from showing up and may need to be [[#Wi-Fi_card_does_not_work.2Fshow_up_since_kernel_upgrade_.28brcmsmac.29|blacklisted]].}}
+
{{Note|The {{ic|bcma}} module can prevent some cards from showing up and may need to be [[#Wi-Fi_card_does_not_work.2Fshow_up_since_kernel_upgrade_.28brcmsmac.29|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.}}
 
{{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 ===
 
The drivers are included in the kernel since 2.6.24.
 
The drivers are included in the kernel since 2.6.24.
 
  
 
==== Loading the b43/b43legacy kernel module ====
 
==== Loading the b43/b43legacy kernel module ====
Verify which module you need by looking up your device [http://wireless.kernel.org/en/users/Drivers/b43#Known_PCI_devices here]. You can also check by computer model [http://linuxwireless.org/en/users/Drivers/b43/devices here]. Blacklist the other module (either {{Codeline|b43}} or {{Codeline|b43legacy}}) to prevent possible problems/confusion. For instructions, see [[Kernel_modules#Blacklisting]].
+
Verify which module you need by looking up your device [http://wireless.kernel.org/en/users/Drivers/b43#Known_PCI_devices here]. You can also check by computer model [http://linuxwireless.org/en/users/Drivers/b43/devices here]. Blacklist the other module (either {{ic|b43}} or {{ic|b43legacy}}) to prevent possible problems/confusion. For instructions, see [[Kernel_modules#Blacklisting]].
  
Install the appropriate {{Package AUR|b43-firmware}} or {{Package AUR|b43-firmware-legacy}} package from the [[AUR]].
+
Install the appropriate {{AUR|b43-firmware}} or {{AUR|b43-firmware-legacy}} package from the [[AUR]].
  
 
You can now configure your device.
 
You can now configure your device.
 
  
 
=== broadcom-wl ===
 
=== 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.}}
 
{{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 {{Codeline|broadcom-wl}} driver, there is a PKGBUILD available in the AUR ({{Package AUR|broadcom-wl}}). You can also download this driver directly from [http://www.broadcom.com/support/802.11/linux_sta.php Broadcom]. However, the PKGBUILD method is strongly encouraged, as that way will have [[pacman]] track all of the files.
+
For users of the {{ic|broadcom-wl}} driver, there is a PKGBUILD available in the AUR ({{AUR|broadcom-wl}}). You can also download this driver directly from [http://www.broadcom.com/support/802.11/linux_sta.php Broadcom]. However, the PKGBUILD method is strongly encouraged, as that way will have [[pacman]] track all of the files.
 
+
  
 
==== Loading the wl kernel module ====
 
==== Loading the wl kernel module ====
The {{Codeline|wl}} module may need to be manually loaded if there are other usable modules present. Before loading the {{Codeline|wl}} module, remove the {{Codeline|b43}} or other module that may have been automatically loaded instead:
+
The {{ic|wl}} module may need to be manually loaded if there are other usable modules present. Before loading the {{ic|wl}} module, remove the {{ic|b43}} or other module that may have been automatically loaded instead:
 
  # rmmod b43
 
  # rmmod b43
  
Also unload {{Codeline|ssb}}, if loaded:
+
Also unload {{ic|ssb}}, if loaded:
 
  # rmmod ssb
 
  # rmmod ssb
  
{{Note|Failure to unload {{Codeline|ssb}} may result in the wireless interface not being created.}}
+
{{Note|Failure to unload {{ic|ssb}} may result in the wireless interface not being created.}}
  
Load the {{Codeline|wl}} module
+
Load the {{ic|wl}} module
 
  # modprobe wl
 
  # modprobe wl
  
The {{Codeline|wl}} module should automatically load {{Codeline|lib80211}} or {{Codeline|lib80211_crypt_tkip}}. Check with {{Codeline|lsmod}} to see if this is the case. If not, you may need to add one of those two modules as well.
+
The {{ic|wl}} module should automatically load {{ic|lib80211}} or {{ic|lib80211_crypt_tkip}}. Check with {{ic|lsmod}} to see if this is the case. If not, you may need to add one of those two modules as well.
 
  # modprobe lib80211
 
  # modprobe lib80211
  
Line 180: Line 173:
 
  # depmod -a
 
  # depmod -a
  
To make the module load at boot, add {{Codeline|wl}} (and {{Codeline|lib80211}}/{{Codeline|lib80211_crypt_tkip}}, if needed) to your MODULES array in {{Filename|/etc/rc.conf}}.
+
To make the module load at boot, add {{ic|wl}} (and {{ic|lib80211}}/{{ic|lib80211_crypt_tkip}}, if needed) to your MODULES array in {{ic|/etc/rc.conf}}.
 
  MODULES=(... wl...)
 
  MODULES=(... wl...)
  
You can also blacklist other modules (to prevent them from interfering) in {{Filename|/etc/modprobe.d/modprobe.conf}}. To blacklist a module just append a new line with the syntax {{Codeline|blacklist <module name>}}:
+
You can also blacklist other modules (to prevent them from interfering) in {{ic|/etc/modprobe.d/modprobe.conf}}. To blacklist a module just append a new line with the syntax {{ic|blacklist <module name>}}:
 
  blacklist b43
 
  blacklist b43
 
  blacklist ssb
 
  blacklist ssb
  
{{Warning|Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] does not work with blacklisting {{Codeline|b43}} and {{Codeline|ssb}}.}}
+
{{Warning|Broadcom Corporation BCM4311 802.11b/g WLAN [14e4:4311] does not work with blacklisting {{ic|b43}} and {{ic|ssb}}.}}
  
 
== Troubleshooting ==
 
== Troubleshooting ==
Line 196: Line 189:
 
=== Wi-Fi card does not work when resuming from suspend (brcm80211) ===
 
=== Wi-Fi card does not work when resuming from suspend (brcm80211) ===
 
{{Note|This issue only affects Linux kernels 2.6.38 and earlier.}}
 
{{Note|This issue only affects Linux kernels 2.6.38 and earlier.}}
The {{Codeline|brcm80211}} module needs to be unloaded before suspend and reloaded upon resume, otherwise Wi-Fi will not come back up. This is printed by {{Codeline|dmesg}}:
+
The {{ic|brcm80211}} module needs to be unloaded before suspend and reloaded upon resume, otherwise Wi-Fi will not come back up. This is printed by {{ic|dmesg}}:
 
  wlc_coreinit: ucode did not self-suspend!
 
  wlc_coreinit: ucode did not self-suspend!
 
  wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
 
  wlc_suspend_mac_and_wait: waited 83000 uS and MI_MACSSPNDD is still not on.
 
  psmdebug 0x000f8773, phydebug 0x00000000, psm_brc 0x0000
 
  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 {{Filename|modules}} or {{Filename|config}} in {{Filename|/etc/pm/config.d/}} and add/modify the following line:
+
The [[pm-utils]] page explains how to do this. If the file does not already exist, create a file called {{ic|modules}} or {{ic|config}} in {{ic|/etc/pm/config.d/}} and add/modify the following line:
 
  SUSPEND_MODULES="brcm80211"
 
  SUSPEND_MODULES="brcm80211"
  
Line 208: Line 201:
 
An alternative procedure:
 
An alternative procedure:
  
1. Create the new file {{Filename|/etc/pm/sleep.d/brcm.sh}}
+
1. Create the new file {{ic|/etc/pm/sleep.d/brcm.sh}}
  
 
2. Insert this code and save:
 
2. Insert this code and save:
Line 232: Line 225:
 
3. Make it executable:
 
3. Make it executable:
 
  chmod +x /etc/pm/sleep.d/brcm.sh
 
  chmod +x /etc/pm/sleep.d/brcm.sh
 
  
 
=== Wi-Fi card does not work/show up (broadcom-wl) ===
 
=== Wi-Fi card does not work/show up (broadcom-wl) ===
Check if you are loading the correct modules. You may need to blacklist the {{Codeline|brcm80211}}, {{Codeline|b43}}, and {{Codeline|ssb}} kernel modules to prevent them from loading automatically. For instructions, see [[Kernel_modules#Blacklisting]].
+
Check if you are loading the correct modules. You may need to blacklist the {{ic|brcm80211}}, {{ic|b43}}, and {{ic|ssb}} kernel modules to prevent them from loading automatically. For instructions, see [[Kernel_modules#Blacklisting]].
  
{{Note|You may not have to blacklist the {{Codeline|brcm80211}} driver; although as of 2011-06-20, it will still default to loading the {{Codeline|brcm80211}} module before the {{Codeline|wl}} driver, which prevents {{Codeline|wl}} from being used.}}
+
{{Note|You may not have to blacklist the {{ic|brcm80211}} driver; although as of 2011-06-20, it will still default to loading the {{ic|brcm80211}} module before the {{ic|wl}} driver, which prevents {{ic|wl}} from being used.}}
  
 
Check if you updated your module dependencies:
 
Check if you updated your module dependencies:
 
  # depmod -a
 
  # depmod -a
  
* Verify that your wireless interface(s) appear using {{Codeline|ip addr}}.
+
* Verify that your wireless interface(s) appear using {{ic|ip addr}}.
* You may need to restart your machine to see the device appear in {{Codeline|iwconfig}} or {{Codeline|ip addr}}.
+
* You may need to restart your machine to see the device appear in {{ic|iwconfig}} or {{ic|ip addr}}.
* If you have recently upgraded your kernel, you need to rebuild the {{Codeline|broadcom-wl}} package with the new kernel installed to update the module.
+
* If you have recently upgraded your kernel, you need to rebuild the {{ic|broadcom-wl}} package with the new kernel installed to update the module.
 
+
  
 
=== Interfaces swapped (broadcom-wl) ===
 
=== Interfaces swapped (broadcom-wl) ===
Users of the {{Codeline|broadcom-wl}} driver may find their Ethernet and Wi-Fi interfaces have been swapped. The [http://wiki.archlinux.org/index.php/Udev#Mixed_Up_Devices.2C_Sound.2FNetwork_Cards_Changing_Order_Each_Boot udev] page explains how to resolve this. Create a file named {{Filename|/etc/udev/rules.d/10-network.rules}} and bind the MAC address of each of your cards to a certain interface name:
+
Users of the {{ic|broadcom-wl}} driver may find their Ethernet and Wi-Fi interfaces have been swapped. The [http://wiki.archlinux.org/index.php/Udev#Mixed_Up_Devices.2C_Sound.2FNetwork_Cards_Changing_Order_Each_Boot udev] page explains how to resolve this. Create a file named {{ic|/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}=="aa:bb:cc:dd:ee:ff", NAME="eth0"
 
  SUBSYSTEM=="net", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="eth1"
 
  SUBSYSTEM=="net", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="eth1"
  
Ensure that the interface name appears correctly in {{Filename|/etc/rc.conf}} and other configuration files that refer to it.
+
Ensure that the interface name appears correctly in {{ic|/etc/rc.conf}} and other configuration files that refer to it.
 
+
  
 
=== Miscellaneous user notes ===
 
=== 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 {{Codeline|b43}}, I can load the {{Codeline|wl}} driver, but no wireless card shows up. However, if I first remove the {{Codeline|b44}} (and {{Codeline|ssb}}) driver for my Ethernet card, and ''then'' load the {{Codeline|wl}} driver, I get a wireless device using the name ''eth0''. Afterwards, I can load {{Codeline|b44}} again, to have an Ethernet ''eth1'' device.
+
* In my Dell Inspiron Laptop, I have a Broadcom BCM4401 Ethernet card and a Broadcom BCM4328 wireless card. If I just remove {{ic|b43}}, I can load the {{ic|wl}} driver, but no wireless card shows up. However, if I first remove the {{ic|b44}} (and {{ic|ssb}}) driver for my Ethernet card, and ''then'' load the {{ic|wl}} driver, I get a wireless device using the name ''eth0''. Afterwards, I can load {{ic|b44}} again, to have an Ethernet ''eth1'' device.
  
 
* I could not get the BCM4313 chip on a Lenovo B560 to work before following these steps:
 
* 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.
 
*# "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 {{Codeline|acer_wmi}} module. For testing, you can add the following to the kernel line in GRUB: {{Codeline|acer_wmi.disable<nowiki>=</nowiki>1}}
+
*# Blacklist the {{ic|acer_wmi}} module. For testing, you can add the following to the kernel line in GRUB: {{ic|acer_wmi.disable<nowiki>=</nowiki>1}}
  
* I have found that to get the {{Codeline|wl}} drivers working for the Broadcom 4313 chip, you need to blacklist {{Codeline|brcm80211}} along with {{Codeline|b43}} and {{Codeline|ssb}}.
+
* I have found that to get the {{ic|wl}} drivers working for the Broadcom 4313 chip, you need to blacklist {{ic|brcm80211}} along with {{ic|b43}} and {{ic|ssb}}.
  
* 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) {{Codeline|iwconfig wlan0 power off}} to {{Filename|/etc/rc.local}} and create an empty file {{Filename|/etc/pm/power.d/wireless}}. 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.
+
* 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) {{ic|iwconfig wlan0 power off}} to {{ic|/etc/rc.local}} and create an empty file {{ic|/etc/pm/power.d/wireless}}. 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.

Revision as of 09:37, 15 November 2011

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 (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 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, brcm80211, has been included into the kernel since 2.6.37. With the release of 2.6.39, these drivers have been renamed to brcmsmac and brcmfmac.

At the time of writing, there are three choices for users with Broadcom Wi-Fi chipsets:

  • brcmsmac/brcmfmac
  • b43
  • broadcom-wl

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 driver:

PCI-ID Name
[14e4:4727] BCM4313
[14e4:4353] BCM43224
[14e4:4357] BCM43225

If your card is in the following list, you can use the brcmfmac 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 b43 or b43legacy driver, wich supports following devices.

PCI-ID Name Notes
[14e4:4301] BCM4301 legacy-only
[14e4:4306] BCM4306  ?legacy
[14e4:4307] BCM4306
[14e4:4311] BCM4311
[14e4:4312] BCM4311
[14e4:4313] BCM4311
[14e4:4315] BCM4312 Not in kernel26-lts
[14e4:4318] BCM4318
[14e4:4319] BCM4318
[14e4:4320] BCM4306  ?legacy
[14e4:4321] BCM4321 Not in kernel26-lts
[14e4:4324] BCM4306 legacy-only
[14e4:4325] BCM4306 legacy-only
[14e4:4328] BCM4321 Not in kernel26-lts
[14e4:4329] BCM4321 Not in kernel26-lts
[14e4:432a] BCM4321
[14e4:432b] BCM4322 Not in kernel26-lts
[14e4:432c] BCM4322
[14e4:432d] BCM4322
[14e4:4358] BCM43227
[14e4:4359] BCM43228

?legacy means that there are devices with same PCI-IDs, but with differend hardware awaiable. Some of these work with the b43 driver, but some might need b43legacy driver. legacy-only means that you need to use the b43legacy 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 driver:

PCI-ID Name
[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.

Getting the driver

brcmsmac/brcmfmac

The brcm80211 drivers have been included in the kernel since 2.6.37. Since the release of 2.6.39, they have been renamed to brcmsmac (for PCI cards) and brcmfmac (for SDIO).

These drivers should be automatically loaded during startup and no further action should be required of the user.

Note: The bcma 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/PCI-E chips with ssb backplane.

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.

Install the appropriate b43-firmwareAUR or b43-firmware-legacyAUR 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 broadcom-wl driver, there is a PKGBUILD available in the AUR (broadcom-wlAUR). 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 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, add wl (and lib80211/lib80211_crypt_tkip, if needed) to your MODULES array in /etc/rc.conf.

MODULES=(... wl...)

You can also blacklist other modules (to prevent them from interfering) in /etc/modprobe.d/modprobe.conf. To blacklist a module just append a new line with the syntax blacklist <module name>:

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

Troubleshooting

Wi-Fi card does not work or show up since kernel upgrade (brcmsmac)

Note: This affects Linux kernels 3.0 and 3.1.

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)

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

The brcm80211 module needs to be unloaded before suspend and reloaded upon resume, otherwise Wi-Fi will not come back up. This is printed by dmesg:

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 modules or config in /etc/pm/config.d/ and add/modify the following line:

SUSPEND_MODULES="brcm80211"

Now, the card should resume working correctly.

An alternative procedure:

1. Create the new file /etc/pm/sleep.d/brcm.sh

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 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. The udev page explains how to resolve this. Create a file named /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"

Ensure that the interface name appears correctly in /etc/rc.conf 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 b43, I can load the wl driver, but no wireless card shows up. However, if I first remove the b44 (and ssb) driver for my Ethernet card, and then load the wl driver, I get a wireless device using the name eth0. Afterwards, I can load b44 again, to have an Ethernet eth1 device.
  • 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 acer_wmi module. For testing, you can add the following to the kernel line in GRUB: acer_wmi.disable=1
  • I have found that to get the wl drivers working for the Broadcom 4313 chip, you need to blacklist brcm80211 along with b43 and ssb.
  • 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) iwconfig wlan0 power off to /etc/rc.local and create an empty file /etc/pm/power.d/wireless. 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.