wlan: Fix incorrect Handling of Active Session in Disconnect.
Currently, If any disconnects comes from supplicant while
connection is already in progress; hdd_DisConnectHandler
is decreasing value of active session.
Driver should decrease in case of connected session only.
CRs-Fixed: 700728
Change-Id: Ibee54791088c6ee7f3c4cb841768172fdaa5d805
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index b0723e3..6dc3b26 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -10304,6 +10304,15 @@
}
pHddCtx->isAmpAllowed = VOS_TRUE;
+
+ if (eConnectionState_Associated == pHddStaCtx->conn_info.connState)
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Set HDD connState to eConnectionState_Disconnecting",
+ __func__);
+ wlan_hdd_decr_active_session(pHddCtx, pAdapter->device_mode);
+ }
+
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
"%s: Set HDD connState to eConnectionState_Disconnecting",
__func__);