Browse Source

qcacld-3.0: Put the hdd runtime pm deinit under fw ready

HDD runtime pm context is only created when fw wmi ready event is received.
Only deinit when fw wmi ready event is received.

Change-Id: I4dda8a95d8a8089693dcbc4dccefbd2079f558f1
CRs-Fixed: 2540580
Alan Chen 5 năm trước cách đây
mục cha
commit
f4e958f714
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      core/hdd/src/wlan_hdd_main.c

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

@@ -3132,6 +3132,7 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx, bool reinit)
 	QDF_STATUS status;
 	bool unint = false;
 	void *hif_ctx;
+	struct target_psoc_info *tgt_hdl;
 
 	qdf_dev = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
 	if (!qdf_dev) {
@@ -3337,7 +3338,11 @@ deregister_cb:
 
 cds_txrx_free:
 
-	hdd_runtime_suspend_context_deinit(hdd_ctx);
+	tgt_hdl = wlan_psoc_get_tgt_if_handle(hdd_ctx->psoc);
+
+	if (tgt_hdl && target_psoc_get_wmi_ready(tgt_hdl))
+		hdd_runtime_suspend_context_deinit(hdd_ctx);
+
 	if (hdd_ctx->pdev) {
 		dispatcher_pdev_close(hdd_ctx->pdev);
 		hdd_objmgr_release_and_destroy_pdev(hdd_ctx);