首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何修复不基于CENTOS的802.11 Linux驱动程序?

如何修复不基于CENTOS的802.11 Linux驱动程序?
EN

Stack Overflow用户
提问于 2013-09-25 19:15:12
回答 2查看 8.8K关注 0票数 1

我已经安装了CENTOS 6.3。我的机器是戴尔工作室。我有下面的无线broadcom模型。

代码语言:javascript
复制
[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)

我从sta.php获得了这个驱动程序的源代码。

我的机器内核是

代码语言:javascript
复制
[root@treasure hybrid_wl]# uname -r
2.6.32-358.18.1.el6.x86_64

在从sta.php构建包时。我得到以下错误。

代码语言:javascript
复制
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 (弃用)

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

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

建议,我可以跟进。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-12-05 21:41:47

关键是: /home/joshis1/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.c:2122:错误:函数‘cfg80211_roamed’的参数太少

如果您检查wl_cfg80211_hybrid.c ~第2122行

代码语言:javascript
复制
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"));
}

虽然我使用2.6.32运行that 6.5,但它运行的是net/cfg80211.h版本,它需要额外的参数,所以我需要将行改为:#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) --或者完全删除if/endif。不幸的是,它并没有就此结束,如果是在需要更改的KERNEL_VERSION中,则大约有十几个wl_cfg80211_hybrid.c。

一旦完成(您可以测试,但运行'make‘,并返回和修复错误),它确实编译和安装良好。我现在用WPA运行它,等等。如预期的那样。似乎仅仅是RedHat将一些cfg80211从最近的内核引入到2.6.32中,这使模块感到困惑。

票数 4
EN

Stack Overflow用户

发布于 2013-09-30 08:35:21

上周,我朋友的CentOS 6.4宏碁笔记本电脑(BCM 43227 WiFi)也出现了同样的问题。Broadcom驱动程序只能使用API=WEXT选项构建(否则,与您引用的错误消息相同),但是它只在“开放”WiFi网络中工作,而不是WPA/WPA 2(不知道WEP)。在/var/log/ WPA _supplicant.log中,当试图连接到WPA网络时,我得到了错误消息association request to the driver failed,而NetworkManager只会继续询问密码。

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

这个周末,我再次看了看电脑,发现ELRepo中链接的RPM文件已经改变了,文档本身也在9月26日更新。因此,我再次尝试使用更新的RPM,完全遵循使用说明,这一次它起作用了。得到一个安装了wl.ko内核模块的RPM文件。通过modprobe wl加载它,在此之后,NetworkManager找到了我的WPA2 wifi,并在第一次尝试中连接。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19013337

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档