浏览代码

qcacld-3.0: Close/destroy the pdev before CDS closing

Pdev is created once all the modules are enabled and currently
it is freed after the cds close is done, if some of the modules
as part of the de-init sequence has to send a command to the firmware
it will result in error.

To keep the deinit sequence opposite to that of init close/destroy
the pdev before closing the cds.

Change-Id: I8e087a573112e5d2d81e8ea413044d45f228813e
CRs-Fixed: 2797344
Arun Kumar Khandavalli 4 年之前
父节点
当前提交
1d03ff172f
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      core/hdd/src/wlan_hdd_main.c

+ 8 - 8
core/hdd/src/wlan_hdd_main.c

@@ -14144,6 +14144,14 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
 			QDF_ASSERT(0);
 		}
 
+		hdd_component_pdev_close(hdd_ctx->pdev);
+		dispatcher_pdev_close(hdd_ctx->pdev);
+		ret = hdd_objmgr_release_and_destroy_pdev(hdd_ctx);
+		if (ret) {
+			hdd_err("Failed to destroy pdev; errno:%d", ret);
+			QDF_ASSERT(0);
+		}
+
 		qdf_status = cds_close(hdd_ctx->psoc);
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			hdd_warn("Failed to stop CDS: %d", qdf_status);
@@ -14156,15 +14164,7 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
 			hdd_err("WBUFF de-init unsuccessful; status: %d",
 				qdf_status);
 
-		hdd_component_pdev_close(hdd_ctx->pdev);
-
 		hdd_component_psoc_close(hdd_ctx->psoc);
-		dispatcher_pdev_close(hdd_ctx->pdev);
-		ret = hdd_objmgr_release_and_destroy_pdev(hdd_ctx);
-		if (ret) {
-			hdd_err("Failed to destroy pdev; errno:%d", ret);
-			QDF_ASSERT(0);
-		}
 		/* pdev close and destroy use tx rx ops so call this here */
 		wlan_global_lmac_if_close(hdd_ctx->psoc);
 	}