From 410675ca8b565ee87a8ce8be2c6c0bf6b34638fc Mon Sep 17 00:00:00 2001 From: Amar Singhal Date: Wed, 10 Jan 2018 12:14:21 -0800 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index ed67174ee8c7..0f13adadef06 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/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);