[PATCH ath-next] wifi: ath12k: Defer vdev bring-up until CSA finalize to avoid stale beacon
Vasanthakumar Thiagarajan
vasanthakumar.thiagarajan at oss.qualcomm.com
Wed Oct 8 09:09:22 PDT 2025
On 9/24/2025 7:13 PM, Maharaja Kennadyrajan wrote:
> From: Aditya Kumar Singh <aditya.kumar.singh at oss.qualcomm.com>
>
> Mac80211 schedules CSA finalize work twice during a channel switch: first
> during the reserved switch phase and again during the finalize phase.
> The beacon content is updated only during the second schedule, which occurs
> after the reserved switch completes. However, the ath12k driver attempts to
> bring up the VDEV during the channel switch callback
> (ath12k_mac_update_vif_chan()), which leads to premature installation of
> stale beacon templates before the updated content is available.
>
> This premature VDEV bring-up causes outdated beacon information to be
> broadcast, which can result in updated channel parameters during the
> transition. In MBSSID scenarios, this behavior is particularly problematic
> because the transmitting interface's beacon must be updated before
> non-transmitting interfaces are brought up. Failing to do so can lead to
> beacon mismatches across interfaces.
>
> Introduce a is_csa_in_progress flag to defer VDEV_UP until CSA finalize is
> complete. Set this flag during the channel switch callback when CSA is
> active. In bss_info_changed(), check this flag and issue VDEV_UP only
> after the beacon template has been updated.
>
> Ensure that in MBSSID cases, the transmitting interface is brought up
> first, followed by all non-transmitting interfaces. This ordering makes
> sure correct beacon propagation and avoids stale beacon installation
> during CSA transitions.
>
> Additionally, move the call to ath12k_mac_update_peer_puncturing_width()
> before VDEV bring-up during CSA handling. This ensures that the puncturing
> bitmap and bandwidth settings are applied before the VDEV is brought up.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
>
> Fixes: 8c6faa56bfb2 ("wifi: ath12k: add MBSSID beacon support")
> Signed-off-by: Aditya Kumar Singh <aditya.kumar.singh at oss.qualcomm.com>
> Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan at oss.qualcomm.com>
More information about the ath12k
mailing list