qcacld-3.0: Move runtime suspend logic for scan to common code
Move runtime suspend logic for scan to common code
Change-Id: Ie2d96156ab698aa4993ea308ae933725c97a94c2
CRs-Fixed: 2035673
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index a3fe1a8..17c98d2 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -866,7 +866,6 @@
* Prevent Runtime PM for scan
*/
struct hdd_runtime_pm_context {
- qdf_runtime_lock_t scan;
qdf_runtime_lock_t roc;
qdf_runtime_lock_t dfs;
};
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 21ac867..3b8d36a 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -2690,7 +2690,6 @@
{
struct hdd_runtime_pm_context *ctx = &hdd_ctx->runtime_context;
- ctx->scan = qdf_runtime_lock_init("scan");
ctx->roc = qdf_runtime_lock_init("roc");
ctx->dfs = qdf_runtime_lock_init("dfs");
}
@@ -2705,8 +2704,6 @@
{
struct hdd_runtime_pm_context *ctx = &hdd_ctx->runtime_context;
- qdf_runtime_lock_deinit(ctx->scan);
- ctx->scan = NULL;
qdf_runtime_lock_deinit(ctx->roc);
ctx->roc = NULL;
qdf_runtime_lock_deinit(ctx->dfs);
diff --git a/core/hdd/src/wlan_hdd_object_manager.c b/core/hdd/src/wlan_hdd_object_manager.c
index 073041f..a300dc1 100644
--- a/core/hdd/src/wlan_hdd_object_manager.c
+++ b/core/hdd/src/wlan_hdd_object_manager.c
@@ -33,7 +33,6 @@
#include <wlan_hdd_object_manager.h>
#include <wlan_osif_priv.h>
-
static void hdd_init_pdev_os_priv(hdd_context_t *hdd_ctx,
struct pdev_osif_priv *os_priv)
{
diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c
index e3c74dd..e7ba934 100644
--- a/core/hdd/src/wlan_hdd_scan.c
+++ b/core/hdd/src/wlan_hdd_scan.c
@@ -1279,7 +1279,6 @@
hdd_vendor_scan_callback(pAdapter, req, aborted);
allow_suspend:
- qdf_runtime_pm_allow_suspend(hddctx->runtime_context.scan);
qdf_spin_lock(&hddctx->hdd_scan_req_q_lock);
size = qdf_list_size(&hddctx->hdd_scan_req_q);
if (!size) {
@@ -1898,7 +1897,6 @@
if (request->flags & NL80211_SCAN_FLAG_FLUSH)
sme_scan_flush_result(WLAN_HDD_GET_HAL_CTX(pAdapter));
#endif
- qdf_runtime_pm_prevent_suspend(pHddCtx->runtime_context.scan);
status = sme_scan_request(WLAN_HDD_GET_HAL_CTX(pAdapter),
pAdapter->sessionId, &scan_req,
&hdd_cfg80211_scan_done_callback, dev);
@@ -1913,8 +1911,6 @@
} else {
status = -EIO;
}
-
- qdf_runtime_pm_allow_suspend(pHddCtx->runtime_context.scan);
hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_SCAN);
goto free_mem;
}