我需要为这台笔记本电脑安装任何可用的无线驱动程序,但是,重新安装与操作系统一起安装的 bcmwl-kernel-source 后,我得到了这个:
modprobe wl
FATAL: Error inserting wl (/lib/modules/3.5.0-25-generic/updates/dkms/wl.ko): Invalid argument
这个驱动程序以前可以工作,但我试图寻找一些替代方案,因为这个驱动程序是专有的并且不能与我想要安装的内核 3.8.1 一起使用(我正在使用 btrfs 文件系统,这个新内核修复了一些问题)。
所以我重启回官方内核 3.5.0,但我无法让这个驱动程序再次工作。现在每次我尝试使用 modprobe 加载它时,它都会返回此错误
dmesg:
[ 1966.302971] wl: disagrees about version of symbol cfg80211_scan_done
[ 1966.302983] wl: Unknown symbol cfg80211_scan_done (err -22)
[ 1966.303062] wl: disagrees about version of symbol cfg80211_disconnected
[ 1966.303067] wl: Unknown symbol cfg80211_disconnected (err -22)
[ 1966.303112] wl: disagrees about version of symbol wiphy_register
[ 1966.303116] wl: Unknown symbol wiphy_register (err -22)
[ 1966.303130] wl: disagrees about version of symbol wiphy_new
[ 1966.303134] wl: Unknown symbol wiphy_new (err -22)
[ 1966.303143] wl: disagrees about version of symbol cfg80211_put_bss
[ 1966.303147] wl: Unknown symbol cfg80211_put_bss (err -22)
[ 1966.303156] wl: disagrees about version of symbol cfg80211_roamed
[ 1966.303160] wl: Unknown symbol cfg80211_roamed (err -22)
[ 1966.303179] wl: disagrees about version of symbol lib80211_get_crypto_ops
[ 1966.303184] wl: Unknown symbol lib80211_get_crypto_ops (err -22)
[ 1966.303201] wl: disagrees about version of symbol cfg80211_ibss_joined
[ 1966.303205] wl: Unknown symbol cfg80211_ibss_joined (err -22)
[ 1966.303224] wl: disagrees about version of symbol cfg80211_michael_mic_failure
[ 1966.303228] wl: Unknown symbol cfg80211_michael_mic_failure (err -22)
[ 1966.303236] wl: disagrees about version of symbol cfg80211_connect_result
[ 1966.303240] wl: Unknown symbol cfg80211_connect_result (err -22)
[ 1966.303270] wl: disagrees about version of symbol wiphy_unregister
[ 1966.303274] wl: Unknown symbol wiphy_unregister (err -22)
[ 1966.303293] wl: disagrees about version of symbol cfg80211_get_bss
[ 1966.303297] wl: Unknown symbol cfg80211_get_bss (err -22)
[ 1966.303311] wl: disagrees about version of symbol __ieee80211_get_channel
[ 1966.303315] wl: Unknown symbol __ieee80211_get_channel (err -22)
[ 1966.303356] wl: disagrees about version of symbol ieee80211_channel_to_frequency
[ 1966.303360] wl: Unknown symbol ieee80211_channel_to_frequency (err -22)
[ 1966.303383] wl: disagrees about version of symbol cfg80211_inform_bss_frame
[ 1966.303387] wl: Unknown symbol cfg80211_inform_bss_frame (err -22)
[ 1966.303417] wl: disagrees about version of symbol wiphy_free
[ 1966.303421] wl: Unknown symbol wiphy_free (err -22)
我知道 ubuntu 对专有驱动程序的支持不是很好,但是还有其他驱动程序可以与之兼容吗?
答案1
您尝试过的修复之一是 linux-backports-modules 吗?如果是,我会将其删除:
sudo apt-get remove --purge linux-backports-modules-cw*
接下来,我将重新安装 Broadcom 驱动程序:
sudo apt-get install --reinstall linux-headers-generic
sudo apt-get install --reinstall bcmwl-kernel-source
sudo modprobe wl
一切已准备就绪。
答案2
首先非常感谢 chili555 的回答,我给了 +1 但这并不是我想要的,经过一天的寻找我终于做到了这一点......
我是一名 C++ 开发人员,经过大量搜索后,我决定自己为该驱动程序编写一个补丁,以便它在 3.8.x 内核中运行。请注意,我不是 ubuntu 开发人员,运行此补丁需要您自担风险。因为我很懒,所以我没有对其进行优化以在旧内核上运行,您只能在内核 3.8 及更新版本中编译它并运行。补丁如下:
dkms 的默认根目录是 /var/lib/dkms/bcmwl/6.20.155.1+bdcom(根据您的安装,这可能有所不同,具体取决于驱动程序的版本):
打开 source/src/wl/sys/wl_cfg80211.c,更改:
diff previous new
49,50c49
< static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
< struct cfg80211_scan_request *request);
---
> static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request);
55c54
< static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
---
> static int wl_cfg80211_get_station(struct wiphy *wiphy,
485,486c484
< wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
< struct cfg80211_scan_request *request)
---
> wl_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
488c486
< struct wl_cfg80211_priv *wl = ndev_to_wl(ndev);
---
> struct wl_cfg80211_priv *wl = wdev_to_wl(request->wdev);
532c530
< err = wl_dev_ioctl(ndev, WLC_SCAN, &sr->wl_scan_req, param_size);
---
> err = wl_dev_ioctl(request->wdev->netdev, WLC_SCAN, &sr->wl_scan_req, param_size);
705c703,704
< wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
---
>
> wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size);
1388c1387
< static s32
---
> static int
1960,1961c1959,1960
< size_t ie_len;
< u8 *ie;
---
> size_t ie_len = 0;
> u8 *ie_data = NULL;
1987c1986
< ie = ((u8 *)bi) + bi->ie_offset;
---
> ie_data = ((u8 *)bi) + bi->ie_offset;
1991,1992c1990,1991
< ie = bss->information_elements;
< ie_len = bss->len_information_elements;
---
> ie_len = (size_t) bss->ies->len;
> ie_data = bss->ies->data;
1996c1995
< tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
---
> tim = bcm_parse_tlvs(ie_data, ie_len, WLAN_EID_TIM);
其他补丁包含在文件夹补丁中,应该足够了。更改后,请保存所有工作,因为万一出现问题,您的电脑可能会崩溃并执行以下操作:
cd /etc/kernel/postinst.d
sudo ./dkms 'yourkernel - for example 3.8.1'
sudo modprobe wl