RE: [PATCH rtw-next 2/2] wifi: rtw88: support channel switch in AP mode
From: Ping-Ke Shih
Date: Tue Sep 29 2026 - 23:48:51 EST
Mehmet Fide <mehmet.fide@xxxxxxxxx> wrote:
> From: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
>
> hostapd's CHAN_SWITCH is refused because the driver does not announce
> channel switch support, so an AP on rtw88 can only change its channel
> by being torn down and started again.
>
> Declare WIPHY_FLAG_HAS_CHANNEL_SWITCH and implement
> ieee80211_ops::channel_switch_beacon the way rtw89 does:
No need to mention rtw89, which you have mentioned in cover letter.
> the firmware
> repeats the beacon held in the reserved page, so while a switch is
> announced the beacon is downloaded again every beacon interval to renew
> the countdown, and ieee80211_csa_finish() is called once it completes.
>
> Signed-off-by: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
[...]
> diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c
> b/drivers/net/wireless/realtek/rtw88/mac80211.c
> index 2a9b09fa76e7..915e810470aa 100644
> --- a/drivers/net/wireless/realtek/rtw88/mac80211.c
> +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
> @@ -164,6 +164,8 @@ static int rtw_ops_add_interface(struct ieee80211_hw *hw,
> memset(&rtwvif->bfee, 0, sizeof(struct rtw_bfee));
> rtw_txq_init(rtwdev, vif->txq);
> INIT_LIST_HEAD(&rtwvif->rsvd_page_list);
> + rtwvif->rtwdev = rtwdev;
Move to be first statement of this function followed by a blank line.
> + INIT_DELAYED_WORK(&rtwvif->csa_beacon_work, rtw_fw_csa_beacon_work);
>
> mutex_lock(&rtwdev->mutex);
>