From 19a7a407dfafc4cca3b2df96cacfc5b1fec229fc Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Thu, 12 Jul 2018 17:36:57 +0530 Subject: [PATCH] qcacld-3.0: Fix connState while processing disconnect from stop adapter If driver receive stop adapter when STA is in connecting state, driver queue a disconnect command without changing the connState of the STA. Now even if the disconnect is in progress the connState indicate that the connection is in progress. This may lead to sync issues between HDD and SME. Fix is to set the connState to disconnecting so that HDD indicate proper state. Change-Id: Ib9d607ad2ab05e5edc266e59516b4ae2b7668c78 CRs-Fixed: 2277633 --- core/hdd/src/wlan_hdd_main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 42e66128bb68..3df267119f1b 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5154,14 +5154,10 @@ QDF_STATUS hdd_stop_adapter_ext(struct hdd_context *hdd_ctx, mac_handle, adapter->session_id, eCSR_DISCONNECT_REASON_IBSS_LEAVE); - else if (QDF_STA_MODE == adapter->device_mode) { - qdf_ret_status = - wlan_hdd_try_disconnect(adapter); - hdd_debug("Send disconnected event to userspace"); - wlan_hdd_cfg80211_indicate_disconnect( - adapter->dev, true, - WLAN_REASON_UNSPECIFIED); - } else + else if (adapter->device_mode == QDF_STA_MODE) + wlan_hdd_disconnect(adapter, + eCSR_DISCONNECT_REASON_DEAUTH); + else qdf_ret_status = sme_roam_disconnect( mac_handle, adapter->session_id,