2023-03-01 21:57:14

by Alexandru Gagniuc

[permalink] [raw]
Subject: Issues with rtw88_8821cu

Hi,

I'm seeing some issues with a BrosTrend AC650 adapter (rtw88_8821cu). I
have all the recent fixes, up to and including commit 4a267bc5ea8f
("wifi: rtw88: use RTW_FLAG_POWERON flag to prevent to power on/off twice").

1) rtw_8821cu 1-3:1.0: Firmware version 24.11.0, H2C version 12
rtw_8821cu 1-3:1.0: failed to download firmware
rtw_8821cu 1-3:1.0: failed to setup chip efuse info
rtw_8821cu 1-3:1.0: failed to setup chip information

This first issue is related to USB errors. Generally, it starts with the
"failed to download firmware" followed by an assortment of other "failed
to" messages. At this point the adapter may show up in iw, but is
unusable until unplugged and replugged.

2) The second issue is unusably low Rx signal levels on the 2.4 GHz
bands. The scan results report about 30dB to 50dB lower than adjacent
adapters. That's if the 8821cu can even detect the beacons.

3) The third issue is that, in IBSS mode, the adapter cannot receive any
packets or see adjacent IBSS nodes.
iw <wlanx> station dump
shows no results, unless also running a scan. Even so, ifconfig shows 0
Rx packets, and the adapter is not able to receive. This happens in
either noHT, HT20, or HT40 modes.


Where do I begin getting these running?

Alex


2023-03-03 12:51:53

by Sascha Hauer

[permalink] [raw]
Subject: Re: Issues with rtw88_8821cu

Hi Alex,

On Wed, Mar 01, 2023 at 03:57:04PM -0600, Alex G. wrote:
> Hi,
>
> I'm seeing some issues with a BrosTrend AC650 adapter (rtw88_8821cu). I have
> all the recent fixes, up to and including commit 4a267bc5ea8f ("wifi: rtw88:
> use RTW_FLAG_POWERON flag to prevent to power on/off twice").
>
> 1) rtw_8821cu 1-3:1.0: Firmware version 24.11.0, H2C version 12
> rtw_8821cu 1-3:1.0: failed to download firmware
> rtw_8821cu 1-3:1.0: failed to setup chip efuse info
> rtw_8821cu 1-3:1.0: failed to setup chip information
>
> This first issue is related to USB errors. Generally, it starts with the
> "failed to download firmware" followed by an assortment of other "failed to"
> messages. At this point the adapter may show up in iw, but is unusable until
> unplugged and replugged.

I can confirm these issues. Unfortunately I don't know why this is happening.
I have a board here with USB2 (ehci) ports and USB3 (xhci) ports. It
seems to work fine on the USB2 ports, but on the USB3 ports it fails
like you described. Well, not always, sometimes it works. It works
better when not using NetworkManager, but wpa_supplicant directly.

>
> 2) The second issue is unusably low Rx signal levels on the 2.4 GHz bands.
> The scan results report about 30dB to 50dB lower than adjacent adapters.
> That's if the 8821cu can even detect the beacons.

That was reported elsewhere and I can confirm it, but unfortunately I
don't know a solution.

>
> 3) The third issue is that, in IBSS mode, the adapter cannot receive any
> packets or see adjacent IBSS nodes.
> iw <wlanx> station dump
> shows no results, unless also running a scan. Even so, ifconfig shows 0 Rx
> packets, and the adapter is not able to receive. This happens in either
> noHT, HT20, or HT40 modes.

I haven't tested IBSS mode, so I can't say anything to this.

>
> Where do I begin getting these running?

For the first problem I can imagine that it could be solved by looking
at the code and evaluating what is different between NetworkManager vs.
wpa_supplicant or EHCI vs. XHCI.

For the other two problems I don't have an idea either. There is no
documentation for these chips and the downstream drivers are a complete
mess.

Have you tried one of these drivers?

https://github.com/lwfinger/rtw88
https://github.com/ulli-kroll/rtw88-usb

The code is based on the kernel driver and the RTW88 USB support in the
kernel is derived from these drivers. There is a chance that I broke
something while porting it upstream and if yes it should be fairly easy
to sort out.

Sascha

--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

2023-03-03 15:53:44

by Larry Finger

[permalink] [raw]
Subject: Re: Issues with rtw88_8821cu

On 3/3/23 06:51, Sascha Hauer wrote:
> documentation for these chips and the downstream drivers are a complete
> mess.
>
> Have you tried one of these drivers?
>
> https://github.com/lwfinger/rtw88
> https://github.com/ulli-kroll/rtw88-usb
>
> The code is based on the kernel driver and the RTW88 USB support in the
> kernel is derived from these drivers. There is a chance that I broke
> something while porting it upstream and if yes it should be fairly easy
> to sort out.

My repo is based on code from the wireless-next repo, thus any upstream error
will also be in it.

Larry


2023-03-03 18:15:27

by Alexandru Gagniuc

[permalink] [raw]
Subject: Re: Issues with rtw88_8821cu

On 3/3/23 09:53, Larry Finger wrote:
> On 3/3/23 06:51, Sascha Hauer wrote:
>> documentation for these chips and the downstream drivers are a complete
>> mess.
>>
>> Have you tried one of these drivers?
>>
>> https://github.com/lwfinger/rtw88
>> https://github.com/ulli-kroll/rtw88-usb
>>
>> The code is based on the kernel driver and the RTW88 USB support in the
>> kernel is derived from these drivers. There is a chance that I broke
>> something while porting it upstream and if yes it should be fairly easy
>> to sort out.
>
> My repo is based on code from the wireless-next repo, thus any upstream
> error will also be in it.
>

I've had similar results with both repos. ulli-kroll's was a bit weird,
as I had to use an older kernel -- but I saw the same issue with 2.4GHz
channels, as well as the occasional USB issues.

Alex