1. 查看内核版本
uname -a / -r
Linux fnos 6.6.38-trim
2. 查看网卡型号
lsusb -v
RTL8188GU 802.11n WLAN Adapter (After Modeswitch)
3. 搜索官网缺失/开源网站
git clone https://github.com/McMCCRU/rtl8188gu.git
编译报错: cfg80211_ch_switch_notify 参数缺失
报错原因: cfg80211_ch_switch_notify在当前内核版本上函数签名有变动
https://elixir.bootlin.com/linux/v6.6.38/source/include/net/cfg80211.h#L8599
如何解决: 将最后一个 u16类型的 punct_bitmap 参数 改为0
cfg80211_ch_switch_notify(adapter->pnetdev, &chdef, 0, 0);
4. 编译:
make clean //清理缓存
make all
make install
动态添加
modprobe -r rtl8xxxu //清理其他模块: 8188gu / 8188eu
modprobe -r 8188eu //清理其他模块: 8188gu / 8188eu
lsmod | grep 8188 //查看
ls /lib/firmware/rtlwifi/rtl8 //查看
modprobe 8188gu //添加
5. 连接wifi
ifconfig //可发现新添加的无线网卡

nmtui
