1

我已经安装了 CENTOS 6.3。我的机器是戴尔工作室。我有以下无线 Broadcom 型号。

[root@treasure hybrid_wl]# lspci | grep -i wireless
03:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)

我从http://www.broadcom.com/support/802.11/linux_sta.php获得了这个驱动程序的源代码。

我的机器内核是

[root@treasure hybrid_wl]# uname -r
2.6.32-358.18.1.el6.x86_64

从http://www.broadcom.com/support/802.11/linux_sta.php构建软件包时。我收到以下错误。

KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/kernels/2.6.32-358.18.1.el6.x86_64'
CFG80211 API is prefered for this kernel version
Using CFG80211 API
  CC [M]  /home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.o
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:79: warning: ‘enum tx_power_setting’ declared inside parameter list
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:79: warning: its scope is only this definition or declaration, which is probably not what you want
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1092: warning: ‘enum tx_power_setting’ declared inside parameter list
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1092: error: parameter 2 (‘type’) has incomplete type
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_cfg80211_set_tx_power’:
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1103: error: ‘TX_POWER_AUTOMATIC’ undeclared (first use in this function)
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1103: error: (Each undeclared identifier is reported only once
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1103: error: for each function it appears in.)
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1105: error: ‘TX_POWER_LIMITED’ undeclared (first use in this function)
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1111: error: ‘TX_POWER_FIXED’ undeclared (first use in this function)
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c: At top level:
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1594: warning: initialization from incompatible pointer type
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1596: warning: initialization from incompatible pointer type
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1597: warning: initialization from incompatible pointer type
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1598: warning: initialization from incompatible pointer type
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1599: warning: initialization from incompatible pointer type
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_inform_single_bss’:
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:1764: error: too few arguments to function ‘ieee80211_channel_to_frequency’
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_bss_roaming_done’:
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2090: warning: passing argument 2 of ‘cfg80211_roamed’ from incompatible pointer type
include/net/cfg80211.h:3124: note: expected ‘struct ieee80211_channel *’ but argument is of type ‘u8 *’
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2090: warning: passing argument 4 of ‘cfg80211_roamed’ makes pointer from integer without a cast
include/net/cfg80211.h:3124: note: expected ‘const u8 *’ but argument is of type ‘s32’
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2090: warning: passing argument 5 of ‘cfg80211_roamed’ makes integer from pointer without a cast
include/net/cfg80211.h:3124: note: expected ‘size_t’ but argument is of type ‘u8 *’
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2090: warning: passing argument 6 of ‘cfg80211_roamed’ makes pointer from integer without a cast
include/net/cfg80211.h:3124: note: expected ‘const u8 *’ but argument is of type ‘s32’
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2090: error: too few arguments to function ‘cfg80211_roamed’
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_bss_connect_done’:
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2122: warning: passing argument 2 of ‘cfg80211_roamed’ from incompatible pointer type
include/net/cfg80211.h:3124: note: expected ‘struct ieee80211_channel *’ but argument is of type ‘u8 *’
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2122: warning: passing argument 4 of ‘cfg80211_roamed’ makes pointer from integer without a cast
include/net/cfg80211.h:3124: note: expected ‘const u8 *’ but argument is of type ‘s32’
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2122: warning: passing argument 5 of ‘cfg80211_roamed’ makes integer from pointer without a cast
include/net/cfg80211.h:3124: note: expected ‘size_t’ but argument is of type ‘u8 *’
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2122: warning: passing argument 6 of ‘cfg80211_roamed’ makes pointer from integer without a cast
include/net/cfg80211.h:3124: note: expected ‘const u8 *’ but argument is of type ‘s32’
/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2122: error: too few arguments to function ‘cfg80211_roamed’
make[2]: *** [/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.o] Error 1
make[1]: *** [_module_/home/joshis1/hybrid_wl] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.32-358.18.1.el6.x86_64'
make: *** [all] Error 2

我该如何解决这个问题?我错过了什么?我还更新了 Broadcom 支持组的电子邮件 ID,此处为 linux-wlan-client-support-list@broadcom.com。Broadcom 是一家领先的公司,我希望他们能在这里提供帮助。我也给他们发了电子邮件。Broadcom 只能在这里分享他们的解决方案,让全世界都能从中受益。

对于 Broadcom,我已将其发布在堆栈溢出上,因为每个人都可以从中受益。目前,我无法在笔记本电脑上使用 WIFI。我被有线连接卡住了。请帮助我,以便我可以让 WIFI 正常工作。当什么都没有构建时,我在最新版本中尝试了以下操作。

make API=WEXT (deprecated) ----> 我正在关注自述文件。

这会检测到可用的 wifi 网络,但无法连接到 AP。看起来这需要无线扩展工具。

做,我需要为它安装任何东西。还是说,不要使用已弃用的构建规则,而是修复构建错误?你对此有何建议?

建议,我可以跟进。

4

2 回答 2

3

关键在这里:/home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2122:错误:函数“cfg80211_roamed”的参数太少</p>

如果你检查 wl_cfg80211_hybrid.c ~line 2122

cfg80211_roamed(ndev,
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
                    NULL,
#endif
    (u8 *)&wl->bssid,  conn_info->req_ie, conn_info->req_ie_len,
    conn_info->resp_ie, conn_info->resp_ie_len,        GFP_KERNEL);
    WL_DBG(("roaming result\n"));
}

虽然我正在运行 RHEL6.5 和 2.6.32,但它运行的 net/cfg80211.h 版本需要额外的参数,所以我需要将行更改为: #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32)- 或者完全删除 if/endif。不幸的是,它并不止于此,如果 wl_cfg80211_hybrid.c 中有十几个 KERNEL_VERSION 需要更改。

一旦完成(您可以测试但运行'make'并返回并修复错误)它确实可以编译和安装。正如预期的那样,我现在正在使用 WPA 等运行它。似乎只是 RedHat 将一些 cfg80211 从更新的内核引入到 2.6.32 中,从而混淆了模块。

于 2013-12-05T21:41:47.830 回答
1

上周我在朋友的 CentOS 6.4 Acer 笔记本电脑(BCM 43227 WiFi)上遇到了完全相同的问题。Broadcom 驱动程序只能使用 API=WEXT 选项构建(否则,与您引用的错误消息相同),但它仅适用于“开放”WiFi 网络,而不适用于 WPA/WPA2(不了解 WEP)。在 /var/log/wpa_supplicant.log 中,我association request to the driver failed在尝试连接到 WPA 网络时收到错误消息,而 NetworkManager 只会不断询问密码。

除了直接编译 Broadcom 驱动程序外,我还尝试按照ELRepo wl-kmod Howto(通过CentOS wiki)的建议构建 RPM 包,但同样失败了(Broadcom 文件名与预期的 RPM 不同)。

这个周末我再次查看了计算机,并意识到 ELRepo Howto 中链接的 RPM 文件已更改,并且文档本身已于 9 月 26 日更新。所以我再次尝试使用较新的 RPM,完全按照说明进行操作,这次成功了。得到一个安装 wl.ko 内核模块的 RPM 文件。通过 加载它modprobe wl,之后 NetworkManager 找到我的 WPA2 wifi 并在第一次尝试时连接。

于 2013-09-30T08:35:21.517 回答