diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index 80a194c7e3be..c262c535d2c6 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/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;
}
diff --git a/components/mlme/dispatcher/inc/cfg_mlme.h b/components/mlme/dispatcher/inc/cfg_mlme.h
index 2bd5c94ee868..a3ed947fe71e 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme.h
+++ b/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 */
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_rates.h b/components/mlme/dispatcher/inc/cfg_mlme_rates.h
new file mode 100644
index 000000000000..b3d1b6dd9167
--- /dev/null
+++ b/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
+
+/*
+ *
+ * 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.
+ *
+ *
+ */
+#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")
+
+/*
+ *
+ * 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
+ *
+ *
+ */
+#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
+ *
+ *
+ */
+#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")
+
+/*
+ *
+ * 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 */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index 73eea2982580..71f7f852f611 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/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
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index c8cfeb68f24e..854c7d59b345 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/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)
-/*
- *
- * 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)
-
/*
*
* 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)
-/*
- *
- * 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.
- *
- *
- */
-#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)
-
/*
*
* 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)
-/*
- *
- * 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
- *
- *
- */
-#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)
-
/*
*
* 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
- *
- *
- */
-#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)
-
/*
*
* 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;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index d5cfea48cc79..e3401d5a814c 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/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;
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index c565ac92622b..3862d66b1b5b 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/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,
diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c
index aa4fe37de1e8..50c382586cec 100644
--- a/core/mac/src/pe/sch/sch_beacon_process.c
+++ b/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);
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index 9f783be2e39a..011bd776cd96 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/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) {
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c
index 06aa34eda4a8..2fe0cb2c6c12 100644
--- a/core/wma/src/wma_dev_if.c
+++ b/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);
diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c
index db516e79e61d..6ca75332de72 100644
--- a/core/wma/src/wma_mgmt.c
+++ b/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++) {