Broadcom wireless (简体中文)

Tango-preferences-desktop-locale.png本页面需要更新翻译,内容可能已经与英文脱节。要贡献翻译,请访问简体中文翻译组Tango-preferences-desktop-locale.png

附注: please use the first argument of the template to provide more detailed indications.

介绍

博通对于其Wifi卡在 GNU/Linux 上的支持不好可谓是臭名昭著。直到最近,大部分的博通芯片要么是完全不被支持,或者需要用户自行修改内核。一组有限的无线芯片由不同的逆向工程提供支持(比如:brcm4xxx, b43。从 Kernel 2.6.24 开始,这些逆向工程 b43 的驱动已经被收录。

2008年8月,博通发布了GNU/ Linux上的 802.11 Linux STA 驱动r 正式为其无线设备提供 GNU/Linux 支持。这些驱动是闭源的, 但博通承诺,在未来将以一种更加开放的方式提供支持。此外,它们不具有隐藏 ESSID 的功能。

在2010年9月,博通完全开源的硬件驱动[1]。该驱动程序 brcm80211已被列入到自2.6.37之后的内核中。随着2.6.39发布,这些驱动程序已被重新命名为 brcmsmac brcmfmac


在写这篇文章时,使用博通芯片组的用户有以下三种选择:

Driver Description
brcmsmac/brcmfmac 开源内核驱动
b43 逆向工程内核驱动
broadcom-wl 专有的 Broadcom STA 驱动

查看你可以使用何种驱动

首先,向你的终端输入以下内容来检测网卡的 PCI-ID:

$ lspci -vnn | grep 14e4:

然后在以下列表中检查 [2] 以及 [3].

获取驱动

brcmsmac/brcmfmac(brcm80211)

brcm80211 驱动自内核2.6.37起包含于内核中. 并且于内核2.6.39起,他们被重命名为brcmsmac (针对PCI卡) 以及 brcmfmac (针对 SDIO).

这些驱动应该会在启动时自行加载,如果不奏效,可以尝试以下命令

# modprobe brcmsmac

# modprobe brcmfmac

有时则可能是因为没有合适的固件,可以使用dmesg观察启动时可能的报错。

Note: The bcma module can prevent some cards from showing up and may need to be blacklisted[broken link: invalid section].
Note: Since linux 3.3.1 the brcmsmac driver depends on the bcma module and blacklisting is no longer required.
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.

加载多博通网卡的内核驱动模块

在我的戴尔 Inspiron笔记本上,拥有BCM4401有线网卡和BCM4328无线网卡。如果我仅仅是移除b43模块,我能加载wl无线驱动,但是没有无线网卡显示。然而,如果我先移除有线网卡的b44(和ssb)驱动模块,然后加载wl无线驱动,则会有一个eth0无线网卡设备出现。之后,再重新加载b44驱动,这样就同时能有一个eth1的有线网卡出现。

短文版:

  • Put "lib80211_crypt_tkip" and "wl" at the BEFORE b44 (if you have it) position in MODULES= 在 /etc/rc.conf 模块部分,b44(如果你需要这个驱动的话)之前加入lib80211_crypt_tkip wl
  • 不要忘记把 b43 模块加入黑名单
  • 您的无线网卡设备为eth0
  • 您的有线网卡设备为eth1
  • 两者能同是正常工作

故障排除

各种可以纠正的错误。

更新 Kernel 后设备无法访问

Since the 3.3.1 kernel the bcma module was introduced. If using a brcm80211 driver be sure it has not been blacklisted. If using a b43 driver be sure the it has been.

使用 broadcom-wl 驱动的设备不工作/不显示

Be sure the correct modules are blacklisted and occasionally it may be necessary to blacklist the brcm80211 drivers if accidentally detected before the wl driver is loaded. Furthermore, update the modules dependencies depmod -a, verify the wireless interface with ip addr, kernel upgrades will require an upgrade of the non-DKMS package.

使用 broadcom-wl 驱动时接口交换

使用 broadcom-wl 驱动也许会发现它们的以太网和 Wi-Fi 接口交换了。查看这里(device naming)的解决方案。

接口显示正常但是不能连接

Append the following kernel parameter:

b43.allhwsupport=1

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.

不能检测到设备 BCM43241

无论是 lspci 还是 lsusb 都不能检测到设备。这个问题目前无法解决。 请在解决后删除此节点。

在连接到某些路由器时可能不稳定

如果没有其他的解决方法,安装linux-lts,或者使用低版本的驱动