mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mehmet Fide <mehmet.fide@gmail.com>
To: Luka Gejak <luka.gejak@linux.dev>
Cc: Ping-Ke Shih <pkshih@realtek.com>,
	Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	mehmet.fide@screeningeagle.com
Subject: Re: [PATCH rtw-next v9 3/3] wifi: rtw88: time the countdown downloads from the TBTT
Date: Sat, 31 Oct 2026 22:20:23 +0100	[thread overview]
Message-ID: <20261031212023.3296837-1-mehmet.fide@gmail.com> (raw)
In-Reply-To: <6a4c37826646abbf833e49aadee7701a3dd4e96a@linux.dev>

Hi Luka,

> Could the TSF also be read before rtw_fw_download_rsvd_page(), so that
> only a TBTT after the download started is taken as one that may have
> sent the first count?

You are right about the bug, but the TSF read before the download does
not cover all of it. The download is two writes, the whole reserved
page and then the beacon again, and both clear BIT_EN_BCN_FUNCTION.
Measured on an RTL8821CU with a sniffer, from a TSF read just before
the download:

- a TBTT before the first write (0.75 ms) sends the old beacon;
- from there to about 0.6 ms after the second write (2.9 ms), 82 of 89
  TBTTs sent no beacon and 7 the old one;
- later TBTTs send the CSA beacon. v9 reads the TSF at 3.4 ms.

With a count of 5 and the TBTT forced into place:

- v9, TBTT 2 ms before the start: count 4 never went out (3 2 1 on
  the air), 6 of 6;
- TSF read before the download, TBTT in the download: lost in 5 of 6;
- without the back-off, so that no earlier TBTT is taken as the one
  that sent the first count: no count lost in 12 of 12, with the TBTT
  before the start or in the download.

With a count of 2 in the v9 case, a Windows station re-associated after
each of 10 switches, and after none of 10 without the back-off.

So v10 drops the back-off. A TBTT in the last 0.5 ms before the TSF
read then sends the first count twice (4 4 3 2 1, 6 of 6 when forced
there), and the AP switches one beacon interval late; the Windows
station stayed associated in 8 of 8 such switches. A lost count is
worse: with a count of 2 no CSA beacon goes out at all. I will check it
on the 8822CE when it arrives.

Mehmet

      reply	other threads:[~2026-10-31 21:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 15:29 [PATCH rtw-next v9 0/3] wifi: rtw88: channel switch in AP mode Mehmet Fide
2026-10-26 15:29 ` [PATCH rtw-next v9 1/3] wifi: rtw88: download the beacon the reserved page was built with Mehmet Fide
2026-10-26 15:29 ` [PATCH rtw-next v9 2/3] wifi: rtw88: support channel switch in AP mode Mehmet Fide
2026-10-30 16:18   ` Luka Gejak
2026-10-31 21:19     ` Mehmet Fide
2026-10-26 15:29 ` [PATCH rtw-next v9 3/3] wifi: rtw88: time the countdown downloads from the TBTT Mehmet Fide
2026-10-30 16:23   ` Luka Gejak
2026-10-31 21:20     ` 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=20261031212023.3296837-1-mehmet.fide@gmail.com \
    --to=mehmet.fide@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luka.gejak@linux.dev \
    --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®