Browse Source

qcacld-3.0: Deinitialize runtime suspend context before hif close

Currently runtime suspend context deinit is done after hif close which
leads to memory leak. In this change deinitialize the runtime suspend
context before hif close.

Change-Id: Idc99f77b09a25a53e10b4e92391060670bb9bb7e
CRs-Fixed: 2065219
Sravan Kumar Kairam 7 năm trước cách đây
mục cha
commit
645749571d
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      core/hdd/src/wlan_hdd_main.c

+ 4 - 1
core/hdd/src/wlan_hdd_main.c

@@ -2781,6 +2781,8 @@ static void hdd_runtime_suspend_context_deinit(hdd_context_t *hdd_ctx)
 	ctx->roc = NULL;
 	qdf_runtime_lock_deinit(ctx->dfs);
 	ctx->dfs = NULL;
+
+	wlan_scan_runtime_pm_deinit(hdd_ctx->hdd_pdev);
 }
 
 static void hdd_adapter_runtime_suspend_init(hdd_adapter_t *adapter)
@@ -5582,7 +5584,6 @@ static void hdd_wlan_exit(hdd_context_t *hdd_ctx)
 	hdd_green_ap_deinit(hdd_ctx);
 	hdd_request_manager_deinit();
 
-	hdd_runtime_suspend_context_deinit(hdd_ctx);
 	hdd_close_all_adapters(hdd_ctx, false);
 
 	hdd_ipa_cleanup(hdd_ctx);
@@ -9175,6 +9176,8 @@ int hdd_wlan_stop_modules(hdd_context_t *hdd_ctx, bool ftm_mode)
 		ret = -EINVAL;
 	}
 
+	hdd_runtime_suspend_context_deinit(hdd_ctx);
+
 	hdd_hif_close(hdd_ctx, hif_ctx);
 
 	ol_cds_free();