All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luka Gejak <luka.gejak@linux.dev>
To: Mehmet Fide <mehmet.fide@gmail.com>, 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 v11 3/3] wifi: rtw88: time the countdown downloads from the TBTT
Date: Mon, 16 Nov 2026 15:26:12 +0100	[thread overview]
Message-ID: <781999FE-B0CB-4D6E-8A1B-06A38082202F@linux.dev> (raw)
In-Reply-To: <20261116071952.1142013-4-mehmet.fide@gmail.com>

Hi Mehmet,

Thanks for the v11. One comment below.

On November 16, 2026 8:19:52 AM GMT+01:00, Mehmet Fide
<mehmet.fide@gmail.com> wrote:

> diff --git a/drivers/net/wireless/realtek/rtw88/fw.c b/drivers/net/wireless/realtek/rtw88/fw.c

[ ... ]

> +     rtwdev->csa_tbtt += interval;
> +     delay = rtwdev->csa_tbtt + RTW_CSA_TBTT_MARGIN_US - tsf;
> +     if (start || delay > interval + RTW_CSA_TBTT_MARGIN_US ||
> +         delay < -(s64)interval) {
> +             /* at the start, or the download ran too late: the next TBTT */
> +             div_u64_rem(tsf, interval, &rem);
> +             rtwdev->csa_tbtt = tsf - rem + interval;
> +             delay = rtwdev->csa_tbtt + RTW_CSA_TBTT_MARGIN_US - tsf;
> +     }

[ ... ]

>       ieee80211_queue_delayed_work(rtwdev->hw, &rtwdev->csa_beacon_work,
>                                    usecs_to_jiffies(max(delay, 0)));

Could the first count still be replaced before it goes out if the first
work runs late? With patch 3 that work is also the first download of a
CSA beacon.

For example, with a 100 TU interval and a count of 2:

        first work due:        TSF 112400
        first download done:   TSF 224800
        csa_tbtt after +=:     TSF 204800
        delay:                -10000 us
        next TBTT:            TSF 307200

The delay is not below -102400, so this queues the next work immediately.
The download just installed count 1, and that work can call
ieee80211_csa_finish() before the next TBTT. So if I read it right, no
CSA beacon has gone out at all, even though the download succeeded.

I understand skipping an intermediate count when a download runs late,
but with a count of 2 there is no earlier CSA beacon for the station to
follow. Could the next step wait for a TBTT that can send the first
download, including when the first work has missed its scheduled one?

Best regards,
Luka Gejak

  reply	other threads:[~2026-11-16 14:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16  7:19 [PATCH rtw-next v11 0/3] wifi: rtw88: channel switch in AP mode Mehmet Fide
2026-11-16  7:19 ` [PATCH rtw-next v11 1/3] wifi: rtw88: download the beacon the reserved page was built with Mehmet Fide
2026-11-16  7:19 ` [PATCH rtw-next v11 2/3] wifi: rtw88: support channel switch in AP mode Mehmet Fide
2026-11-16 14:24   ` Luka Gejak
2026-11-16 21:49     ` Mehmet Fide
2026-11-16  7:19 ` [PATCH rtw-next v11 3/3] wifi: rtw88: time the countdown downloads from the TBTT Mehmet Fide
2026-11-16 14:26   ` Luka Gejak [this message]
2026-11-16 21:49     ` Mehmet Fide

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=781999FE-B0CB-4D6E-8A1B-06A38082202F@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.