Linux wireless drivers development
 help / color / mirror / Atom feed
* wifi: rtw88: usb: AP sends no beacons after monitor capture on the same phy
@ 2026-11-24 13:44 martin
  2026-11-25 22:32 ` Luka Gejak
  0 siblings, 1 reply; 4+ messages in thread
From: martin @ 2026-11-24 13:44 UTC (permalink / raw)
  To: Ping-Ke Shih; +Cc: linux-wireless, martin

Hi,

on rtw88 USB adapters, an AP started on a phy that had a monitor-mode
capture session before sometimes never transmits a beacon, although
hostapd reports AP-ENABLED. Neither the driver nor the firmware logs an
error. Only reloading the chip module recovers.

Hardware/software:
- rtw88_8812au (fw 52.14.0); also seen with rtw88_8814au (fw 33.6.0)
   and rtw88_8821cu (fw 24.11.0)
- Ubuntu 24.04, kernel 7.0.0-43-generic, hostapd 2.10, regdomain DE
- same behaviour with a v7.4-rc4 mainline build (Ubuntu mainline
   7.4.0-070400rc4) and the same firmware

Test: module freshly loaded, hostapd for 12 s on channel 6 (about 110
beacons expected), beacons counted by a separate mt7921u monitor on
channel 6.

Sequence that triggers it reliably: a capture session with Kismet
(monitor vif added on the phy, base interface down, channel hopping
including HT40 and 80 MHz, 15 s, then Kismet exits and leaves the
monitor vif in place), hostapd on the base interface (116 beacons),
a second capture session, hostapd again: 0 beacons. 12 of 12 runs on
7.0 and 7.4-rc4. AP -> capture -> AP was silent in 1 of 6 runs.

On 7.4-rc4, with the capture source closed while hostapd runs (20 s)
and reopened in between, three APs in a row sent 230, 0 and 0 beacons.

With iw only it is sporadic:
- monitor vif deleted afterwards (20/40/80 MHz, with and without a
   packet socket, several orders): 0 of 9 silent
- monitor vif left in place like above (add, base down, vif up, tcpdump,
   HT40/80 hopping for 10 s, vif down, reused the next time): 1 of 3
   silent on 7.0; on 7.4-rc4 one of two pairs had a silent AP

With rtw88_core debug_mask=0x80020018 the logs of a working AP
(116 beacons) and a silent one (0 beacons) look the same: start vif
mac_id 0 on port 0, the same reserved pages, the same H2C/C2H sequence,
stop vif. No "error beacon valid", no "failed to download drv rsvd
page", no "failed to get tx report".

Not the cause: HT config (ieee80211n=1 or not), changing the MAC
address before hostapd, waiting 5 or 15 s after the capture.

Recovery: ip link set down/up and "iw dev ... set type managed" do not
help; modprobe -r / modprobe of the chip module does.

mt7921u is not affected by the same sequence. airbase-ng (injection,
no AP mode) on the same rtw88 adapters keeps working.

I can rerun the test with other debug flags, another kernel or a patch.

Thanks,
Martin


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

* Re: wifi: rtw88: usb: AP sends no beacons after monitor capture on the same phy
  2026-11-24 13:44 wifi: rtw88: usb: AP sends no beacons after monitor capture on the same phy martin
@ 2026-11-25 22:32 ` Luka Gejak
  2026-11-26  7:12   ` martin
  0 siblings, 1 reply; 4+ messages in thread
From: Luka Gejak @ 2026-11-25 22:32 UTC (permalink / raw)
  To: linux-wireless, martin, Ping-Ke Shih

Hi Martin,

Thanks for the detailed report. Two things would help narrow this down.

On November 24, 2026 2:44:27 PM GMT+01:00, <martin@rfdeck.de> wrote:

> including HT40 and 80 MHz, 15 s, then Kismet exits and leaves the
> monitor vif in place), hostapd on the base interface (116 beacons),

Is the monitor still UP in ip link after Kismet exits? If it is, could
you repeat the same sequence with the monitor brought down after each
capture, but left in place? Please check that the base interface is down
too before starting hostapd. If the monitor stays up, mac80211 can keep
the device running between APs. The iw run where you brought the monitor
down still failed sometimes, so I would like to compare the two cases
with the same capture sequence.

[ ... ]

> mac_id 0 on port 0, the same reserved pages, the same H2C/C2H sequence,

The driver checks whether the beacon page was accepted. I don't see a
check that the chip then sends it. If read_reg is available, could you
take these reads on the 8812AU during a working AP and again during a
silent one, while hostapd is still running? Please include iw dev from
both runs.

        r=/sys/kernel/debug/ieee80211/phyN/rtw88/read_reg
        for reg in '100 4' '420 4' '522 1' '540 4' '550 1' '554 2' \
                   '560 4' '560 4'
        do
                printf '%s\n' "$reg" > "$r" && cat "$r" || break
                sleep 0.1
        done

Use the rtw88 PHY in place of phyN and run this as root. The last two
reads show whether the port 0 beacon timer is still moving.

Best regards,
Luka Gejak

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

* Re: wifi: rtw88: usb: AP sends no beacons after monitor capture on the same phy
  2026-11-25 22:32 ` Luka Gejak
@ 2026-11-26  7:12   ` martin
  2026-11-26  7:59     ` Luka Gejak
  0 siblings, 1 reply; 4+ messages in thread
From: martin @ 2026-11-26  7:12 UTC (permalink / raw)
  To: Luka Gejak; +Cc: linux-wireless, Ping-Ke Shih, martin

Hi Luka,

thanks for looking into this. Both tests are done, on the same box
(7.0.0-43, RTL8812AU fw 52.14.0, channel 6, 12 s AP, driver reloaded
before each run).

> Is the monitor still UP in ip link after Kismet exits?

Yes. After all 12 capture sessions the monitor vif was still UP
(operstate unknown, on the last hop channel, e.g. 40 at 80 MHz), and
the base interface was down. Kismet's capture brings the monitor up
and never takes it down or deletes it on exit.

> could you repeat the same sequence with the monitor brought down
> after each capture, but left in place?

That makes the difference, three runs each (beacons AP1 / AP2):

   A, monitor left UP:       116/0, 116/0, 115/0
   B, monitor set down after
      each capture (kept):   109/109, 109/109, 109/109

hostapd reported AP-ENABLED every time. In B both the monitor vif and
the base interface were down before each hostapd start.

> could you take these reads on the 8812AU during a working AP and
> again during a silent one, while hostapd is still running?

Read 5 s after hostapd started. All 12 APs, sending or silent, gave
the same values:

   0x100=0x000306ff 0x420=0xff711f00 0x522=0x00 0x540=0x80006404
   0x550=0x18 0x554=0x0064

Only the TSF differs. It moves in every case (the two reads are about
130 ms apart and the TSF moves by about that much), but:

   A, AP1 (sends):    0x016c8d9b -> 0x016e91b8   (~23.9 s)
   A, AP2 (silent):   0x038de301 -> 0x038fe5f4   (~59.7 s)
   B, AP1 and AP2:    0x0052e0eb -> 0x0054e312   (~5.4 s)

The other runs look the same. In B the TSF starts again at about 5 s
with every AP, in A it keeps counting from the driver load, so the
device is never stopped between the two APs while the monitor stays
up. AP1 in A also runs on a device that had been running for the
capture session before, and it still sends; it's the second AP vif on
the same running device that stays silent.

iw dev during the APs shows the monitor vif and the AP vif (channel 6,
20 MHz) on the phy, in A and B alike apart from the monitor's state.

I can try other registers, the same thing without Kismet (monitor
left up, hostapd started, stopped and started again), or a patch.

Thanks,
Martin



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

* Re: wifi: rtw88: usb: AP sends no beacons after monitor capture on the same phy
  2026-11-26  7:12   ` martin
@ 2026-11-26  7:59     ` Luka Gejak
  0 siblings, 0 replies; 4+ messages in thread
From: Luka Gejak @ 2026-11-26  7:59 UTC (permalink / raw)
  To: martin; +Cc: linux-wireless, Ping-Ke Shih, martin

Hi Martin,

Thanks for running both tests. Two followups below.

On November 26, 2026 8:12:56 AM GMT+01:00, <martin@rfdeck.de> wrote:

>    A, monitor left UP:       116/0, 116/0, 115/0

Could you try the two AP starts you suggested with just iw? Set the
monitor to channel 6 once and leave it up across both runs. Please keep
the same waits before the AP starts and count beacons for both. That
would show whether the second AP can go silent without channel hopping.

[ ... ]

> Read 5 s after hostapd started. All 12 APs, sending or silent, gave
> the same values:

The beacon queue bit is set in both cases and the timer is moving. The
driver clears that bit when AP1 stops and sets it again after attempting
the beacon upload for AP2. Could you read one byte at 0x422 with read_reg
just before each hostapd start, while the monitor is up? Bit 6 is the
queue bit.

The next time AP2 goes silent, could you leave it running and try this
with the hostapd control socket enabled? Use your AP interface for wlanX.

	hostapd_cli -i wlanX update_beacon

Please let me know what the command returns and whether beacons come
back. This asks the driver to upload the beacon again on the running AP.

Best regards,
Luka Gejak

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

end of thread, other threads:[~2026-11-26  7:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 13:44 wifi: rtw88: usb: AP sends no beacons after monitor capture on the same phy martin
2026-11-25 22:32 ` Luka Gejak
2026-11-26  7:12   ` martin
2026-11-26  7:59     ` Luka Gejak

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