kimocoder / realtek_rtwifi

Realtek RTL8xxxU
https://www.aircrack-ng.org
69 stars 14 forks source link

rtwifi.ko: Unknown symbol in module #8

Closed ZerBea closed 3 years ago

ZerBea commented 3 years ago

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)
MoneyCatcher commented 3 years ago

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

ZerBea commented 3 years ago

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.

ZerBea commented 3 years ago

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

ZerBea commented 3 years ago

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.

ZerBea commented 3 years ago

I know, the driver is highly experimental, but I decided to add it "known as working" to hcxdumptool: https://github.com/ZerBea/hcxdumptool/commit/03c3b957e33053b5baa7ca1a6fa0a8e5534acbb3 because it is working much better than the old ones!