2022-12-28 22:40:55

by Felix Schwarz

[permalink] [raw]
Subject: rtw_8821cu: "rfe 38 isn't supported" with Linux 6.2rc1 (0bda:c811)

Hi,

I noticed that support for Realtek's 8821cu devices was recently merged with
commit aff5ffd7. I have a "Realtek Semiconductor Corp. 802.11ac NIC" (ID
0bda:c811) so I decided to try 6.2rc1.

However I only get these messages (and no new wifi network interface) when
trying to load the module:

rtw_8821cu 1-4:1.0: Firmware version 24.11.0, H2C version 12
rtw_8821cu 1-4:1.0: rfe 38 isn't supported
rtw_8821cu 1-4:1.0: failed to setup chip efuse info
rtw_8821cu 1-4:1.0: failed to setup chip information
usbcore: registered new interface driver rtw_8821cu

I read that the vendor-supplied GPL driver (which I don't use) requires
"usb_modeswitch" so I ran that just to be sure but still no dice:

$ sudo usb_modeswitch --std-eject --verbose --default-vendor=0bda
--default-product=c811
[...]
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.6.1 (C) Josua Dietze 2017
* Based on libusb1/libusbx

[...]

Look for default devices ...
found USB ID 0bda:c811
vendor ID matched
product ID matched
[...]
Found devices in default mode (1)
Access device 005 on bus 001
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
with class 255
Error: can't use storage command in MessageContent with interface 0; interface
class is 255, expected 8. Abort


Is there a new branch I could try? Any idea what I am doing wrong?
Felix


2022-12-29 00:28:57

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: rtw_8821cu: "rfe 38 isn't supported" with Linux 6.2rc1 (0bda:c811)



> -----Original Message-----
> From: Felix Schwarz <[email protected]>
> Sent: Thursday, December 29, 2022 6:26 AM
> To: [email protected]
> Subject: rtw_8821cu: "rfe 38 isn't supported" with Linux 6.2rc1 (0bda:c811)
>
> Hi,
>
> I noticed that support for Realtek's 8821cu devices was recently merged with
> commit aff5ffd7. I have a "Realtek Semiconductor Corp. 802.11ac NIC" (ID
> 0bda:c811) so I decided to try 6.2rc1.
>
> However I only get these messages (and no new wifi network interface) when
> trying to load the module:
>
> rtw_8821cu 1-4:1.0: Firmware version 24.11.0, H2C version 12
> rtw_8821cu 1-4:1.0: rfe 38 isn't supported

RFE type 38 is very similar to type 6, so I suggest to try this:

diff --git a/rtw8821c.c b/rtw8821c.c
index dd01b22f..9ac83756 100644
--- a/rtw8821c.c
+++ b/rtw8821c.c
@@ -1547,6 +1547,7 @@ static const struct rtw_rfe_def rtw8821c_rfe_defs[] = {
[4] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2),
[6] = RTW_DEF_RFE(8821c, 0, 0),
[34] = RTW_DEF_RFE(8821c, 0, 0),
+ [38] = RTW_DEF_RFE(8821c, 0, 0),
};

--
Ping-Ke

2022-12-29 09:27:01

by Felix Schwarz

[permalink] [raw]
Subject: Re: rtw_8821cu: "rfe 38 isn't supported" with Linux 6.2rc1 (0bda:c811)

Hi Ping-Ke,

Am 29.12.22 um 01:26 schrieb Ping-Ke Shih:
> RFE type 38 is very similar to type 6, so I suggest to try this:
>
> diff --git a/rtw8821c.c b/rtw8821c.c
> index dd01b22f..9ac83756 100644
> --- a/rtw8821c.c
> +++ b/rtw8821c.c
> @@ -1547,6 +1547,7 @@ static const struct rtw_rfe_def rtw8821c_rfe_defs[] = {
> [4] = RTW_DEF_RFE_EXT(8821c, 0, 0, 2),
> [6] = RTW_DEF_RFE(8821c, 0, 0),
> [34] = RTW_DEF_RFE(8821c, 0, 0),
> + [38] = RTW_DEF_RFE(8821c, 0, 0),
> };

That seems to help. The errors I posted initially are all gone.

Now I see a wifi card in network manager and scanning for wifi networks works as
well. Connection to my wireless network does not work though (neither 2.4 Ghz
nor 5) - no real errors just endless spinning after I entered my password.
(Though running any application is *extremly* slow without an obvious cause when
running 6.2rc1, maybe a different bug?)

I should probably debug this without gnome + networkmanager but maybe you have
an idea based on these errors?

rtw_8821cu 1-4:1.0: read register 0x5 failed with -110
rtw_8821cu 1-4:1.0: read register 0x20 failed with -110
rtw_8821cu 1-4:1.0: read register 0x7c failed with -110
rtw_8821cu 1-4:1.0: read register 0x1080 failed with -110
rtw_8821cu 1-4:1.0: write register 0x3 failed with -110


I attached the logs produced once I attach the USB device running Linux 6.2rc1
with the additional patch for rfe 38.

Felix