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
This commit is contained in:

committed by
snandini

parent
fd6d164471
commit
96dced7129
@@ -3963,6 +3963,9 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
|
|||||||
hdd_ctx->hHal,
|
hdd_ctx->hHal,
|
||||||
adapter->sessionId,
|
adapter->sessionId,
|
||||||
eCSR_DISCONNECT_REASON_IBSS_LEAVE);
|
eCSR_DISCONNECT_REASON_IBSS_LEAVE);
|
||||||
|
else if (QDF_STA_MODE == adapter->device_mode)
|
||||||
|
qdf_ret_status =
|
||||||
|
wlan_hdd_try_disconnect(adapter);
|
||||||
else
|
else
|
||||||
qdf_ret_status = sme_roam_disconnect(
|
qdf_ret_status = sme_roam_disconnect(
|
||||||
hdd_ctx->hHal,
|
hdd_ctx->hHal,
|
||||||
@@ -3971,16 +3974,17 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
|
|||||||
/* success implies disconnect command got
|
/* success implies disconnect command got
|
||||||
* queued up successfully
|
* 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(
|
rc = wait_for_completion_timeout(
|
||||||
&adapter->disconnect_comp_var,
|
&adapter->disconnect_comp_var,
|
||||||
msecs_to_jiffies
|
msecs_to_jiffies
|
||||||
(WLAN_WAIT_TIME_DISCONNECT));
|
(WLAN_WAIT_TIME_DISCONNECT));
|
||||||
if (!rc)
|
if (!rc)
|
||||||
hdd_warn("wait on disconnect_comp_var failed");
|
hdd_warn("disconn_comp_var wait fail");
|
||||||
} else {
|
|
||||||
hdd_err("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));
|
memset(&wrqu, '\0', sizeof(wrqu));
|
||||||
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
|
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
|
||||||
memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN);
|
memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN);
|
||||||
|
Reference in New Issue
Block a user