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 v17 2/3] wifi: rtw88: support channel switch in AP mode
Date: Thu, 03 Dec 2026 21:05:32 +0100 [thread overview]
Message-ID: <00DE6122-F299-41E4-ABC3-3C2989A2584D@linux.dev> (raw)
In-Reply-To: <20261203184700.3636262-3-mehmet.fide@gmail.com>
Hi Mehmet,
Thank you for your patience and persistence across 17 version.
On December 3, 2026 7:46:59 PM GMT+01:00, Mehmet Fide
<mehmet.fide@gmail.com> wrote:
>From: Mehmet Fide <mehmet.fide@screeningeagle.com>
>
>The driver does not set WIPHY_FLAG_HAS_CHANNEL_SWITCH, so hostapd's
>CHAN_SWITCH is refused and an rtw88 AP can only change its channel by
>restarting.
>
>The firmware repeats the beacon of the first reserved page, so the
>driver has to step the countdown. Set the flag, and when
>BSS_CHANGED_BEACON brings a beacon with CSA, start a delayed work that
>advances the count with ieee80211_beacon_update_cntdwn() and downloads
>the page once per beacon interval. It calls ieee80211_csa_finish() one
>interval after the count of 1 was downloaded, and repeats a failed
>download with the same count. IBSS uses the same page and work.
>
>The countdown stops when the AP stops, the interface is removed,
>beaconing is disabled, on WoWLAN suspend and in rtw_core_stop(). It
>starts again when beaconing is enabled and when a hardware restart
>replays the beacon. The CSA state and work are under the driver mutex,
>and only the stop paths clear csa.vif.
>
>During a countdown the page beacon is fetched with
>ieee80211_beacon_get_template(), which leaves the count alone, so any
>other download carries the current count. The TIM update, the PG backup
>and the download on association are left to the next step. An AP that
>stops with a station interface left downloads the page once more.
>Scans are refused, as they would take the AP off its channel.
>
>A channel change outside a scan and outside an off-channel period,
>while an AP is up or a station is associated, runs the calibration that
>start_ap and the association run. This also covers a count of 0 or 1,
>which mac80211 finalizes without a countdown, and a station that
>follows the switch of its AP. On the RTL8822C the calibration includes
>the GAPK and the DPK, which take about 0.2 s over PCIe and up to 1.7 s
>over USB. mac80211 replaces the beacon only after the channel change,
>so until then the firmware repeats the beacon with the count of 1 on
>the new channel. A switch is refused while a second interface is up:
>that interface keeps the shared channel, and mac80211 would stop the AP
>at the end of the countdown.
>
>Signed-off-by: Mehmet Fide <mehmet.fide@screeningeagle.com>
>---
>
One nit: this commit message is rather extensive, and could be shortened
significantly. I don't have a strong preference for long or short commit
messages so I will leave to Ping-Ke to decide whether it needs to be
shortened or if he will take it as is.
Either way, the code looks good to me,
Reviewed-by: Luka Gejak <luka.gejak@linux.dev>
Best regards,
Luka Gejak
next prev parent reply other threads:[~2026-12-03 20:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 18:46 [PATCH rtw-next v17 0/3] wifi: rtw88: channel switch in AP mode Mehmet Fide
2026-12-03 18:46 ` [PATCH rtw-next v17 1/3] wifi: rtw88: download the beacon the reserved page was built with Mehmet Fide
2026-12-03 18:46 ` [PATCH rtw-next v17 2/3] wifi: rtw88: support channel switch in AP mode Mehmet Fide
2026-12-03 20:05 ` Luka Gejak [this message]
2026-12-03 20:06 ` Luka Gejak
2026-12-03 20:07 ` Luka Gejak
2026-12-04 3:51 ` Ping-Ke Shih
2026-12-04 6:38 ` Mehmet Fide
2026-12-03 18:47 ` [PATCH rtw-next v17 3/3] wifi: rtw88: time the countdown downloads from the TBTT Mehmet Fide
2026-12-03 20:06 ` Luka Gejak
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=00DE6122-F299-41E4-ABC3-3C2989A2584D@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.