From 7d72d270fa42f8ea879ab55114eb06a985386a5b Mon Sep 17 00:00:00 2001 From: Ashish Date: Fri, 14 Jan 2022 18:07:26 +0530 Subject: [PATCH] Revert "qcacld-3.0: Prevent runtime suspend on ll_stats and get station requests" This reverts commit I7704a3b9b3e8ad187677705e1b11fbd82be73cfb. This change cause CXPC failure, as each ll_status will cause runtime pm resume. Change-Id: I3547181fb8cfee1e5e40992dfaf5547eaac29a2a CRs-Fixed: 3110499 --- core/hdd/inc/wlan_hdd_main.h | 2 -- core/hdd/src/wlan_hdd_main.c | 2 -- core/hdd/src/wlan_hdd_stats.c | 13 ------------- 3 files changed, 17 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index c0df974aadf8..723101dcfb14 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -1152,7 +1152,6 @@ struct hdd_chan_change_params { * @user: user context to prevent/allow runtime pm * @is_user_wakelock_acquired: boolean to check if user wakelock status * @monitor_mode: monitor mode context to prevent/allow runtime pm - * @stats: stats context to prevent/allow runtime pm * * Runtime PM control for underlying activities */ @@ -1162,7 +1161,6 @@ struct hdd_runtime_pm_context { qdf_runtime_lock_t user; bool is_user_wakelock_acquired; qdf_runtime_lock_t monitor_mode; - qdf_runtime_lock_t stats; }; /* diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index b11865e4bd82..33a8244bdd26 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -1437,7 +1437,6 @@ static void hdd_runtime_suspend_context_init(struct hdd_context *hdd_ctx) qdf_runtime_lock_init(&ctx->connect); qdf_runtime_lock_init(&ctx->user); qdf_runtime_lock_init(&ctx->monitor_mode); - qdf_runtime_lock_init(&ctx->stats); ctx->is_user_wakelock_acquired = false; @@ -1457,7 +1456,6 @@ static void hdd_runtime_suspend_context_deinit(struct hdd_context *hdd_ctx) if (ctx->is_user_wakelock_acquired) qdf_runtime_pm_allow_suspend(&ctx->user); - qdf_runtime_lock_deinit(&ctx->stats); qdf_runtime_lock_deinit(&ctx->monitor_mode); qdf_runtime_lock_deinit(&ctx->user); qdf_runtime_lock_deinit(&ctx->connect); diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c index 2679dfd7e622..8c495ff61814 100644 --- a/core/hdd/src/wlan_hdd_stats.c +++ b/core/hdd/src/wlan_hdd_stats.c @@ -2010,8 +2010,6 @@ static int wlan_hdd_send_ll_stats_req(struct hdd_adapter *adapter, return -ENOMEM; } - qdf_runtime_pm_prevent_suspend(&hdd_ctx->runtime_context.stats); - cookie = osif_request_cookie(request); priv = osif_request_priv(request); @@ -2058,8 +2056,6 @@ exit: hdd_exit(); osif_request_put(request); - qdf_runtime_pm_allow_suspend(&hdd_ctx->runtime_context.stats); - return ret; } @@ -6857,23 +6853,16 @@ int wlan_hdd_get_station_stats(struct hdd_adapter *adapter) int ret = 0; struct stats_event *stats; struct wlan_objmgr_vdev *vdev; - struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); if (!get_station_fw_request_needed) { hdd_debug("return cached get_station stats"); return 0; } - ret = wlan_hdd_validate_context(hdd_ctx); - if (ret) - return ret; - vdev = hdd_objmgr_get_vdev(adapter); if (!vdev) return -EINVAL; - qdf_runtime_pm_prevent_suspend(&hdd_ctx->runtime_context.stats); - stats = wlan_cfg80211_mc_cp_stats_get_station_stats(vdev, &ret); if (ret || !stats) { wlan_cfg80211_mc_cp_stats_free_stats_event(stats); @@ -6886,8 +6875,6 @@ int wlan_hdd_get_station_stats(struct hdd_adapter *adapter) wlan_cfg80211_mc_cp_stats_free_stats_event(stats); out: - qdf_runtime_pm_allow_suspend(&hdd_ctx->runtime_context.stats); - hdd_objmgr_put_vdev(vdev); return ret; }