From: "Luka Gejak" <luka.gejak@linux.dev>
To: "Mehmet Fide" <mehmet.fide@gmail.com>,
"Ping-Ke Shih" <pkshih@realtek.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
mehmet.fide@screeningeagle.com
Subject: Re: [PATCH RFC rtw-next] wifi: rtw88: raise the TBTT hold time while beaconing
Date: Fri, 20 Nov 2026 17:31:13 +0000 [thread overview]
Message-ID: <95610ac92e284b3b7b32981e14c380fcda09fcb7@linux.dev> (raw)
In-Reply-To: <20261119102953.4035731-1-mehmet.fide@gmail.com>
Hi Mehmet,
Thanks for looking into this. Below are my thoughts.
November 19, 2026 at 11:29 AM, "Mehmet Fide" <mehmet.fide@gmail.com> wrote:
[ ... ]
> 1. The captures suggest the MAC drops a beacon that cannot start
> within the hold time. Is that how it works, and does a longer hold
> time delay any other TX? iperf3 and ping through the AP were the
> same with 0x064, 0x0ff and 0x400.
Your captures fit a beacon transmit deadline. The RTL8822CU vendor
header says data queues can also wait during the hold, so I'd measure
latency around TBTT under load.
> 2. Which value do you recommend while beaconing: a fixed one, or one
> derived from the beacon interval? With 0x0ff an RTL8821CU, a second
> RTL8821CU and an RTL8822CU had no such seconds either, but an
> RTL8822CE still had 6: its beacons were cut off at 8.2 ms.
I'd start with 0x0ff and cap it for short beacon intervals. At 10 TU
that leaves 2.08 ms before the next TBTT. I'd measure beacon loss and
data latency before raising it on RTL8822CE.
> 3. The CSA series [1] downloads each countdown beacon 10 ms after TBTT,
> so a hold time above about 9 ms needs a later download there. If
> the reserved page is rewritten while a beacon still waits in the
> hold window, which beacon goes out, the old or the new one?
I'd expect the old template if the MAC has already fetched it and
still sends. Your v13 tests also saw missed beacons during a write.
At 100 TU a late CSA worker can pass rtw_fw_csa_hold() at 6 ms after
TBTT, inside the 8.16 ms window. Could the guard account for the hold
and beacon airtime before a rewrite or switch completion? It currently
skips intervals of 20 ms or less.
[ ... ]
> diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
> index 3029fbdb288a..cb1deeffef71 100644
> --- a/drivers/net/wireless/realtek/rtw88/mac80211.c
> +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
> @@ -449,12 +449,19 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw,
> }
>
> if (changed & BSS_CHANGED_BEACON_ENABLED) {
> - if (conf->enable_beacon)
> + if (conf->enable_beacon) {
> rtw_write32_set(rtwdev, REG_FWHW_TXQ_CTRL,
> BIT_EN_BCNQ_DL);
> - else
> + rtw_write32_mask(rtwdev, REG_TBTT_PROHIBIT,
> + BIT_MASK_TBTT_HOLD_TIME_AP,
> + TBTT_HOLD_TIME_BCN);
> + } else {
> rtw_write32_clr(rtwdev, REG_FWHW_TXQ_CTRL,
> BIT_EN_BCNQ_DL);
> + rtw_write32_mask(rtwdev, REG_TBTT_PROHIBIT,
> + BIT_MASK_TBTT_HOLD_TIME_AP,
> + TBTT_HOLD_TIME_STOP_BCN);
> + }
> }
> if (changed & BSS_CHANGED_CQM)
> rtw_fw_beacon_filter_config(rtwdev, true, vif);
To me it looks like a station scan on RTL8822C can pause AP beacons
through rtw_hw_scan_chan_switch() and rtw_core_enable_beacon(), leaving
0xff programmed. The vendor driver restores 0x64 on scan pause. Could
we update the hold on scan pause and resume too?
Best regards,
Luka Gejak
prev parent reply other threads:[~2026-11-20 17:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 10:29 [PATCH RFC rtw-next] wifi: rtw88: raise the TBTT hold time while beaconing Mehmet Fide
2026-11-20 17:31 ` Luka Gejak [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=95610ac92e284b3b7b32981e14c380fcda09fcb7@linux.dev \
--to=luka.gejak@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mehmet.fide@gmail.com \
--cc=mehmet.fide@screeningeagle.com \
--cc=pkshih@realtek.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