From cc7e1f485560d724de183b25d9949771c5b5262c Mon Sep 17 00:00:00 2001 From: Jingxiang Ge Date: Tue, 14 Nov 2017 16:21:27 +0800 Subject: [PATCH] qcacld-3.0: Fix kernel disconnect indication mismatch issue While stop interface by "ifconfig wlan0 down" in connection status, in wlan_hdd_try_disconnect, the disconnect indication doesn't send to kernel, wdev->current_bss in kernel will not be null; In nl80211_trigger_scan, it will check wdev->current_bss, it will return if it is not NULL, which causes scan fail, and this is a very low ratio issue. Add disconnect indication to kernel. Change-Id: I5f652b49c87ff2fb5c7f34dd3a826307fb3bb7e1 CRs-Fixed: 2128100 --- core/hdd/src/wlan_hdd_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 63937603a79f..748e23e6d0d4 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -4392,9 +4392,14 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx, struct hdd_adapter *ada hdd_ctx->hHal, adapter->session_id, eCSR_DISCONNECT_REASON_IBSS_LEAVE); - else if (QDF_STA_MODE == adapter->device_mode) + 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 qdf_ret_status = sme_roam_disconnect( hdd_ctx->hHal,