• Contos7 装bcm4312无线网卡驱动


    本次装网卡比较的无语,报错网上竟然找不到答案,误打误撞给装好了,做下记录以后可能会用的上。

    首先去官网下载网卡驱动:http://www.broadcom.com/support/802.11    

    我系统为64位的所以下载的是6.30.223.271  64_bit.

    把驱动解压到/usr/local/src/hybrid-wl

    [root@localhost modules]# mkdir -p /usr/local/src/hybrid-wl
    [root@localhost modules]# cd /usr/local/src/hybrid-wl
    [root@localhost hybrid-wl]# ls
    [root@localhost hybrid-wl]# tar xvfz /home/peng/文档/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz

    紧接着我  make了下  报错:

    [root@localhost hybrid-wl]# make
    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
    make[1]: 进入目录“/usr/src/kernels/3.10.0-229.14.1.el7.x86_64”
    CFG80211 API is prefered for this kernel version
    Using CFG80211 API
      LD      /usr/local/src/hybrid-wl/built-in.o
      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_hybrid.o
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1799:2: 警告:从不兼容的指针类型初始化 [默认启用]
      .get_station = wl_cfg80211_get_station,
      ^
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1799:2: 警告:(在‘wl_cfg80211_ops.get_station’的初始化附近) [默认启用]
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c: 在函数‘wl_alloc_wdev’中:
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1894:22: 错误:将‘struct wiphy_wowlan_support’赋值给‘const struct wiphy_wowlan_support *’时类型不兼容
      wdev->wiphy->wowlan = wl_wowlan_support;
                          ^
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c: 在函数‘wl_notify_connect_status’中:
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2124:4: 警告:传递‘cfg80211_ibss_joined’的第 3 个参数时将整数赋给指针,未作类型转换 [默认启用]
        cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
        ^
    In file included from /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:33:0:
    include/net/cfg80211.h:4002:6: 附注:需要类型‘struct ieee80211_channel *’,但实参的类型为‘unsigned intvoid cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,
          ^
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:2124:4: 错误:提供给函数‘cfg80211_ibss_joined’的实参太少
        cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
        ^
    In file included from /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:33:0:
    include/net/cfg80211.h:4002:6: 附注:在此声明
     void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,
          ^
    make[2]: *** [/usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.o] 错误 1
    make[1]: *** [_module_/usr/local/src/hybrid-wl] 错误 2
    make[1]: 离开目录“/usr/src/kernels/3.10.0-229.14.1.el7.x86_64”
    make: *** [all] 错误 2

    然后根据网上的解决办法把:http://tieba.baidu.com/p/3415973758

    把错误'cfg80211_ibass_joined'的实参太少给解决了。

    将/usr/local/src/hybrid-wl/sys/wl_cfg80211_hybrid.c查到

    cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);

    改为

    cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid,&wl->conf->channel, GFP_KERNEL);

    但是错误:将‘struct wiphy_wowlan_support’赋值给‘const struct wiphy_wowlan_support *’时类型不兼容
      wdev->wiphy->wowlan = wl_wowlan_support;
    没有找到解决的办法阿! 开发程序多年,对c语言也不是太了解,没办法
    硬着头皮去找到报错的地方,

    wdev->wiphy->wowlan = wl_wowlan_support;

    既然你不兼荣,那我给成空试试。

    wdev->wiphy->wowlan = NULL;

    保存,make一下:

    [root@localhost hybrid-wl]# make
    KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
    make[1]: 进入目录“/usr/src/kernels/3.10.0-229.14.1.el7.x86_64”
    CFG80211 API is prefered for this kernel version
    Using CFG80211 API
      CC [M]  /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.o
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1799:2: 警告:从不兼容的指针类型初始化 [默认启用]
      .get_station = wl_cfg80211_get_station,
      ^
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1799:2: 警告:(在‘wl_cfg80211_ops.get_station’的初始化附近) [默认启用]
    /usr/local/src/hybrid-wl/src/wl/sys/wl_cfg80211_hybrid.c:1828:36: 警告:‘wl_wowlan_support’定义后未使用 [-Wunused-variable]
     static struct wiphy_wowlan_support wl_wowlan_support = {
                                        ^
      LD [M]  /usr/local/src/hybrid-wl/wl.o
      Building modules, stage 2.
    CFG80211 API is prefered for this kernel version
    Using CFG80211 API
      MODPOST 1 modules
      CC      /usr/local/src/hybrid-wl/wl.mod.o
      LD [M]  /usr/local/src/hybrid-wl/wl.ko
    make[1]: 离开目录“/usr/src/kernels/3.10.0-229.14.1.el7.x86_64”

    竟然让我给弄成功了,顿时笑了  呵呵!

    然后:make install       没有报错,欣喜额

    然后根据Centos官网的教程  一路modprobe   大部分没有找到

    最后:modprobe wl 发现家里的wifi被找到了   连接上,写博客记录下。完成!

  • 相关阅读:
    asp.net常用的javascript经典例子
    Silverlight学习之——布局系统
    TreeView数据绑定方法
    软件测试:单元测试的一些疑问
    Silverlight学习之——Deep Zoom文件格式概述
    把生活节奏调整得慢一点
    20、Windows内核函数(1)Windows驱动开发详解笔记,字符串
    24、Windows派遣函数(2)Windows驱动开发详解笔记,直接读写方式
    21、Windows内核函数(2)Windows驱动开发详解笔记,文件操作
    27、Windows内核编程,IRP的同步(1)
  • 原文地址:https://www.cnblogs.com/b422/p/4925457.html
Copyright © 2020-2023  润新知