summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarun Reddy Yeturu <varunreddy.yeturu@codeaurora.org>2017-03-29 18:03:54 -0700
committerSandeep Puligilla <spuligil@codeaurora.org>2017-03-31 04:18:26 -0700
commit81cf124cdeb40e0b62b4e8e4785cfe83ec7e3c12 (patch)
treefcf2c3bfe2b0377b702924bd80714a447fc374c5
parentfc7a9e9790c0f4ff03defb50a12637bbc77b0098 (diff)
qcacld-3.0: Defer disconnect from driver unload during roaming
Defer the disconnect that is issued because of driver unload and handle it immediately after the roaming is complete. Change-Id: I9200d0f218560f2a990f491a27563bbbf594ae24 CRs-Fixed: 2025273
-rw-r--r--core/hdd/src/wlan_hdd_main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 963598cb78c4..42d88102bb99 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -3706,22 +3706,26 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
hdd_ctx->hHal,
adapter->sessionId,
eCSR_DISCONNECT_REASON_IBSS_LEAVE);
+ else if (QDF_STA_MODE == adapter->device_mode)
+ qdf_ret_status =
+ wlan_hdd_try_disconnect(adapter);
else
qdf_ret_status = sme_roam_disconnect(
hdd_ctx->hHal,
adapter->sessionId,
eCSR_DISCONNECT_REASON_UNSPECIFIED);
/* success implies disconnect command got queued up successfully */
- if (qdf_ret_status == QDF_STATUS_SUCCESS) {
+ if (qdf_ret_status == QDF_STATUS_SUCCESS &&
+ QDF_STA_MODE != adapter->device_mode) {
rc = wait_for_completion_timeout(
&adapter->disconnect_comp_var,
msecs_to_jiffies
(WLAN_WAIT_TIME_DISCONNECT));
if (!rc)
hdd_warn("wait on disconnect_comp_var failed");
- } else {
- hdd_warn("failed to post disconnect event to SME");
}
+ if (qdf_ret_status != QDF_STATUS_SUCCESS)
+ hdd_warn("failed to post disconnect");
memset(&wrqu, '\0', sizeof(wrqu));
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN);