From 6ff329eacb03981d018849052ccaedee5db3be77 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Fri, 5 Oct 2018 20:38:10 +0530 Subject: [PATCH] qcacld-3.0: De-init adapters before stop modules In con_mode handler, adapters are getting deinitialized while cleaning up present mode which is happening after stop modules. In stop modules driver checks for memory leak which results in mem leak detection for the adapters which are not freed yet. To address this issue, move the deinitialization of the adapters from clean up present mode to stop present mode, which happens before stop modules. Change-Id: I9cda456feb2b0c199f5c8d4debee21f0e07c47fb CRs-Fixed: 2326340 --- core/hdd/src/wlan_hdd_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 0739973ee8..9e66bc9d79 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -13194,6 +13194,7 @@ static void hdd_stop_present_mode(struct hdd_context *hdd_ctx, hdd_abort_mac_scan_all_adapters(hdd_ctx); wlan_cfg80211_cleanup_scan_queue(hdd_ctx->pdev, NULL); hdd_stop_all_adapters(hdd_ctx); + hdd_deinit_all_adapters(hdd_ctx, false); break; default: @@ -13212,7 +13213,6 @@ static void hdd_cleanup_present_mode(struct hdd_context *hdd_ctx, case QDF_GLOBAL_MISSION_MODE: case QDF_GLOBAL_MONITOR_MODE: case QDF_GLOBAL_FTM_MODE: - hdd_deinit_all_adapters(hdd_ctx, false); hdd_close_all_adapters(hdd_ctx, false); break; case QDF_GLOBAL_EPPING_MODE: