Re: [PATCH rtw-next v2 2/2] wifi: rtw88: support channel switch in AP mode
From: Mehmet Fide
Date: Thu Oct 01 2026 - 07:55:02 EST
Hi Luka,
On 2026-10-01 Luka Gejak wrote:
> This work is not the only one that re-downloads the page. Every page download
> fetches a beacon, through rtw_get_rsvd_page_skb():
[...]
> A station that wakes up in power save during the countdown is enough, so one
> interval can move the count twice, for example 4 on air and then 2, and a fetch
> that lands after the counter reached 1 makes mac80211 log "beacon TX faster than
> countdown". Can the set_tim work skip the download while a switch is announced?
> rtw_fw_csa_beacon_work() rebuilds the page one interval later, so the new TIM
> still gets out and the countdown keeps one step per interval.
You are right, I had only looked at the paths the series touches. v3
makes rtw_fw_update_beacon_work() return without a download while the
vif that owns the beacon page has csa_active set; the csa work rebuilds
the page, TIM included, within the interval.
I went through the other callers of rtw_fw_download_rsvd_page() for the
same pattern. One more is reachable with an AP: set_key downloads the
page for the PG deep-sleep backup, so a station installing a key during
the countdown would add a step on a chip with that mode; v3 skips that
download the same way. BSS_CHANGED_BEACON during a countdown re-arms
the csa work timer, so that download replaces the step instead of
adding one; the hw scan is refused while a switch is announced; the
WoWLAN downloads run after suspend cancelled the work; the ASSOC
download is station mode.
I will check it with a station in power save during the countdown and
watch for mac80211's "beacon TX faster than countdown" before and after.
Best regards,
Mehmet