kimocoder/realtek_rtwifi

rtwifi.ko: Unknown symbol in module

ZerBea opened this issue · 5 comments

Compiles fine on
$ uname -r
5.10.9-arch1-1
except 2 warnings:
rtl8xxxu_desc_to_mcsrate defined but not used
rtl8xxxu_legacy_ratetable defined but not used

but its not possible to insmod the module
$ sudo insmod rtwifi.ko
insmod: ERROR: could not insert module rtwifi.ko: Unknown symbol in module

[ 2431.965796] rtwifi: Unknown symbol ieee80211_free_hw (err -2)
[ 2431.965829] rtwifi: Unknown symbol ieee80211_register_hw (err -2)
[ 2431.965861] rtwifi: Unknown symbol ieee80211_find_sta (err -2)
[ 2431.965885] rtwifi: Unknown symbol ieee80211_tx_status_irqsafe (err -2)
[ 2431.965932] rtwifi: Unknown symbol ieee80211_wake_queues (err -2)
[ 2431.965958] rtwifi: Unknown symbol ieee80211_alloc_hw_nm (err -2)
[ 2431.965989] rtwifi: Unknown symbol ieee80211_stop_queues (err -2)
[ 2431.966017] rtwifi: Unknown symbol ieee80211_unregister_hw (err -2)
[ 2431.966048] rtwifi: Unknown symbol ieee80211_rx_irqsafe (err -2)

did you try sudo depmod -a after copy rtwiki.ko to

/lib/modules/<<kernel e.g. 5.10.9-arch1-1>>/kernel/drivers/net/wireless/rtwifi.ko

I don't run the module from inside the modules directory.
Maybe I should run "modprobe mac80211" before insmod.
I'll try that. Thanks for pointing me into that direction.

That did the trick.
rtwifi.ko doesn't load mac80211. It must be done by hand.
Thanks.

Looks like the driver is working fine on

$ lsusb
ID 2357:010c TP-Link TL-WN722N v2/v3 [Realtek RTL8188EUS]
$ sudo hcxdumptool -i wlp39s0f3u1u1u2 --check_driver
initialization...
starting driver test...
driver tests passed...
all required ioctl() system calls are supported by driver

terminating...
$ sudo hcxdumptool -i wlp39s0f3u1u1u2 -C
initialization...
available channels:
  1 / 2412MHz (30 dBm)
  2 / 2417MHz (30 dBm)
  3 / 2422MHz (30 dBm)
  4 / 2427MHz (30 dBm)
  5 / 2432MHz (30 dBm)
  6 / 2437MHz (30 dBm)
  7 / 2442MHz (30 dBm)
  8 / 2447MHz (30 dBm)
  9 / 2452MHz (30 dBm)
 10 / 2457MHz (30 dBm)
 11 / 2462MHz (30 dBm)
 12 / 2467MHz (30 dBm)
 13 / 2472MHz (30 dBm)
 14 / 2484MHz (30 dBm)
$ sudo hcxdumptool -i wlp39s0f3u1u1u2 --check_injection
initialization...
starting antenna test and packet injection test (that can take up to two minutes)...
available channels: 1,2,3,4,5,6,7,8,9,10,11,12,13,14
packet injection is working on 2.4GHz!
injection ratio: 100% (BEACON: 22 PROBERESPONSE: 24)
your injection ratio is huge - say kids what time is it?
antenna ratio: 100% (NETWORK: 3 PROBERESPONSE: 3)
your antenna ratio is huge - say kids what time is it?

terminating...

@kimocoder no longer NETLINK dependencies.

I know, the driver is highly experimental, but I decided to add it "known as working" to hcxdumptool:
ZerBea/hcxdumptool@03c3b95
because it is working much better than the old ones!