Linux wireless drivers development
 help / color / mirror / Atom feed
* rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
@ 2026-11-03 22:29 Pablo Martínez Ríos
  2026-11-04  1:33 ` Ping-Ke Shih
  0 siblings, 1 reply; 12+ messages in thread
From: Pablo Martínez Ríos @ 2026-11-03 22:29 UTC (permalink / raw)
  To: linux-wireless, pkshih

Hello,

I would like to report a problem with an RTL8822BE using rtw88_8822be.
The same card, in the same spot, works well on Windows, so I suspect a
driver/firmware issue rather than coverage. I am happy to run any tests
or try patches.

HARDWARE / SOFTWARE
- Laptop: HP Pavilion 15-bc450ns (i5-8300H), BIOS F.32
- Card: Realtek RTL8822BE, PCI ID 10ec:b822 (04:00.0), HP subsystem.
  Both antenna cables are connected; "iw phy" reports available and
  configured antennas TX 0x3 / RX 0x3.
- Debian 13.7 live USB, kernel 6.12.107+deb13-amd64, firmware-realtek
  20250410-2, rtw88 firmware 27.2.0 (H2C 13)
- Same behaviour earlier on CachyOS (a recent 7.x kernel, exact version
  not recorded) and on an Ubuntu live session (26.10)
- Module parameters at defaults: disable_lps_deep=N, disable_aspm=N,
  support_bf=Y
- Router: ISP-supplied Huawei OptiXstar EG8145X6-10, separate SSIDs for
  2.4 GHz (ch 6, 20 MHz) and 5 GHz (ch 36, auto width). The router is
  one floor below the laptop, with a concrete slab in between.

PROBLEM 1: 5 GHz
Linux never authenticates. This repeats indefinitely:

  wlo1: authenticate with 22:87:ec:xx:xx:08 (local address=90:32:4b:xx:xx:xx)
  wlo1: send auth to 22:87:ec:xx:xx:08 (try 1/3)
  wlo1: send auth to 22:87:ec:xx:xx:08 (try 2/3)
  wlo1: send auth to 22:87:ec:xx:xx:08 (try 3/3)
  wlo1: authentication with 22:87:ec:xx:xx:08 timed out

- It fails with WPA2-PSK and with WPA3 (SAE), and with the router set to
  WPA/WPA2 TKIP+AES and to WPA2/WPA3 AES, so it fails at the 802.11
  authentication frame, before any SAE/EAPOL exchange.
- Same result with regulatory domain 00 and with "iw reg set ES".
- The BSS appears in scans (its beacons carry country IE ES), but no
  authentication response is ever received.
- Windows 11 on the same laptop, same spot (Realtek driver
  2024.0.10.209): connects with WPA3-Personal, reported RSSI -76 to
  -81 dBm, 80/80 pings answered, 3-9 ms, link rate 260-292 Mbps as
  reported by Windows.

PROBLEM 2: 2.4 GHz
- Linux associates, but the link is very poor: iw reports about -73 to
  -76 dBm, and the beacon loss counter rises about once per second
  (14 to 65 over roughly 2 minutes). Across 5 runs, ping to the router
  showed 0-54% loss and average RTT of 37-278 ms.
- Kernel messages: "rtw_8822be 0000:04:00.0: firmware failed to leave
  lps state" (several times), and once "failed to send h2c command".
- The beacon signal average (-97 to -109 dBm) is far below the frame
  signal average (about -75 dBm). With a phone hotspot at -48 dBm both
  agree (-46). Occasionally signal readings of -100 to -112 dBm appear
  with the second chain at 0 while traffic continues.
- Windows, same spot: 60/60 pings, average 12 ms (max 157 ms).
- With a phone hotspot (2.4 GHz, ch 1, -48 dBm), Linux works well:
  rx 78 Mbit/s (VHT-MCS 8, NSS 1), tx 65 Mbit/s (MCS 7).

TRIED WITHOUT EFFECT
- "iw dev wlo1 set power_save off" (one run had 54% ping loss)
- rtw88_pci disable_aspm=Y (lspci still showed "ASPM L1 Enabled"
  afterwards)
- WPA2 vs WPA3, regulatory domain 00 vs ES

COULD NOT CHECK
/sys/kernel/debug/ieee80211/phy0/rtw88 does not exist on the Debian
kernel (presumably rtw88 debugfs is not enabled), so I could not read
tx_pwr_tbl, phy_info or coex_info, nor test the edcca_enable switch.
A single correctable PCIe error (BadDLLP) was logged once; the AER
counters were 0 later.

QUESTIONS
Is this a known issue? Which additional data would be most useful (a
kernel with rtw88 debugfs, a debug_mask setting, a monitor-mode
capture)? I can provide full logs and test patches.

Thanks,
Pablo.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
  2026-11-03 22:29 rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows Pablo Martínez Ríos
@ 2026-11-04  1:33 ` Ping-Ke Shih
  2026-11-04 10:45   ` Bitterblue Smith
  0 siblings, 1 reply; 12+ messages in thread
From: Ping-Ke Shih @ 2026-11-04  1:33 UTC (permalink / raw)
  To: Pablo Martínez Ríos, linux-wireless@vger.kernel.org

Pablo Martínez Ríos <pabloriosmartinez@gmail.com> wrote:
> Hello,
> 
> I would like to report a problem with an RTL8822BE using rtw88_8822be.
> The same card, in the same spot, works well on Windows, so I suspect a
> driver/firmware issue rather than coverage. I am happy to run any tests
> or try patches.
> 
> HARDWARE / SOFTWARE
> - Laptop: HP Pavilion 15-bc450ns (i5-8300H), BIOS F.32
> - Card: Realtek RTL8822BE, PCI ID 10ec:b822 (04:00.0), HP subsystem.
>   Both antenna cables are connected; "iw phy" reports available and
>   configured antennas TX 0x3 / RX 0x3.
> - Debian 13.7 live USB, kernel 6.12.107+deb13-amd64, firmware-realtek
>   20250410-2, rtw88 firmware 27.2.0 (H2C 13)
> - Same behaviour earlier on CachyOS (a recent 7.x kernel, exact version
>   not recorded) and on an Ubuntu live session (26.10)

Is there any version working well to you?

> - Module parameters at defaults: disable_lps_deep=N, disable_aspm=N,
>   support_bf=Y
> - Router: ISP-supplied Huawei OptiXstar EG8145X6-10, separate SSIDs for
>   2.4 GHz (ch 6, 20 MHz) and 5 GHz (ch 36, auto width). The router is
>   one floor below the laptop, with a concrete slab in between.

I think it is worth to try putting closer.

And, can you try another AP to see if anything different?

> 
> PROBLEM 1: 5 GHz
> Linux never authenticates. This repeats indefinitely:
> 
>   wlo1: authenticate with 22:87:ec:xx:xx:08 (local address=90:32:4b:xx:xx:xx)
>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 1/3)
>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 2/3)
>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 3/3)
>   wlo1: authentication with 22:87:ec:xx:xx:08 timed out
> 
> - It fails with WPA2-PSK and with WPA3 (SAE), and with the router set to
>   WPA/WPA2 TKIP+AES and to WPA2/WPA3 AES, so it fails at the 802.11
>   authentication frame, before any SAE/EAPOL exchange.
> - Same result with regulatory domain 00 and with "iw reg set ES".
> - The BSS appears in scans (its beacons carry country IE ES), but no
>   authentication response is ever received.

How can you prove "no authentication response is ever received" ?
Can AP ack the auth? I mean that might be a TX side problem.

> - Windows 11 on the same laptop, same spot (Realtek driver
>   2024.0.10.209): connects with WPA3-Personal, reported RSSI -76 to
>   -81 dBm, 80/80 pings answered, 3-9 ms, link rate 260-292 Mbps as
>   reported by Windows.
> 
> PROBLEM 2: 2.4 GHz
> - Linux associates, but the link is very poor: iw reports about -73 to
>   -76 dBm, and the beacon loss counter rises about once per second
>   (14 to 65 over roughly 2 minutes). Across 5 runs, ping to the router
>   showed 0-54% loss and average RTT of 37-278 ms.
> - Kernel messages: "rtw_8822be 0000:04:00.0: firmware failed to leave
>   lps state" (several times), and once "failed to send h2c command".

For this case, "iw dev wlo1 set power_save off" should help.

> - The beacon signal average (-97 to -109 dBm) is far below the frame
>   signal average (about -75 dBm). With a phone hotspot at -48 dBm both
>   agree (-46). Occasionally signal readings of -100 to -112 dBm appear
>   with the second chain at 0 while traffic continues.
> - Windows, same spot: 60/60 pings, average 12 ms (max 157 ms).
> - With a phone hotspot (2.4 GHz, ch 1, -48 dBm), Linux works well:
>   rx 78 Mbit/s (VHT-MCS 8, NSS 1), tx 65 Mbit/s (MCS 7).
> 
> TRIED WITHOUT EFFECT
> - "iw dev wlo1 set power_save off" (one run had 54% ping loss)

How about the loss rate comparing to power_save on? Almost the same?

> - rtw88_pci disable_aspm=Y (lspci still showed "ASPM L1 Enabled"
>   afterwards)
> - WPA2 vs WPA3, regulatory domain 00 vs ES
> 
> COULD NOT CHECK
> /sys/kernel/debug/ieee80211/phy0/rtw88 does not exist on the Debian
> kernel (presumably rtw88 debugfs is not enabled), so I could not read
> tx_pwr_tbl, phy_info or coex_info, nor test the edcca_enable switch.
> A single correctable PCIe error (BadDLLP) was logged once; the AER
> counters were 0 later.
> 
> QUESTIONS
> Is this a known issue? Which additional data would be most useful (a
> kernel with rtw88 debugfs, a debug_mask setting, a monitor-mode
> capture)? I can provide full logs and test patches.

The kernel v5.3 or earlier support RTL8822BE. Could you bisect (use
distro live image) which kernel can work to you? It would be easier
to address problem. 

Have you tested with disabling Bluetooth, since this is a combo chip?

Another point is that rtw88 can only support these types:

static const struct rtw8822b_rfe_info rtw8822b_rfe_info[] = {
	[2] = I2GE5G_CCUT(efem),
	[3] = IFEM_EXT_CCUT(ifem),
	[5] = IFEM_EXT_CCUT(ifem),
};

You can add a printk to print the type of your RTL8822BE.




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
  2026-11-04  1:33 ` Ping-Ke Shih
@ 2026-11-04 10:45   ` Bitterblue Smith
  2026-11-11 10:15     ` Pablo Martínez Ríos
  0 siblings, 1 reply; 12+ messages in thread
From: Bitterblue Smith @ 2026-11-04 10:45 UTC (permalink / raw)
  To: Ping-Ke Shih, Pablo Martínez Ríos,
	linux-wireless@vger.kernel.org

On 04/11/2026 03:33, Ping-Ke Shih wrote:
> Pablo Martínez Ríos <pabloriosmartinez@gmail.com> wrote:
>> Hello,
>>
>> I would like to report a problem with an RTL8822BE using rtw88_8822be.
>> The same card, in the same spot, works well on Windows, so I suspect a
>> driver/firmware issue rather than coverage. I am happy to run any tests
>> or try patches.
>>
>> HARDWARE / SOFTWARE
>> - Laptop: HP Pavilion 15-bc450ns (i5-8300H), BIOS F.32
>> - Card: Realtek RTL8822BE, PCI ID 10ec:b822 (04:00.0), HP subsystem.
>>   Both antenna cables are connected; "iw phy" reports available and
>>   configured antennas TX 0x3 / RX 0x3.
>> - Debian 13.7 live USB, kernel 6.12.107+deb13-amd64, firmware-realtek
>>   20250410-2, rtw88 firmware 27.2.0 (H2C 13)
>> - Same behaviour earlier on CachyOS (a recent 7.x kernel, exact version
>>   not recorded) and on an Ubuntu live session (26.10)
> 
> Is there any version working well to you?
> 
>> - Module parameters at defaults: disable_lps_deep=N, disable_aspm=N,
>>   support_bf=Y
>> - Router: ISP-supplied Huawei OptiXstar EG8145X6-10, separate SSIDs for
>>   2.4 GHz (ch 6, 20 MHz) and 5 GHz (ch 36, auto width). The router is
>>   one floor below the laptop, with a concrete slab in between.
> 
> I think it is worth to try putting closer.
> 
> And, can you try another AP to see if anything different?
> 
>>
>> PROBLEM 1: 5 GHz
>> Linux never authenticates. This repeats indefinitely:
>>
>>   wlo1: authenticate with 22:87:ec:xx:xx:08 (local address=90:32:4b:xx:xx:xx)
>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 1/3)
>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 2/3)
>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 3/3)
>>   wlo1: authentication with 22:87:ec:xx:xx:08 timed out
>>
>> - It fails with WPA2-PSK and with WPA3 (SAE), and with the router set to
>>   WPA/WPA2 TKIP+AES and to WPA2/WPA3 AES, so it fails at the 802.11
>>   authentication frame, before any SAE/EAPOL exchange.
>> - Same result with regulatory domain 00 and with "iw reg set ES".
>> - The BSS appears in scans (its beacons carry country IE ES), but no
>>   authentication response is ever received.
> 
> How can you prove "no authentication response is ever received" ?
> Can AP ack the auth? I mean that might be a TX side problem.
> 
>> - Windows 11 on the same laptop, same spot (Realtek driver
>>   2024.0.10.209): connects with WPA3-Personal, reported RSSI -76 to
>>   -81 dBm, 80/80 pings answered, 3-9 ms, link rate 260-292 Mbps as
>>   reported by Windows.
>>
>> PROBLEM 2: 2.4 GHz
>> - Linux associates, but the link is very poor: iw reports about -73 to
>>   -76 dBm, and the beacon loss counter rises about once per second
>>   (14 to 65 over roughly 2 minutes). Across 5 runs, ping to the router
>>   showed 0-54% loss and average RTT of 37-278 ms.
>> - Kernel messages: "rtw_8822be 0000:04:00.0: firmware failed to leave
>>   lps state" (several times), and once "failed to send h2c command".
> 
> For this case, "iw dev wlo1 set power_save off" should help.
> 
>> - The beacon signal average (-97 to -109 dBm) is far below the frame
>>   signal average (about -75 dBm). With a phone hotspot at -48 dBm both
>>   agree (-46). Occasionally signal readings of -100 to -112 dBm appear
>>   with the second chain at 0 while traffic continues.
>> - Windows, same spot: 60/60 pings, average 12 ms (max 157 ms).
>> - With a phone hotspot (2.4 GHz, ch 1, -48 dBm), Linux works well:
>>   rx 78 Mbit/s (VHT-MCS 8, NSS 1), tx 65 Mbit/s (MCS 7).
>>
>> TRIED WITHOUT EFFECT
>> - "iw dev wlo1 set power_save off" (one run had 54% ping loss)
> 
> How about the loss rate comparing to power_save on? Almost the same?
> 
>> - rtw88_pci disable_aspm=Y (lspci still showed "ASPM L1 Enabled"
>>   afterwards)
>> - WPA2 vs WPA3, regulatory domain 00 vs ES
>>
>> COULD NOT CHECK
>> /sys/kernel/debug/ieee80211/phy0/rtw88 does not exist on the Debian
>> kernel (presumably rtw88 debugfs is not enabled), so I could not read
>> tx_pwr_tbl, phy_info or coex_info, nor test the edcca_enable switch.
>> A single correctable PCIe error (BadDLLP) was logged once; the AER
>> counters were 0 later.
>>
>> QUESTIONS
>> Is this a known issue? Which additional data would be most useful (a
>> kernel with rtw88 debugfs, a debug_mask setting, a monitor-mode
>> capture)? I can provide full logs and test patches.
> 
> The kernel v5.3 or earlier support RTL8822BE. Could you bisect (use
> distro live image) which kernel can work to you? It would be easier
> to address problem. 
> 
> Have you tested with disabling Bluetooth, since this is a combo chip?
> 
> Another point is that rtw88 can only support these types:
> 
> static const struct rtw8822b_rfe_info rtw8822b_rfe_info[] = {
> 	[2] = I2GE5G_CCUT(efem),
> 	[3] = IFEM_EXT_CCUT(ifem),
> 	[5] = IFEM_EXT_CCUT(ifem),
> };
> 
> You can add a printk to print the type of your RTL8822BE.

On CachyOS you can get the RFE type from debugfs:

cat /sys/kernel/debug/ieee80211/phy*/rtw88/coex_info

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
  2026-11-04 10:45   ` Bitterblue Smith
@ 2026-11-11 10:15     ` Pablo Martínez Ríos
  2026-11-11 11:58       ` Bitterblue Smith
  0 siblings, 1 reply; 12+ messages in thread
From: Pablo Martínez Ríos @ 2026-11-11 10:15 UTC (permalink / raw)
  To: Bitterblue Smith; +Cc: Ping-Ke Shih, linux-wireless@vger.kernel.org

Hi Ping-Ke, hi Bitterblue,

Thank you for the suggestions, and sorry for the delay. I ran most of
them; answers inline. Tests were done upstairs, in the usual spot,
unless stated otherwise.

> Is there any version working well to you?
> Could you bisect (use distro live image) which kernel can work to you?

Not so far. Debian 13 (6.12.107), Ubuntu 26.10 (7.3.0-9-generic) and
CachyOS (a 7.x kernel, exact version not recorded) behave the same. I
have not tested older kernels yet: old live ISOs may not boot here with
Secure Boot enabled. I could try disabling it to test it out if you think
it's worth it, but since I'm currently using Windows 11 with encrypted
drives, I'm not sure if that might cause any problems.

> I think it is worth to try putting closer.
> And, can you try another AP to see if anything different?

- Next to the router, 5 GHz works very well: about -45 dBm, link rates
  780/702 Mbit/s, ping about 2 ms, speed tests 350-440 Mbit/s.
- A phone hotspot on 5 GHz (ch 149, 80 MHz) at 1 m: 0% loss.
- I connected next to the router and carried the laptop upstairs while
  logging once per second. The signal went from -45 to about -78 dBm;
  pings were lost only when it reached about -77 dBm, and "tx failed"
  went from 1 to 8 within 5 s. After that the association stayed up
  (ping about 2 ms). Reconnecting to the same 5 GHz BSS from that spot
  fails every time (authentication timeouts).
- Windows 11 on the same laptop in the same spot connects to that BSS
  (RSSI -76 to -81 dBm as reported by Windows, 80/80 pings, 3-9 ms).

> How can you prove "no authentication response is ever received"?
> Can AP ack the auth? I mean that might be a TX side problem.

I cannot prove it; that sentence was an inference. I tested with a
second (monitor) interface on the same card (Ubuntu 26.10, 7.3.0-9):

1) Beacons: with the station interface down and mon0 fixed on channel
   36 (20 MHz, no HT), I receive 194 and 196 beacons of the AP in 20 s
   (about 195 expected), mean -75 dBm. So RX is fine.
2) In that state I injected 100 probe requests and 100 open-system
   authentication frames from my MAC to the AP: it ACKed about 100/100
   of each and answered them (many retransmitted answers, since mon0
   does not ACK them). The same on 2.4 GHz and next to the router.
3) With mon0 at 40 MHz (center 5190) or 80 MHz (center 5210) and
   everything else equal, the AP did not ACK or answer any of the 100
   probes or 100 authentication frames, while its beacons were still
   received (99-100 of about 100).
4) I set the router's 5 GHz width to 20 MHz (it advertises no
   secondary channel). Station-mode authentication still failed.
5) Station mode also fails on 2.4 GHz at certain times of day (e.g.
   with NetworkManager on Nov 8 at 13:14, and with plain "iw connect"
   open authentication on Nov 11 at 10:49), although on Nov 8 at 14:05
   injected frames on 2.4 GHz were ACKed 100/100. So from the same spot,
   injected frames at 20 MHz are ACKed, but authentication from the
   station interface is not, in both bands.

I do not know whether (3) is a monitor-mode artifact or related to the
failure. Is there something in the station-mode TX path (per-bandwidth
TX power, rates, RF configuration for this RFE) that differs from
injection? If you tell me which debug output or capture you would like
to see, I can collect it.

> For this case, "iw dev wlo1 set power_save off" should help.
> How about the loss rate comparing to power_save on? Almost the same?

Almost the same. In on/off pairs (2.4 GHz upstairs, 2.4 GHz next to the
router, and the 5 GHz hotspot) there was 0% loss in every run with
either setting. "firmware failed to leave lps state" appeared only in
some runs with power_save on and never in runs with it off. My earlier
54% figure came from a day when the 2.4 GHz link was bad for other
reasons, so please ignore it as evidence about power_save.

> Have you tested with disabling Bluetooth, since this is a combo chip?

Partially: I unloaded btusb (the bluetooth core stayed loaded because
other modules use it). 2.4 GHz was unchanged and 5 GHz upstairs still
fails. I do not know whether the BT side of the chip stays powered.

> You can add a printk to print the type of your RTL8822BE.

Thanks to Bitterblue's hint: the Ubuntu kernel has the rtw88 debugfs,
and coex_info reports "Mech/ RFE = Shared/ 5", so it is RFE type 5, one
of the supported types. I did not keep the dumps; I can collect
coex_info, phy_info and tx_pwr_tbl again if useful. I could not use the
edcca_enable switch: opening it fails with "Operation not permitted"
(probably kernel lockdown because of Secure Boot).

Corrections to my first message: the "wpa-psk" profile against the
router in WPA2/WPA3 mode actually used SAE in my logs. I can only say
the 5 GHz failure happens with the router set to WPA/WPA2 (Oct 31) and
to WPA2/WPA3. Also, the 2.4 GHz link varies a lot with the time of day
(it worked on the evenings of Nov 5 and 7, but not at other times,
possibly because of a strong nearby 2.4 GHz AP), so please treat
"Problem 2" as unreliable. The 5 GHz failure upstairs is reproducible.

Thanks,
Pablo

El mié, 4 nov 2026 a las 11:45, Bitterblue Smith
(<rtl8821cerfe2@gmail.com>) escribió:
>
> On 04/11/2026 03:33, Ping-Ke Shih wrote:
> > Pablo Martínez Ríos <pabloriosmartinez@gmail.com> wrote:
> >> Hello,
> >>
> >> I would like to report a problem with an RTL8822BE using rtw88_8822be.
> >> The same card, in the same spot, works well on Windows, so I suspect a
> >> driver/firmware issue rather than coverage. I am happy to run any tests
> >> or try patches.
> >>
> >> HARDWARE / SOFTWARE
> >> - Laptop: HP Pavilion 15-bc450ns (i5-8300H), BIOS F.32
> >> - Card: Realtek RTL8822BE, PCI ID 10ec:b822 (04:00.0), HP subsystem.
> >>   Both antenna cables are connected; "iw phy" reports available and
> >>   configured antennas TX 0x3 / RX 0x3.
> >> - Debian 13.7 live USB, kernel 6.12.107+deb13-amd64, firmware-realtek
> >>   20250410-2, rtw88 firmware 27.2.0 (H2C 13)
> >> - Same behaviour earlier on CachyOS (a recent 7.x kernel, exact version
> >>   not recorded) and on an Ubuntu live session (26.10)
> >
> > Is there any version working well to you?
> >
> >> - Module parameters at defaults: disable_lps_deep=N, disable_aspm=N,
> >>   support_bf=Y
> >> - Router: ISP-supplied Huawei OptiXstar EG8145X6-10, separate SSIDs for
> >>   2.4 GHz (ch 6, 20 MHz) and 5 GHz (ch 36, auto width). The router is
> >>   one floor below the laptop, with a concrete slab in between.
> >
> > I think it is worth to try putting closer.
> >
> > And, can you try another AP to see if anything different?
> >
> >>
> >> PROBLEM 1: 5 GHz
> >> Linux never authenticates. This repeats indefinitely:
> >>
> >>   wlo1: authenticate with 22:87:ec:xx:xx:08 (local address=90:32:4b:xx:xx:xx)
> >>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 1/3)
> >>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 2/3)
> >>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 3/3)
> >>   wlo1: authentication with 22:87:ec:xx:xx:08 timed out
> >>
> >> - It fails with WPA2-PSK and with WPA3 (SAE), and with the router set to
> >>   WPA/WPA2 TKIP+AES and to WPA2/WPA3 AES, so it fails at the 802.11
> >>   authentication frame, before any SAE/EAPOL exchange.
> >> - Same result with regulatory domain 00 and with "iw reg set ES".
> >> - The BSS appears in scans (its beacons carry country IE ES), but no
> >>   authentication response is ever received.
> >
> > How can you prove "no authentication response is ever received" ?
> > Can AP ack the auth? I mean that might be a TX side problem.
> >
> >> - Windows 11 on the same laptop, same spot (Realtek driver
> >>   2024.0.10.209): connects with WPA3-Personal, reported RSSI -76 to
> >>   -81 dBm, 80/80 pings answered, 3-9 ms, link rate 260-292 Mbps as
> >>   reported by Windows.
> >>
> >> PROBLEM 2: 2.4 GHz
> >> - Linux associates, but the link is very poor: iw reports about -73 to
> >>   -76 dBm, and the beacon loss counter rises about once per second
> >>   (14 to 65 over roughly 2 minutes). Across 5 runs, ping to the router
> >>   showed 0-54% loss and average RTT of 37-278 ms.
> >> - Kernel messages: "rtw_8822be 0000:04:00.0: firmware failed to leave
> >>   lps state" (several times), and once "failed to send h2c command".
> >
> > For this case, "iw dev wlo1 set power_save off" should help.
> >
> >> - The beacon signal average (-97 to -109 dBm) is far below the frame
> >>   signal average (about -75 dBm). With a phone hotspot at -48 dBm both
> >>   agree (-46). Occasionally signal readings of -100 to -112 dBm appear
> >>   with the second chain at 0 while traffic continues.
> >> - Windows, same spot: 60/60 pings, average 12 ms (max 157 ms).
> >> - With a phone hotspot (2.4 GHz, ch 1, -48 dBm), Linux works well:
> >>   rx 78 Mbit/s (VHT-MCS 8, NSS 1), tx 65 Mbit/s (MCS 7).
> >>
> >> TRIED WITHOUT EFFECT
> >> - "iw dev wlo1 set power_save off" (one run had 54% ping loss)
> >
> > How about the loss rate comparing to power_save on? Almost the same?
> >
> >> - rtw88_pci disable_aspm=Y (lspci still showed "ASPM L1 Enabled"
> >>   afterwards)
> >> - WPA2 vs WPA3, regulatory domain 00 vs ES
> >>
> >> COULD NOT CHECK
> >> /sys/kernel/debug/ieee80211/phy0/rtw88 does not exist on the Debian
> >> kernel (presumably rtw88 debugfs is not enabled), so I could not read
> >> tx_pwr_tbl, phy_info or coex_info, nor test the edcca_enable switch.
> >> A single correctable PCIe error (BadDLLP) was logged once; the AER
> >> counters were 0 later.
> >>
> >> QUESTIONS
> >> Is this a known issue? Which additional data would be most useful (a
> >> kernel with rtw88 debugfs, a debug_mask setting, a monitor-mode
> >> capture)? I can provide full logs and test patches.
> >
> > The kernel v5.3 or earlier support RTL8822BE. Could you bisect (use
> > distro live image) which kernel can work to you? It would be easier
> > to address problem.
> >
> > Have you tested with disabling Bluetooth, since this is a combo chip?
> >
> > Another point is that rtw88 can only support these types:
> >
> > static const struct rtw8822b_rfe_info rtw8822b_rfe_info[] = {
> >       [2] = I2GE5G_CCUT(efem),
> >       [3] = IFEM_EXT_CCUT(ifem),
> >       [5] = IFEM_EXT_CCUT(ifem),
> > };
> >
> > You can add a printk to print the type of your RTL8822BE.
>
> On CachyOS you can get the RFE type from debugfs:
>
> cat /sys/kernel/debug/ieee80211/phy*/rtw88/coex_info

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
  2026-11-11 10:15     ` Pablo Martínez Ríos
@ 2026-11-11 11:58       ` Bitterblue Smith
  2026-11-11 21:00         ` Pablo Martínez Ríos
  0 siblings, 1 reply; 12+ messages in thread
From: Bitterblue Smith @ 2026-11-11 11:58 UTC (permalink / raw)
  To: Pablo Martínez Ríos
  Cc: Ping-Ke Shih, linux-wireless@vger.kernel.org

On 11/11/2026 12:15, Pablo Martínez Ríos wrote:
> Hi Ping-Ke, hi Bitterblue,
> 
> Thank you for the suggestions, and sorry for the delay. I ran most of
> them; answers inline. Tests were done upstairs, in the usual spot,
> unless stated otherwise.
> 
>> Is there any version working well to you?
>> Could you bisect (use distro live image) which kernel can work to you?
> 
> Not so far. Debian 13 (6.12.107), Ubuntu 26.10 (7.3.0-9-generic) and
> CachyOS (a 7.x kernel, exact version not recorded) behave the same. I
> have not tested older kernels yet: old live ISOs may not boot here with
> Secure Boot enabled. I could try disabling it to test it out if you think
> it's worth it, but since I'm currently using Windows 11 with encrypted
> drives, I'm not sure if that might cause any problems.
> 
>> I think it is worth to try putting closer.
>> And, can you try another AP to see if anything different?
> 
> - Next to the router, 5 GHz works very well: about -45 dBm, link rates
>   780/702 Mbit/s, ping about 2 ms, speed tests 350-440 Mbit/s.

[...]

>> You can add a printk to print the type of your RTL8822BE.
> 
> Thanks to Bitterblue's hint: the Ubuntu kernel has the rtw88 debugfs,
> and coex_info reports "Mech/ RFE = Shared/ 5", so it is RFE type 5, one

"Shared" indicates that your card has only one antenna, but I don't
think that's likely. You could not have 440 Mbps with just one antenna.

This comes from a byte in the chip's efuse. Maybe this byte is undefined
(0xff) in your chip, which would explain why it says "Shared". Here is
a patch to show the raw values:

diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index 7c178ed63f45..92fd410c15cf 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -46,6 +46,9 @@ static int rtw8822b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map, u8 *phy_map)
 
 	map = (struct rtw8822b_efuse *)log_map;
 
+	print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1,
+		       log_map, efuse->logical_size, true);
+
 	efuse->usb_mode_switch = u8_get_bits(map->usb_mode, BIT(7));
 	efuse->rfe_option = map->rfe_option;
 	efuse->rf_board_option = map->rf_board_option;

> of the supported types. I did not keep the dumps; I can collect
> coex_info, phy_info and tx_pwr_tbl again if useful. I could not use the
> edcca_enable switch: opening it fails with "Operation not permitted"
> (probably kernel lockdown because of Secure Boot).
> 
> Corrections to my first message: the "wpa-psk" profile against the
> router in WPA2/WPA3 mode actually used SAE in my logs. I can only say
> the 5 GHz failure happens with the router set to WPA/WPA2 (Oct 31) and
> to WPA2/WPA3. Also, the 2.4 GHz link varies a lot with the time of day
> (it worked on the evenings of Nov 5 and 7, but not at other times,
> possibly because of a strong nearby 2.4 GHz AP), so please treat
> "Problem 2" as unreliable. The 5 GHz failure upstairs is reproducible.
> 
> Thanks,
> Pablo
> 
> El mié, 4 nov 2026 a las 11:45, Bitterblue Smith
> (<rtl8821cerfe2@gmail.com>) escribió:
>>
>> On 04/11/2026 03:33, Ping-Ke Shih wrote:
>>> Pablo Martínez Ríos <pabloriosmartinez@gmail.com> wrote:
>>>> Hello,
>>>>
>>>> I would like to report a problem with an RTL8822BE using rtw88_8822be.
>>>> The same card, in the same spot, works well on Windows, so I suspect a
>>>> driver/firmware issue rather than coverage. I am happy to run any tests
>>>> or try patches.
>>>>
>>>> HARDWARE / SOFTWARE
>>>> - Laptop: HP Pavilion 15-bc450ns (i5-8300H), BIOS F.32
>>>> - Card: Realtek RTL8822BE, PCI ID 10ec:b822 (04:00.0), HP subsystem.
>>>>   Both antenna cables are connected; "iw phy" reports available and
>>>>   configured antennas TX 0x3 / RX 0x3.
>>>> - Debian 13.7 live USB, kernel 6.12.107+deb13-amd64, firmware-realtek
>>>>   20250410-2, rtw88 firmware 27.2.0 (H2C 13)
>>>> - Same behaviour earlier on CachyOS (a recent 7.x kernel, exact version
>>>>   not recorded) and on an Ubuntu live session (26.10)
>>>
>>> Is there any version working well to you?
>>>
>>>> - Module parameters at defaults: disable_lps_deep=N, disable_aspm=N,
>>>>   support_bf=Y
>>>> - Router: ISP-supplied Huawei OptiXstar EG8145X6-10, separate SSIDs for
>>>>   2.4 GHz (ch 6, 20 MHz) and 5 GHz (ch 36, auto width). The router is
>>>>   one floor below the laptop, with a concrete slab in between.
>>>
>>> I think it is worth to try putting closer.
>>>
>>> And, can you try another AP to see if anything different?
>>>
>>>>
>>>> PROBLEM 1: 5 GHz
>>>> Linux never authenticates. This repeats indefinitely:
>>>>
>>>>   wlo1: authenticate with 22:87:ec:xx:xx:08 (local address=90:32:4b:xx:xx:xx)
>>>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 1/3)
>>>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 2/3)
>>>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 3/3)
>>>>   wlo1: authentication with 22:87:ec:xx:xx:08 timed out
>>>>
>>>> - It fails with WPA2-PSK and with WPA3 (SAE), and with the router set to
>>>>   WPA/WPA2 TKIP+AES and to WPA2/WPA3 AES, so it fails at the 802.11
>>>>   authentication frame, before any SAE/EAPOL exchange.
>>>> - Same result with regulatory domain 00 and with "iw reg set ES".
>>>> - The BSS appears in scans (its beacons carry country IE ES), but no
>>>>   authentication response is ever received.
>>>
>>> How can you prove "no authentication response is ever received" ?
>>> Can AP ack the auth? I mean that might be a TX side problem.
>>>
>>>> - Windows 11 on the same laptop, same spot (Realtek driver
>>>>   2024.0.10.209): connects with WPA3-Personal, reported RSSI -76 to
>>>>   -81 dBm, 80/80 pings answered, 3-9 ms, link rate 260-292 Mbps as
>>>>   reported by Windows.
>>>>
>>>> PROBLEM 2: 2.4 GHz
>>>> - Linux associates, but the link is very poor: iw reports about -73 to
>>>>   -76 dBm, and the beacon loss counter rises about once per second
>>>>   (14 to 65 over roughly 2 minutes). Across 5 runs, ping to the router
>>>>   showed 0-54% loss and average RTT of 37-278 ms.
>>>> - Kernel messages: "rtw_8822be 0000:04:00.0: firmware failed to leave
>>>>   lps state" (several times), and once "failed to send h2c command".
>>>
>>> For this case, "iw dev wlo1 set power_save off" should help.
>>>
>>>> - The beacon signal average (-97 to -109 dBm) is far below the frame
>>>>   signal average (about -75 dBm). With a phone hotspot at -48 dBm both
>>>>   agree (-46). Occasionally signal readings of -100 to -112 dBm appear
>>>>   with the second chain at 0 while traffic continues.
>>>> - Windows, same spot: 60/60 pings, average 12 ms (max 157 ms).
>>>> - With a phone hotspot (2.4 GHz, ch 1, -48 dBm), Linux works well:
>>>>   rx 78 Mbit/s (VHT-MCS 8, NSS 1), tx 65 Mbit/s (MCS 7).
>>>>
>>>> TRIED WITHOUT EFFECT
>>>> - "iw dev wlo1 set power_save off" (one run had 54% ping loss)
>>>
>>> How about the loss rate comparing to power_save on? Almost the same?
>>>
>>>> - rtw88_pci disable_aspm=Y (lspci still showed "ASPM L1 Enabled"
>>>>   afterwards)
>>>> - WPA2 vs WPA3, regulatory domain 00 vs ES
>>>>
>>>> COULD NOT CHECK
>>>> /sys/kernel/debug/ieee80211/phy0/rtw88 does not exist on the Debian
>>>> kernel (presumably rtw88 debugfs is not enabled), so I could not read
>>>> tx_pwr_tbl, phy_info or coex_info, nor test the edcca_enable switch.
>>>> A single correctable PCIe error (BadDLLP) was logged once; the AER
>>>> counters were 0 later.
>>>>
>>>> QUESTIONS
>>>> Is this a known issue? Which additional data would be most useful (a
>>>> kernel with rtw88 debugfs, a debug_mask setting, a monitor-mode
>>>> capture)? I can provide full logs and test patches.
>>>
>>> The kernel v5.3 or earlier support RTL8822BE. Could you bisect (use
>>> distro live image) which kernel can work to you? It would be easier
>>> to address problem.
>>>
>>> Have you tested with disabling Bluetooth, since this is a combo chip?
>>>
>>> Another point is that rtw88 can only support these types:
>>>
>>> static const struct rtw8822b_rfe_info rtw8822b_rfe_info[] = {
>>>       [2] = I2GE5G_CCUT(efem),
>>>       [3] = IFEM_EXT_CCUT(ifem),
>>>       [5] = IFEM_EXT_CCUT(ifem),
>>> };
>>>
>>> You can add a printk to print the type of your RTL8822BE.
>>
>> On CachyOS you can get the RFE type from debugfs:
>>
>> cat /sys/kernel/debug/ieee80211/phy*/rtw88/coex_info


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
  2026-11-11 11:58       ` Bitterblue Smith
@ 2026-11-11 21:00         ` Pablo Martínez Ríos
  2026-11-12 15:50           ` Bitterblue Smith
  0 siblings, 1 reply; 12+ messages in thread
From: Pablo Martínez Ríos @ 2026-11-11 21:00 UTC (permalink / raw)
  To: Bitterblue Smith; +Cc: Ping-Ke Shih, linux-wireless@vger.kernel.org

Hi Bitterblue, hi Ping-Ke,

I built the Debian 6.12.107 rtw88 sources with your print_hex_dump patch
(nothing else changed) and loaded the modules. This is the raw efuse
logical map of the RTL8822BE, with my MAC address (0xd0-0xd5) replaced
by xx. 0x70-0xaf is all 0xff, and I left out 0x100 and above:

00000000: 29 81 00 3c 09 10 0b 00 ac 04 a4 35 10 03 30 0b
00000010: 2c 2c 2d 2d 2d 2d 2c 2c 2c 2c 2c 02 00 00 ff ff
00000020: ff ff 27 27 27 27 27 27 27 29 2a 2b 2a 2a 2c 2e
00000030: 02 00 ff ff 00 ff 0c 00 ff ff 29 29 29 29 29 29
00000040: 29 29 29 29 29 02 00 00 ff ff ff ff 26 25 25 23
00000050: 23 23 23 23 25 25 23 23 23 23 02 00 ff ff 00 ff
00000060: 0c 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff
000000b0: ff ff ff ff ff ff ff ff 7f 21 1d 00 ff ff ff ff
000000c0: ff 29 00 11 00 00 00 00 00 ff 05 ff ff ff ff ff
000000d0: xx xx xx xx xx xx ec 10 22 b8 3c 10 1b 83 c3 ff
000000e0: 80 8d 80 08 00 00 11 3c 27 00 10 20 01 22 b8 fe
000000f0: ff 4c e0 00 04 0c 00 80 02 00 80 02 00 00 f0 00

With the struct layout of rtw8822b_efuse (channel_plan at 0xb8):
  0xb8 channel_plan = 0x7f, xtal_k = 0x21, thermal_meter = 0x1d
  0xbc pa_type = 0xff, lna_type_2g/5g = 0xff
  0xc1 rf_board_option = 0x29, rf_feature_option = 0x00
  0xc3 rf_bt_setting = 0x11
  0xc9 rf_antenna_option = 0xff, 0xca rfe_option = 0x05
  country_code = ff ff
The PCI ids appear at 0xd6-0xdd (10ec:b822, subsystem 103c:831b), so the
offsets look right.

So rfe_option is 5, as coex_info said. If "Shared" is derived from
rf_bt_setting (bit 0 of 0x11 is set), that byte is programmed, not 0xff.
rf_antenna_option is 0xff, so if that is the byte you meant, it is
indeed undefined. Which byte does coex_info use for "Shared"? And is
0xff in rf_antenna_option / pa_type / lna_type normal for RFE 5?

I understood "Shared" as the Bluetooth sharing an antenna with the
WLAN (not that the WLAN has a single one), which would fit 2 spatial
streams working, but I may be wrong.

What would you like me to try next?

Thanks,
Pablo

El mié, 11 nov 2026 a las 12:58, Bitterblue Smith
(<rtl8821cerfe2@gmail.com>) escribió:
>
> On 11/11/2026 12:15, Pablo Martínez Ríos wrote:
> > Hi Ping-Ke, hi Bitterblue,
> >
> > Thank you for the suggestions, and sorry for the delay. I ran most of
> > them; answers inline. Tests were done upstairs, in the usual spot,
> > unless stated otherwise.
> >
> >> Is there any version working well to you?
> >> Could you bisect (use distro live image) which kernel can work to you?
> >
> > Not so far. Debian 13 (6.12.107), Ubuntu 26.10 (7.3.0-9-generic) and
> > CachyOS (a 7.x kernel, exact version not recorded) behave the same. I
> > have not tested older kernels yet: old live ISOs may not boot here with
> > Secure Boot enabled. I could try disabling it to test it out if you think
> > it's worth it, but since I'm currently using Windows 11 with encrypted
> > drives, I'm not sure if that might cause any problems.
> >
> >> I think it is worth to try putting closer.
> >> And, can you try another AP to see if anything different?
> >
> > - Next to the router, 5 GHz works very well: about -45 dBm, link rates
> >   780/702 Mbit/s, ping about 2 ms, speed tests 350-440 Mbit/s.
>
> [...]
>
> >> You can add a printk to print the type of your RTL8822BE.
> >
> > Thanks to Bitterblue's hint: the Ubuntu kernel has the rtw88 debugfs,
> > and coex_info reports "Mech/ RFE = Shared/ 5", so it is RFE type 5, one
>
> "Shared" indicates that your card has only one antenna, but I don't
> think that's likely. You could not have 440 Mbps with just one antenna.
>
> This comes from a byte in the chip's efuse. Maybe this byte is undefined
> (0xff) in your chip, which would explain why it says "Shared". Here is
> a patch to show the raw values:
>
> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
> index 7c178ed63f45..92fd410c15cf 100644
> --- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
> @@ -46,6 +46,9 @@ static int rtw8822b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map, u8 *phy_map)
>
>         map = (struct rtw8822b_efuse *)log_map;
>
> +       print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1,
> +                      log_map, efuse->logical_size, true);
> +
>         efuse->usb_mode_switch = u8_get_bits(map->usb_mode, BIT(7));
>         efuse->rfe_option = map->rfe_option;
>         efuse->rf_board_option = map->rf_board_option;
>
> > of the supported types. I did not keep the dumps; I can collect
> > coex_info, phy_info and tx_pwr_tbl again if useful. I could not use the
> > edcca_enable switch: opening it fails with "Operation not permitted"
> > (probably kernel lockdown because of Secure Boot).
> >
> > Corrections to my first message: the "wpa-psk" profile against the
> > router in WPA2/WPA3 mode actually used SAE in my logs. I can only say
> > the 5 GHz failure happens with the router set to WPA/WPA2 (Oct 31) and
> > to WPA2/WPA3. Also, the 2.4 GHz link varies a lot with the time of day
> > (it worked on the evenings of Nov 5 and 7, but not at other times,
> > possibly because of a strong nearby 2.4 GHz AP), so please treat
> > "Problem 2" as unreliable. The 5 GHz failure upstairs is reproducible.
> >
> > Thanks,
> > Pablo
> >
> > El mié, 4 nov 2026 a las 11:45, Bitterblue Smith
> > (<rtl8821cerfe2@gmail.com>) escribió:
> >>
> >> On 04/11/2026 03:33, Ping-Ke Shih wrote:
> >>> Pablo Martínez Ríos <pabloriosmartinez@gmail.com> wrote:
> >>>> Hello,
> >>>>
> >>>> I would like to report a problem with an RTL8822BE using rtw88_8822be.
> >>>> The same card, in the same spot, works well on Windows, so I suspect a
> >>>> driver/firmware issue rather than coverage. I am happy to run any tests
> >>>> or try patches.
> >>>>
> >>>> HARDWARE / SOFTWARE
> >>>> - Laptop: HP Pavilion 15-bc450ns (i5-8300H), BIOS F.32
> >>>> - Card: Realtek RTL8822BE, PCI ID 10ec:b822 (04:00.0), HP subsystem.
> >>>>   Both antenna cables are connected; "iw phy" reports available and
> >>>>   configured antennas TX 0x3 / RX 0x3.
> >>>> - Debian 13.7 live USB, kernel 6.12.107+deb13-amd64, firmware-realtek
> >>>>   20250410-2, rtw88 firmware 27.2.0 (H2C 13)
> >>>> - Same behaviour earlier on CachyOS (a recent 7.x kernel, exact version
> >>>>   not recorded) and on an Ubuntu live session (26.10)
> >>>
> >>> Is there any version working well to you?
> >>>
> >>>> - Module parameters at defaults: disable_lps_deep=N, disable_aspm=N,
> >>>>   support_bf=Y
> >>>> - Router: ISP-supplied Huawei OptiXstar EG8145X6-10, separate SSIDs for
> >>>>   2.4 GHz (ch 6, 20 MHz) and 5 GHz (ch 36, auto width). The router is
> >>>>   one floor below the laptop, with a concrete slab in between.
> >>>
> >>> I think it is worth to try putting closer.
> >>>
> >>> And, can you try another AP to see if anything different?
> >>>
> >>>>
> >>>> PROBLEM 1: 5 GHz
> >>>> Linux never authenticates. This repeats indefinitely:
> >>>>
> >>>>   wlo1: authenticate with 22:87:ec:xx:xx:08 (local address=90:32:4b:xx:xx:xx)
> >>>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 1/3)
> >>>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 2/3)
> >>>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 3/3)
> >>>>   wlo1: authentication with 22:87:ec:xx:xx:08 timed out
> >>>>
> >>>> - It fails with WPA2-PSK and with WPA3 (SAE), and with the router set to
> >>>>   WPA/WPA2 TKIP+AES and to WPA2/WPA3 AES, so it fails at the 802.11
> >>>>   authentication frame, before any SAE/EAPOL exchange.
> >>>> - Same result with regulatory domain 00 and with "iw reg set ES".
> >>>> - The BSS appears in scans (its beacons carry country IE ES), but no
> >>>>   authentication response is ever received.
> >>>
> >>> How can you prove "no authentication response is ever received" ?
> >>> Can AP ack the auth? I mean that might be a TX side problem.
> >>>
> >>>> - Windows 11 on the same laptop, same spot (Realtek driver
> >>>>   2024.0.10.209): connects with WPA3-Personal, reported RSSI -76 to
> >>>>   -81 dBm, 80/80 pings answered, 3-9 ms, link rate 260-292 Mbps as
> >>>>   reported by Windows.
> >>>>
> >>>> PROBLEM 2: 2.4 GHz
> >>>> - Linux associates, but the link is very poor: iw reports about -73 to
> >>>>   -76 dBm, and the beacon loss counter rises about once per second
> >>>>   (14 to 65 over roughly 2 minutes). Across 5 runs, ping to the router
> >>>>   showed 0-54% loss and average RTT of 37-278 ms.
> >>>> - Kernel messages: "rtw_8822be 0000:04:00.0: firmware failed to leave
> >>>>   lps state" (several times), and once "failed to send h2c command".
> >>>
> >>> For this case, "iw dev wlo1 set power_save off" should help.
> >>>
> >>>> - The beacon signal average (-97 to -109 dBm) is far below the frame
> >>>>   signal average (about -75 dBm). With a phone hotspot at -48 dBm both
> >>>>   agree (-46). Occasionally signal readings of -100 to -112 dBm appear
> >>>>   with the second chain at 0 while traffic continues.
> >>>> - Windows, same spot: 60/60 pings, average 12 ms (max 157 ms).
> >>>> - With a phone hotspot (2.4 GHz, ch 1, -48 dBm), Linux works well:
> >>>>   rx 78 Mbit/s (VHT-MCS 8, NSS 1), tx 65 Mbit/s (MCS 7).
> >>>>
> >>>> TRIED WITHOUT EFFECT
> >>>> - "iw dev wlo1 set power_save off" (one run had 54% ping loss)
> >>>
> >>> How about the loss rate comparing to power_save on? Almost the same?
> >>>
> >>>> - rtw88_pci disable_aspm=Y (lspci still showed "ASPM L1 Enabled"
> >>>>   afterwards)
> >>>> - WPA2 vs WPA3, regulatory domain 00 vs ES
> >>>>
> >>>> COULD NOT CHECK
> >>>> /sys/kernel/debug/ieee80211/phy0/rtw88 does not exist on the Debian
> >>>> kernel (presumably rtw88 debugfs is not enabled), so I could not read
> >>>> tx_pwr_tbl, phy_info or coex_info, nor test the edcca_enable switch.
> >>>> A single correctable PCIe error (BadDLLP) was logged once; the AER
> >>>> counters were 0 later.
> >>>>
> >>>> QUESTIONS
> >>>> Is this a known issue? Which additional data would be most useful (a
> >>>> kernel with rtw88 debugfs, a debug_mask setting, a monitor-mode
> >>>> capture)? I can provide full logs and test patches.
> >>>
> >>> The kernel v5.3 or earlier support RTL8822BE. Could you bisect (use
> >>> distro live image) which kernel can work to you? It would be easier
> >>> to address problem.
> >>>
> >>> Have you tested with disabling Bluetooth, since this is a combo chip?
> >>>
> >>> Another point is that rtw88 can only support these types:
> >>>
> >>> static const struct rtw8822b_rfe_info rtw8822b_rfe_info[] = {
> >>>       [2] = I2GE5G_CCUT(efem),
> >>>       [3] = IFEM_EXT_CCUT(ifem),
> >>>       [5] = IFEM_EXT_CCUT(ifem),
> >>> };
> >>>
> >>> You can add a printk to print the type of your RTL8822BE.
> >>
> >> On CachyOS you can get the RFE type from debugfs:
> >>
> >> cat /sys/kernel/debug/ieee80211/phy*/rtw88/coex_info
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
  2026-11-11 21:00         ` Pablo Martínez Ríos
@ 2026-11-12 15:50           ` Bitterblue Smith
  2026-11-12 20:44             ` Luka Gejak
  0 siblings, 1 reply; 12+ messages in thread
From: Bitterblue Smith @ 2026-11-12 15:50 UTC (permalink / raw)
  To: Pablo Martínez Ríos
  Cc: Ping-Ke Shih, linux-wireless@vger.kernel.org

On 11/11/2026 23:00, Pablo Martínez Ríos wrote:
> Hi Bitterblue, hi Ping-Ke,
> 
> I built the Debian 6.12.107 rtw88 sources with your print_hex_dump patch
> (nothing else changed) and loaded the modules. This is the raw efuse
> logical map of the RTL8822BE, with my MAC address (0xd0-0xd5) replaced
> by xx. 0x70-0xaf is all 0xff, and I left out 0x100 and above:
> 
> 00000000: 29 81 00 3c 09 10 0b 00 ac 04 a4 35 10 03 30 0b
> 00000010: 2c 2c 2d 2d 2d 2d 2c 2c 2c 2c 2c 02 00 00 ff ff
> 00000020: ff ff 27 27 27 27 27 27 27 29 2a 2b 2a 2a 2c 2e
> 00000030: 02 00 ff ff 00 ff 0c 00 ff ff 29 29 29 29 29 29
> 00000040: 29 29 29 29 29 02 00 00 ff ff ff ff 26 25 25 23
> 00000050: 23 23 23 23 25 25 23 23 23 23 02 00 ff ff 00 ff
> 00000060: 0c 00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> 000000b0: ff ff ff ff ff ff ff ff 7f 21 1d 00 ff ff ff ff
> 000000c0: ff 29 00 11 00 00 00 00 00 ff 05 ff ff ff ff ff
> 000000d0: xx xx xx xx xx xx ec 10 22 b8 3c 10 1b 83 c3 ff
> 000000e0: 80 8d 80 08 00 00 11 3c 27 00 10 20 01 22 b8 fe
> 000000f0: ff 4c e0 00 04 0c 00 80 02 00 80 02 00 00 f0 00
> 
> With the struct layout of rtw8822b_efuse (channel_plan at 0xb8):
>   0xb8 channel_plan = 0x7f, xtal_k = 0x21, thermal_meter = 0x1d
>   0xbc pa_type = 0xff, lna_type_2g/5g = 0xff
>   0xc1 rf_board_option = 0x29, rf_feature_option = 0x00
>   0xc3 rf_bt_setting = 0x11
>   0xc9 rf_antenna_option = 0xff, 0xca rfe_option = 0x05
>   country_code = ff ff
> The PCI ids appear at 0xd6-0xdd (10ec:b822, subsystem 103c:831b), so the
> offsets look right.
> 
> So rfe_option is 5, as coex_info said. If "Shared" is derived from
> rf_bt_setting (bit 0 of 0x11 is set), that byte is programmed, not 0xff.
> rf_antenna_option is 0xff, so if that is the byte you meant, it is
> indeed undefined. Which byte does coex_info use for "Shared"? And is
> 0xff in rf_antenna_option / pa_type / lna_type normal for RFE 5?

That looks normal. "Shared" comes from bit 0 of rf_bt_setting.

> 
> I understood "Shared" as the Bluetooth sharing an antenna with the
> WLAN (not that the WLAN has a single one), which would fit 2 spatial
> streams working, but I may be wrong.

Yes, that's probably correct. I guess "Shared" means one antenna only
for the chips with one spatial stream.

> 
> What would you like me to try next?

I don't have other ideas.

> 
> Thanks,
> Pablo
> 
> El mié, 11 nov 2026 a las 12:58, Bitterblue Smith
> (<rtl8821cerfe2@gmail.com>) escribió:
>>
>> On 11/11/2026 12:15, Pablo Martínez Ríos wrote:
>>> Hi Ping-Ke, hi Bitterblue,
>>>
>>> Thank you for the suggestions, and sorry for the delay. I ran most of
>>> them; answers inline. Tests were done upstairs, in the usual spot,
>>> unless stated otherwise.
>>>
>>>> Is there any version working well to you?
>>>> Could you bisect (use distro live image) which kernel can work to you?
>>>
>>> Not so far. Debian 13 (6.12.107), Ubuntu 26.10 (7.3.0-9-generic) and
>>> CachyOS (a 7.x kernel, exact version not recorded) behave the same. I
>>> have not tested older kernels yet: old live ISOs may not boot here with
>>> Secure Boot enabled. I could try disabling it to test it out if you think
>>> it's worth it, but since I'm currently using Windows 11 with encrypted
>>> drives, I'm not sure if that might cause any problems.
>>>
>>>> I think it is worth to try putting closer.
>>>> And, can you try another AP to see if anything different?
>>>
>>> - Next to the router, 5 GHz works very well: about -45 dBm, link rates
>>>   780/702 Mbit/s, ping about 2 ms, speed tests 350-440 Mbit/s.
>>
>> [...]
>>
>>>> You can add a printk to print the type of your RTL8822BE.
>>>
>>> Thanks to Bitterblue's hint: the Ubuntu kernel has the rtw88 debugfs,
>>> and coex_info reports "Mech/ RFE = Shared/ 5", so it is RFE type 5, one
>>
>> "Shared" indicates that your card has only one antenna, but I don't
>> think that's likely. You could not have 440 Mbps with just one antenna.
>>
>> This comes from a byte in the chip's efuse. Maybe this byte is undefined
>> (0xff) in your chip, which would explain why it says "Shared". Here is
>> a patch to show the raw values:
>>
>> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
>> index 7c178ed63f45..92fd410c15cf 100644
>> --- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
>> +++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
>> @@ -46,6 +46,9 @@ static int rtw8822b_read_efuse(struct rtw_dev *rtwdev, u8 *log_map, u8 *phy_map)
>>
>>         map = (struct rtw8822b_efuse *)log_map;
>>
>> +       print_hex_dump(KERN_INFO, "", DUMP_PREFIX_OFFSET, 16, 1,
>> +                      log_map, efuse->logical_size, true);
>> +
>>         efuse->usb_mode_switch = u8_get_bits(map->usb_mode, BIT(7));
>>         efuse->rfe_option = map->rfe_option;
>>         efuse->rf_board_option = map->rf_board_option;
>>
>>> of the supported types. I did not keep the dumps; I can collect
>>> coex_info, phy_info and tx_pwr_tbl again if useful. I could not use the
>>> edcca_enable switch: opening it fails with "Operation not permitted"
>>> (probably kernel lockdown because of Secure Boot).
>>>
>>> Corrections to my first message: the "wpa-psk" profile against the
>>> router in WPA2/WPA3 mode actually used SAE in my logs. I can only say
>>> the 5 GHz failure happens with the router set to WPA/WPA2 (Oct 31) and
>>> to WPA2/WPA3. Also, the 2.4 GHz link varies a lot with the time of day
>>> (it worked on the evenings of Nov 5 and 7, but not at other times,
>>> possibly because of a strong nearby 2.4 GHz AP), so please treat
>>> "Problem 2" as unreliable. The 5 GHz failure upstairs is reproducible.
>>>
>>> Thanks,
>>> Pablo
>>>
>>> El mié, 4 nov 2026 a las 11:45, Bitterblue Smith
>>> (<rtl8821cerfe2@gmail.com>) escribió:
>>>>
>>>> On 04/11/2026 03:33, Ping-Ke Shih wrote:
>>>>> Pablo Martínez Ríos <pabloriosmartinez@gmail.com> wrote:
>>>>>> Hello,
>>>>>>
>>>>>> I would like to report a problem with an RTL8822BE using rtw88_8822be.
>>>>>> The same card, in the same spot, works well on Windows, so I suspect a
>>>>>> driver/firmware issue rather than coverage. I am happy to run any tests
>>>>>> or try patches.
>>>>>>
>>>>>> HARDWARE / SOFTWARE
>>>>>> - Laptop: HP Pavilion 15-bc450ns (i5-8300H), BIOS F.32
>>>>>> - Card: Realtek RTL8822BE, PCI ID 10ec:b822 (04:00.0), HP subsystem.
>>>>>>   Both antenna cables are connected; "iw phy" reports available and
>>>>>>   configured antennas TX 0x3 / RX 0x3.
>>>>>> - Debian 13.7 live USB, kernel 6.12.107+deb13-amd64, firmware-realtek
>>>>>>   20250410-2, rtw88 firmware 27.2.0 (H2C 13)
>>>>>> - Same behaviour earlier on CachyOS (a recent 7.x kernel, exact version
>>>>>>   not recorded) and on an Ubuntu live session (26.10)
>>>>>
>>>>> Is there any version working well to you?
>>>>>
>>>>>> - Module parameters at defaults: disable_lps_deep=N, disable_aspm=N,
>>>>>>   support_bf=Y
>>>>>> - Router: ISP-supplied Huawei OptiXstar EG8145X6-10, separate SSIDs for
>>>>>>   2.4 GHz (ch 6, 20 MHz) and 5 GHz (ch 36, auto width). The router is
>>>>>>   one floor below the laptop, with a concrete slab in between.
>>>>>
>>>>> I think it is worth to try putting closer.
>>>>>
>>>>> And, can you try another AP to see if anything different?
>>>>>
>>>>>>
>>>>>> PROBLEM 1: 5 GHz
>>>>>> Linux never authenticates. This repeats indefinitely:
>>>>>>
>>>>>>   wlo1: authenticate with 22:87:ec:xx:xx:08 (local address=90:32:4b:xx:xx:xx)
>>>>>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 1/3)
>>>>>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 2/3)
>>>>>>   wlo1: send auth to 22:87:ec:xx:xx:08 (try 3/3)
>>>>>>   wlo1: authentication with 22:87:ec:xx:xx:08 timed out
>>>>>>
>>>>>> - It fails with WPA2-PSK and with WPA3 (SAE), and with the router set to
>>>>>>   WPA/WPA2 TKIP+AES and to WPA2/WPA3 AES, so it fails at the 802.11
>>>>>>   authentication frame, before any SAE/EAPOL exchange.
>>>>>> - Same result with regulatory domain 00 and with "iw reg set ES".
>>>>>> - The BSS appears in scans (its beacons carry country IE ES), but no
>>>>>>   authentication response is ever received.
>>>>>
>>>>> How can you prove "no authentication response is ever received" ?
>>>>> Can AP ack the auth? I mean that might be a TX side problem.
>>>>>
>>>>>> - Windows 11 on the same laptop, same spot (Realtek driver
>>>>>>   2024.0.10.209): connects with WPA3-Personal, reported RSSI -76 to
>>>>>>   -81 dBm, 80/80 pings answered, 3-9 ms, link rate 260-292 Mbps as
>>>>>>   reported by Windows.
>>>>>>
>>>>>> PROBLEM 2: 2.4 GHz
>>>>>> - Linux associates, but the link is very poor: iw reports about -73 to
>>>>>>   -76 dBm, and the beacon loss counter rises about once per second
>>>>>>   (14 to 65 over roughly 2 minutes). Across 5 runs, ping to the router
>>>>>>   showed 0-54% loss and average RTT of 37-278 ms.
>>>>>> - Kernel messages: "rtw_8822be 0000:04:00.0: firmware failed to leave
>>>>>>   lps state" (several times), and once "failed to send h2c command".
>>>>>
>>>>> For this case, "iw dev wlo1 set power_save off" should help.
>>>>>
>>>>>> - The beacon signal average (-97 to -109 dBm) is far below the frame
>>>>>>   signal average (about -75 dBm). With a phone hotspot at -48 dBm both
>>>>>>   agree (-46). Occasionally signal readings of -100 to -112 dBm appear
>>>>>>   with the second chain at 0 while traffic continues.
>>>>>> - Windows, same spot: 60/60 pings, average 12 ms (max 157 ms).
>>>>>> - With a phone hotspot (2.4 GHz, ch 1, -48 dBm), Linux works well:
>>>>>>   rx 78 Mbit/s (VHT-MCS 8, NSS 1), tx 65 Mbit/s (MCS 7).
>>>>>>
>>>>>> TRIED WITHOUT EFFECT
>>>>>> - "iw dev wlo1 set power_save off" (one run had 54% ping loss)
>>>>>
>>>>> How about the loss rate comparing to power_save on? Almost the same?
>>>>>
>>>>>> - rtw88_pci disable_aspm=Y (lspci still showed "ASPM L1 Enabled"
>>>>>>   afterwards)
>>>>>> - WPA2 vs WPA3, regulatory domain 00 vs ES
>>>>>>
>>>>>> COULD NOT CHECK
>>>>>> /sys/kernel/debug/ieee80211/phy0/rtw88 does not exist on the Debian
>>>>>> kernel (presumably rtw88 debugfs is not enabled), so I could not read
>>>>>> tx_pwr_tbl, phy_info or coex_info, nor test the edcca_enable switch.
>>>>>> A single correctable PCIe error (BadDLLP) was logged once; the AER
>>>>>> counters were 0 later.
>>>>>>
>>>>>> QUESTIONS
>>>>>> Is this a known issue? Which additional data would be most useful (a
>>>>>> kernel with rtw88 debugfs, a debug_mask setting, a monitor-mode
>>>>>> capture)? I can provide full logs and test patches.
>>>>>
>>>>> The kernel v5.3 or earlier support RTL8822BE. Could you bisect (use
>>>>> distro live image) which kernel can work to you? It would be easier
>>>>> to address problem.
>>>>>
>>>>> Have you tested with disabling Bluetooth, since this is a combo chip?
>>>>>
>>>>> Another point is that rtw88 can only support these types:
>>>>>
>>>>> static const struct rtw8822b_rfe_info rtw8822b_rfe_info[] = {
>>>>>       [2] = I2GE5G_CCUT(efem),
>>>>>       [3] = IFEM_EXT_CCUT(ifem),
>>>>>       [5] = IFEM_EXT_CCUT(ifem),
>>>>> };
>>>>>
>>>>> You can add a printk to print the type of your RTL8822BE.
>>>>
>>>> On CachyOS you can get the RFE type from debugfs:
>>>>
>>>> cat /sys/kernel/debug/ieee80211/phy*/rtw88/coex_info
>>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
  2026-11-12 15:50           ` Bitterblue Smith
@ 2026-11-12 20:44             ` Luka Gejak
  2026-11-24 17:20               ` Pablo Martínez Ríos
  0 siblings, 1 reply; 12+ messages in thread
From: Luka Gejak @ 2026-11-12 20:44 UTC (permalink / raw)
  To: linux-wireless, Bitterblue Smith, Pablo Martínez Ríos
  Cc: Ping-Ke Shih, linux-wireless@vger.kernel.org

Hi Pablo and Bitterblue,

On November 12, 2026 4:50:55 PM GMT+01:00, Bitterblue Smith
<rtl8821cerfe2@gmail.com> wrote:
>On 11/11/2026 23:00, Pablo Martínez Ríos wrote:
>>
>> What would you like me to try next?
>
> I don't have other ideas.

I had a look and I think this could be EDCCA. With the country set to ES,
rtw88 runs the ETSI adaptivity mode. The RTL8822B firmware doesn't do that
part itself, so the driver sets the energy detect threshold in
rtw8822b_adaptivity():

        l2h = min_t(s8, igi, dm_info->l2h_th_ini);
        h2l = l2h - EDCCA_L2H_H2L_DIFF;

l2h_th_ini is 36 for ETSI, so the threshold follows IGI down. Before the
association rtw88 has no station entry yet, so the DIG lets IGI drop to
its 0x1c floor. That gives L2H 28 and H2L 21, nominally -82 and -89 dBm.
As long as the energy on the channel stays above that, the MAC holds every
frame, so the authentication frames may never leave the card.

As far as I can see that fits most of what you measured. On 40 and 80 MHz
the receiver takes in the whole channel, so it likely sees more noise and
more traffic from other networks than on 20 MHz. That would explain why
the AP only ACKed your injected frames on 20 MHz.

Once associated, the DIG raises IGI at a much lower false alarm count, so
the threshold can sit higher. That may be why the link survived the walk
upstairs. To leave LPS the firmware also needs a null frame ACKed by the
AP, so the "firmware failed to leave lps state" messages could come from
the same thing.

Your kernels use the same rule on 2.4 GHz, which might explain the bad
times of day there as well. Josef already relaxed it for 2.4 GHz in
rtw-next with commit b0435910e47d.

The one result that doesn't fit is 00. With 00 the driver uses the normal
threshold, which never goes below 48 (nominally -62 dBm), so I would
expect 00 to work from upstairs. Could you check "iw reg get" right before
you connect, once with 00 and once with ES? After a connection the country
element of your router can switch it to ES.

Could you also try the patch below with ES set? On 5 GHz it uses a fixed
L2H of 45, nominally -65 dBm, which is 3 dB below the EN 301 893 level
over 20 MHz. It also carries Josef's 2.4 GHz change, so it should apply to
your 6.12 sources. If it helps, I will send it properly for rtw-next.

diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -1565,6 +1565,16 @@ static void rtw8822b_adaptivity(struct rtw_dev *rtwdev)
        if (dm_info->edcca_mode == RTW_EDCCA_NORMAL) {
                l2h = max_t(s8, igi + EDCCA_IGI_L2H_DIFF, EDCCA_TH_L2H_LB);
                h2l = l2h - EDCCA_L2H_H2L_DIFF_NORMAL;
+       } else if (rtwdev->regd.dfs_region == NL80211_DFS_ETSI &&
+                  rtwdev->hal.current_band_type == RTW_BAND_2G) {
+               /* follow the normal threshold, capped for EN 300 328 */
+               l2h = max_t(s8, igi + EDCCA_IGI_L2H_DIFF, EDCCA_TH_L2H_LB);
+               l2h = min_t(s8, l2h, RTW8822B_EDCCA_ETSI_2G);
+               h2l = l2h - EDCCA_L2H_H2L_DIFF;
+       } else if (rtwdev->regd.dfs_region == NL80211_DFS_ETSI &&
+                  rtwdev->hal.current_band_type == RTW_BAND_5G) {
+               l2h = RTW8822B_EDCCA_ETSI_5G;
+               h2l = l2h - EDCCA_L2H_H2L_DIFF;
        } else {
                l2h = min_t(s8, igi, dm_info->l2h_th_ini);
                h2l = l2h - EDCCA_L2H_H2L_DIFF;
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.h b/drivers/net/wireless/realtek/rtw88/rtw8822b.h
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.h
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.h
@@ -149,6 +149,10 @@ _rtw_write32s_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 data)
 #define GET_PHY_STAT_P1_RXSNR_B(phy_stat)                                      \
        le32_get_bits(*((__le32 *)(phy_stat) + 0x06), GENMASK(15, 8))

+/* nominally -60 dBm: 3 dB below the EN 300 328 level at 20 dBm e.i.r.p. */
+#define RTW8822B_EDCCA_ETSI_2G 50
+/* nominally -65 dBm: 3 dB below the EN 301 893 level over 20 MHz */
+#define RTW8822B_EDCCA_ETSI_5G 45
 #define RTW8822B_EDCCA_MAX     0x7f
 #define RTW8822B_EDCCA_SRC_DEF 1
 #define REG_HTSTFWT    0x800

Best regards,
Luka Gejak

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
  2026-11-12 20:44             ` Luka Gejak
@ 2026-11-24 17:20               ` Pablo Martínez Ríos
  2026-11-25 22:10                 ` Luka Gejak
  0 siblings, 1 reply; 12+ messages in thread
From: Pablo Martínez Ríos @ 2026-11-24 17:20 UTC (permalink / raw)
  To: Luka Gejak; +Cc: linux-wireless, Bitterblue Smith, Ping-Ke Shih

Hi Luka, hi Ping-Ke, hi Bitterblue,

Sorry for the long delay. Luka, thank you for the analysis and the
patch. Here are the results of what you asked, plus some new data. All
tests were done on the same machine and spot (upstairs, router one floor
below).

1) "iw reg get" before connecting, and your patch
Debian 13 live, stock 6.12.107 rtw88 sources, Secure Boot off so I could
load my own build. I applied your diff with a script (the two #defines
went to the top of rtw8822b.c instead of rtw8822b.h); it built cleanly
and dmesg shows the out-of-tree modules loaded. Each attempt was
"nmcli connection up" to the 5 GHz BSS (35 s timeout):
- original modules, reg 00: "country 00: DFS-UNSET" before and after;
  no connection (12 "send auth" lines)
- original modules, reg ES: "country ES: DFS-ETSI" before and after;
  no connection (14)
- patched modules, ES, twice: no connection (13 and 13)
- patched modules, 00: no connection (13)
The country never changed during an attempt (the card never associates).

2) EDCCA and coex switches
Ubuntu 26.10 live, 7.3.0-9-generic, country ES (tx_pwr_tbl says
"regulatory: ETSI"):
- edcca_enable=0 (reads back "EDCCA disabled: EDCCA mode 0"): still no
  connection (7 "send auth" lines)
- coex_enable=0 ("coex mechanism disabled"): still no connection (6)
Both were restored afterwards. So EDCCA does not look like the (only)
cause here. phy_info shows "Current IGI = 0x1c" with only a monitor
interface up and 0x20 in station mode before association.

3) Where the radio is when the authentication goes out
I polled phy_info every ~50 ms while NetworkManager tried to connect.
Before each attempt the card scans channels at 20 MHz (BW=0). Then, for
each authentication, it switches to "Current CH(fc) = 42, Current BW =
2" (tx_pwr_tbl shows channel 42 / bandwidth 2 when I set an 80 MHz
channel centered on 5210). The router advertises primary channel 36
with an 80 MHz operation. The 3 "send auth" lines go out about 10 ms
apart and "authentication ... timed out" comes about 30 ms after the
first one. In 16 failed rounds over two sessions it was always CH=42
BW=2. Next to the router (-45 dBm) the radio has the same configuration
and the authentication succeeds.

4) Injection by bandwidth
Station interface down, only a monitor interface fixed on channel 36,
100 authentication frames from my MAC to the AP (same result with probe
requests):
- 20 MHz (no HT): ACK on 87/100 and 65/100 (100/100 on earlier days);
  the AP also answers
- 40 MHz (center 5190) and 80 MHz (center 5210), primary 5180: 0 ACKs,
  while the AP's beacons still arrive (about 100 out of 100)
- tx_pwr_tbl: same index at 20/40/80 MHz (OFDM_6M: 45 path A / 44 path B)
When I set the router's 5 GHz width to 20 MHz earlier, station mode still
failed to authenticate, but I did not log the radio's bandwidth in that
run.

So at about -75 dBm, frames sent with a 40 or 80 MHz channel
configuration are not acknowledged while 20 MHz ones are. Is there
something in rtw88 for the TX of non-HT management frames when the
operating channel is 80 MHz (TX descriptor bandwidth, primary
sub-channel)? And is it expected that mac80211 configures the full 80 MHz
channel already for the authentication?

Next I will repeat the station-mode test with the router's 5 GHz width
set to 20 MHz, logging the radio's bandwidth. If you prefer, I can instead
run a debug patch that prints the TX descriptor fields of the
authentication frames, or test an older kernel; tell me which.

Thanks,
Pablo

El jue, 12 nov 2026 a las 21:44, Luka Gejak (<luka.gejak@linux.dev>) escribió:
>
> Hi Pablo and Bitterblue,
>
> On November 12, 2026 4:50:55 PM GMT+01:00, Bitterblue Smith
> <rtl8821cerfe2@gmail.com> wrote:
> >On 11/11/2026 23:00, Pablo Martínez Ríos wrote:
> >>
> >> What would you like me to try next?
> >
> > I don't have other ideas.
>
> I had a look and I think this could be EDCCA. With the country set to ES,
> rtw88 runs the ETSI adaptivity mode. The RTL8822B firmware doesn't do that
> part itself, so the driver sets the energy detect threshold in
> rtw8822b_adaptivity():
>
>         l2h = min_t(s8, igi, dm_info->l2h_th_ini);
>         h2l = l2h - EDCCA_L2H_H2L_DIFF;
>
> l2h_th_ini is 36 for ETSI, so the threshold follows IGI down. Before the
> association rtw88 has no station entry yet, so the DIG lets IGI drop to
> its 0x1c floor. That gives L2H 28 and H2L 21, nominally -82 and -89 dBm.
> As long as the energy on the channel stays above that, the MAC holds every
> frame, so the authentication frames may never leave the card.
>
> As far as I can see that fits most of what you measured. On 40 and 80 MHz
> the receiver takes in the whole channel, so it likely sees more noise and
> more traffic from other networks than on 20 MHz. That would explain why
> the AP only ACKed your injected frames on 20 MHz.
>
> Once associated, the DIG raises IGI at a much lower false alarm count, so
> the threshold can sit higher. That may be why the link survived the walk
> upstairs. To leave LPS the firmware also needs a null frame ACKed by the
> AP, so the "firmware failed to leave lps state" messages could come from
> the same thing.
>
> Your kernels use the same rule on 2.4 GHz, which might explain the bad
> times of day there as well. Josef already relaxed it for 2.4 GHz in
> rtw-next with commit b0435910e47d.
>
> The one result that doesn't fit is 00. With 00 the driver uses the normal
> threshold, which never goes below 48 (nominally -62 dBm), so I would
> expect 00 to work from upstairs. Could you check "iw reg get" right before
> you connect, once with 00 and once with ES? After a connection the country
> element of your router can switch it to ES.
>
> Could you also try the patch below with ES set? On 5 GHz it uses a fixed
> L2H of 45, nominally -65 dBm, which is 3 dB below the EN 301 893 level
> over 20 MHz. It also carries Josef's 2.4 GHz change, so it should apply to
> your 6.12 sources. If it helps, I will send it properly for rtw-next.
>
> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
> --- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
> @@ -1565,6 +1565,16 @@ static void rtw8822b_adaptivity(struct rtw_dev *rtwdev)
>         if (dm_info->edcca_mode == RTW_EDCCA_NORMAL) {
>                 l2h = max_t(s8, igi + EDCCA_IGI_L2H_DIFF, EDCCA_TH_L2H_LB);
>                 h2l = l2h - EDCCA_L2H_H2L_DIFF_NORMAL;
> +       } else if (rtwdev->regd.dfs_region == NL80211_DFS_ETSI &&
> +                  rtwdev->hal.current_band_type == RTW_BAND_2G) {
> +               /* follow the normal threshold, capped for EN 300 328 */
> +               l2h = max_t(s8, igi + EDCCA_IGI_L2H_DIFF, EDCCA_TH_L2H_LB);
> +               l2h = min_t(s8, l2h, RTW8822B_EDCCA_ETSI_2G);
> +               h2l = l2h - EDCCA_L2H_H2L_DIFF;
> +       } else if (rtwdev->regd.dfs_region == NL80211_DFS_ETSI &&
> +                  rtwdev->hal.current_band_type == RTW_BAND_5G) {
> +               l2h = RTW8822B_EDCCA_ETSI_5G;
> +               h2l = l2h - EDCCA_L2H_H2L_DIFF;
>         } else {
>                 l2h = min_t(s8, igi, dm_info->l2h_th_ini);
>                 h2l = l2h - EDCCA_L2H_H2L_DIFF;
> diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.h b/drivers/net/wireless/realtek/rtw88/rtw8822b.h
> --- a/drivers/net/wireless/realtek/rtw88/rtw8822b.h
> +++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.h
> @@ -149,6 +149,10 @@ _rtw_write32s_mask(struct rtw_dev *rtwdev, u32 addr, u32 mask, u32 data)
>  #define GET_PHY_STAT_P1_RXSNR_B(phy_stat)                                      \
>         le32_get_bits(*((__le32 *)(phy_stat) + 0x06), GENMASK(15, 8))
>
> +/* nominally -60 dBm: 3 dB below the EN 300 328 level at 20 dBm e.i.r.p. */
> +#define RTW8822B_EDCCA_ETSI_2G 50
> +/* nominally -65 dBm: 3 dB below the EN 301 893 level over 20 MHz */
> +#define RTW8822B_EDCCA_ETSI_5G 45
>  #define RTW8822B_EDCCA_MAX     0x7f
>  #define RTW8822B_EDCCA_SRC_DEF 1
>  #define REG_HTSTFWT    0x800
>
> Best regards,
> Luka Gejak

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
  2026-11-24 17:20               ` Pablo Martínez Ríos
@ 2026-11-25 22:10                 ` Luka Gejak
  2026-11-29 10:14                   ` Pablo Martínez Ríos
  0 siblings, 1 reply; 12+ messages in thread
From: Luka Gejak @ 2026-11-25 22:10 UTC (permalink / raw)
  To: Pablo Martínez Ríos
  Cc: linux-wireless, Bitterblue Smith, Ping-Ke Shih

Hi Pablo,

Thanks for running these tests. I have a few comments.

On November 24, 2026 6:20:01 PM GMT+01:00, Pablo Martínez Ríos
<pabloriosmartinez@gmail.com> wrote:

> patched modules, ES, twice: no connection

With the same failure under 00 and with the patch under ES, I think we
can set aside my ETSI threshold hypothesis. The edcca_enable switch puts
the 8822B back in normal EDCCA mode, so it still has an energy threshold.

[ ... ]

> mac80211 configures the full 80 MHz
> channel already for the authentication?

Yes. mac80211 sets the channel from the BSS before sending auth. rtw88
uses a legacy OFDM rate and sets DATA_BW to 20 MHz for the auth frame.
It sets the primary 20 MHz position in REG_DATA_SC and leaves DATA_SC
in the descriptor at zero. The old staging driver filled in that field
too. The vendor driver for the same PCI chip leaves it at zero for
ordinary management frames.

Ping-Ke, do you know if the 8822BE takes the primary position from
REG_DATA_SC when DATA_SC is zero for a legacy frame?

[ ... ]

> set to 20 MHz, logging the radio's bandwidth.

I'd start with that. Could you keep primary channel 36, confirm CH=36
and BW=0 during station auth, then switch the router back to 80 MHz and
repeat from the same spot? The 10 ms retries fit the path where rtw88
reports a TX failure and mac80211 retries without waiting for a reply.

If you have a second adapter, a capture near the router at 20 MHz on
channel 36 with control frames enabled would help. Can it see the auth
request, the router's ACK and the auth response during a failed attempt?
Also, were the injection ACK counts from captured frames or TX status?

Best regards,
Luka Gejak

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
  2026-11-25 22:10                 ` Luka Gejak
@ 2026-11-29 10:14                   ` Pablo Martínez Ríos
  2026-12-01  6:29                     ` Luka Gejak
  0 siblings, 1 reply; 12+ messages in thread
From: Pablo Martínez Ríos @ 2026-11-29 10:14 UTC (permalink / raw)
  To: Luka Gejak; +Cc: linux-wireless, Bitterblue Smith, Ping-Ke Shih

Hi Luka, hi Ping-Ke, hi Bitterblue,

I did the test you asked for (Ubuntu 26.10 live, 7.3.0-9-generic;
this kernel loads firmware 30.20.0, H2C 14, while the Debian 6.12.107
kernel I used before loaded 27.2.0, H2C 13, so both firmware versions
fail the same way). Upstairs, same spot, router's 5 GHz primary channel
fixed to 36. Before each phase I checked the BSS with "iw scan dump"
(80 MHz: "secondary channel offset: above", "channel width: 1 (80 MHz)";
20 MHz: "no secondary", "channel width: 0"). I polled
phy_info every 50 ms while NetworkManager tried to connect
(nmcli connection up, 25 s timeout) and took the last polled state
before each first "send auth":

- Router at 80 MHz: 6 rounds, always "Current CH(fc) = 42, Current BW =
  2"; no authentication succeeded.
- Router at 20 MHz: 7 rounds, always "Current CH(fc) = 36, Current BW =
  0" (in two rounds the CH=36 line appears 1-5 ms after the first
  "send auth" because of the polling interval); no authentication
  succeeded. Same pattern as before: 3 "send auth" about 10 ms apart,
  then "authentication ... timed out" about 30 ms after the first one.
- Router back at 80 MHz: 4 rounds, CH=42 BW=2; no authentication.

So with the radio on CH=36 BW=0 the station-mode authentication still
fails; bandwidth does not seem to be the cause in station mode. The
injection result stays as reported (20 MHz ACKed, 40/80 MHz not ACKed),
but it does not explain the station-mode failure.

About your question on the injection ACK counts: they come from captured
frames, i.e. control ACK frames addressed to my MAC received by the
monitor interface; the copies of my own injected frames were counted
separately and not included.

On Nov 8, with a monitor interface running during station attempts
(router at 80 MHz then, radio probably on CH 42/80 MHz), the monitor saw
my authentication frames but no ACK and no response, and only about 1
beacon in 32 s. I do not consider it conclusive.

I also switched off ASPM L1 on the card's PCIe link at runtime
(writing 0 to link/l1_aspm; lspci shows "ASPM Disabled" afterwards; my
earlier disable_aspm=Y test was not valid because lspci still showed L1
enabled). 3 connection attempts with the default and 3 with ASPM off:
no connection in any of them.

A correctable "PCIe Bus Error ... [ 7] BadDLLP" has been logged a few
times in different sessions (about five so far), both during failing
attempts and once next to the router between connections that worked,
so I do not think it is related.

Questions:
1) What differs in rtw88 between an injected management frame (which the
   AP ACKs at 20 MHz) and the authentication frame sent by the station
   interface on the same channel (TX report request, macid / rate
   adaptation info, BSSID or MAC registers set at authentication, etc.)?
2) I do not have a second adapter. Now that the radio sits on CH=36
   BW=0 during the attempts, I can run a monitor interface on the same
   card during the station attempts; it only sees the 30-60 ms the radio
   is on channel 36 per attempt, and it would show the echoed TX frames
   with their radiotap TX flags/rate. Would that be useful, or would you
   prefer a debug patch printing the TX descriptor and TX report status
   of the authentication frames?

Thanks,
Pablo

El mié, 25 nov 2026 a las 23:10, Luka Gejak (<luka.gejak@linux.dev>) escribió:
>
> Hi Pablo,
>
> Thanks for running these tests. I have a few comments.
>
> On November 24, 2026 6:20:01 PM GMT+01:00, Pablo Martínez Ríos
> <pabloriosmartinez@gmail.com> wrote:
>
> > patched modules, ES, twice: no connection
>
> With the same failure under 00 and with the patch under ES, I think we
> can set aside my ETSI threshold hypothesis. The edcca_enable switch puts
> the 8822B back in normal EDCCA mode, so it still has an energy threshold.
>
> [ ... ]
>
> > mac80211 configures the full 80 MHz
> > channel already for the authentication?
>
> Yes. mac80211 sets the channel from the BSS before sending auth. rtw88
> uses a legacy OFDM rate and sets DATA_BW to 20 MHz for the auth frame.
> It sets the primary 20 MHz position in REG_DATA_SC and leaves DATA_SC
> in the descriptor at zero. The old staging driver filled in that field
> too. The vendor driver for the same PCI chip leaves it at zero for
> ordinary management frames.
>
> Ping-Ke, do you know if the 8822BE takes the primary position from
> REG_DATA_SC when DATA_SC is zero for a legacy frame?
>
> [ ... ]
>
> > set to 20 MHz, logging the radio's bandwidth.
>
> I'd start with that. Could you keep primary channel 36, confirm CH=36
> and BW=0 during station auth, then switch the router back to 80 MHz and
> repeat from the same spot? The 10 ms retries fit the path where rtw88
> reports a TX failure and mac80211 retries without waiting for a reply.
>
> If you have a second adapter, a capture near the router at 20 MHz on
> channel 36 with control frames enabled would help. Can it see the auth
> request, the router's ACK and the auth response during a failed attempt?
> Also, were the injection ACK counts from captured frames or TX status?
>
> Best regards,
> Luka Gejak

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows
  2026-11-29 10:14                   ` Pablo Martínez Ríos
@ 2026-12-01  6:29                     ` Luka Gejak
  0 siblings, 0 replies; 12+ messages in thread
From: Luka Gejak @ 2026-12-01  6:29 UTC (permalink / raw)
  To: Pablo Martínez Ríos
  Cc: linux-wireless, Bitterblue Smith, Ping-Ke Shih

[-- Attachment #1: Type: text/plain, Size: 2133 bytes --]

Hi Pablo,

Thanks for checking both widths. Two comments below.

On November 29, 2026 11:14:17 AM GMT+01:00, Pablo Martínez Ríos
<pabloriosmartinez@gmail.com> wrote:

> So with the radio on CH=36 BW=0 the station-mode authentication still
> fails;

That takes the wide channel setup out of the station test. Both paths
use the same PCI management queue and request a firmware TX report.
The station uses its interface MACID, usually zero with just one
interface. The monitor on its own uses zero. The station's MAC address
is programmed at interface setup and the AP BSSID before auth. The
driver sets up rate adaptation for the AP at association.

There can still be a rate difference. The station uses the lowest
basic rate from the BSS and the monitor on its own uses 6 Mbps. Could
you check the rates marked with a star in iw scan dump? If the lowest
basic rate is above 6 Mbps, try writing 1 to rtw88/force_lowest_basic_rate
in debugfs and repeat the upstairs test at 20 MHz. That forces 6 Mbps
for auth. Please restore the previous value afterwards.

[ ... ]

> a debug patch printing the TX descriptor and TX report status

I found something specific to try. Just before sending auth, the
station calls rtw_ops_mgd_prepare_tx(). That selects the 2.4 GHz
coexistence path even on channel 36. On your RFE type the 5 GHz path
uses different antenna switch settings and gives WiFi a fixed grant.
Writing 0 to coex_enable skips that notification. The write itself
leaves the antenna switch and grants as they were.

If the rate check does not explain it, could you try the attached diff
with coex enabled and the router still at 20 MHz? A few attempts from
the same spot with the original build, with the diff, and then with
the original again would show if auth follows that change. With
debug_mask including 0x40 you should see the connect notification
change from "2G start" to "5G start".

The same card capture could still help if it shows an incoming ACK or
auth response. The outgoing copy comes from TX status, and rtw88 does
not fill in the actual TX rate there. I'd start with the test above.

Best regards,
Luka Gejak

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: test-5ghz-coex.patch --]
[-- Type: text/x-diff; name=test-5ghz-coex.patch, Size: 652 bytes --]

diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
@@ -710,6 +710,9 @@ static void rtw_ops_mgd_prepare_tx(struct ieee80211_hw *hw,
 	mutex_lock(&rtwdev->mutex);
 	rtw_leave_lps_deep(rtwdev);
-	rtw_coex_connect_notify(rtwdev, COEX_ASSOCIATE_START);
+	if (rtwdev->hal.current_band_type == RTW_BAND_5G)
+		rtw_coex_connect_notify(rtwdev, COEX_ASSOCIATE_5G_START);
+	else
+		rtw_coex_connect_notify(rtwdev, COEX_ASSOCIATE_START);
 	rtw_chip_prepare_tx(rtwdev);
 	mutex_unlock(&rtwdev->mutex);
 }

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-12-01  6:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 22:29 rtw88: RTL8822BE (10ec:b822) never authenticates on 5 GHz with a Huawei router; poor 2.4 GHz link; same hardware works fine on Windows Pablo Martínez Ríos
2026-11-04  1:33 ` Ping-Ke Shih
2026-11-04 10:45   ` Bitterblue Smith
2026-11-11 10:15     ` Pablo Martínez Ríos
2026-11-11 11:58       ` Bitterblue Smith
2026-11-11 21:00         ` Pablo Martínez Ríos
2026-11-12 15:50           ` Bitterblue Smith
2026-11-12 20:44             ` Luka Gejak
2026-11-24 17:20               ` Pablo Martínez Ríos
2026-11-25 22:10                 ` Luka Gejak
2026-11-29 10:14                   ` Pablo Martínez Ríos
2026-12-01  6:29                     ` Luka Gejak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox