zoukankan      html  css  js  c++  java
  • centos6.4 安装wireless驱动

    安装完centos6.4之后,目测只有有线的驱动,没有无线驱动。

    一、检测网卡

    [root@centos ~]# lspci | grep Net
    04:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)
    07:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5906M Fast Ethernet PCI Express (rev 02)

    第一个是无线网卡,第二个是有线网卡。无线网卡的卡号信息是

    BCM4312 802.11b/g

    二、按照网卡信息安装网卡

    由第一步的信息,在centos的一个wiki网站找到相应的安装信息

    http://wiki.centos.org/zh/HowTos/Laptops/Wireless?highlight=%284965%29#head-5fe2637a5fe5ea5c49fb1355597ff97ea107d10b

    不过要跳到“其他未被识别的网卡”这一选项

    再进入此链接

    http://wiki.centos.org/zh/HowTos/Laptops/Wireless/Broadcom?action=show

    如果按照以上信息都出现错误

    [root@centos hybrid-wl]# make
    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
    make[1]: Entering directory `/usr/src/kernels/2.6.32-358.11.1.el6.i686'
    CFG80211 API is prefered for this kernel version
    Using CFG80211 API
      CC [M]  /usr/local/src/hybrid-wl/src/shared/linux_osl.o
      CC [M]  /usr/local/src/hybrid-wl/src/wl/sys/wl_linux.o
      CC [M]  /usr/local/src/hybrid-wl/src/wl/sys/wl_iw.o
      CC [M]  /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.o
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:64: warning: ‘enum tx_power_setting’ declared inside parameter list
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:64: warning: its scope is only this definition or declaration, which is probably not what you want
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1110: warning: ‘enum tx_power_setting’ declared inside parameter list
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1110: error: parameter 2 (‘type’) has incomplete type
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c: In function ‘wl_cfg80211_set_tx_power’:
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1123: error: ‘TX_POWER_AUTOMATIC’ undeclared (first use in this function)
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1123: error: (Each undeclared identifier is reported only once
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1123: error: for each function it appears in.)
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1125: error: ‘TX_POWER_LIMITED’ undeclared (first use in this function)
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1131: error: ‘TX_POWER_FIXED’ undeclared (first use in this function)
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c: At top level:
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1649: warning: initialization from incompatible pointer type
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1651: warning: initialization from incompatible pointer type
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1652: warning: initialization from incompatible pointer type
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1653: warning: initialization from incompatible pointer type
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1654: warning: initialization from incompatible pointer type
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1658: warning: initialization from incompatible pointer type
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c: In function ‘wl_inform_single_bss’:
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:1817: error: too few arguments to function ‘ieee80211_channel_to_frequency’
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c: In function ‘wl_bss_roaming_done’:
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:2117: 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 *’
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:2117: 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’
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:2117: 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 *’
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:2117: 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’
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:2117: error: too few arguments to function ‘cfg80211_roamed’
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c: In function ‘wl_bss_connect_done’:
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:2149: 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 *’
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:2149: 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’
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:2149: 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 *’
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:2149: 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’
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.c:2149: error: too few arguments to function ‘cfg80211_roamed’
    make[2]: *** [/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211.o] Error 1
    make[1]: *** [_module_/usr/local/src/hybrid-wl] Error 2
    make[1]: Leaving directory `/usr/src/kernels/2.6.32-358.11.1.el6.i686'
    make: *** [all] Error 2

    那么编译方式可以改为

    make API=WEXT

    就这样编译完成。

    [root@centos hybrid-wl]# cp -rf wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/
    [root@centos hybrid-wl]# depmod
    [root@centos hybrid-wl]# modprobe wl
    安成啦!

    附:无线驱动下载地址http://www.broadcom.com/support/802.11/linux_sta.php
    要读README.txt,其中此处关键点
    This driver now supports the new linux cfg80211 wireless configuration API in
    addition to the older Wireless Extensions (Wext).  The makefile will
    automaticly build the right version for your system but it can be
    overridden if needed:
    
    # make API=WEXT
     or
    # make API=CFG80211



  • 相关阅读:
    [CSS] prefers-reduced-motion
    [VSCode] Adding Custom Syntax Highlighting to a Theme in VSCode
    Subversion/Git/ReviewBoard工作流程
    oracle hints
    Node.js学习(10)----文件系统fs
    网络子系统41_inet_peer平衡二叉树的删除
    由链表初始化看C语言的二级指针
    挣值管理不是搞数字游戏(4)——让挣值管理实用!
    关于数据库一致改关闭下redo日志文件丢失的处理办法的总结
    Android 操作系统的内存回收机制
  • 原文地址:https://www.cnblogs.com/zhuangzebo/p/3158493.html
Copyright © 2011-2022 走看看