[PATCH rtw-next 0/2] wifi: rtw88: channel switch in AP mode

From: Mehmet Fide

Date: Tue Sep 29 2026 - 08:51:01 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"): WIPHY_FLAG_HAS_CHANNEL_SWITCH and a
channel_switch_beacon op that keeps the beacon in the firmware's
reserved page current while the countdown runs, then calls
ieee80211_csa_finish().

The first patch is needed for that: rtw_fw_download_rsvd_page() fetched
the beacon from mac80211 twice per update, once for the page and once
for the standalone beacon download, which advanced the CSA countdown
twice per beacon interval. It now downloads the beacon the page was
built with.

Tested on 6.12.111 with identical hunks, hostapd 2.11 on nl80211:
- RTL8821CU (Edimax AC600, fw 24.11.0) and RTL8822BU (Edimax EW-7822ULC,
fw 27.2.0) as an AP on arm64 hosts, with one and with two associated
clients (an AR9271 and an RTL8822BU station).
- CHAN_SWITCH with count 1: the radio moves within 0.6 s, the client
re-associates as expected without a CSA element.
- count 2, 3 and 5: CSA announced, AP-CSA-FINISHED, radio on the new
channel within 0.8 s, the clients stay associated with no packet
loss (worst round trip 168 ms); an iperf3 stream on one of them ran
on through the switch.
- a countdown aborted by stopping hostapd or unloading the modules:
clean; STA mode scan: fine; no warning in dmesg in any run.
- every rtw88 chip option built with W=1 and sparse.

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 | 54 +++++++++++++++----
drivers/net/wireless/realtek/rtw88/fw.h | 1 +
drivers/net/wireless/realtek/rtw88/mac80211.c | 14 +++++
drivers/net/wireless/realtek/rtw88/main.c | 3 +-
drivers/net/wireless/realtek/rtw88/main.h | 2 +
5 files changed, 64 insertions(+), 10 deletions(-)

--
2.55.0