linux - 如何修复未在 CENTOS 上构建的 802.11 Linux STA broadcom 驱动程序?

标签 linux centos centos6 broadcom

我已经安装了 CENTOS 6.3。我的机器是 Dell Studio。我有以下无线 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 只能在这里分享他们的解决方案,让世界从中受益。

致博通, 我已经在堆栈溢出上发布了这个,因为每个人都可以利用它。目前,我无法在笔记本电脑上使用 WIFI。我坚持使用有线连接。请帮助我,以便我可以使用 WIFI。当什么都没有构建时,我在最新版本中尝试了以下操作。

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

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

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

建议,我可以跟进。

最佳答案

关键在这里: /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"));
}

虽然我运行的是带有 2.6.32 的 RHEL6.5,但它运行的是一个需要额外参数的 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 混淆了模块。

关于linux - 如何修复未在 CENTOS 上构建的 802.11 Linux STA broadcom 驱动程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19013337/

相关文章:

python - Venv 在 CentOS 中失败,确保 pip 丢失

git - 为什么我得到 Git fatal : index file smaller than expected error regularly?

php - 连接失败: 2002

linux - 可执行文件中的时间限制

linux - bash 脚本一次选择多种文件格式进行编码过程

linux - 专用 CoreNLP 服务器控制问题

centos - 如何使用rsync只复制特定的子目录(几个目录同名)

linux - CloudFormation如何导出变量

c++ - MacOS 创建一个处于挂起状态的进程

linux - Elasticsearch 可能无法在 CentOS 上启动