您的位置:首页 > 其它

记一次失败的尝试--ubuntu下把笔记本无线网卡的驱动替换掉

2014-05-13 14:42 495 查看
我的Ubuntu版本10.04

linux内核是3.0.66, 不是原装的 kernel,我自己编译优化过的

机子是联想Y400 i7

首先,为什么想去替换掉网卡的驱动呢?原因是原先装的驱动,连接上wifi之后,过一段时间就会自动断线,然后重连就不成功,即使成功,这个时候往往也会无法访问到网路,ping网关也不通。

因为已经装双系统,在win7下面是很好的,所以排除硬件问题,一定是软件驱动的问题。

然后网上搜索到说安装wl网卡驱动,替换brcmsmac可以解决这个问题,于是开始着手实验。

首先是用apt-get命令安装wl

sudo apt-get --reinstall install bcmwl-kernel-source


这个命令是用来查看你是否有相应的linux环境

4$ ls /lib/modules/3.0.66custom/build

arch config-3.5.7 debian include kernel modules.builtin REPORTING-BUGS System.map vmlinux

automake.sh config-3.5.7.old Documentation init lib modules.order samples tags vmlinux.o

automake.sh~ COPYING drivers ipc MAINTAINERS Module.symvers scripts tools

block CREDITS firmware Kbuild Makefile net security usr

config-3.5.0-23-generic crypto fs Kconfig mm README sound virt

我这里显示应该是正常的。

无线网卡是:

Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)

Subsystem: Broadcom Corporation Device 0609

Kernel driver in use: brcmsmac

Kernel modules: wl, bcma, brcmsmac

以上是用 lspci -k命令查看到的

然后用lsmod查看:

$ lsmod

Module Size Used by

brcmsmac 628806 0

brcmutil 17837 1 brcmsmac

mac80211 301906 1 brcmsmac

cfg80211 193238 2 brcmsmac,mac80211

crc_ccitt 12667 1 brcmsmac

arc4 12529 2

ieee802154 25468 0

lib80211 14991 0

bluetooth 100308 2

parport_pc 36784 0

ppdev 13008 0

目前用到的驱动模块是: brcmsmac

此时先卸载brcmsmac

$ sudo modprobe -r brcmsmac

成功后系统提示无线网络断开

然后插入wl

$ sudo modprobe wl

FATAL: Error inserting wl (/lib/modules/3.0.66custom/updates/dkms/wl.ko): Invalid argument

FATAL: Error running install command for wl

此时系统提示以上错误,查看dmesg:

[ 9208.546626] wl: no symbol version for cfg80211_scan_done

[ 9208.546628] wl: Unknown symbol cfg80211_scan_done (err -22)

[ 9208.546651] wl: no symbol version for cfg80211_disconnected

[ 9208.546652] wl: Unknown symbol cfg80211_disconnected (err -22)

[ 9208.546665] wl: no symbol version for wiphy_register

[ 9208.546666] wl: Unknown symbol wiphy_register (err -22)

[ 9208.546669] wl: no symbol version for wiphy_new

[ 9208.546670] wl: Unknown symbol wiphy_new (err -22)

[ 9208.546672] wl: no symbol version for cfg80211_put_bss

[ 9208.546674] wl: Unknown symbol cfg80211_put_bss (err -22)

[ 9208.546675] wl: no symbol version for cfg80211_roamed

[ 9208.546676] wl: Unknown symbol cfg80211_roamed (err -22)

[ 9208.546683] wl: no symbol version for lib80211_get_crypto_ops

[ 9208.546685] wl: Unknown symbol lib80211_get_crypto_ops (err -22)

[ 9208.546689] wl: no symbol version for cfg80211_ibss_joined

[ 9208.546691] wl: Unknown symbol cfg80211_ibss_joined (err -22)

[ 9208.546696] wl: no symbol version for cfg80211_michael_mic_failure

[ 9208.546697] wl: Unknown symbol cfg80211_michael_mic_failure (err -22)

[ 9208.546699] wl: no symbol version for cfg80211_connect_result

[ 9208.546701] wl: Unknown symbol cfg80211_connect_result (err -22)

[ 9208.546709] wl: no symbol version for wiphy_unregister

[ 9208.546710] wl: Unknown symbol wiphy_unregister (err -22)

[ 9208.546738] wl: no symbol version for cfg80211_get_bss

[ 9208.546741] wl: Unknown symbol cfg80211_get_bss (err -22)

[ 9208.546747] wl: no symbol version for __ieee80211_get_channel

[ 9208.546750] wl: Unknown symbol __ieee80211_get_channel (err -22)

[ 9208.546764] wl: no symbol version for ieee80211_channel_to_frequency

[ 9208.546766] wl: Unknown symbol ieee80211_channel_to_frequency (err -22)

[ 9208.546774] wl: no symbol version for cfg80211_inform_bss_frame

[ 9208.546776] wl: Unknown symbol cfg80211_inform_bss_frame (err -22)

[ 9208.546779] wl: no symbol version for ieee80211_frequency_to_channel

[ 9208.546782] wl: Unknown symbol ieee80211_frequency_to_channel (err -22)

[ 9208.546789] wl: no symbol version for wiphy_free

[ 9208.546791] wl: Unknown symbol wiphy_free (err -22)

从上面的信息可以看到,

wl.ko里面引用的一些外部函数找不到,包括cfg_xxxx, ieee80211_xxxx, wiphy_xxxx这几个库,为什么会这样呢?我暂时没有找到原因,我相信如果搞清楚这个原因,就可以解决问题了。

我在网上搜索,发现有人说是要把代码放到某个目录下面去编译,才可以引用得到,也许是这个原因。

重新加载brcmsmac, dmesg是这样的:

[ 8990.324012] wlan0: no IPv6 routers present

[ 9000.618439] ieee80211 phy0: wl_ops_bss_info_changed: qos enabled: false (implement)

[ 9000.618455] ieee80211 phy0: brcmsmac: wl_ops_bss_info_changed: disassociated

[ 9000.618464] ieee80211 phy0: wl_ops_bss_info_changed: arp filtering: enabled false, count 1 (implement)

[ 9002.538362] cfg80211: All devices are disconnected, going to restore regulatory settings

[ 9002.538371] cfg80211: Restoring regulatory settings

[ 9002.538380] cfg80211: Calling CRDA to update world regulatory domain

[ 9002.544625] cfg80211: Updating information on frequency 2412 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544632] cfg80211: 2402000 KHz - 2472000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544637] cfg80211: Updating information on frequency 2417 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544641] cfg80211: 2402000 KHz - 2472000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544644] cfg80211: Updating information on frequency 2422 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544648] cfg80211: 2402000 KHz - 2472000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544651] cfg80211: Updating information on frequency 2427 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544655] cfg80211: 2402000 KHz - 2472000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544659] cfg80211: Updating information on frequency 2432 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544663] cfg80211: 2402000 KHz - 2472000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544666] cfg80211: Updating information on frequency 2437 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544670] cfg80211: 2402000 KHz - 2472000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544673] cfg80211: Updating information on frequency 2442 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544677] cfg80211: 2402000 KHz - 2472000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544680] cfg80211: Updating information on frequency 2447 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544684] cfg80211: 2402000 KHz - 2472000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544688] cfg80211: Updating information on frequency 2452 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544692] cfg80211: 2402000 KHz - 2472000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544695] cfg80211: Updating information on frequency 2457 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544699] cfg80211: 2402000 KHz - 2472000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544702] cfg80211: Updating information on frequency 2462 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544706] cfg80211: 2402000 KHz - 2472000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544710] cfg80211: Updating information on frequency 2467 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544713] cfg80211: 2457000 KHz - 2482000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544717] cfg80211: Updating information on frequency 2472 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544721] cfg80211: 2457000 KHz - 2482000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544724] cfg80211: Updating information on frequency 2484 MHz for a 20 MHz width channel with regulatory rule:

[ 9002.544728] cfg80211: 2474000 KHz - 2494000 KHz @ KHz), (300 mBi, 2000 mBm)

[ 9002.544733] cfg80211: World regulatory domain updated:

[ 9002.544735] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)

[ 9002.544739] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

[ 9002.544743] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)

[ 9002.544747] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)

[ 9002.544750] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

[ 9002.544754] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

[ 9003.779116] wlan0: authenticate with 30:46:9a:85:f2:aa (try 1)

[ 9003.783053] wlan0: authenticated

[ 9003.783373] wlan0: associate with 30:46:9a:85:f2:aa (try 1)

[ 9003.806602] wlan0: RX ReassocResp from 30:46:9a:85:f2:aa (capab=0x411 status=0 aid=4)

[ 9003.806608] wlan0: associated

[ 9003.807245] ieee80211 phy0: wl_ops_bss_info_changed: qos enabled: true (implement)

[ 9003.807261] ieee80211 phy0: brcmsmac: wl_ops_bss_info_changed: associated

[ 9003.807283] ieee80211 phy0: wl_ops_bss_info_changed: arp filtering: enabled true, count 1 (implement)

卸载brcmsmac

[ 9129.048142] wlan0: deauthenticating from 30:46:9a:85:f2:aa by local choice (reason=3)

[ 9143.593612] cfg80211: All devices are disconnected, going to restore regulatory settings

[ 9143.593620] cfg80211: Restoring regulatory settings

[ 9143.593628] cfg80211: Calling CRDA to update world regulatory domain

[ 9143.657522] cfg80211: World regulatory domain updated:

[ 9143.657529] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)

[ 9143.657536] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

[ 9143.657545] brcmsmac 0000:03:00.0: PCI INT A disabled

[ 9143.657553] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)

[ 9143.657559] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)

[ 9143.657565] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

[ 9143.657572] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

先整理这么多,以后如果成功了再更新吧。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: