我安装了CENTOS 6.3。我的机器是戴尔Studio。我有以下无线广播模型。
[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正常工作。当什么都没有建成时,我尝试了以下最新版本。
这会检测可用的wifi网络,但无法连接到AP。看起来这需要无线扩展工具。
我需要为它安装任何东西。或者您说,不要使用已弃用的构建规则,而是修复构建错误?你的建议是什么?
建议,我可以继续。
答案 0 :(得分:3)
关键在这里: /home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2122:错误:函数'cfg80211_roamed'的参数太少
如果你检查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,这会让模块感到困惑。
答案 1 :(得分:1)
我上周在朋友的CentOS 6.4 Acer笔记本电脑(BCM 43227 WiFi)上遇到了同样的问题。 Broadcom驱动程序只能使用API = WEXT选项构建(否则,与您引用的错误消息相同),但它只适用于" open" WiFi网络,而不是WPA / WPA2(不了解WEP)。在/var/log/wpa_supplicant.log中,当我尝试连接到WPA网络时,我收到错误消息association request to the driver failed
,而NetworkManager只是一直要求输入密码。
除了直接编译Broadcom驱动程序外,我还尝试按ELRepo wl-kmod Howto(通过CentOS wiki)的建议构建RPM包,但也失败了(Broadcom文件名与RPM预期的不同)
本周末我再次查看了计算机,发现ELRepo Howto中链接的RPM文件已经更改,文档本身已于9月26日更新。所以我再次尝试使用较新的RPM,完全遵循instructions,这次它起作用了。有一个安装wl.ko内核模块的RPM文件。通过modprobe wl
加载它,之后NetworkManager发现我的WPA2 wifi并在第一次尝试连接。