[PATCH rtw-next v2 0/2] wifi: rtw88: channel switch in AP mode
From: Mehmet Fide
Date: Wed Sep 30 2026 - 03:51:25 EST
From: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
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