From: Mehmet Fide <mehmet.fide@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
mehmet.fide@screeningeagle.com
Subject: Re: [PATCH rtw-next v6 2/2] wifi: rtw88: support channel switch in AP mode
Date: Mon, 19 Oct 2026 12:56:43 +0200 [thread overview]
Message-ID: <20261019105643.3282423-1-mehmet.fide@gmail.com> (raw)
In-Reply-To: <f4aea8175e4f4082afd50fa94787137d@realtek.com>
Hi Ping-Ke,
On 2026-10-19, Ping-Ke Shih wrote:
> It'd be better to see every count stays on the air. Will you implement
> to handle TBTT events? Can you share a draft first or a separate patch
> (e.g. patch 3/3 to improve missing count)?
The USB chips raise no TBTT interrupt, so the countdown work reads the
TSF and queues itself for 10 ms after the next TBTT. That gives a
download about 80 ms to run late before a beacon goes out without it;
one later than that is still followed by its successor at once, as in
v6. A TSF that moved by more than a beacon interval, an IBSS merge or
a reset, restarts the schedule from the TBTT ahead.
On the 8821CU the downloads land 13 to 22 ms after the TBTT; with a
60 ms delay on every second download the sniffer saw 9, 8, 7, 6, 5,
4, 3, 2, 1 for count 10, with 95 ms it saw 9, 8, 8, 6, 6, 4, 4, 2, 2,
and the AP switched at the same time in all cases.
The idea, on top of 2/2:
/* csa_start: the first download goes with the TBTT ahead */
tsf = read_tsf(rtwvif->port); /* 64 bit, 0x560 for port 0 */
csa_tbtt = tsf - tsf % beacon_int;
csa_queue();
/* csa_queue, after every download */
csa_tbtt += beacon_int; /* the TBTT this download is for */
delay = csa_tbtt + 10ms - read_tsf();
if (delay > beacon_int + 10ms || delay < -beacon_int)
/* the TSF moved (IBSS merge, reset): start over */
csa_tbtt = next TBTT after now, delay = csa_tbtt + 10ms - now;
queue_delayed_work(csa_beacon_work, max(delay, 0));
So a download on time runs 10 ms after its TBTT; one late by less
than ~80 ms still makes the next beacon; one later than that gets a
delay of zero for its successor, the catch-up of v6. Nothing else
changes, the download and ieee80211_csa_finish() stay as they are.
One thing I do not have: the TSF registers of the ports other than 0,
for an AP that comes up next to a station interface. rtw88 only names
REG_USTIME_TSF; is it 0x568 for port 1, and where are ports 2 to 4?
If this is the way you want it, it becomes patch 3/3 of v7 with 1/2
and 2/2 unchanged.
Thanks,
Mehmet
prev parent reply other threads:[~2026-10-19 10:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 7:30 [PATCH rtw-next v6 0/2] wifi: rtw88: " Mehmet Fide
2026-10-13 7:30 ` [PATCH rtw-next v6 1/2] wifi: rtw88: download the beacon the reserved page was built with Mehmet Fide
2026-10-13 7:30 ` [PATCH rtw-next v6 2/2] wifi: rtw88: support channel switch in AP mode Mehmet Fide
2026-10-19 3:31 ` Ping-Ke Shih
2026-10-19 8:31 ` Mehmet Fide
2026-10-19 8:52 ` Ping-Ke Shih
2026-10-19 10:56 ` Mehmet Fide [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261019105643.3282423-1-mehmet.fide@gmail.com \
--to=mehmet.fide@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mehmet.fide@screeningeagle.com \
--cc=pkshih@realtek.com \
--cc=rtl8821cerfe2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®