Linux wireless drivers development
 help / color / mirror / Atom feed
From: Luka Gejak <luka.gejak@linux.dev>
To: Mehmet Fide <mehmet.fide@gmail.com>
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 v14 3/3] wifi: rtw88: time the countdown downloads from the TBTT
Date: Tue, 24 Nov 2026 01:24:37 +0100	[thread overview]
Message-ID: <20261124002437.213112-2-luka.gejak@linux.dev> (raw)
In-Reply-To: <20261121193644.603289-4-mehmet.fide@gmail.com>

Hi Mehmet,

Thanks for trying the shorter margins. One comment below.

On November 21, 2026 8:36:44 PM GMT+01:00, Mehmet Fide
<mehmet.fide@gmail.com> wrote:

> +		ieee80211_queue_delayed_work(rtwdev->hw,
> +					     &rtwdev->csa_beacon_work,
> +					     usecs_to_jiffies(hold));
> +		goto out;

I think this can still miss several beacon intervals on a kernel with
HZ=100, even without a slow USB transfer. The timer wheel adds a tick
after usecs_to_jiffies() rounds the delay up. A hold of a few ms can
therefore move the work about 20 ms, which is close to the whole beacon
interval at 19 TU. The next run lands in almost the same part of the
interval and can defer again.

With a 19 TU interval and the TBTT and tick starting together, the
timer arithmetic allows consecutive steps at 200 and 550 ms, even
without transfer time or a late worker. A station that timed the switch
from an earlier count can then move several beacon intervals ahead of
the AP.

Could the wait for the safe part of the interval use a finer timer, or
could we limit CSA to intervals the timer can reliably handle?

Best regards,
Luka Gejak


      reply	other threads:[~2026-11-24  0:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21 19:36 [PATCH rtw-next v14 0/3] wifi: rtw88: channel switch in AP mode Mehmet Fide
2026-11-21 19:36 ` [PATCH rtw-next v14 1/3] wifi: rtw88: download the beacon the reserved page was built with Mehmet Fide
2026-11-21 19:36 ` [PATCH rtw-next v14 2/3] wifi: rtw88: support channel switch in AP mode Mehmet Fide
2026-11-24  0:24   ` Luka Gejak
2026-11-21 19:36 ` [PATCH rtw-next v14 3/3] wifi: rtw88: time the countdown downloads from the TBTT Mehmet Fide
2026-11-24  0:24   ` 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=20261124002437.213112-2-luka.gejak@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 \
    --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