Selaa lähdekoodia

qcacld-3.0: Add MLME CFG items of rates [PART 1]

Add MLME CFG items of rates

Change-Id: I9f52f2ef0eef4698ddc13c55dd56d938a6e4c677
Karthik Kantamneni 6 vuotta sitten
vanhempi
sitoutus
22dd0f69cb

+ 15 - 0
components/mlme/core/src/wlan_mlme_main.c

@@ -148,6 +148,20 @@ static void mlme_update_ht_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
 	*ht_cap_info = u.default_ht_cap_info;
 }
 
+static void mlme_update_rates_in_cfg(struct wlan_objmgr_psoc *psoc,
+				     struct wlan_mlme_rates *rates)
+{
+	rates->cfp_period = cfg_default(CFG_CFP_PERIOD);
+	rates->cfp_max_duration = cfg_default(CFG_CFP_MAX_DURATION);
+	rates->max_htmcs_txdata = cfg_get(psoc, CFG_INI_MAX_HT_MCS_FOR_TX_DATA);
+	rates->disable_abg_rate_txdata = cfg_get(psoc,
+					CFG_INI_DISABLE_ABG_RATE_FOR_TX_DATA);
+	rates->sap_max_mcs_txdata = cfg_get(psoc,
+					CFG_INI_SAP_MAX_MCS_FOR_TX_DATA);
+	rates->disable_high_ht_mcs_2x2 = cfg_get(psoc,
+					 CFG_INI_DISABLE_HIGH_HT_RX_MCS_2x2);
+}
+
 QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
 {
 	struct wlan_mlme_psoc_obj *mlme_obj;
@@ -162,6 +176,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
 
 	mlme_cfg = &mlme_obj->cfg;
 	mlme_update_ht_cap_in_cfg(psoc, &mlme_cfg->ht_caps.ht_cap_info);
+	mlme_update_rates_in_cfg(psoc, &mlme_cfg->rates);
 
 	return status;
 }

+ 3 - 1
components/mlme/dispatcher/inc/cfg_mlme.h

@@ -25,10 +25,12 @@
 
 #include "cfg_mlme_ht_caps.h"
 #include "cfg_mlme_vht_caps.h"
+#include "cfg_mlme_rates.h"
 
 #define CFG_MLME_ALL \
 	CFG_HT_CAPS_ALL \
-	CFG_VHT_CAPS_ALL
+	CFG_VHT_CAPS_ALL \
+	CFG_RATES_ALL
 
 #endif /* __CFG_MLME_H */
 

+ 146 - 0
components/mlme/dispatcher/inc/cfg_mlme_rates.h

@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: This file contains centralized definitions of converged configuration.
+ */
+
+#ifndef __CFG_MLME_RATES_H
+#define __CFG_MLME_RATES_H
+
+/*
+ * <ini>
+ * gMaxHTMCSForTxData - max HT mcs for TX
+ * @Min: 0
+ * @Max: 383
+ * @Default: 0
+ *
+ * This ini is used to configure the max HT mcs
+ * for tx data.
+ *
+ * Usage: External
+ *
+ * bits 0-15:  max HT mcs
+ * bits 16-31: zero to disable, otherwise enable.
+ *
+ * </ini>
+ */
+#define CFG_INI_MAX_HT_MCS_FOR_TX_DATA CFG_INI_UINT( \
+		"gMaxHTMCSForTxData", \
+		0, \
+		0x17f, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"Max HT Mcs for Tx Data")
+
+/*
+ * <ini>
+ * gDisableABGRateForTxData - disable abg rate for tx data
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to disable abg rate for tx data.
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_INI_DISABLE_ABG_RATE_FOR_TX_DATA CFG_INI_BOOL( \
+		"gDisableABGRateForTxData", \
+		0, \
+		"Disable ABG RATE for TX Data")
+
+/*
+ * gSapMaxMCSForTxData - sap 11n max mcs
+ * @Min: 0
+ * @Max: 383
+ * @Default: 0
+ *
+ * This ini configure SAP 11n max mcs
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_INI_SAP_MAX_MCS_FOR_TX_DATA CFG_INI_UINT( \
+		"gSapMaxMCSForTxData", \
+		0, \
+		383, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"SAP Max MCS for TX Data")
+
+/*
+ * <ini>
+ * disable_high_ht_mcs_2x2 - disable high mcs index for 2nd stream in 2.4G
+ * @Min: 0
+ * @Max: 8
+ * @Default: 0
+ *
+ * This ini is used to disable high HT MCS index for 2.4G STA connection.
+ * It has been introduced to resolve IOT issue with one of the vendor.
+ *
+ * Note: This INI is not useful with 1x1 setting. If some platform supports
+ * only 1x1 then this INI is not useful.
+ *
+ * 0 - It won't disable any HT MCS index (just like normal HT MCS)
+ * 1 - It will disable 15th bit from HT RX MCS set (from 8-15 bits slot)
+ * 2 - It will disable 14th & 15th bits from HT RX MCS set
+ * 3 - It will disable 13th, 14th, & 15th bits from HT RX MCS set
+ * and so on.
+ *
+ * Related: STA
+ *
+ * Supported Feature: 11n
+ *
+ * Usage: External
+ */
+#define CFG_INI_DISABLE_HIGH_HT_RX_MCS_2x2 CFG_INI_UINT( \
+		"disable_high_ht_mcs_2x2", \
+		0, \
+		8, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"Disable high MCS index for 2x2")
+
+#define CFG_CFP_PERIOD CFG_UINT( \
+		"cfpPeriod", \
+		0, \
+		255, \
+		1, \
+		CFG_VALUE_OR_DEFAULT, \
+		"CFP Period")
+
+#define CFG_CFP_MAX_DURATION CFG_UINT( \
+		"cfpMaxDuration", \
+		0, \
+		65535, \
+		30000, \
+		CFG_VALUE_OR_DEFAULT, \
+		"CFP Max Duration")
+
+#define CFG_RATES_ALL \
+	CFG(CFG_INI_MAX_HT_MCS_FOR_TX_DATA) \
+	CFG(CFG_INI_DISABLE_ABG_RATE_FOR_TX_DATA) \
+	CFG(CFG_INI_SAP_MAX_MCS_FOR_TX_DATA) \
+	CFG(CFG_INI_DISABLE_HIGH_HT_RX_MCS_2x2) \
+	CFG(CFG_CFP_PERIOD) \
+	CFG(CFG_CFP_MAX_DURATION)
+
+#endif /* __CFG_MLME_RATES_H */

+ 20 - 0
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -90,14 +90,34 @@ struct wlan_mlme_vht_caps {
 	/* VHT related configs */
 };
 
+/**
+ * struct wlan_mlme_rates - RATES related config items
+ * @cfpPeriod: cfp period info
+ * @cfpMaxDuration: cfp Max duration info
+ * @max_htmcs_txdata: max HT mcs info for Tx
+ * @disable_abg_rate_txdata: disable abg rate info for tx data
+ * @sap_max_mcs_txdata: sap max mcs info
+ * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
+ */
+struct wlan_mlme_rates {
+	uint8_t cfp_period;
+	uint16_t cfp_max_duration;
+	uint16_t max_htmcs_txdata;
+	bool disable_abg_rate_txdata;
+	uint16_t sap_max_mcs_txdata;
+	uint8_t disable_high_ht_mcs_2x2;
+};
+
 /**
  * struct wlan_mlme_cfg - MLME config items
  * @ht_cfg: HT related CFG Items
  * @vht_cfg: VHT related CFG Items
+ * @rates: Rates related cfg items
  */
 struct wlan_mlme_cfg {
 	struct wlan_mlme_ht_caps ht_caps;
 	struct wlan_mlme_vht_caps vht_caps;
+	struct wlan_mlme_rates rates;
 };
 
 #endif

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

@@ -4907,36 +4907,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ENABLE_BT_CHAIN_SEPARATION_MAX     (1)
 #define CFG_ENABLE_BT_CHAIN_SEPARATION_DEFAULT (0)
 
-/*
- * <ini>
- * disable_high_ht_mcs_2x2 - disable high mcs index for 2nd stream in 2.4G
- * @Min: 0
- * @Max: 8
- * @Default: 0
- *
- * This ini is used to disable high HT MCS index for 2.4G STA connection.
- * It has been introduced to resolve IOT issue with one of the vendor.
- *
- * Note: This INI is not useful with 1x1 setting. If some platform supports
- * only 1x1 then this INI is not useful.
- *
- * 0 - It won't disable any HT MCS index (just like normal HT MCS)
- * 1 - It will disable 15th bit from HT RX MCS set (from 8-15 bits slot)
- * 2 - It will disable 14th & 15th bits from HT RX MCS set
- * 3 - It will disable 13th, 14th, & 15th bits from HT RX MCS set
- * and so on.
- *
- * Related: STA
- *
- * Supported Feature: 11n
- *
- * Usage: External
- */
-#define CFG_DISABLE_HIGH_HT_RX_MCS_2x2         "disable_high_ht_mcs_2x2"
-#define CFG_DISABLE_HIGH_HT_RX_MCS_2x2_MIN     (0)
-#define CFG_DISABLE_HIGH_HT_RX_MCS_2x2_MAX     (8)
-#define CFG_DISABLE_HIGH_HT_RX_MCS_2x2_DEFAULT (0)
-
 /*
  * <ini>
  * gStaPrefer80MHzOver160MHz - set Sta perferance to connect in 80HZ/160HZ
@@ -6104,28 +6074,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ENABLE_TX_STBC_MAX                   (1)
 #define CFG_ENABLE_TX_STBC_DEFAULT               (0)
 
-/*
- * <ini>
- * gMaxHTMCSForTxData - max HT mcs for TX
- * @Min: 0
- * @Max: 383
- * @Default: 0
- *
- * This ini is used to configure the max HT mcs
- * for tx data.
- *
- * Usage: External
- *
- * bits 0-15:  max HT mcs
- * bits 16-31: zero to disable, otherwise enable.
- *
- * </ini>
- */
-#define CFG_MAX_HT_MCS_FOR_TX_DATA          "gMaxHTMCSForTxData"
-#define CFG_MAX_HT_MCS_FOR_TX_DATA_MIN      (WNI_CFG_MAX_HT_MCS_TX_DATA_STAMIN)
-#define CFG_MAX_HT_MCS_FOR_TX_DATA_MAX      (WNI_CFG_MAX_HT_MCS_TX_DATA_STAMAX)
-#define CFG_MAX_HT_MCS_FOR_TX_DATA_DEFAULT  (WNI_CFG_MAX_HT_MCS_TX_DATA_STADEF)
-
 /*
  * <ini>
  * gSapGetPeerInfo - Enable/Disable remote peer info query support
@@ -6144,27 +6092,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_SAP_GET_PEER_INFO_MAX                   (1)
 #define CFG_SAP_GET_PEER_INFO_DEFAULT               (0)
 
-/*
- * <ini>
- * gDisableABGRateForTxData - disable abg rate for tx data
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini is used to disable abg rate for tx data.
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_DISABLE_ABG_RATE_FOR_TX_DATA        "gDisableABGRateForTxData"
-#define CFG_DISABLE_ABG_RATE_FOR_TX_DATA_MIN \
-	(WNI_CFG_DISABLE_ABG_RATE_FOR_TX_DATA_STAMIN)
-#define CFG_DISABLE_ABG_RATE_FOR_TX_DATA_MAX \
-	(WNI_CFG_DISABLE_ABG_RATE_FOR_TX_DATA_STAMAX)
-#define CFG_DISABLE_ABG_RATE_FOR_TX_DATA_DEFAULT \
-	(WNI_CFG_DISABLE_ABG_RATE_FOR_TX_DATA_STADEF)
-
 /*
  * <ini>
  * gRateForTxMgmt - rate for tx mgmt frame
@@ -11342,23 +11269,6 @@ enum hdd_external_acs_policy {
 #define CFG_EXTERNAL_ACS_POLICY_MAX     (HDD_EXTERNAL_ACS_PCL_MANDATORY)
 #define CFG_EXTERNAL_ACS_POLICY_DEFAULT (HDD_EXTERNAL_ACS_PCL_PREFERRED)
 
-/*
- * gSapMaxMCSForTxData - sap 11n max mcs
- * @Min: 0
- * @Max: 383
- * @Default: 0
- *
- * This ini configure SAP 11n max mcs
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_SAP_MAX_MCS_FOR_TX_DATA         "gSapMaxMCSForTxData"
-#define CFG_SAP_MAX_MCS_FOR_TX_DATA_MIN     (0)
-#define CFG_SAP_MAX_MCS_FOR_TX_DATA_MAX     (383)
-#define CFG_SAP_MAX_MCS_FOR_TX_DATA_DEFAULT (0)
-
 /*
  * <ini>
  * gEnableTxOrphan- Enable/Disable orphaning of Tx packets
@@ -14238,7 +14148,6 @@ struct hdd_config {
 	bool enable_su_tx_bformer;
 	uint8_t vhtRxMCS2x2;
 	uint8_t vhtTxMCS2x2;
-	uint8_t disable_high_ht_mcs_2x2;
 	bool enable2x2;
 	uint32_t vdev_type_nss_2g;
 	uint32_t vdev_type_nss_5g;
@@ -14330,9 +14239,7 @@ struct hdd_config {
 	bool fRegChangeDefCountry;
 	bool acs_with_more_param;
 	uint32_t auto_channel_select_weight;
-	uint16_t max_ht_mcs_txdata;
 	bool sap_get_peer_info;
-	bool disable_abg_rate_txdata;
 	uint8_t rate_for_tx_mgmt;
 	uint8_t rate_for_tx_mgmt_2g;
 	uint8_t rate_for_tx_mgmt_5g;
@@ -14677,7 +14584,6 @@ struct hdd_config {
 	bool is_force_1x1;
 	uint8_t enable_rts_sifsbursting;
 	uint8_t max_mpdus_inampdu;
-	uint16_t sap_max_mcs_txdata;
 	enum pmo_auto_pwr_detect_failure_mode auto_pwr_save_fail_mode;
 	uint16_t num_11b_tx_chains;
 	uint16_t num_11ag_tx_chains;

+ 0 - 51
core/hdd/src/wlan_hdd_cfg.c

@@ -1954,13 +1954,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_VHT_ENABLE_2x2_CAP_FEATURE_MIN,
 		     CFG_VHT_ENABLE_2x2_CAP_FEATURE_MAX),
 
-	REG_VARIABLE(CFG_DISABLE_HIGH_HT_RX_MCS_2x2, WLAN_PARAM_Integer,
-		     struct hdd_config, disable_high_ht_mcs_2x2,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_DISABLE_HIGH_HT_RX_MCS_2x2_DEFAULT,
-		     CFG_DISABLE_HIGH_HT_RX_MCS_2x2_MIN,
-		     CFG_DISABLE_HIGH_HT_RX_MCS_2x2_MAX),
-
 	REG_VARIABLE(CFG_VDEV_TYPE_NSS_2G, WLAN_PARAM_Integer,
 		     struct hdd_config, vdev_type_nss_2g,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -2077,13 +2070,6 @@ struct reg_table_entry g_registry_table[] = {
 			     CFG_DISABLE_DFS_JAPAN_W53_MAX,
 			     ch_notify_set_g_disable_dfs_japan_w53, 0),
 
-	REG_VARIABLE(CFG_MAX_HT_MCS_FOR_TX_DATA, WLAN_PARAM_HexInteger,
-		     struct hdd_config, max_ht_mcs_txdata,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_MAX_HT_MCS_FOR_TX_DATA_DEFAULT,
-		     CFG_MAX_HT_MCS_FOR_TX_DATA_MIN,
-		     CFG_MAX_HT_MCS_FOR_TX_DATA_MAX),
-
 	REG_VARIABLE(CFG_SAP_GET_PEER_INFO, WLAN_PARAM_Integer,
 		     struct hdd_config, sap_get_peer_info,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -2091,13 +2077,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_SAP_GET_PEER_INFO_MIN,
 		     CFG_SAP_GET_PEER_INFO_MAX),
 
-	REG_VARIABLE(CFG_DISABLE_ABG_RATE_FOR_TX_DATA, WLAN_PARAM_Integer,
-		     struct hdd_config, disable_abg_rate_txdata,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_DISABLE_ABG_RATE_FOR_TX_DATA_DEFAULT,
-		     CFG_DISABLE_ABG_RATE_FOR_TX_DATA_MIN,
-		     CFG_DISABLE_ABG_RATE_FOR_TX_DATA_MAX),
-
 	REG_VARIABLE(CFG_RATE_FOR_TX_MGMT, WLAN_PARAM_HexInteger,
 		     struct hdd_config, rate_for_tx_mgmt,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -4427,13 +4406,6 @@ struct reg_table_entry g_registry_table[] = {
 		CFG_MAX_MPDUS_IN_AMPDU_MIN,
 		CFG_MAX_MPDUS_IN_AMPDU_MAX),
 
-	REG_VARIABLE(CFG_SAP_MAX_MCS_FOR_TX_DATA, WLAN_PARAM_Integer,
-		struct hdd_config, sap_max_mcs_txdata,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_SAP_MAX_MCS_FOR_TX_DATA_DEFAULT,
-		CFG_SAP_MAX_MCS_FOR_TX_DATA_MIN,
-		CFG_SAP_MAX_MCS_FOR_TX_DATA_MAX),
-
 	REG_VARIABLE(CFG_TX_ORPHAN_ENABLE_NAME, WLAN_PARAM_Integer,
 		struct hdd_config, tx_orphan_enable,
 		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -8086,20 +8058,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
 		hdd_err("Couldn't pass on WNI_CFG_TGT_GTX_USR_CFG to CCM");
 	}
 
-	if (sme_cfg_set_int(mac_handle, WNI_CFG_MAX_HT_MCS_TX_DATA,
-			    config->max_ht_mcs_txdata) ==
-			    QDF_STATUS_E_FAILURE) {
-		status = false;
-		hdd_err("Couldn't pass on WNI_CFG_MAX_HT_MCS_TX_DATA to CCM");
-	}
-
-	if (sme_cfg_set_int(mac_handle, WNI_CFG_DISABLE_ABG_RATE_FOR_TX_DATA,
-			    config->disable_abg_rate_txdata) ==
-			    QDF_STATUS_E_FAILURE) {
-		status = false;
-		hdd_err("Couldn't pass on WNI_CFG_DISABLE_ABG_RATE_FOR_TX_DATA to CCM");
-	}
-
 	if (sme_cfg_set_int(mac_handle, WNI_CFG_RATE_FOR_TX_MGMT,
 			    config->rate_for_tx_mgmt) ==
 			    QDF_STATUS_E_FAILURE) {
@@ -8107,13 +8065,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
 		hdd_err("Couldn't pass on WNI_CFG_RATE_FOR_TX_MGMT to CCM");
 	}
 
-	if (sme_cfg_set_int(mac_handle, WNI_CFG_SAP_MAX_MCS_DATA,
-			    config->sap_max_mcs_txdata) ==
-			    QDF_STATUS_E_FAILURE) {
-		status = false;
-		hdd_err("Could not pass on WNI_CFG_SAP_MAX_MCS_DATA to CCM");
-	}
-
 	if (sme_cfg_set_int(mac_handle, WNI_CFG_RATE_FOR_TX_MGMT_2G,
 			    config->rate_for_tx_mgmt_2g) ==
 			    QDF_STATUS_E_FAILURE) {
@@ -8621,8 +8572,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 
 	smeConfig->csrConfig.enable_tx_ldpc = pConfig->enable_tx_ldpc;
 	smeConfig->csrConfig.enable_rx_ldpc = pConfig->enable_rx_ldpc;
-	smeConfig->csrConfig.disable_high_ht_mcs_2x2 =
-					pConfig->disable_high_ht_mcs_2x2;
 	smeConfig->csrConfig.enable_vht20_mcs9 = pConfig->enable_vht20_mcs9;
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 	smeConfig->csrConfig.cc_switch_mode = pConfig->WlanMccToSccSwitchMode;

+ 4 - 9
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -998,15 +998,10 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
 			mlm_start_req->dtimPeriod = (uint8_t) val;
 		}
 
-		if (wlan_cfg_get_int(mac_ctx, WNI_CFG_CFP_PERIOD, &val) !=
-			QDF_STATUS_SUCCESS)
-			pe_err("could not retrieve Beacon interval");
-		mlm_start_req->cfParamSet.cfpPeriod = (uint8_t) val;
-
-		if (wlan_cfg_get_int(mac_ctx, WNI_CFG_CFP_MAX_DURATION, &val) !=
-			QDF_STATUS_SUCCESS)
-			pe_err("could not retrieve CFPMaxDuration");
-		mlm_start_req->cfParamSet.cfpMaxDuration = (uint16_t) val;
+		mlm_start_req->cfParamSet.cfpPeriod =
+			mac_ctx->mlme_cfg->rates.cfp_period;
+		mlm_start_req->cfParamSet.cfpMaxDuration =
+			mac_ctx->mlme_cfg->rates.cfp_max_duration;
 
 		/*
 		 * this may not be needed anymore now,

+ 7 - 2
core/mac/src/pe/sch/sch_beacon_process.c

@@ -32,6 +32,7 @@
 #include "wni_cfg.h"
 
 #include "cfg_api.h"
+#include "cfg_ucfg_api.h"
 #include "lim_api.h"
 #include "utils_api.h"
 #include "sch_api.h"
@@ -399,8 +400,12 @@ sch_bcn_process_sta(tpAniSirGlobal mac_ctx,
 	}
 
 	if (bcn->cfPresent) {
-		cfg_set_int(mac_ctx, WNI_CFG_CFP_PERIOD,
-			    bcn->cfParamSet.cfpPeriod);
+		if (!cfg_in_range(CFG_CFP_PERIOD, bcn->cfParamSet.cfpPeriod)) {
+			pe_err("Error in setting CFG item CFP Period");
+			return false;
+		}
+		mac_ctx->mlme_cfg->rates.cfp_period = bcn->cfParamSet.cfpPeriod;
+
 		lim_send_cf_params(mac_ctx, *bssIdx,
 				   bcn->cfParamSet.cfpCount,
 				   bcn->cfParamSet.cfpPeriod);

+ 1 - 1
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -665,7 +665,7 @@ populate_dot11f_ht_caps(tpAniSirGlobal pMac,
 
 	if (psessionEntry) {
 		disable_high_ht_mcs_2x2 =
-				pMac->roam.configParam.disable_high_ht_mcs_2x2;
+				pMac->mlme_cfg->rates.disable_high_ht_mcs_2x2;
 		pe_debug("disable HT high MCS INI param[%d]",
 			 disable_high_ht_mcs_2x2);
 		if (psessionEntry->nss == NSS_1x1_MODE) {

+ 4 - 5
core/wma/src/wma_dev_if.c

@@ -4426,8 +4426,10 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
 	struct wma_target_req *msg;
 	bool peer_assoc_cnf = false;
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
-	uint32_t mcs_limit, i, j;
+	uint32_t i, j;
+	uint16_t mcs_limit;
 	uint8_t *rate_pos;
+	struct sAniSirGlobal *mac = (struct sAniSirGlobal *)wma->mac_context;
 
 	pdev = cds_get_context(QDF_MODULE_ID_TXRX);
 
@@ -4513,10 +4515,7 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
 #define CFG_CTRL_MASK              0xFF00
 #define CFG_DATA_MASK              0x00FF
 
-	if (wlan_cfg_get_int(wma->mac_context, WNI_CFG_SAP_MAX_MCS_DATA,
-			     &mcs_limit) != QDF_STATUS_SUCCESS) {
-		mcs_limit = WNI_CFG_SAP_MAX_MCS_DATA_STADEF;
-	}
+	mcs_limit = mac->mlme_cfg->rates.sap_max_mcs_txdata;
 
 	if (mcs_limit & CFG_CTRL_MASK) {
 		WMA_LOGD("%s: set mcs_limit %x", __func__, mcs_limit);

+ 6 - 12
core/wma/src/wma_mgmt.c

@@ -1036,8 +1036,10 @@ wma_unified_peer_state_update(
  */
 static void wma_mask_tx_ht_rate(tp_wma_handle wma, uint8_t *mcs_set)
 {
-	uint32_t mcs_limit, i, j;
+	uint32_t i, j;
+	uint16_t mcs_limit;
 	uint8_t *rate_pos = mcs_set;
+	struct sAniSirGlobal *mac = (struct sAniSirGlobal *)wma->mac_context;
 
 	/*
 	 * Get MCS limit from ini configure, and map it to rate parameters
@@ -1045,10 +1047,7 @@ static void wma_mask_tx_ht_rate(tp_wma_handle wma, uint8_t *mcs_set)
 	 * check whether ini config is enabled and CFG_DATA_MASK to get the
 	 * MCS value.
 	 */
-	if (wlan_cfg_get_int(wma->mac_context, WNI_CFG_MAX_HT_MCS_TX_DATA,
-			   &mcs_limit) != QDF_STATUS_SUCCESS) {
-		mcs_limit = WNI_CFG_MAX_HT_MCS_TX_DATA_STADEF;
-	}
+	mcs_limit = mac->mlme_cfg->rates.max_htmcs_txdata;
 
 	if (mcs_limit & CFG_CTRL_MASK) {
 		WMA_LOGD("%s: set mcs_limit %x", __func__, mcs_limit);
@@ -1242,10 +1241,10 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
 	uint32_t num_peer_11a_rates = 0;
 	uint32_t phymode;
 	uint32_t peer_nss = 1;
-	uint32_t disable_abg_rate;
 	struct wma_txrx_node *intr = NULL;
 	bool is_he;
 	QDF_STATUS status;
+	struct sAniSirGlobal *mac = (struct sAniSirGlobal *)wma->mac_context;
 
 	cmd = qdf_mem_malloc(sizeof(struct peer_assoc_params));
 	if (!cmd) {
@@ -1276,12 +1275,7 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
 
 	wma_objmgr_set_peer_mlme_phymode(wma, params->staMac, phymode);
 
-	if (wlan_cfg_get_int(wma->mac_context,
-			     WNI_CFG_DISABLE_ABG_RATE_FOR_TX_DATA,
-			     &disable_abg_rate) != QDF_STATUS_SUCCESS)
-		disable_abg_rate = WNI_CFG_DISABLE_ABG_RATE_FOR_TX_DATA_STADEF;
-
-	if (!disable_abg_rate) {
+	if (!mac->mlme_cfg->rates.disable_abg_rate_txdata) {
 		/* Legacy Rateset */
 		rate_pos = (uint8_t *) peer_legacy_rates.rates;
 		for (i = 0; i < SIR_NUM_11B_RATES; i++) {