Browse Source

qcacld-3.0: Move gEnableMCCAdaptiveScheduler from HDD to Plcy manager

As part of new INI/CFG model, move gEnableMCCAdaptiveScheduler
ownership from HDD to policy manager.

CRs-Fixed: 2324393
Change-Id: Ib86004c4ee753b37b392de69551c777e3e9011de
Krunal Soni 6 years ago
parent
commit
6871374b9d
3 changed files with 13 additions and 41 deletions
  1. 0 22
      core/hdd/inc/wlan_hdd_cfg.h
  2. 8 17
      core/hdd/src/wlan_hdd_cfg.c
  3. 5 2
      core/hdd/src/wlan_hdd_p2p.c

+ 0 - 22
core/hdd/inc/wlan_hdd_cfg.h

@@ -4388,27 +4388,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ENABLE_RX_LDPC_MAX                   (1)
 #define CFG_ENABLE_RX_LDPC_DEFAULT               (0)
 
-/*
- * <ini>
- * gEnableMCCAdaptiveScheduler - MCC Adaptive Scheduler feature.
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to enable/disable MCC Adaptive Scheduler feature.
- *
- * Related: None.
- *
- * Supported Feature: Concurrency
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_NAME             "gEnableMCCAdaptiveScheduler"
-#define CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_MIN              (0)
-#define CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_MAX              (1)
-#define CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_DEFAULT          (1)
 
 #define CFG_DISABLE_LDPC_WITH_TXBF_AP             "gDisableLDPCWithTxbfAP"
 #define CFG_DISABLE_LDPC_WITH_TXBF_AP_MIN         (0)
@@ -7481,7 +7460,6 @@ struct hdd_config {
 	bool prevent_link_down;
 	uint8_t scanAgingTimeout;
 	uint8_t disableLDPCWithTxbfAP;
-	uint8_t enableMCCAdaptiveScheduler;
 	bool enableSSR;
 	bool enable_data_stall_det;
 	bool bFastRoamInConIniFeatureEnabled;

+ 8 - 17
core/hdd/src/wlan_hdd_cfg.c

@@ -1701,14 +1701,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_RX_LDPC_MIN,
 		     CFG_ENABLE_RX_LDPC_MAX),
 
-	REG_VARIABLE(CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_NAME,
-		     WLAN_PARAM_Integer,
-		     struct hdd_config, enableMCCAdaptiveScheduler,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_DEFAULT,
-		     CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_MIN,
-		     CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_MAX),
-
 	REG_VARIABLE(CFG_IBSS_ADHOC_CHANNEL_5GHZ_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, AdHocChannel5G,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -4125,6 +4117,7 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
 	bool status = true;
 	struct hdd_config *config = hdd_ctx->config;
 	mac_handle_t mac_handle;
+	uint8_t mcc_adaptive_sch = 0;
 
 	/*
 	 * During the initialization both 2G and 5G capabilities should be same.
@@ -4179,12 +4172,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
 		hdd_err("Couldn't pass on WNI_CFG_11D_ENABLED to CFG");
 	}
 
-	if (sme_cfg_set_int(mac_handle, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
-		    config->enableMCCAdaptiveScheduler) ==
-		    QDF_STATUS_E_FAILURE) {
-		status = false;
-		hdd_err("Couldn't pass on WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED to CFG");
-	}
 	if (sme_cfg_set_int(mac_handle, WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP,
 		    config->disableLDPCWithTxbfAP) == QDF_STATUS_E_FAILURE) {
 		status = false;
@@ -4198,6 +4185,13 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
 		hdd_err("Couldn't pass on WNI_CFG_IBSS_ATIM_WIN_SIZE to CFG");
 	}
 
+	ucfg_policy_mgr_get_mcc_adaptive_sch(hdd_ctx->psoc,
+					     &mcc_adaptive_sch);
+	if (sme_cfg_set_int(mac_handle, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
+			    mcc_adaptive_sch) == QDF_STATUS_E_FAILURE) {
+		status = false;
+		hdd_err("Couldn't pass on WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED to CFG");
+	}
 	return status;
 }
 
@@ -4221,9 +4215,6 @@ QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx)
 		return QDF_STATUS_E_NOMEM;
 	}
 
-	user_cfg->enable_mcc_adaptive_scheduler =
-		hdd_ctx->config->enableMCCAdaptiveScheduler;
-
 	status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc,
 					     &user_cfg->enable2x2);
 	if (!QDF_IS_STATUS_SUCCESS(status))

+ 5 - 2
core/hdd/src/wlan_hdd_p2p.c

@@ -48,6 +48,7 @@
 #include "wlan_p2p_ucfg_api.h"
 #include "wlan_cfg80211_p2p.h"
 #include "wlan_p2p_cfg_api.h"
+#include "wlan_policy_mgr_ucfg.h"
 
 /* Ms to Time Unit Micro Sec */
 #define MS_TO_TU_MUS(x)   ((x) * 1024)
@@ -1087,6 +1088,7 @@ static int32_t wlan_hdd_update_mcc_adaptive_scheduler(
 		struct hdd_adapter *adapter, bool is_enable)
 {
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+	uint8_t enable_mcc_adaptive_sch = 0;
 
 	if (hdd_ctx == NULL) {
 		hdd_err("HDD context is null");
@@ -1094,8 +1096,9 @@ static int32_t wlan_hdd_update_mcc_adaptive_scheduler(
 	}
 
 	hdd_info("enable/disable MAS :%d", is_enable);
-	if (hdd_ctx->config &&
-	    hdd_ctx->config->enableMCCAdaptiveScheduler) {
+	ucfg_policy_mgr_get_mcc_adaptive_sch(hdd_ctx->psoc,
+					     &enable_mcc_adaptive_sch);
+	if (enable_mcc_adaptive_sch) {
 		/* Todo check where to set the MCC apative SCHED for read */
 
 		if (QDF_STATUS_SUCCESS != sme_set_mas(is_enable)) {