From 8fa28fd26fa71adec420f7b16b6f2e9cec63b280 Mon Sep 17 00:00:00 2001 From: Sandeep Puligilla Date: Thu, 2 Nov 2017 12:19:33 -0700 Subject: [PATCH] qcacld-3.0: Clear the HDD scan list during exit HDD scan list is not cleared as part of wlan driver exit if the driver state is closed. Clear the HDD scan list irrespective of the driver status but send scan abort to firmware only when firmware is active. It mean don't send abort when driver is in closed state. Change-Id: Ib1b52203aafafd3e7af50224e5d245c80c45efad CRs-Fixed: 2137288 --- core/hdd/src/wlan_hdd_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 53250f67eefb..831b7bf2a9a3 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5987,6 +5987,8 @@ static void hdd_wlan_exit(struct hdd_context *hdd_ctx) * Disable Idle Power Save Mode */ hdd_set_idle_ps_config(hdd_ctx, false); + /* clear the scan queue in all the scenarios */ + wlan_cfg80211_cleanup_scan_queue(hdd_ctx->hdd_pdev); if (driver_status != DRIVER_MODULES_CLOSED) { hdd_unregister_wext_all_adapters(hdd_ctx); @@ -6007,7 +6009,6 @@ static void hdd_wlan_exit(struct hdd_context *hdd_ctx) * the expectation is that by the time Request Full Power has * completed, all scans will be cancelled */ - wlan_cfg80211_cleanup_scan_queue(hdd_ctx->hdd_pdev); hdd_abort_mac_scan_all_adapters(hdd_ctx); hdd_abort_sched_scan_all_adapters(hdd_ctx); hdd_stop_all_adapters(hdd_ctx, true);