mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mehmet Fide <mehmet.fide@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: Luka Gejak <luka.gejak@linux.dev>,
	Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	mehmet.fide@screeningeagle.com
Subject: [PATCH rtw-next v2 0/2] wifi: rtw88: channel switch in AP mode
Date: Wed, 30 Sep 2026 09:44:42 +0200	[thread overview]
Message-ID: <20260930074444.1991223-1-mehmet.fide@gmail.com> (raw)

From: Mehmet Fide <mehmet.fide@screeningeagle.com>

hostapd's CHAN_SWITCH fails on an rtw88 AP because the driver does not
announce channel switch support, so the only way to move the AP to
another channel is to stop and start it, and every client drops.

This adds the support the way rtw89 has it (edba3f107844 "wifi: rtw89:
implement channel switch support"). The first patch is needed for it:
rtw_fw_download_rsvd_page() fetched the beacon from mac80211 twice per
update, which advanced the CSA countdown twice per beacon interval.

Tested on 6.12.111 with RTL8821CU and RTL8822BU as an AP (hostapd 2.11,
one and two stations): CHAN_SWITCH with counts 1 to 5, the stations
follow without loss; aborted countdowns and STA mode scans are clean.
The hw scan path is compile-tested only, these firmwares have no scan
offload.

v2:
- rtw_download_beacon() takes the beacon from the page build and fetches
  its own for the hw scan; v1 left the scan with -ENOENT (Luka Gejak).
- a hw scan is refused while a switch is announced (Ping-Ke).
- one wiphy delayed work per device instead of a delayed work per vif:
  serialized with mac80211, not re-initialized by a hw restart, checks
  RTW_FLAG_RUNNING, cancelled on stop_ap, vif removal and WoWLAN
  suspend, covers IBSS; it starts one beacon interval after the
  countdown beacon so the count on air is not skipped.
- commit message of 2/2 without the rtw89 reference (Ping-Ke).


Mehmet Fide (2):
  wifi: rtw88: download the beacon the reserved page was built with
  wifi: rtw88: support channel switch in AP mode

 drivers/net/wireless/realtek/rtw88/fw.c       | 75 +++++++++++++++----
 drivers/net/wireless/realtek/rtw88/fw.h       |  1 +
 drivers/net/wireless/realtek/rtw88/mac80211.c | 46 ++++++++++++
 drivers/net/wireless/realtek/rtw88/main.c     |  4 +-
 drivers/net/wireless/realtek/rtw88/main.h     |  1 +
 5 files changed, 113 insertions(+), 14 deletions(-)

-- 
2.55.0


             reply	other threads:[~2026-09-30  7:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  7:44 Mehmet Fide [this message]
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-09-30  7:44 ` [PATCH rtw-next v2 2/2] wifi: rtw88: support channel switch in AP mode 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=20260930074444.1991223-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®