From caf16262865ff20c1b888a6696f13bcf33235387 Mon Sep 17 00:00:00 2001 From: Vinod Kumar Pirla Date: Tue, 29 Aug 2023 06:03:37 -0700 Subject: [PATCH] qcacmn: On link switch don't change the state of ML peer On disconnect ML peer state is set to disconnect initiated, this helps to avoid sending multiple deauth/disassoc OTA frames to AP on each VDEV. If link switch fails the ML peer will be in this state so for next userspace disconnect request deauth/disassoc frame is not sent OTA and AP might not be aware of STA leaving the network. Do not change ML peer's state on VDEV link switch disconnect to ML_PEER_DISCONN_INITIATED. Change-Id: Icbbb46bbf78cea796a3a1e07754be3a626390ad0 CRs-Fixed: 3601739 --- umac/mlo_mgr/src/wlan_mlo_mgr_peer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/umac/mlo_mgr/src/wlan_mlo_mgr_peer.c b/umac/mlo_mgr/src/wlan_mlo_mgr_peer.c index 9e26d7b446..87dec5fa5a 100644 --- a/umac/mlo_mgr/src/wlan_mlo_mgr_peer.c +++ b/umac/mlo_mgr/src/wlan_mlo_mgr_peer.c @@ -724,6 +724,14 @@ void wlan_mlo_partner_peer_disconnect_notify(struct wlan_objmgr_peer *src_peer) if (!vdev) return; + /* Do not change peer state to disconnect initiated for + * link switch case, this can lead to not sending deauth frame + * incase of actual disconnect and AP might drop the next connect + * request as it might think STA is still in connected state. + */ + if (wlan_vdev_mlme_is_mlo_link_switch_in_progress(vdev)) + return; + mlo_peer_lock_acquire(ml_peer); if (ml_peer->mlpeer_state == ML_PEER_DISCONN_INITIATED) {