summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanumanth Reddy Pothula <c_hpothu@codeaurora.org>2016-10-07 17:27:04 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-10-12 00:45:06 -0700
commit3370212bf797e4131f077b552abc877fdb349fb2 (patch)
tree018c594b438206749bfe13c4db8a066a0cc5e955
parent901d75a1a14a0e13b68067636b8a11abf0a9955c (diff)
qcacld-3.0: Invalidate session ID after successful session close
Presently, host sets session ID to invalid(0xFF) once it posts the message for sme to close session. During the close session if there are any north bound command pending in queue, Host is sending the command with invalid session ID to firmware, leading to device crash. Set session ID to invalid only once sme session is closed. Change-Id: Ib8a6a8e8a8af842064f6500b4bb62266eae7c1f8 CRs-Fixed: 1074111
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c1
-rw-r--r--core/hdd/src/wlan_hdd_main.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 559a6717f3e9..bf299934952b 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -7674,6 +7674,7 @@ static int __wlan_hdd_cfg80211_stop_ap(struct wiphy *wiphy,
global_p2p_connection_status = P2P_NOT_ACTIVE;
}
#endif
+ pAdapter->sessionId = HDD_SESSION_ID_INVALID;
EXIT();
return ret;
}
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 75c5aec1d67f..bfbee90dfc03 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -3463,7 +3463,6 @@ static void hdd_wait_for_sme_close_sesion(hdd_context_t *hdd_ctx,
sme_close_session(hdd_ctx->hHal, adapter->sessionId,
hdd_sme_close_session_callback,
adapter)) {
- adapter->sessionId = HDD_SESSION_ID_INVALID;
/*
* Block on a completion variable. Can't wait
* forever though.
@@ -3477,7 +3476,9 @@ static void hdd_wait_for_sme_close_sesion(hdd_context_t *hdd_ctx,
if (adapter->device_mode == QDF_NDI_MODE)
hdd_ndp_session_end_handler(adapter);
clear_bit(SME_SESSION_OPENED, &adapter->event_flags);
+ return;
}
+ adapter->sessionId = HDD_SESSION_ID_INVALID;
}
}