Re: [PATCH rtw-next v16 2/3] wifi: rtw88: support channel switch in AP mode
From: Luka Gejak
Date: Tue Dec 01 2026 - 11:53:39 EST
Hi Mehmet,
Thanks for the v16. I think the calibration still needs two changes.
On December 1, 2026 9:08:40 AM GMT+01:00, Mehmet Fide
<mehmet.fide@xxxxxxxxx> wrote:
> diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
[ ... ]
> - if (changed & IEEE80211_CONF_CHANGE_CHANNEL)
> + if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
> rtw_set_channel(rtwdev);
> + if (rtw_fw_csa_active(rtwdev) && chip->ops->switch_calibration)
> + chip->ops->switch_calibration(rtwdev);
> + }
As far as I can see, a count of 0 or 1 still skips IQK. mac80211
finalizes directly, without the beacon notification that sets csa.vif,
so rtw_fw_csa_active() is false here.
A user can reach this with a normal hostapd_cli chan_switch request
using count 1.
I think we should cover the immediate switch path too.
[ ... ]
> diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
[ ... ]
> hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS |
> - WIPHY_FLAG_TDLS_EXTERNAL_SETUP;
> + WIPHY_FLAG_TDLS_EXTERNAL_SETUP |
> + WIPHY_FLAG_HAS_CHANNEL_SWITCH;
I think RTL8812AU still misses its channel specific setup.
rtw8812a_phy_calibration() selects different AGC tables for channels
36 through 64 and for channels 100 and above.
A user can hit this with a normal switch, e.g. from channel 36 to 149,
where both channels are permitted.
That leaves the low channel table in use. rtw88xxa_set_channel() and the
watchdog's IQK path do not load the other table, and this chip has no
switch_calibration callback.
We should cover that chip's channel specific setup too.
Best regards,
Luka Gejak