[PATCH ath-next] wifi: ath11k: update rx_channel on a channel switch
From: Christopher Griffin via B4 Relay
Date: Sat Oct 24 2026 - 20:32:45 EST
From: Christopher Griffin <christophergriffin05@xxxxxxxxx>
ath11k keeps the radio's current channel in ar->rx_channel: survey dumps
flag that channel as in use, and only for it is the bss channel info
requested. ath11k_mac_op_add_chanctx() sets it, but a channel switch
(CSA, or hostapd's switch_chan) goes through ath11k_mac_update_vif_chan(),
which leaves it at the old channel ("TODO: Update ar->rx_channel"). After
a switch the survey keeps marking the old channel as in use and never
refreshes the new one.
Set it to the new context's channel, as ath10k does in its
ath10k_mac_update_vif_chan(). ath11k uses one channel context per radio,
so every vif in the switch moves to the same channel.
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Christopher Griffin <christophergriffin05@xxxxxxxxx>
---
Found on an Arista C-260 (IPQ8074) while chasing a wrong survey noise
floor; the noise floor fix itself is sent separately ("wifi: ath11k:
report the measured noise floor of the channel in use") and relies on
this one after a channel switch.
---
drivers/net/wireless/ath/ath11k/mac.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 1a237adaa..57873c875 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -7800,7 +7800,11 @@ ath11k_mac_update_vif_chan(struct ath11k *ar,
* should be available for the channel switch now.
*/
- /* TODO: Update ar->rx_channel */
+ if (n_vifs) {
+ spin_lock_bh(&ar->data_lock);
+ ar->rx_channel = vifs[0].new_ctx->def.chan;
+ spin_unlock_bh(&ar->data_lock);
+ }
for (i = 0; i < n_vifs; i++) {
arvif = ath11k_vif_to_arvif(vifs[i].vif);
---
base-commit: cd026e68fdbf88b9cc522b76c7a9d92c9a41f709
change-id: 20261024-ath11k-rx-channel-switch-4ae05c7a827c
Best regards,
--
Christopher Griffin <christophergriffin05@xxxxxxxxx>