From 03f992e41d557aff351e8adddeb6044f4263c5f1 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Date: Thu, 7 Jan 2016 18:07:06 +0530 Subject: [PATCH] qcacld-3.0: Abort previous connect if fresh connect is received qcacld-2.0 to qcacld-3.0 propagation If connect is received with previous connect in progress, driver doesn't abort the previous connect and process the new connect. In csr if new connect is for same profile, sme directly indicate connection success to hdd and thus hdd increment the active session count twice for both connect. Now if one more connect is received it will try to disconnect the previous connection and decrements the active session count. So the count is 1 though no session is active. Eventually if same scenario happens again the active session count will become 2 with no active session. As max active session limit is 2, no more connect is accepted. To avoid this, if fresh connect is received and previous connect is in progress abort the previous connect. CRs-Fixed: 958963 Change-Id: I1544bc6e7894ffeda1956a19a553b6fe4e35f988 --- core/hdd/src/wlan_hdd_cfg80211.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index e80b293541fa..20f73e649a5a 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -8747,8 +8747,9 @@ static int wlan_hdd_try_disconnect(hdd_adapter_t *pAdapter) hdd_conn_get_connected_bss_type(pHddStaCtx, &connectedBssType); if ((eMib_dot11DesiredBssType_independent == connectedBssType) || - (eConnectionState_Associated == pHddStaCtx->conn_info.connState) || - (eConnectionState_IbssConnected == pHddStaCtx->conn_info.connState)) { + (eConnectionState_Associated == pHddStaCtx->conn_info.connState) || + (eConnectionState_Connecting == pHddStaCtx->conn_info.connState) || + (eConnectionState_IbssConnected == pHddStaCtx->conn_info.connState)) { hdd_conn_set_connection_state(pAdapter, eConnectionState_Disconnecting); /* Issue disconnect to CSR */