summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdhar, Mahesh Kumar <c_medhar@qti.qualcomm.com>2014-07-21 18:39:22 +0530
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-07-22 22:01:35 -0700
commit2dad565afff14df0fc0954924f6901dca3cafa54 (patch)
tree74401704b875481a4f4d905f951d81b12a8cb34a
parentdbd4c2f8a05c3be4e79fbb6a0aac134bc167234c (diff)
cld:Restore the connection state on disconnection failure.
Currently irrespective of disconnection return status we update the connection state to disconnecting state. This causes issue in the next attemp of supplicant to disconnect the connection. Since in this case we are already in disconnecting state we return success to supplicant even though we have not yet disconnected. changes are made to restore the connection state on disconnection failures. Change-Id: I9bb2d680850ec904e16f99745f37412a25096b8d CRs-Fixed: 696249
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 27e549df9870..437baa5b886f 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -9904,6 +9904,7 @@ static int __wlan_hdd_cfg80211_disconnect( struct wiphy *wiphy,
int status;
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ eConnectionState connState;
#ifdef FEATURE_WLAN_TDLS
tANI_U8 staIdx;
#endif
@@ -9930,6 +9931,8 @@ static int __wlan_hdd_cfg80211_disconnect( struct wiphy *wiphy,
eCsrRoamDisconnectReason reasonCode =
eCSR_DISCONNECT_REASON_UNSPECIFIED;
hdd_scaninfo_t *pScanInfo;
+
+ connState = pHddStaCtx->conn_info.connState;
switch (reason) {
case WLAN_REASON_MIC_FAILURE:
reasonCode = eCSR_DISCONNECT_REASON_MIC_ERROR;
@@ -9982,6 +9985,7 @@ static int __wlan_hdd_cfg80211_disconnect( struct wiphy *wiphy,
status = wlan_hdd_disconnect(pAdapter, reasonCode);
if (0 != status) {
hddLog(VOS_TRACE_LEVEL_ERROR, FL("failure, returned %d"), status);
+ pHddStaCtx->conn_info.connState = connState;
return -EINVAL;
}
} else {