Bladeren bron

qcacld-3.0: Add call to pdev open and close APIs

Pdev open and close APIs are needed so that reference counting
can be separated from handler for pdev create APIs. Reference
counting cannot be done in the handlers for pdev create callbacks.
Therefore add call to pdev open and close APIs.

Change-Id: I5f1ed6a470bbedaa2772d4ad95953ae3894b2c9c
CRs-Fixed: 2170257
Amar Singhal 7 jaren geleden
bovenliggende
commit
410675ca8b
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  1. 6 0
      core/hdd/src/wlan_hdd_main.c

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

@@ -1845,6 +1845,10 @@ void hdd_update_tgt_cfg(void *context, void *param)
 	} else {
 		hdd_debug("New pdev has been created with pdev_id = %u",
 			  hdd_ctx->hdd_pdev->pdev_objmgr.wlan_pdev_id);
+		if (dispatcher_pdev_open(hdd_ctx->hdd_pdev)) {
+			hdd_err("dispatcher pdev open failed");
+			QDF_BUG(0);
+		}
 	}
 
 	ret = hdd_update_green_ap_config(hdd_ctx);
@@ -2669,6 +2673,7 @@ int hdd_wlan_start_modules(struct hdd_context *hdd_ctx,
 
 post_disable:
 	cds_post_disable();
+	dispatcher_pdev_close(hdd_ctx->hdd_pdev);
 	hdd_objmgr_release_and_destroy_pdev(hdd_ctx);
 
 cds_txrx_free:
@@ -10134,6 +10139,7 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
 		QDF_ASSERT(0);
 	}
 
+	dispatcher_pdev_close(hdd_ctx->hdd_pdev);
 	ret = hdd_objmgr_release_and_destroy_pdev(hdd_ctx);
 	if (ret) {
 		hdd_err("Failed to destroy pdev; errno:%d", ret);