mirror of https://lore.kernel.org/lkml/
 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>,
	mehmet.fide@screeningeagle.com, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org, Luka Gejak <luka.gejak@linux.dev>
Subject: Re: [PATCH v2 2/2] wifi: rtw88: support channel switch in AP mode
Date: Thu,  1 Oct 2026 07:18:22 +0000	[thread overview]
Message-ID: <20261001071822.17746-1-luka.gejak@linux.dev> (raw)
In-Reply-To: <20260930074444.1991223-3-mehmet.fide@gmail.com>

On Wed, 30 Sep 2026, Mehmet Fide wrote:

> @@ -1813,6 +1813,47 @@ void rtw_fw_update_beacon_work(struct work_struct *work)
> +	if (!ieee80211_beacon_cntdwn_is_complete(vif, 0)) {
> +		rtw_fw_download_rsvd_page(rtwdev);
> +		rtw_send_rsvd_page_h2c(rtwdev);
> +
> +		wiphy_delayed_work_queue(wiphy, &rtwdev->csa_beacon_work,
> +					                   usecs_to_jiffies(delay));

This work is not the only one that re-downloads the page. Every page download
fetches a beacon, through rtw_get_rsvd_page_skb():

	case RSVD_BEACON:
		skb_new = ieee80211_beacon_get_tim(hw, vif, &tim_offset, NULL, 0);
		rsvd_pkt->tim_offset = tim_offset;
		break;

and mac80211 moves the countdown on that fetch, not once per beacon that is
transmitted:

	if (beacon->cntdwn_counter_offsets[0]) {
		if (!is_template)
			ieee80211_beacon_update_cntdwn(vif, link->link_id);

		ieee80211_set_beacon_cntdwn(sdata, beacon, link);
	}

rtw_ops_set_tim() queues update_beacon_work:

	ieee80211_queue_work(hw, &rtwdev->update_beacon_work);

and the work itself re-downloads the page:

void rtw_fw_update_beacon_work(struct work_struct *work)
{
	struct rtw_dev *rtwdev = container_of(work, struct rtw_dev,
					                              update_beacon_work);

	mutex_lock(&rtwdev->mutex);
	rtw_fw_download_rsvd_page(rtwdev);
	rtw_send_rsvd_page_h2c(rtwdev);
	mutex_unlock(&rtwdev->mutex);
}

A station that wakes up in power save during the countdown is enough, so one
interval can move the count twice, for example 4 on air and then 2, and a fetch
that lands after the counter reached 1 makes mac80211 log "beacon TX faster than
countdown". Can the set_tim work skip the download while a switch is announced?
rtw_fw_csa_beacon_work() rebuilds the page one interval later, so the new TIM
still gets out and the countdown keeps one step per interval.

Best regards,
Luka Gejak

  reply	other threads:[~2026-10-01  7:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  7:44 [PATCH rtw-next v2 0/2] wifi: rtw88: " Mehmet Fide
2026-09-30  7:44 ` [PATCH rtw-next v2 1/2] wifi: rtw88: download the beacon the reserved page was built with Mehmet Fide
2026-10-01  7:16   ` [PATCH " Luka Gejak
2026-10-01 11:54     ` [PATCH rtw-next " Mehmet Fide
2026-09-30  7:44 ` [PATCH rtw-next v2 2/2] wifi: rtw88: support channel switch in AP mode Mehmet Fide
2026-10-01  7:18   ` Luka Gejak [this message]
2026-10-01 11:54     ` 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=20261001071822.17746-1-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

all inboxes | Powered by JetHome®