From 681e2c002a5ecd6eab474ea33c1875ba20524ee6 Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Wed, 1 Jun 2022 20:24:25 +0530 Subject: [PATCH] qcacld-3.0: Don't proceed with roam synch after disassociation During roam synch event processing, if ssid mismatch is seen, then the driver issues disassociate, but still proceeds to process the roam synch indication and indicates new connection to upper layer. This causes policy manager api to increment active session wrongly when actually STA is disconnected. Return failure in csr_roam_stop_network() if disassociation is initiated. Change-Id: I21ae1c26114e4387517710cd3358f89b7e2432fd CRs-Fixed: 3210852 --- core/sme/src/csr/csr_api_roam.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index d1657cd622ef..2d5aaeb43567 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -5028,10 +5028,16 @@ QDF_STATUS csr_roam_stop_network(struct mac_context *mac, uint32_t sessionId, ssid_match = csr_is_ssid_equal( mac, pSession->pConnectBssDesc, bss_desc, pIes); - if (bss_desc && !ssid_match) - status = csr_roam_issue_disassociate(mac, - sessionId, substate, false); - else if (bss_desc) + if (bss_desc && !ssid_match) { + csr_roam_issue_disassociate(mac, + sessionId, substate, + false); + status = QDF_STATUS_E_FAILURE; + qdf_mem_free(pBssConfig); + + return status; + + } else if (bss_desc) { /* * In an infra & going to an infra network with * the same SSID. This calls for a reassoc seq. @@ -5042,6 +5048,7 @@ QDF_STATUS csr_roam_stop_network(struct mac_context *mac, uint32_t sessionId, mac, sessionId, roam_profile, bss_desc, pBssConfig, pIes, false); + } } else if (bss_desc || CSR_IS_INFRA_AP(roam_profile)) { /* * Not in Infra. We can go ahead and set