• 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



  • 相关阅读:
    jsoncpp使用
    java学习笔记12--国际化
    java学习笔记13--比较器(Comparable、Comparator)
    java学习笔记15--引用传递
    java学习笔记16--异常
    Java学习笔记——File类之文件管理和读写操作、下载图片
    java学习笔记3
    我的二十一天CoreJava 学习笔记
    大数据处理方面的 7 个开源搜索引擎
    GridView编辑删除操作
  • 原文地址:https://www.cnblogs.com/zhuangzebo/p/3158493.html
Copyright © 2020-2023  润新知