From 98534ecf60f1aec2f9702854ef94760a3b759699 Mon Sep 17 00:00:00 2001 From: Rakesh Pillai Date: Sat, 29 Aug 2020 22:10:51 -0700 Subject: [PATCH] qcacld-3.0: Add INI support for SWLM Add support to enable or disable the Software latency manager via INI Change-Id: I7e0323a0e84c0b6bddaf646dbd0b968d2c6b3f8d CRs-fixed: 2769033 --- core/dp/txrx3.0/dp_swlm.c | 13 +++++++++++++ core/dp/txrx3.0/dp_swlm.h | 3 --- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/core/dp/txrx3.0/dp_swlm.c b/core/dp/txrx3.0/dp_swlm.c index a22e2eda73..32c022807d 100644 --- a/core/dp/txrx3.0/dp_swlm.c +++ b/core/dp/txrx3.0/dp_swlm.c @@ -16,6 +16,9 @@ #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR +#include +#include +#include #include "dp_swlm.h" /** @@ -210,15 +213,25 @@ static inline QDF_STATUS dp_soc_swlm_tcl_detach(struct dp_soc *soc) QDF_STATUS dp_soc_swlm_attach(struct dp_soc *soc) { + struct wlan_cfg_dp_soc_ctxt *cfg = soc->wlan_cfg_ctx; struct dp_swlm *swlm = &soc->swlm; QDF_STATUS ret; + /* Check if it is enabled in the INI */ + if (!wlan_cfg_is_swlm_enabled(cfg)) { + dp_err("SWLM feature is disabled"); + swlm->is_init = false; + swlm->is_enabled = false; + return QDF_STATUS_E_NOSUPPORT; + } + swlm->ops = &dp_latency_mgr_ops; ret = dp_soc_swlm_tcl_attach(soc); if (QDF_IS_STATUS_ERROR(ret)) goto swlm_tcl_setup_fail; + swlm->is_init = true; swlm->is_enabled = true; return QDF_STATUS_SUCCESS; diff --git a/core/dp/txrx3.0/dp_swlm.h b/core/dp/txrx3.0/dp_swlm.h index 6872b5c0fb..cdf9bcbe3b 100644 --- a/core/dp/txrx3.0/dp_swlm.h +++ b/core/dp/txrx3.0/dp_swlm.h @@ -19,9 +19,6 @@ #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR -#include -#include - #define DP_SWLM_TCL_TPUT_PASS_THRESH 3 #define DP_SWLM_TCL_RX_TRAFFIC_THRESH 50