Re: [PATCH rtw-next v13 3/3] wifi: rtw88: time the countdown downloads from the TBTT
From: Luka Gejak
Date: Fri Nov 20 2026 - 09:16:25 EST
Hi Mehmet,
Thanks for the v13. One comment below.
On November 19, 2026 12:19:40 AM GMT+01:00, Mehmet Fide
<mehmet.fide@xxxxxxxxx> wrote:
> diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c
> index 9d5df3e65b97..c24932d00e14 100644
> --- a/drivers/net/wireless/realtek/rtw88/fw.c
> +++ b/drivers/net/wireless/realtek/rtw88/fw.c
[ ... ]
> + div_u64_rem(rtw_fw_read_tsf(rtwdev), interval, &rem);
> + delay = interval - rem;
> + if (delay < RTW_CSA_TBTT_MARGIN_US)
> + delay += interval;
[ ... ]
> + usecs_to_jiffies(delay +
> + RTW_CSA_TBTT_MARGIN_US));
Does the short interval case need a smaller margin here as well?
With a beacon interval of 19 TU and a download that finishes 10 ms
after a TBTT, the next two TBTTs are about 9.5 and 28.9 ms away. This
queues the next step about 38.9 ms later, two beacon intervals away.
Several counts can then go out twice even when the work runs on time.
That seems to put the AP further behind a station that timed its
switch from an earlier count. Could the queue and hold paths use a
margin that fits the beacon interval?
Best regards,
Luka Gejak