RE: [PATCH rtw-next v6 2/2] wifi: rtw88: support channel switch in AP mode
From: Ping-Ke Shih
Date: Sun Oct 18 2026 - 23:34:36 EST
Mehmet Fide <mehmet.fide@xxxxxxxxx> wrote:
[...]
> - the downloads are paced from the first one with an absolute due time:
> queued after each download, the countdown drifted by about 10 ms per
> beacon interval on the ordered mac80211 workqueue, and a station
> switched ahead of the AP on a count of 50
If you download beacon to firmware twice within a period of beacon_int,
a countdown in the air will not present, no? Like this
t (TU) 0 100 200 300
download beacon 5 4 3 2
firmware TX beacon x x x x
air 5 5 3 2
The 4 is missing.
> +/* paced from the first download: a late one does not delay the next */
> +static void rtw_fw_csa_queue(struct rtw_dev *rtwdev, struct ieee80211_vif *vif)
> +{
> + u32 interval = ieee80211_tu_to_usec(vif->bss_conf.beacon_int);
> + s64 delay;
> +
> + rtwdev->csa_due = ktime_add_us(rtwdev->csa_due, interval);
> + delay = ktime_us_delta(rtwdev->csa_due, ktime_get());
> + ieee80211_queue_delayed_work(rtwdev->hw, &rtwdev->csa_beacon_work,
> + usecs_to_jiffies(max(delay, 0)));
> +}
Otherwise, looks good to me.