summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com>2013-11-19 14:54:51 +0530
committerMadan Mohan Koyyalamudi <mkoyyala@qca.qualcomm.com>2013-11-27 20:02:54 -0800
commitd53502a4a8a0b9c3d60d24271152f2f24a1015e4 (patch)
tree5fab77336816e5fc4aab5af750d83dcb8b5b0775
parent92bd2525b1f1100550bac023019b130652eb96d4 (diff)
qcacld: Change the connection state to Disconnecting.
On receiving Disconnect command from CFG, change the connection state to Disconnecting rather than changing it to NotConnected. Hence processing of Connect command even before Disconnect has completed is avoided. Change-Id: Id3a39e33f4a6fdeb052cddcbace2aa2959f15987 CRs-fixed: 550307
-rw-r--r--CORE/HDD/src/wlan_hdd_assoc.c8
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c2
2 files changed, 7 insertions, 3 deletions
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
index db6eb2d97835..63d7b7954919 100644
--- a/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
@@ -749,8 +749,12 @@ static eHalStatus hdd_DisConnectHandler( hdd_adapter_t *pAdapter, tCsrRoamInfo *
netif_tx_disable(dev);
netif_carrier_off(dev);
- INIT_COMPLETION(pAdapter->disconnect_comp_var);
- hdd_connSetConnectionState( pHddStaCtx, eConnectionState_Disconnecting );
+ if(pHddStaCtx->conn_info.connState != eConnectionState_Disconnecting)
+ {
+ INIT_COMPLETION(pAdapter->disconnect_comp_var);
+ hdd_connSetConnectionState( pHddStaCtx, eConnectionState_Disconnecting );
+ }
+
/* If only STA mode is on */
if((pHddCtx->concurrency_mode <= 1) && (pHddCtx->no_of_sessions[WLAN_HDD_INFRA_STATION] <=1))
{
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 48467859cc54..5950689e9639 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -5675,7 +5675,7 @@ int wlan_hdd_disconnect( hdd_adapter_t *pAdapter, u16 reason )
/*stop tx queues*/
netif_tx_disable(pAdapter->dev);
netif_carrier_off(pAdapter->dev);
- pHddStaCtx->conn_info.connState = eConnectionState_NotConnected;
+ pHddStaCtx->conn_info.connState = eConnectionState_Disconnecting;
(WLAN_HDD_GET_CTX(pAdapter))->isAmpAllowed = VOS_TRUE;
INIT_COMPLETION(pAdapter->disconnect_comp_var);
/*issue disconnect*/