Ver código fonte

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
Rakesh Pillai 4 anos atrás
pai
commit
98534ecf60
2 arquivos alterados com 13 adições e 3 exclusões
  1. 13 0
      core/dp/txrx3.0/dp_swlm.c
  2. 0 3
      core/dp/txrx3.0/dp_swlm.h

+ 13 - 0
core/dp/txrx3.0/dp_swlm.c

@@ -16,6 +16,9 @@
 
 #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR
 
+#include <dp_types.h>
+#include <dp_internal.h>
+#include <wlan_cfg.h>
 #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;

+ 0 - 3
core/dp/txrx3.0/dp_swlm.h

@@ -19,9 +19,6 @@
 
 #ifdef WLAN_DP_FEATURE_SW_LATENCY_MGR
 
-#include <dp_types.h>
-#include <dp_internal.h>
-
 #define DP_SWLM_TCL_TPUT_PASS_THRESH 3
 
 #define DP_SWLM_TCL_RX_TRAFFIC_THRESH 50