Re: [PATCH rtw-next v17 3/3] wifi: rtw88: time the countdown downloads from the TBTT

From: Luka Gejak

Date: Thu Dec 03 2026 - 15:07:02 EST


On December 3, 2026 7:47:00 PM GMT+01:00, Mehmet Fide
<mehmet.fide@xxxxxxxxx> wrote:
>From: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
>
>The countdown steps run one beacon interval apart with no relation to
>the TBTT, and a download close to a TBTT keeps beacons off the air. On
>an RTL8821CU and an RTL8822CU a TBTT during the download sent no beacon
>or the old one. On an RTL8822CE a TBTT up to about 100 us before the
>download also kept the next beacon out, so with a count of 2 no CSA
>beacon went out.
>
>Read the TSF and queue each step min(10 ms, interval / 4), but at least
>5 ms, after the first TBTT that is at least min(10 ms, interval / 4)
>away. A step that runs less than 5 ms after a TBTT, or less than that
>margin before one, waits until after the TBTT. The first count is now
>downloaded by the work too, not when mac80211 changes the beacon, so
>the first CSA beacon carries the count after the first step, as with
>drivers that fetch every beacon with ieee80211_beacon_get(). The replay
>after a hardware restart still downloads at once.
>
>A late download delays the switch by a beacon interval instead of
>taking a count off the air; stations that took the switch time from an
>earlier count then switch up to that interval before the AP. At short
>intervals a USB download, 6 to 17 ms, can run past the next TBTT, and
>the USB chips then send a count more than once.
>
>The USB chips raise no TBTT interrupt, hence the TSF read. The beaconing
>interface is always on port 0: rtw_core_port_switch() moves an AP
>there, and an IBSS runs alone.
>
>Signed-off-by: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
>Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
>---
>

Looks good to me,

Reviewed-by: Luka Gejak <luka.gejak@xxxxxxxxx>

Best regards,
Luka Gejak