Giter Club home page Giter Club logo

rtw88-usb's Introduction

rtw88-usb

mac80211 kernel driver

currently supported chipset's

8723du
8822bu with variants
8821cu
8822cu

It's under GPL license, and please feel free to use it. Also welcome to upstream to the Linux kernel if you want, and please refer to the branch, for_kernel_upstream, which meets the Linux coding style, and may be easier to upstream.

Thank to many people's kind help on this project.
BIG tanks to Ji-Pin Jou and Neo Jou, for the USB parts

supports at least managed (i.e. client) and monitor mode.

This driver is based on Realtek's rtw88 in Linux main trunk.

Build

$ make clean
$ make

load drivers, preferred

$ sudo make load

install drivers

did you have run make load ?

$ sudo make install

install firmware

$ sudo make firmware

NOTE

This driver will naturally clash with upstream rtw88 drivers
For PCI based device you need the drivers from this location

General Commands

Scan:

$ sudo iw wlanX scan

Connect to the AP without security:

$ sudo iw wlanX connect <AP name>

Wifi Sniffer - monitor mode

$ sudo ip link set wlanX down
$ sudo iw dev wlanX set type monitor
$ sudo rfkill unblock all
$ sudo ip link set wlanX up

Then you can use "iw info" to check if the wireless mode is correct.

e.g.
    wlan1    IEEE 802.11  Mode:Monitor ... 

And you can use the program like wireshark to sniffer wifi packets.

  1. set up the sniffer channel
$ sudo iw dev wlanX set channel xxx
  1. run the program
$ sudo wireshark

Test

test ok with general commands with the latest kernel ubuntu 18 + kernel v5.3 test with Network Manager ok.

Known Issues

  • Currently, this driver is not upstreamed to Linux kernel driver rtw88 yet. That means, loading this module will cause unpredictable results to other working Realtek wifi pcie device, especially to those laptops with Realtek wifi IC running kernel > v5.2.

rtw88-usb's People

Contributors

afaerber avatar arndb avatar borting avatar computersforpeace avatar gustavoarsilva avatar insafonov avatar khfeng avatar kimocoder avatar mrkiko avatar neojou avatar rtlwifi-linux avatar tititiou36 avatar trixirt avatar ulli-kroll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rtw88-usb's Issues

rtw8821cw fails to go into monitor mode

hi! thanks for your work on this, it's really nice to see support getting into the kernel for these weird and wonderful wifi cards.
I am using the firmware from the linux-firmware tree since its missing from this repo: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtw88

I've built latest master fine (same as the dev branch) and trying to get into monitor mode for aircrack.

It loads just fine and ends up being able to scan and connect to APs:

# lsusb
Bus 002 Device 002: ID 0bda:c820 Realtek Semiconductor Corp. 

# modprobe mac80211
[   49.397533] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   49.408691] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   49.409459] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[   49.410246] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[   49.414004] cfg80211: failed to load regulatory.db

# insmod rtw88_core.ko
[   62.355646] rtw88_core: loading out-of-tree module taints kernel.

# insmod rtw88_usb.ko

# insmod rtw88_8821c.ko

# insmod rtw88_8821cu.ko
[   62.915177] rtw_8821cu 2-1:1.2: USB: 2
[   62.918105] rtw_8821cu 2-1:1.2: Firmware version 24.5.0, H2C version 12
[   63.313457] usbcore: registered new interface driver rtw_8821cu
[   63.316623] rtw_8821cu 2-1:1.2 wlx4401bb8e21c4: renamed from wlan0
[   63.780152] rtw_8821cu 2-1:1.2: failed to download firmware
[   65.187405] rtw_8821cu 2-1:1.2: start vif 44:01:bb:8e:21:c4 on port 0

but attempting to go into monitor mode to scan with aircrack ends up with:

# ip link set wlx4401bb8e21c4 down
[  117.257098] rtw_8821cu 2-1:1.2: stop vif 44:01:bb:8e:21:c4 on port 0

# iw dev wlx4401bb8e21c4 set type monitor

# rfkill unblock all

# ip link set wlx4401bb8e21c4 up
[  151.469571] rtw_8821cu 2-1:1.2: error beacon valid
[  151.470515] rtw_8821cu 2-1:1.2: failed to download rsvd page
[  151.472065] rtw_8821cu 2-1:1.2: failed to download firmware
RTNETLINK answers: Device or resource busy

# airodump-ng wlx4401bb8e21c4
[  661.035071] rtw_8821cu 2-1:1.2: error beacon valid
[  661.036428] rtw_8821cu 2-1:1.2: failed to download rsvd page
[  661.038253] rtw_8821cu 2-1:1.2: failed to download firmware
[  661.045981] device wlx4401bb8e21c4 entered promiscuous mode
ioctl(SIOCSIFFLAGS) failed: Device or resource busy

rtw8822cu: rfe 3 support missing

Hi,
I'm trying to setup a system with a LM842 Realtek 8822CU BT/WIFI combo adapter.

Currently testing with Ubuntu 21.04, 5.11.0-34 kernel and branch sync-upstream-with/v5.11. Is this the correct branch to use?

I'm getting the following kernel messages upon connecting the device:

[ 994.256534] usb 1-1.3: new high-speed USB device number 6 using ehci-pci
[ 994.365521] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=c82c, bcdDevice= 0.00
[ 994.365529] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 994.365532] usb 1-1.3: Product: 802.11ac NIC
[ 994.365535] usb 1-1.3: Manufacturer: Realtek
[ 994.365537] usb 1-1.3: SerialNumber: 123456
[ 994.366887] rtw_8822cu 1-1.3:1.2: USB: 2
[ 994.367005] rtw_8822cu 1-1.3:1.2: Firmware version 5.0.0, H2C version 14
[ 994.367104] rtw_8822cu 1-1.3:1.2: Firmware version 7.3.0, H2C version 14
[ 994.367921] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000c lmp_ver=0a lmp_subver=8822
[ 994.368893] Bluetooth: hci0: RTL: rom_version status=0 version=3
[ 994.368903] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_fw.bin
[ 994.368981] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_config.bin
[ 994.369023] Bluetooth: hci0: RTL: cfg_sz 6, total sz 35514
[ 994.536919] Bluetooth: hci0: RTL: fw version 0x099a7253
[ 994.632477] rtw_8822cu 1-1.3:1.2: rfe 3 isn't supported
[ 994.637534] rtw_8822cu 1-1.3:1.2: failed to setup chip efuse info
[ 994.637538] rtw_8822cu 1-1.3:1.2: failed to setup chip information

Build/install steps:

git checkout sync-upstream-with/v5.11
make clean
make
make install
make firmware
modprobe mac80211
insmod rtw88_core.ko
insmod rtw88_usb.ko
insmod rtw88_8822b.ko
insmod rtw88_8822bu.ko
insmod rtw88_8822c.ko
insmod rtw88_8822cu.ko

It seems rfe 3 support is missing for rtw8822c(u). I thought of copying the rfe3 tables from e.g. 8822b to 8822c, but then I compared the existing txpwr_lmt_type0 for both and saw they are different. So I concluded that it would be a bad idea to use the tables from 8822b. Do you know where to get the missing rfe3 tables?

LM provides the drivers here, but I could not get anywhere with them. This driver also seems to use these tables, but in a different format, which I'm no sure how to translate properly....and array_mp_8822c_txpwr_lmt seems to be much longer than the ones used here.

#ifdef CONFIG_8822C
const char *array_mp_8822c_txpwr_lmt[] = {
"FCC", "2.4G", "20M", "CCK", "1T", "01", "72",
"ETSI", "2.4G", "20M", "CCK", "1T", "01", "60",
"MKK", "2.4G", "20M", "CCK", "1T", "01", "68",
"IC", "2.4G", "20M", "CCK", "1T", "01", "72",
"KCC", "2.4G", "20M", "CCK", "1T", "01", "76",
"ACMA", "2.4G", "20M", "CCK", "1T", "01", "60",
"CHILE", "2.4G", "20M", "CCK", "1T", "01", "72",
"UKRAINE", "2.4G", "20M", "CCK", "1T", "01", "60",
"MEXICO", "2.4G", "20M", "CCK", "1T", "01", "72",
"CN", "2.4G", "20M", "CCK", "1T", "01", "60",
"FCC", "2.4G", "20M", "CCK", "1T", "02", "72",
...

  1. Is fixing rfe3 support for rtw8822cu even going to make this stick work or is it likely just the first of more issues along the way?
  2. Can somebody tell me how to translate the tables from realtek driver to rtw driver?
  3. btw what does RFE stand for?

Thanks & best regards,
Peter

8822bu error when set antenna

Environment
Debian 11, all packages are the latest version
linux-5.10.103

step1: ip link set wlan0 down
step2: iw phy phy0 set antenna 0x01 0x01

dmesg:
[ 1530.132354] rtw_8822bu 1-1:1.2: sta 06:90:e8:8a:a4:7f with macid 0 left
[ 1530.356622] rtw_8822bu 1-1:1.2: stop vif d4:ab:cd:69:71:3b on port 0
[ 1541.644433] ------------[ cut here ]------------
[ 1541.644519] WARNING: CPU: 0 PID: 339 at drivers/net/wireless/realtek/rtw88/rtw8822b.c:812 rtw8822b_config_trx_mode.constprop.0+0x8d0/0x8d8 [rtw88_8822b]
[ 1541.644531] write RF mode table fail

error code:
for (counter = 100; counter > 0; counter--) {
u32 rf_reg33;
rtw_write_rf(rtwdev, RF_PATH_A, RF_LUTWE, RFREG_MASK, 0x80000);
rtw_write_rf(rtwdev, RF_PATH_A, RF_LUTWA, RFREG_MASK, 0x00001);
udelay(2);
rf_reg33 = rtw_read_rf(rtwdev, RF_PATH_A, 0x33, RFREG_MASK);
if (rf_reg33 == 0x00001)
break;
}

the error is because rf_reg33 != 0x0001, but rf_reg33 = 0xeaeaeaea, do you know what this value means?

Support for Concurrent Mode

Hello,

Looking through the source code, I do not see an option to support CONCURRENT mode for this driver.
Does the mainline version support concurrent mode for rtl8822BU, and if so, how can it be enabled?

Thank you!

Can not support 7822ULC (rtw_8822bu) usb card

HI here,

I insert it into my raspberry pi and cause to below error message.

[   37.132452] usbcore: registered new interface driver rtw_8822bu
[   44.735668] rtw_8822bu 1-1.3:1.0: USB: 2
[   44.754874] rtw_8822bu 1-1.3:1.0: Firmware version 27.2.0, H2C version 13
[   46.025175] rtw_8822bu 1-1.3:1.0: failed to register hw
[   46.030393] rtw_8822bu 1-1.3:1.0: failed to register hw
[   46.035738] rtw_8822bu: probe of 1-1.3:1.0 failed with error -22
[  183.195455] rtw_8822bu 1-1.3:1.0: USB: 2
[  183.199628] rtw_8822bu 1-1.3:1.0: Firmware version 27.2.0, H2C version 13
[  184.479976] rtw_8822bu 1-1.3:1.0: failed to register hw
[  184.485206] rtw_8822bu 1-1.3:1.0: failed to register hw
[  184.490647] rtw_8822bu: probe of 1-1.3:1.0 failed with error -22
[  212.485463] rtw_8822bu 1-1.1:1.0: USB: 2
[  212.489633] rtw_8822bu 1-1.1:1.0: Firmware version 27.2.0, H2C version 13
[  213.766871] rtw_8822bu 1-1.1:1.0: failed to register hw
[  213.772094] rtw_8822bu 1-1.1:1.0: failed to register hw
[  213.777433] rtw_8822bu: probe of 1-1.1:1.0 failed with error -22

My environment is Openwrt.

Linux OpenWrt 5.10.64 #0 SMP Sat Sep 25 22:32:18 2021 aarch64 GNU/Linux

Realtek RTL8821CU support (failed to download firmware)

I have tried both the latest firmware from linux-firmware.git as well as the ones in this repo. This is with Linux 5.8.5. Attached is the dmesg.

[ 20.035922] rtwifi_usb 1-1:1.0: bLength=7 [ 20.050942] rtwifi_usb 1-1:1.0: bDescriptorType=5 [ 20.066608] rtwifi_usb 1-1:1.0: bEndpointAddress=81 [ 20.082423] rtwifi_usb 1-1:1.0: wMaxPacketSize=16 [ 20.097928] rtwifi_usb 1-1:1.0: bInterval=4 [ 20.112805] rtwifi_usb 1-1:1.0: USB: interrupt endpoint num 1 [ 20.129019] rtwifi_usb 1-1:1.0: [ 20.156110] rtwifi_usb 1-1:1.0: bLength=7 [ 20.170066] rtwifi_usb 1-1:1.0: bDescriptorType=5 [ 20.184657] rtwifi_usb 1-1:1.0: bEndpointAddress=2 [ 20.199089] rtwifi_usb 1-1:1.0: wMaxPacketSize=512 [ 20.213416] rtwifi_usb 1-1:1.0: bInterval=0 [ 20.226908] rtwifi_usb 1-1:1.0: USB: out endpoint num 2 [ 20.241374] rtwifi_usb 1-1:1.0: [ 20.266938] rtwifi_usb 1-1:1.0: bLength=7 [ 20.280362] rtwifi_usb 1-1:1.0: bDescriptorType=5 [ 20.294436] rtwifi_usb 1-1:1.0: bEndpointAddress=82 [ 20.308736] rtwifi_usb 1-1:1.0: wMaxPacketSize=512 [ 20.322962] rtwifi_usb 1-1:1.0: bInterval=0 [ 20.336621] rtwifi_usb 1-1:1.0: USB: dir in endpoint num 2 [ 20.351622] rtwifi_usb 1-1:1.0: USB_SPEED_HIGH [ 20.365474] rtwifi_usb 1-1:1.0: USB: bulkout_size: 512 [ 20.379928] rtwifi_usb 1-1:1.0: USB: TX Agg desc num: 3 [ 20.394435] rtwifi_usb 1-1:1.0: USB: bulkout_num: 1 [ 20.409390] rtwifi_usb 1-1:1.0: Firmware version 9.9.0, H2C version 15 [ 20.426425] rtwifi_usb 1-1:1.0: Firmware version 9.9.0, H2C version 15 [ 20.579872] rtwifi_usb 1-1:1.0: error beacon valid [ 20.594222] rtwifi_usb 1-1:1.0: failed to download rsvd page [ 20.609473] rtwifi_usb 1-1:1.0: failed to download firmware [ 20.628617] rtwifi_usb 1-1:1.0: failed to setup chip efuse info [ 20.643463] rtwifi_usb 1-1:1.0: failed to setup chip information

https://pastebin.com/nk7ZYr21

hard lockup with rtl8822bu

When I load the module it seems to work for a while, but my dmesg log is full of scheduling while atomic errors, then I generally get a hard lockup soon thereafter.

I'll try to probe into this a bit further, but I thought I'd open an issue in case anyone else is having the same problem.

How to compile for ARM (raspberry) - only USB part

Hi,

I tried to compile for ARM (raspbeerry pi 3+ latest kernel) but the first attempt ended with an error

/root/rtw88-usb/rtw8822be.c:27:1: warning: data definition has no type or storage class
 module_pci_driver(rtw_8822be_driver);
 ^~~~~~~~~~~~~~~~~
/root/rtw88-usb/rtw8822be.c:27:1: error: type defaults to ‘int’ in declaration of ‘module_pci_driver’ [-Werror=implicit-int]
/root/rtw88-usb/rtw8822be.c:27:1: warning: parameter names (without types) in function declaration
/root/rtw88-usb/rtw8822be.c:19:26: warning: ‘rtw_8822be_driver’ defined but not used [-Wunused-variable]
 static struct pci_driver rtw_8822be_driver = {
                          ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

When I removed all the references to pci and all other drivers except the one I am interested to (8822bu) the compilation almost completed but this time another error occured

make[1]: Entering directory '/usr/src/linux-headers-5.10.17-v7+'
  CC [M]  /root/rtw88-usb/main.o
  CC [M]  /root/rtw88-usb/mac80211.o
  CC [M]  /root/rtw88-usb/util.o
  CC [M]  /root/rtw88-usb/debug.o
  CC [M]  /root/rtw88-usb/tx.o
  CC [M]  /root/rtw88-usb/rx.o
  CC [M]  /root/rtw88-usb/mac.o
  CC [M]  /root/rtw88-usb/phy.o
  CC [M]  /root/rtw88-usb/coex.o
  CC [M]  /root/rtw88-usb/efuse.o
  CC [M]  /root/rtw88-usb/fw.o
  CC [M]  /root/rtw88-usb/ps.o
  CC [M]  /root/rtw88-usb/sec.o
  CC [M]  /root/rtw88-usb/bf.o
  CC [M]  /root/rtw88-usb/wow.o
  CC [M]  /root/rtw88-usb/regd.o
  CC [M]  /root/rtw88-usb/rtw8822bu.o
  CC [M]  /root/rtw88-usb/usb.o
  LD [M]  /root/rtw88-usb/rtw88_core.o
  LD [M]  /root/rtw88-usb/rtw88_8822bu.o
  LD [M]  /root/rtw88-usb/rtw88_usb.o
  MODPOST /root/rtw88-usb/Module.symvers
ERROR: modpost: "rtw8822b_hw_spec" [/root/rtw88-usb/rtw88_8822bu.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:111: /root/rtw88-usb/Module.symvers] Error 1
make[2]: *** Deleting file '/root/rtw88-usb/Module.symvers'
make[1]: *** [Makefile:1708: modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.17-v7+'
make: *** [Makefile:51: all] Error 2

Any help on how to proceed ?

Thanks in advance!

Compile problem on Slackware64-15.0

I have a usb dongle with an RTL8811CU chip (usb id: 0bda:c811), and tried compiling this for kernel 5.15.27. It pukes:
bash-5.1$ make
make -C /lib/modules/5.15.27/build M=/home/dec/tmp/rtw88-usb
make[1]: Entering directory '/usr/src/linux-5.15.27'
CC [M] /home/dec/tmp/rtw88-usb/mac80211.o
/home/dec/tmp/rtw88-usb/mac80211.c:812:35: error: initialization of ‘void (*)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_prep_tx_info )’ from incompatible pointer type ‘void ()(struct ieee80211_hw *, struct ieee80211_vif , u16)’ {aka ‘void ()(struct ieee80211_hw *, struct ieee80211_vif *, short unsigned int)’} [-Werror=incompatible-pointer-types]
812 | .mgd_prepare_tx = rtw_ops_mgd_prepare_tx,
| ^~~~~~~~~~~~~~~~~~~~~~
/home/dec/tmp/rtw88-usb/mac80211.c:812:35: note: (near initialization for ‘rtw_ops.mgd_prepare_tx’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /home/dec/tmp/rtw88-usb/mac80211.o] Error 1
make[1]: *** [Makefile:1868: /home/dec/tmp/rtw88-usb] Error 2
make[1]: Leaving directory '/usr/src/linux-5.15.27'
make: *** [Makefile:112: all] Error 2
bash-5.1$ sudo make clean
rm -f .o ..d *.a .ko ..cmd .mod *.order *.symvers .tmp_versions
bash-5.1$ make
make -C /lib/modules/5.15.27/build M=/home/dec/tmp/rtw88-usb
make[1]: Entering directory '/usr/src/linux-5.15.27'
CC [M] /home/dec/tmp/rtw88-usb/main.o
CC [M] /home/dec/tmp/rtw88-usb/mac80211.o
/home/dec/tmp/rtw88-usb/mac80211.c:812:35: error: initialization of ‘void (
)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_prep_tx_info )’ from incompatible pointer type ‘void ()(struct ieee80211_hw *, struct ieee80211_vif , u16)’ {aka ‘void ()(struct ieee80211_hw *, struct ieee80211_vif *, short unsigned int)’} [-Werror=incompatible-pointer-types]
812 | .mgd_prepare_tx = rtw_ops_mgd_prepare_tx,
| ^~~~~~~~~~~~~~~~~~~~~~
/home/dec/tmp/rtw88-usb/mac80211.c:812:35: note: (near initialization for ‘rtw_ops.mgd_prepare_tx’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /home/dec/tmp/rtw88-usb/mac80211.o] Error 1
make[1]: *** [Makefile:1868: /home/dec/tmp/rtw88-usb] Error 2
make[1]: Leaving directory '/usr/src/linux-5.15.27'
make: *** [Makefile:112: all] Error 2

Because it was saying "some warnings as errors, I cleaned up and ran 'make -k' which continued past thyose errors and then failed this way:
… CC [M] /home/dec/tmp/rtw88-usb/usb.o
LD [M] /home/dec/tmp/rtw88-usb/rtw88_usb.o
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1868: /home/dec/tmp/rtw88-usb] Error 2
make[1]: Target '__all' not remade because of errors.
make[1]: Leaving directory '/usr/src/linux-5.15.27'
make: *** [Makefile:112: all] Error 2

I'm not a coder so I can't do much more really.

Error in make load

When I run $ sudo make load, it throws this error:

echo "Unload upstream driver(s)"
Unload upstream driver(s)
for m in rtw88_8723de rtw88_8723d rtw88_8822be rtw88_8822b \
	rtw88_8821ce rtw88_8821c rtw88_8822ce rtw88_8821c \
	rtw88_pci rtw88_core; \
	do rmmod "$m" 2> /dev/null; done;
make: *** [Makefile:116: load] Error 1

I looked into Makefile what it does. I actually need to load only one driver, so I typed $ sudo insmod rtw88_8723du.ko and it threw this error:

insmod: ERROR: could not insert module rtw88_8723du.ko: Unknown symbol in module

please support kernel version > 5.14

I use kernel version 5.15.2, and compile error for line 617 in mac80211.c .
I just modify this line to

struct ieee80211_prep_tx_info *)

This structure is added from version 5.14.
I wondor whether it is the right solution, but it can be used well.

Sorry for my weak English.

packet injection on 5G does not appear to work (2G does) - 8822bu

Noname 8822bu dongle on Ubuntu 5.4.0-65 (using backports branch)

Monitor mode (airmon, airodump) works fine on all channels, receives packets.

iw dev wlan0mon set channel 6
aireplay-ng --test wlan0mon

..works fine, sees APs and all injected packets work. Very good.

iw dev wlan0mon set channel 149
aireplay-ng --test wlan0mon

..still sees APs, but 0% of probes work.. Same on all 5Ghz channels I tried.

Just FYI. Thankyou for your work on this driver!

Compiling error

I tried to compile it. After make command I got the error:

In function ‘rtw8822c_txgapk_read_offset’:
/home/roman/Загрузки/rtw88-usb-master/rtw8822c.c:1482:2: error: implicit declaration of function ‘fsleep’; did you mean ‘ssleep’? [-Werror=implicit-function-declaration]
1482 | fsleep(1000);
| ^~~~~~
| ssleep
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:276: /home/roman/Загрузки/rtw88-usb-master/rtw8822c.o] Ошибка 1
make[1]: *** [Makefile:1707: /home/roman/Загрузки/rtw88-usb-master] Ошибка 2
make[1]: выход из каталога «/usr/src/linux-headers-5.6.0-1028-oem»
make: *** [Makefile:112: all] Ошибка 2

Fail to connect with 8723du

Hi,

I'm trying to make this driver work with a 8723du module.
I'm using the branch sync-with-backports/v5.10 on a 5.10.37 kernel.

When I plug the module, I can see that no hw mac is set. No errors in logs.

[20407.683393] usb 5-1.3.1: new high-speed USB device number 27 using xhci_hcd
[20407.771937] usb 5-1.3.1: New USB device found, idVendor=0424, idProduct=2512, bcdDevice= b.b3
[20407.771939] usb 5-1.3.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[20407.819087] hub 5-1.3.1:1.0: USB hub found
[20407.819305] hub 5-1.3.1:1.0: 2 ports detected
[20408.168392] usb 5-1.3.1.1: new high-speed USB device number 28 using xhci_hcd
[20408.257938] usb 5-1.3.1.1: New USB device found, idVendor=0bda, idProduct=d723, bcdDevice= 2.00
[20408.257940] usb 5-1.3.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[20408.257942] usb 5-1.3.1.1: Product: 802.11n WLAN Adapter
[20408.257943] usb 5-1.3.1.1: Manufacturer: Realtek
[20408.257944] usb 5-1.3.1.1: SerialNumber: 00e04c000001
[20408.332004] rtw_8723du 5-1.3.1.1:1.2: USB: 2
[20408.332035] rtw_8723du 5-1.3.1.1:1.2: Firmware version 48.0.0, H2C version 0

I set manually the mac address, using real device mac, with this command
sudo ifconfig wlan0 ^C ether xx:xx:xx:xx:xx:xx

The, when I try to join a network, I got lot of these errors :

[21055.229853] rtw_8723du 5-1.3.1.1:1.2: failed to wait usb ctrl req:192
[21055.260704] rtw_8723du 5-1.3.1.1:1.2: failed to wait usb ctrl req:64
[21055.290804] rtw_8723du 5-1.3.1.1:1.2: failed to wait usb ctrl req:64
[21055.398028] rtw_8723du 5-1.3.1.1:1.2: failed to wait usb ctrl req:192
[21056.104988] rtw_8723du 5-1.3.1.1:1.2: failed to wait usb ctrl req:192
[21056.135832] rtw_8723du 5-1.3.1.1:1.2: failed to wait usb ctrl req:192
[21056.166760] rtw_8723du 5-1.3.1.1:1.2: failed to wait usb ctrl req:64
[21056.196854] rtw_8723du 5-1.3.1.1:1.2: failed to wait usb ctrl req:64

And of course, the join failed :

[20678.784169] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[20679.889741] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[20680.907193] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[20681.859163] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out
[20681.921387] wlan0: authenticate with yy:yy:yy:yy:yy:yy
[20682.275042] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 1/3)
[20682.891125] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 2/3)
[20683.928462] wlan0: send auth to yy:yy:yy:yy:yy:yy (try 3/3)
[20684.867163] wlan0: authentication with yy:yy:yy:yy:yy:yy timed out

I guess that something is missing regarding the mac address issue.
Any idea on the failed to wait usb ctrl req:64 error?

rtw8821cu antenna issue

Possible antenna fail with rtw8821cu.

Currently hunting bugs in rtw8822cu, yes
with
echo "0bda c811" > /sys/bus/usb/drivers/rtw88_8822cu/new_id

Build process does not match instructions, built modules have unknown symbols

I was trying to use this module for my Logilink WL0238 USB adapter (see aircrack-ng/rtl8812au#721).

According to the README, and ignoring the firmware for a moment, I'm supposed to do:

make
insmod rtw.ko
insmod rtwusb.ko

The result of that process is:

# LC_ALL=C make
make -C /lib/modules/5.4.51-v7l+/build M=/root/rtw88-usb-development-chipset-rtl8822cu
make[1]: Entering directory '/usr/src/linux-headers-5.4.51-v7l+'
  AR      /root/rtw88-usb-development-chipset-rtl8822cu/built-in.a
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/main.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/mac80211.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/util.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/debug.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/tx.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rx.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/mac.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/phy.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/coex.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/efuse.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/fw.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/ps.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/sec.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/bf.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/wow.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/regd.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_core.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw8822b.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw8822b_table.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822b.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw8822be.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822be.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw8822bu.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822bu.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw8822c.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw8822c_table.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822c.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw8822ce.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822ce.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw8822cu.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822cu.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw8723d.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw8723d_table.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8723d.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw8723de.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8723de.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/pci.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_pci.o
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/usb.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_usb.o
  Building modules, stage 2.
  MODPOST 11 modules
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8723d.mod.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8723d.ko
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8723de.mod.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8723de.ko
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822b.mod.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822b.ko
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822be.mod.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822be.ko
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822bu.mod.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822bu.ko
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822c.mod.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822c.ko
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822ce.mod.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822ce.ko
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822cu.mod.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_8822cu.ko
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_core.mod.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_core.ko
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_pci.mod.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_pci.ko
  CC [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_usb.mod.o
  LD [M]  /root/rtw88-usb-development-chipset-rtl8822cu/rtw88_usb.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.4.51-v7l+'

As you can see, no rtw.ko or rtwusb.ko are ever built. And sure enough:

# insmod rtw88.ko
insmod: ERROR: could not load module rtw88.ko: No such file or directory
# insmod rtw88usb.ko
insmod: ERROR: could not load module rtw88usb.ko: No such file or directory

There are other modules (e.g. rtw88_usb.ko, rtw88_8822cu.ko, rtw88_core.ko, etc.). But trying to load them leads to the dreaded "unknown symbols in module" error:

# find -iname '*.ko'
./rtw88_8822be.ko
./rtw88_8822bu.ko
./rtw88_8822c.ko
./rtw88_core.ko
./rtw88_8822cu.ko
./rtw88_8822b.ko
./rtw88_8723d.ko
./rtw88_pci.ko
./rtw88_8723de.ko
./rtw88_usb.ko
./rtw88_8822ce.ko

# insmod rtw88_core.ko
insmod: ERROR: could not insert module rtw88_core.ko: Unknown symbol in module

# dmesg | grep rtw88_core
[ 1388.927009] rtw88_core: Unknown symbol ieee80211_start_tx_ba_cb_irqsafe (err -2)
[ 1388.927073] rtw88_core: Unknown symbol ieee80211_txq_get_depth (err -2)
[ 1388.927195] rtw88_core: Unknown symbol ieee80211_probereq_get (err -2)
[ 1388.927249] rtw88_core: Unknown symbol ieee80211_iterate_stations_atomic (err -2)
[ 1388.927293] rtw88_core: Unknown symbol ieee80211_start_tx_ba_session (err -2)
[ 1388.927377] rtw88_core: Unknown symbol ieee80211_nullfunc_get (err -2)
[ 1388.927429] rtw88_core: Unknown symbol ieee80211_pspoll_get (err -2)
[ 1388.927481] rtw88_core: Unknown symbol ieee80211_register_hw (err -2)
[ 1388.927572] rtw88_core: Unknown symbol ieee80211_find_sta (err -2)
[ 1388.927616] rtw88_core: Unknown symbol ieee80211_iter_keys (err -2)
[ 1388.927673] rtw88_core: Unknown symbol ieee80211_tx_status_irqsafe (err -2)
[ 1388.927757] rtw88_core: Unknown symbol ieee80211_stop_tx_ba_cb_irqsafe (err -2)
[ 1388.927813] rtw88_core: Unknown symbol wiphy_to_ieee80211_hw (err -2)
[ 1388.927863] rtw88_core: Unknown symbol ieee80211_queue_delayed_work (err -2)
[ 1388.927906] rtw88_core: Unknown symbol ieee80211_proberesp_get (err -2)
[ 1388.927993] rtw88_core: Unknown symbol ieee80211_find_sta_by_ifaddr (err -2)
[ 1388.928075] rtw88_core: Unknown symbol ieee80211_free_txskb (err -2)
[ 1388.928146] rtw88_core: Unknown symbol ieee80211_tx_dequeue (err -2)
[ 1388.928270] rtw88_core: Unknown symbol ieee80211_iterate_active_interfaces_atomic (err -2)
[ 1388.928342] rtw88_core: Unknown symbol ieee80211_unregister_hw (err -2)
[ 1388.928412] rtw88_core: Unknown symbol ieee80211_beacon_get_tim (err -2)
[ 1388.928478] rtw88_core: Unknown symbol ieee80211_queue_work (err -2)

# insmod rtw88_usb.ko
insmod: ERROR: could not insert module rtw88_usb.ko: Unknown symbol in module

# dmesg | grep rtw88_usb
[ 1774.897279] rtw88_usb: Unknown symbol rtw_tx_report_enqueue (err -2)
[ 1774.897394] rtw88_usb: Unknown symbol ieee80211_free_hw (err -2)
[ 1774.897464] rtw88_usb: Unknown symbol ieee80211_tx_status_irqsafe (err -2)
[ 1774.897540] rtw88_usb: Unknown symbol rtw_chip_info_setup (err -2)
[ 1774.897590] rtw88_usb: Unknown symbol rtw_unregister_hw (err -2)
[ 1774.897640] rtw88_usb: Unknown symbol rtw_tx_fill_tx_desc (err -2)
[ 1774.897694] rtw88_usb: Unknown symbol rtw_core_init (err -2)
[ 1774.897740] rtw88_usb: Unknown symbol ieee80211_alloc_hw_nm (err -2)
[ 1774.897796] rtw88_usb: Unknown symbol rtw_register_hw (err -2)
[ 1774.897859] rtw88_usb: Unknown symbol rtw_core_deinit (err -2)
[ 1774.897899] rtw88_usb: Unknown symbol rtw_ops (err -2)
[ 1774.897943] rtw88_usb: Unknown symbol rtw_fw_c2h_cmd_rx_irqsafe (err -2)
[ 1774.897988] rtw88_usb: Unknown symbol ieee80211_rx_irqsafe (err -2)

# insmod rtw88_8822cu.ko
insmod: ERROR: could not insert module rtw88_8822cu.ko: Unknown symbol in module

# dmesg | grep rtw88_8822cu
[ 1827.473718] rtw88_8822cu: Unknown symbol rtw_usb_disconnect (err -2)
[ 1827.473779] rtw88_8822cu: Unknown symbol rtw8822c_hw_spec (err -2)
[ 1827.473834] rtw88_8822cu: Unknown symbol rtw_usb_probe (err -2)

failed to download firmware using rtw_8822cu on 8811cu

Firstly thank you for putting together this set of drivers, nothing else I have found comes close to working!

I managed to compile these for openwrt master snapshot build (happy to share hacky package file).

However I have ran into a problem where I get failed to download firmware on both of my test devices (Simplecom NW602, 8811cu based devices with usb ids of 0bda:c811). I tried newer firmware from the debian repo as well (I noticed the existing firmware in the fw directory had a version mismatch between wow and non-wow firmware). I also tested the device on windows and it works perfectly fine.

I was using your 8822cu dev branch.

Once I plug in the device I get:
rtw_8822cu 1-1.3:1.0: USB:2
rtw_8822cu 1-1.3:1.0: Firmware version 9.9.0, H2C version 15
rtw_8822cu 1-1.3:1.0: Firmware version 9.9.0, H2C version 15
rtw_8822cu 1-1.3:1.0: failed to download firmware
rtw_8822cu 1-1.3:1.0: failed to setup chip efuse info
rtw_8822cu 1-1.3:1.0: failed to setup chip information

Steps to setup:
modprobe mac80211
modprobe rtw88_8822cu
plug in usb

Any help would be much appreciated

rtw_8821cu fails to load on aarch64 kernel 5.4.70 with embedded USB

Hi, i'm doing a quick package of your driver as an OpenWRT feed ( https://github.com/Pix13/openwrt-rtw88-usb-feed ), to use on a Rock Pi E SBC, but when loading the driver outputs a warning, and fails to load:

[ 7.174342] rtw_8821cu 1-1:1.2: USB: 2
[ 7.194416] rtw_8821cu 1-1:1.2: Firmware version 24.5.0, H2C version 12
[ 7.463526] ------------[ cut here ]------------
[ 7.463945] wiphy should have REGULATORY_CUSTOM_REG
[ 7.464478] WARNING: CPU: 0 PID: 254 at backports-5.8-1/net/wireless/reg.c:2349 wiphy_apply_custom_regulatory+0xb0/0x230 [cfg80211]
[ 7.465507] Modules linked in: rtw88_8821cu(+) rtw88_8821c pppoe ppp_async iptable_nat xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD rtw88_usb rtw88_core pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack mac80211 ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG wireguard slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt compat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 ip6_udp_tunnel udp_tunnel gpio_button_hotplug
[ 7.470566] CPU: 0 PID: 254 Comm: kmodloader Not tainted 5.4.70 #0
[ 7.471104] Hardware name: Radxa ROCK Pi E (DT)
[ 7.471501] pstate: 60000005 (nZCv daif -PAN -UAO)
[ 7.471927] pc : wiphy_apply_custom_regulatory+0xb0/0x230 [cfg80211]
[ 7.472487] lr : wiphy_apply_custom_regulatory+0xb0/0x230 [cfg80211]
[ 7.473040] sp : ffff800011483830
[ 7.473331] x29: ffff800011483830 x28: ffff80001012bda0
[ 7.473796] x27: 00000000ffffffed x26: ffff800010968be8
[ 7.474262] x25: 0000000fffffffe0 x24: ffff800008a374f8
[ 7.474726] x23: ffff00003b006a40 x22: ffff00003b0002e0
[ 7.475190] x21: ffff800008a354c0 x20: ffff00003b0002e0
[ 7.475656] x19: ffff00003b002640 x18: 000000000000001b
[ 7.476120] x17: 000000000000003d x16: 0000000000000004
[ 7.476584] x15: ffff00003b002813 x14: ffff800010c0f090
[ 7.477049] x13: 0000000000000000 x12: ffff800010c0e000
[ 7.477513] x11: ffff800010b9a000 x10: 0000000000000010
[ 7.477977] x9 : 0000000000000000 x8 : 5355435f59524f54
[ 7.478442] x7 : 414c554745522065 x6 : 0000000000000136
[ 7.478906] x5 : 0000000000000000 x4 : 0000000000000000
[ 7.479370] x3 : 00000000ffffffff x2 : ffff800010b9a0a8
[ 7.479836] x1 : ffff00003c5ad080 x0 : 0000000000000027
[ 7.480300] Call trace:
[ 7.480524] wiphy_apply_custom_regulatory+0xb0/0x230 [cfg80211]
[ 7.481054] rtw_regd_init+0x13c/0x148 [rtw88_core]
[ 7.481485] rtw_register_hw+0x114/0x2f8 [rtw88_core]
[ 7.481928] rtw_usb_probe+0x4d0/0x1a78 [rtw88_usb]
[ 7.482358] 0xffff800008a8d014
[ 7.482641] usb_probe_interface+0xe8/0x280
[ 7.483012] really_probe+0xd4/0x328
[ 7.483328] driver_probe_device+0x54/0xe8
[ 7.483687] device_driver_attach+0x6c/0x78
[ 7.484055] __driver_attach+0x54/0xd0
[ 7.484385] bus_for_each_dev+0x60/0x98
[ 7.484723] driver_attach+0x20/0x28
[ 7.485038] bus_add_driver+0x178/0x1d8
[ 7.485374] driver_register+0x60/0x110
[ 7.485711] usb_register_driver+0x78/0x148
[ 7.486079] init_module+0x28/0x1000 [rtw88_8821cu]
[ 7.486510] do_one_initcall+0x74/0x1c8
[ 7.486851] do_init_module+0x50/0x1f0
[ 7.487181] load_module+0x1c2c/0x2088
[ 7.487512] __do_sys_init_module+0x154/0x200
[ 7.487894] __arm64_sys_init_module+0x18/0x20
[ 7.488287] el0_svc_common.constprop.1+0x7c/0x100
[ 7.488707] el0_svc_handler+0x20/0x80
[ 7.489037] el0_svc+0x8/0x200
[ 7.489305] ---[ end trace 4f0b9426f1b54e2a ]---
[ 7.489787] ------------[ cut here ]------------
[ 7.490204] WARNING: CPU: 0 PID: 254 at backports-5.8-1/net/wireless/reg.c:2363 wiphy_apply_custom_regulatory+0xbc/0x230 [cfg80211]
[ 7.491231] Modules linked in: rtw88_8821cu(+) rtw88_8821c pppoe ppp_async iptable_nat xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD rtw88_usb rtw88_core pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack mac80211 ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG wireguard slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt compat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 ip6_udp_tunnel udp_tunnel gpio_button_hotplug
[ 7.496276] CPU: 0 PID: 254 Comm: kmodloader Tainted: G W 5.4.70 #0
[ 7.496933] Hardware name: Radxa ROCK Pi E (DT)
[ 7.497330] pstate: 60000005 (nZCv daif -PAN -UAO)
[ 7.497756] pc : wiphy_apply_custom_regulatory+0xbc/0x230 [cfg80211]
[ 7.498316] lr : wiphy_apply_custom_regulatory+0xb0/0x230 [cfg80211]
[ 7.498869] sp : ffff800011483830
[ 7.499160] x29: ffff800011483830 x28: ffff80001012bda0
[ 7.499626] x27: 00000000ffffffed x26: ffff800010968be8
[ 7.500090] x25: ffff00003b000c18 x24: ffff800008a374f8
[ 7.500555] x23: 0000000000000000 x22: ffff00003b0002e0
[ 7.501019] x21: ffff00003b000c18 x20: 0000000000000000
[ 7.501483] x19: ffff00003b002640 x18: 000000000000001b
[ 7.501948] x17: 000000000000003d x16: 0000000000000004
[ 7.502412] x15: ffff00003b002813 x14: ffff800010c0f090
[ 7.502876] x13: 0000000000000000 x12: ffff800010c0e000
[ 7.503341] x11: ffff800010b9a000 x10: 0000000000000010
[ 7.503805] x9 : 0000000000000000 x8 : 5355435f59524f54
[ 7.504269] x7 : 414c554745522065 x6 : 0000000000000136
[ 7.504734] x5 : 0000000000000000 x4 : 0000000000000000
[ 7.505198] x3 : 00000000ffffffff x2 : ffff800010b9a0a8
[ 7.505662] x1 : ffff00003c5ad080 x0 : 0000000000000001
[ 7.506126] Call trace:
[ 7.506349] wiphy_apply_custom_regulatory+0xbc/0x230 [cfg80211]
[ 7.506879] rtw_regd_init+0x13c/0x148 [rtw88_core]
[ 7.507309] rtw_register_hw+0x114/0x2f8 [rtw88_core]
[ 7.507751] rtw_usb_probe+0x4d0/0x1a78 [rtw88_usb]
[ 7.508179] 0xffff800008a8d014
[ 7.508456] usb_probe_interface+0xe8/0x280
[ 7.508826] really_probe+0xd4/0x328
[ 7.509141] driver_probe_device+0x54/0xe8
[ 7.509501] device_driver_attach+0x6c/0x78
[ 7.509868] __driver_attach+0x54/0xd0
[ 7.510198] bus_for_each_dev+0x60/0x98
[ 7.510535] driver_attach+0x20/0x28
[ 7.510850] bus_add_driver+0x178/0x1d8
[ 7.511187] driver_register+0x60/0x110
[ 7.511523] usb_register_driver+0x78/0x148
[ 7.511892] init_module+0x28/0x1000 [rtw88_8821cu]
[ 7.512319] do_one_initcall+0x74/0x1c8
[ 7.512658] do_init_module+0x50/0x1f0
[ 7.512988] load_module+0x1c2c/0x2088
[ 7.513318] __do_sys_init_module+0x154/0x200
[ 7.513700] __arm64_sys_init_module+0x18/0x20
[ 7.514091] el0_svc_common.constprop.1+0x7c/0x100
[ 7.514511] el0_svc_handler+0x20/0x80
[ 7.514841] el0_svc+0x8/0x200
[ 7.515109] ---[ end trace 4f0b9426f1b54e2b ]---
[ 7.515648] ------------[ cut here ]------------
[ 7.516066] WARNING: CPU: 0 PID: 254 at backports-5.8-1/net/wireless/core.c:872 wiphy_register+0x980/0x9d0 [cfg80211]
[ 7.516986] Modules linked in: rtw88_8821cu(+) rtw88_8821c pppoe ppp_async iptable_nat xt_state xt_nat xt_conntrack xt_REDIRECT xt_MASQUERADE xt_FLOWOFFLOAD rtw88_usb rtw88_core pppox ppp_generic nf_nat nf_flow_table_hw nf_flow_table nf_conntrack_rtcache nf_conntrack mac80211 ipt_REJECT cfg80211 xt_time xt_tcpudp xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG wireguard slhc nf_reject_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_filter ip_tables crc_ccitt compat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 ip6_udp_tunnel udp_tunnel gpio_button_hotplug
[ 7.522029] CPU: 0 PID: 254 Comm: kmodloader Tainted: G W 5.4.70 #0
[ 7.522686] Hardware name: Radxa ROCK Pi E (DT)
[ 7.523083] pstate: 60000005 (nZCv daif -PAN -UAO)
[ 7.523509] pc : wiphy_register+0x980/0x9d0 [cfg80211]
[ 7.523983] lr : ieee80211_register_hw+0x800/0xb98 [mac80211]
[ 7.524484] sp : ffff800011483780
[ 7.524774] x29: ffff800011483780 x28: ffff00003b0025d0
[ 7.525239] x27: 0000000000000000 x26: 0000000000000000
[ 7.525703] x25: 0000000000000000 x24: ffff8000089a1b90
[ 7.526168] x23: ffff8000089a1b88 x22: 0000000000000004
[ 7.526632] x21: 0000000000000928 x20: ffff00003afffee0
[ 7.527096] x19: ffff00003b000f80 x18: 0000000000000014
[ 7.527561] x17: 00000000163a3589 x16: 000000003a4db370
[ 7.528025] x15: 00000000e308aee7 x14: 0000000025c6dc4e
[ 7.528489] x13: 00000000b5c5a8b2 x12: 00000000ffffffbd
[ 7.528954] x11: ffff800008918d40 x10: ffff00003b000bf8
[ 7.529418] x9 : 0000000000000003 x8 : 000000007fffffff
[ 7.529882] x7 : 0000000000000003 x6 : 0000000013121706
[ 7.530347] x5 : 0000000000000004 x4 : 0000000000000000
[ 7.530811] x3 : 0000000000000000 x2 : 0000000000000000
[ 7.531275] x1 : 0000000000000000 x0 : ffff00003b0002e0
[ 7.531740] Call trace:
[ 7.531962] wiphy_register+0x980/0x9d0 [cfg80211]
[ 7.532392] ieee80211_register_hw+0x800/0xb98 [mac80211]
[ 7.532869] rtw_register_hw+0x11c/0x2f8 [rtw88_core]
[ 7.533312] rtw_usb_probe+0x4d0/0x1a78 [rtw88_usb]
[ 7.533739] 0xffff800008a8d014
[ 7.534018] usb_probe_interface+0xe8/0x280
[ 7.534388] really_probe+0xd4/0x328
[ 7.534703] driver_probe_device+0x54/0xe8
[ 7.535063] device_driver_attach+0x6c/0x78
[ 7.535431] __driver_attach+0x54/0xd0
[ 7.535761] bus_for_each_dev+0x60/0x98
[ 7.536098] driver_attach+0x20/0x28
[ 7.536413] bus_add_driver+0x178/0x1d8
[ 7.536749] driver_register+0x60/0x110
[ 7.537086] usb_register_driver+0x78/0x148
[ 7.537455] init_module+0x28/0x1000 [rtw88_8821cu]
[ 7.537882] do_one_initcall+0x74/0x1c8
[ 7.538220] do_init_module+0x50/0x1f0
[ 7.538551] load_module+0x1c2c/0x2088
[ 7.538881] __do_sys_init_module+0x154/0x200
[ 7.539263] __arm64_sys_init_module+0x18/0x20
[ 7.539654] el0_svc_common.constprop.1+0x7c/0x100
[ 7.540074] el0_svc_handler+0x20/0x80
[ 7.540403] el0_svc+0x8/0x200
[ 7.540671] ---[ end trace 4f0b9426f1b54e2c ]---
[ 7.541154] rtw_8821cu 1-1:1.2: failed to register hw
[ 7.541609] rtw_8821cu 1-1:1.2: failed to register hw
[ 7.542247] rtw_8821cu: probe of 1-1:1.2 failed with error -22
[ 7.542876] usbcore: registered new interface driver rtw_8821cu

As you can see, the kernel-side wireless code seems to be a 5.8 backport, maybe it's not yet supported on your sire ?

rtw88bu:rfe support needed

We have several antenna modes, for delta swing.
In upstream PCI driver is only one supported

rip out delta swing tables from rtl8822bu

cross compile openwrt

Hi,
i am a end user.
I tried several hours to do a cross compile for my router (Archer C7), without success.
Is it possible to make the driver available to the openwrt project ?
regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.