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

Add MLME CFG items of rates based on converged cfg component

Change-Id: If823a2b19e4b828a3f079d2b032067dd5b5ca196
CRs-Fixed: 2322410
This commit is contained in:
Karthik Kantamneni
2018-09-19 20:27:32 +05:30
committed by nshrivas
parent 26efc97ff4
commit e3bbd7fbb4
17 changed files with 506 additions and 229 deletions

View File

@@ -559,13 +559,43 @@ static void mlme_init_rates_in_cfg(struct wlan_objmgr_psoc *psoc,
{
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->max_htmcs_txdata = cfg_get(psoc, CFG_MAX_HT_MCS_FOR_TX_DATA);
rates->disable_abg_rate_txdata = cfg_get(psoc,
CFG_INI_DISABLE_ABG_RATE_FOR_TX_DATA);
CFG_DISABLE_ABG_RATE_FOR_TX_DATA);
rates->sap_max_mcs_txdata = cfg_get(psoc,
CFG_INI_SAP_MAX_MCS_FOR_TX_DATA);
CFG_SAP_MAX_MCS_FOR_TX_DATA);
rates->disable_high_ht_mcs_2x2 = cfg_get(psoc,
CFG_INI_DISABLE_HIGH_HT_RX_MCS_2x2);
CFG_DISABLE_HIGH_HT_RX_MCS_2x2);
rates->supported_11b.max_len = CFG_SUPPORTED_RATES_11B_LEN;
qdf_uint8_array_parse(cfg_default(CFG_SUPPORTED_RATES_11B),
rates->supported_11b.data,
sizeof(rates->supported_11b.data),
&rates->supported_11b.len);
rates->supported_11a.max_len = CFG_SUPPORTED_RATES_11A_LEN;
qdf_uint8_array_parse(cfg_default(CFG_SUPPORTED_RATES_11A),
rates->supported_11a.data,
sizeof(rates->supported_11a.data),
&rates->supported_11a.len);
rates->opr_rate_set.max_len = CFG_OPERATIONAL_RATE_SET_LEN;
rates->opr_rate_set.len = 0;
rates->ext_opr_rate_set.max_len = CFG_EXTENDED_OPERATIONAL_RATE_SET_LEN;
rates->ext_opr_rate_set.len = 0;
rates->supported_mcs_set.max_len = CFG_SUPPORTED_MCS_SET_LEN;
qdf_uint8_array_parse(cfg_default(CFG_SUPPORTED_MCS_SET),
rates->supported_mcs_set.data,
sizeof(rates->supported_mcs_set.data),
&rates->supported_mcs_set.len);
rates->basic_mcs_set.max_len = CFG_BASIC_MCS_SET_LEN;
qdf_uint8_array_parse(cfg_default(CFG_BASIC_MCS_SET),
rates->basic_mcs_set.data,
sizeof(rates->basic_mcs_set.data),
&rates->basic_mcs_set.len);
rates->current_mcs_set.max_len = CFG_CURRENT_MCS_SET_LEN;
qdf_uint8_array_parse(cfg_default(CFG_CURRENT_MCS_SET),
rates->current_mcs_set.data,
sizeof(rates->current_mcs_set.data),
&rates->current_mcs_set.len);
}
static void mlme_init_dfs_cfg(struct wlan_objmgr_psoc *psoc,

View File

@@ -23,6 +23,14 @@
#ifndef __CFG_MLME_RATES_H
#define __CFG_MLME_RATES_H
#define CFG_SUPPORTED_RATES_11B_LEN 4
#define CFG_SUPPORTED_RATES_11A_LEN 8
#define CFG_OPERATIONAL_RATE_SET_LEN 12
#define CFG_EXTENDED_OPERATIONAL_RATE_SET_LEN 8
#define CFG_SUPPORTED_MCS_SET_LEN 16
#define CFG_BASIC_MCS_SET_LEN 16
#define CFG_CURRENT_MCS_SET_LEN 16
/*
* <ini>
* gMaxHTMCSForTxData - max HT mcs for TX
@@ -40,7 +48,7 @@
*
* </ini>
*/
#define CFG_INI_MAX_HT_MCS_FOR_TX_DATA CFG_INI_UINT( \
#define CFG_MAX_HT_MCS_FOR_TX_DATA CFG_INI_UINT( \
"gMaxHTMCSForTxData", \
0, \
0x17f, \
@@ -61,7 +69,7 @@
*
* </ini>
*/
#define CFG_INI_DISABLE_ABG_RATE_FOR_TX_DATA CFG_INI_BOOL( \
#define CFG_DISABLE_ABG_RATE_FOR_TX_DATA CFG_INI_BOOL( \
"gDisableABGRateForTxData", \
0, \
"Disable ABG RATE for TX Data")
@@ -78,7 +86,7 @@
*
* </ini>
*/
#define CFG_INI_SAP_MAX_MCS_FOR_TX_DATA CFG_INI_UINT( \
#define CFG_SAP_MAX_MCS_FOR_TX_DATA CFG_INI_UINT( \
"gSapMaxMCSForTxData", \
0, \
383, \
@@ -111,7 +119,7 @@
*
* Usage: External
*/
#define CFG_INI_DISABLE_HIGH_HT_RX_MCS_2x2 CFG_INI_UINT( \
#define CFG_DISABLE_HIGH_HT_RX_MCS_2x2 CFG_INI_UINT( \
"disable_high_ht_mcs_2x2", \
0, \
8, \
@@ -134,13 +142,95 @@
30000, \
CFG_VALUE_OR_DEFAULT, \
"CFP Max Duration")
/*
* <cfg>
* supported_rates_11b - supported rates for 11b
* @Min: 0 minimum length of supported rates
* @Max: default data length of supported rates in string format
* @Default: 2, 4, 11, 22
*/
#define CFG_SUPPORTED_RATES_11B_DATA "2, 4, 11, 22"
#define CFG_SUPPORTED_RATES_11B CFG_STRING( \
"supported_rates_11b", \
0, \
sizeof(CFG_SUPPORTED_RATES_11B_DATA) - 1, \
CFG_SUPPORTED_RATES_11B_DATA, \
"Supported rates for 11B")
/*
* <cfg>
* supported_rates_11a - supported rates for 11a
* @Min: 0 minimum length of supported rates
* @Max: default data length of supported rates in string format
* @Default: 12, 18, 24, 36, 48, 72, 96, 108
*/
#define CFG_SUPPORTED_RATES_11A_DATA "12, 18, 24, 36, 48, 72, 96, 108"
#define CFG_SUPPORTED_RATES_11A CFG_STRING( \
"supported_rates_11a", \
0, \
sizeof(CFG_SUPPORTED_RATES_11A_DATA) - 1, \
CFG_SUPPORTED_RATES_11A_DATA, \
"Supported rates for 11A")
/*
* <cfg>
* supported_mcs_set - supported MCS set data
* @Min: 0 minimum length of supported MCS set
* @Max: default data length of supported mcs set in string format
* @Default: 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
* 0x0, 0x0, 0x0
*/
#define CFG_SUPPORTED_MCS_SET_DATA "0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0"
#define CFG_SUPPORTED_MCS_SET CFG_STRING( \
"supported_mcs_set", \
0, \
sizeof(CFG_SUPPORTED_MCS_SET_DATA) - 1, \
CFG_SUPPORTED_MCS_SET_DATA, \
"supported MCS set")
/*
* <cfg>
* basic_mcs_set - basic MCS set data
* @Min: 0 minimum length of basic MCS set
* @Max: default data length of basic mcs set in string format
* @Default: 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
* 0x0, 0x0, 0x0
*/
#define CFG_BASIC_MCS_SET_DATA "0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0"
#define CFG_BASIC_MCS_SET CFG_STRING( \
"basic_mcs_set", \
0, \
sizeof(CFG_BASIC_MCS_SET_DATA) - 1, \
CFG_BASIC_MCS_SET_DATA, \
"basic MCS set")
/*
* <cfg>
* current_mcs_set - current MCS set data
* @Min: 0 minimum length of current MCS set
* @Max: default data length of current mcs set in string format
* @Default: 0x00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
* 0x0, 0x0, 0x0
*/
#define CFG_CURRENT_MCS_SET_DATA "0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0"
#define CFG_CURRENT_MCS_SET CFG_STRING( \
"current_mcs_set", \
0, \
sizeof(CFG_CURRENT_MCS_SET_DATA) - 1, \
CFG_CURRENT_MCS_SET_DATA, \
"current MCS set")
#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_MAX_HT_MCS_FOR_TX_DATA) \
CFG(CFG_DISABLE_ABG_RATE_FOR_TX_DATA) \
CFG(CFG_SAP_MAX_MCS_FOR_TX_DATA) \
CFG(CFG_DISABLE_HIGH_HT_RX_MCS_2x2) \
CFG(CFG_CFP_PERIOD) \
CFG(CFG_CFP_MAX_DURATION)
CFG(CFG_CFP_MAX_DURATION) \
CFG(CFG_SUPPORTED_RATES_11B) \
CFG(CFG_SUPPORTED_RATES_11A) \
CFG(CFG_SUPPORTED_MCS_SET) \
CFG(CFG_BASIC_MCS_SET) \
CFG(CFG_CURRENT_MCS_SET)
#endif /* __CFG_MLME_RATES_H */

View File

@@ -531,6 +531,13 @@ struct wlan_mlme_he_caps {
* @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
* @supported_11b: supported 11B rates
* @supported_11a: supported 11A rates
* @opr_rate_set: operational rates set
* @ext_opr_rate_set: extended operational rates set
* @supported_mcs_set: supported MCS set
* @basic_mcs_set: basic MCS set
* @current_mcs_set: current MCS set
*/
struct wlan_mlme_rates {
uint8_t cfp_period;
@@ -539,6 +546,13 @@ struct wlan_mlme_rates {
bool disable_abg_rate_txdata;
uint16_t sap_max_mcs_txdata;
uint8_t disable_high_ht_mcs_2x2;
struct mlme_cfg_str supported_11b;
struct mlme_cfg_str supported_11a;
struct mlme_cfg_str opr_rate_set;
struct mlme_cfg_str ext_opr_rate_set;
struct mlme_cfg_str supported_mcs_set;
struct mlme_cfg_str basic_mcs_set;
struct mlme_cfg_str current_mcs_set;
};

View File

@@ -1590,4 +1590,58 @@ ucfg_mlme_update_nss_vht_cap(struct wlan_objmgr_psoc *psoc)
return mlme_update_nss_vht_cap(psoc);
}
/**
* ucfg_mlme_get_opr_rate_set() - Get operational rate set
* @psoc: pointer to psoc object
* @buf: buffer to get rates set
* @len: length of the buffer
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_opr_rate_set(struct wlan_objmgr_psoc *psoc, uint8_t *buf,
qdf_size_t *len);
/**
* ucfg_mlme_get_ext_opr_rate_set() - Get operational rate set
* @psoc: pointer to psoc object
* @buf: buffer to get rates set
* @len: length of the buffer
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_ext_opr_rate_set(struct wlan_objmgr_psoc *psoc, uint8_t *buf,
qdf_size_t *len);
/**
* ucfg_mlme_get_supported_mcs_set() - Get Supported MCS set
* @psoc: pointer to psoc object
* @buf: caller buffer to copy mcs set info
* @len: length of the buffer
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_supported_mcs_set(struct wlan_objmgr_psoc *psoc, uint8_t *buf,
qdf_size_t *len);
/**
* ucfg_mlme_set_supported_mcs_set() - Get Supported MCS set
* @psoc: pointer to psoc object
* @buf: caller buffer having mcs set info
* @len: length of the buffer
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_set_supported_mcs_set(struct wlan_objmgr_psoc *psoc, uint8_t *buf,
qdf_size_t len);
/**
* ucfg_mlme_get_current_mcs_set() - Get current MCS set
* @psoc: pointer to psoc object
* @buf: caller buffer to copy mcs set info
* @len: length of the buffer
* Return: QDF Status
*/
QDF_STATUS
ucfg_mlme_get_current_mcs_set(struct wlan_objmgr_psoc *psoc, uint8_t *buf,
qdf_size_t *len);
#endif /* _WLAN_MLME_UCFG_API_H_ */

View File

@@ -316,3 +316,86 @@ ucfg_mlme_get_first_scan_bucket_threshold(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_mlme_get_opr_rate_set(struct wlan_objmgr_psoc *psoc,
uint8_t *buf, qdf_size_t *len)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
return wlan_mlme_get_cfg_str(buf, &mlme_obj->cfg.rates.opr_rate_set,
len);
}
QDF_STATUS
ucfg_mlme_get_ext_opr_rate_set(struct wlan_objmgr_psoc *psoc,
uint8_t *buf, qdf_size_t *len)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
return wlan_mlme_get_cfg_str(buf, &mlme_obj->cfg.rates.ext_opr_rate_set,
len);
}
QDF_STATUS
ucfg_mlme_get_supported_mcs_set(struct wlan_objmgr_psoc *psoc,
uint8_t *buf, qdf_size_t *len)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
return wlan_mlme_get_cfg_str(buf,
&mlme_obj->cfg.rates.supported_mcs_set,
len);
}
QDF_STATUS
ucfg_mlme_set_supported_mcs_set(struct wlan_objmgr_psoc *psoc,
uint8_t *buf, qdf_size_t len)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
return wlan_mlme_set_cfg_str(buf,
&mlme_obj->cfg.rates.supported_mcs_set,
len);
}
QDF_STATUS
ucfg_mlme_get_current_mcs_set(struct wlan_objmgr_psoc *psoc,
uint8_t *buf, qdf_size_t *len)
{
struct wlan_mlme_psoc_obj *mlme_obj;
mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("mlme obj null");
return QDF_STATUS_E_INVAL;
}
return wlan_mlme_get_cfg_str(buf,
&mlme_obj->cfg.rates.current_mcs_set,
len);
}

View File

@@ -4947,10 +4947,10 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss)
uint32_t rx_supp_data_rate, tx_supp_data_rate;
bool status = true;
QDF_STATUS qdf_status;
qdf_size_t val_len;
struct mlme_ht_capabilities_info ht_cap_info;
uint8_t mcs_set[SIZE_OF_SUPPORTED_MCS_SET] = {0};
uint8_t mcs_set_temp[SIZE_OF_SUPPORTED_MCS_SET];
uint32_t val;
uint8_t enable2x2;
mac_handle_t mac_handle;
bool bval = 0;
@@ -5038,21 +5038,26 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss)
}
#define WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES 0xff
val = SIZE_OF_SUPPORTED_MCS_SET;
sme_cfg_get_str(mac_handle, WNI_CFG_SUPPORTED_MCS_SET,
mcs_set_temp, &val);
mcs_set[0] = mcs_set_temp[0];
if (enable2x2)
for (val = 0; val < nss; val++)
mcs_set[val] = WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES;
if (sme_cfg_set_str(mac_handle, WNI_CFG_SUPPORTED_MCS_SET,
mcs_set,
SIZE_OF_SUPPORTED_MCS_SET) ==
QDF_STATUS_E_FAILURE) {
val_len = SIZE_OF_SUPPORTED_MCS_SET;
qdf_status = ucfg_mlme_get_supported_mcs_set(hdd_ctx->psoc,
mcs_set_temp,
&val_len);
if (QDF_IS_STATUS_SUCCESS(qdf_status)) {
mcs_set[0] = mcs_set_temp[0];
if (enable2x2)
for (val_len = 0; val_len < nss; val_len++)
mcs_set[val_len] =
WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES;
if (ucfg_mlme_set_supported_mcs_set(
hdd_ctx->psoc, mcs_set,
(qdf_size_t)SIZE_OF_SUPPORTED_MCS_SET) ==
QDF_STATUS_E_FAILURE) {
status = false;
hdd_err("Could not pass on MCS SET to CFG");
}
} else {
status = false;
hdd_err("Could not pass on MCS SET to CFG");
hdd_err("Could not get MCS SET from CFG");
}
sme_update_he_cap_nss(mac_handle, adapter->session_id, nss);
#undef WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES

View File

@@ -1411,6 +1411,7 @@ static void hdd_update_tgt_ht_cap(struct hdd_context *hdd_ctx,
struct wma_tgt_ht_cap *cfg)
{
QDF_STATUS status;
qdf_size_t value_len;
uint32_t value;
struct mlme_ht_capabilities_info ht_cap_info;
uint8_t mcs_set[SIZE_OF_SUPPORTED_MCS_SET];
@@ -1495,9 +1496,10 @@ static void hdd_update_tgt_ht_cap(struct hdd_context *hdd_ctx,
if (status != QDF_STATUS_SUCCESS)
hdd_err("could not set HT capability to CCM");
#define WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES 0xff
value = SIZE_OF_SUPPORTED_MCS_SET;
if (sme_cfg_get_str(mac_handle, WNI_CFG_SUPPORTED_MCS_SET, mcs_set,
&value) == QDF_STATUS_SUCCESS) {
value_len = SIZE_OF_SUPPORTED_MCS_SET;
if (ucfg_mlme_get_supported_mcs_set(
hdd_ctx->psoc, mcs_set,
&value_len) == QDF_STATUS_SUCCESS) {
hdd_debug("Read MCS rate set");
if (cfg->num_rf_chains > SIZE_OF_SUPPORTED_MCS_SET)
cfg->num_rf_chains = SIZE_OF_SUPPORTED_MCS_SET;
@@ -1507,12 +1509,11 @@ static void hdd_update_tgt_ht_cap(struct hdd_context *hdd_ctx,
mcs_set[value] =
WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES;
status =
sme_cfg_set_str(mac_handle,
WNI_CFG_SUPPORTED_MCS_SET,
mcs_set,
SIZE_OF_SUPPORTED_MCS_SET);
if (status == QDF_STATUS_E_FAILURE)
status = ucfg_mlme_set_supported_mcs_set(
hdd_ctx->psoc,
mcs_set,
(qdf_size_t)SIZE_OF_SUPPORTED_MCS_SET);
if (QDF_IS_STATUS_ERROR(status))
hdd_err("could not set MCS SET to CCM");
}
}

View File

@@ -3959,12 +3959,12 @@ static int hdd_report_max_rate(mac_handle_t mac_handle,
uint16_t max_rate = 0;
uint32_t vht_mcs_map;
uint16_t current_rate = 0;
uint8_t or_leng = CSR_DOT11_SUPPORTED_RATES_MAX;
qdf_size_t or_leng = CSR_DOT11_SUPPORTED_RATES_MAX;
uint8_t operational_rates[CSR_DOT11_SUPPORTED_RATES_MAX];
uint8_t extended_rates[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX];
uint32_t er_leng = CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX;
qdf_size_t er_leng = CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX;
uint8_t mcs_rates[SIZE_OF_BASIC_MCS_SET];
uint32_t mcs_leng = SIZE_OF_BASIC_MCS_SET;
qdf_size_t mcs_leng = SIZE_OF_BASIC_MCS_SET;
struct index_vht_data_rate_type *supported_vht_mcs_rate;
struct index_data_rate_type *supported_mcs_rate;
enum data_rate_11ac_max_mcs vht_max_mcs;
@@ -4011,10 +4011,8 @@ static int hdd_report_max_rate(mac_handle_t mac_handle,
max_rate = 0;
/* Get Basic Rate Set */
if (0 != sme_cfg_get_str(mac_handle,
WNI_CFG_OPERATIONAL_RATE_SET,
operational_rates,
(uint32_t *)&or_leng)) {
if (0 != ucfg_mlme_get_opr_rate_set(hdd_ctx->psoc,
operational_rates, &or_leng)) {
hdd_err("cfg get returned failure");
/*To keep GUI happy */
return 0;
@@ -4037,9 +4035,9 @@ static int hdd_report_max_rate(mac_handle_t mac_handle,
}
/* Get Extended Rate Set */
if (0 != sme_cfg_get_str(mac_handle,
WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET,
extended_rates, &er_leng)) {
if (0 != ucfg_mlme_get_ext_opr_rate_set(hdd_ctx->psoc,
extended_rates,
&er_leng)) {
hdd_err("cfg get returned failure");
/*To keep GUI happy */
return 0;
@@ -4062,9 +4060,9 @@ static int hdd_report_max_rate(mac_handle_t mac_handle,
* actual speed
*/
if ((3 != rssidx) && !(tx_rate_flags & TX_RATE_LEGACY)) {
if (0 != sme_cfg_get_str(mac_handle,
WNI_CFG_CURRENT_MCS_SET, mcs_rates,
&mcs_leng)) {
if (0 != ucfg_mlme_get_current_mcs_set(hdd_ctx->psoc,
mcs_rates,
&mcs_leng)) {
hdd_err("cfg get returned failure");
/*To keep GUI happy */
return 0;

View File

@@ -32,11 +32,7 @@ enum {
WNI_CFG_DTIM_PERIOD,
WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME,
WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME,
WNI_CFG_SUPPORTED_RATES_11B,
WNI_CFG_SUPPORTED_RATES_11A,
WNI_CFG_DOT11_MODE,
WNI_CFG_OPERATIONAL_RATE_SET,
WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET,
WNI_CFG_LISTEN_INTERVAL,
WNI_CFG_VALID_CHANNEL_LIST,
WNI_CFG_APSD_ENABLED,
@@ -56,15 +52,12 @@ enum {
WNI_CFG_SCAN_CONTROL_LIST,
WNI_CFG_HT_CAP_INFO,
WNI_CFG_HT_AMPDU_PARAMS,
WNI_CFG_SUPPORTED_MCS_SET,
WNI_CFG_EXT_HT_CAP_INFO,
WNI_CFG_TX_BF_CAP,
WNI_CFG_AS_CAP,
WNI_CFG_HT_INFO_FIELD1,
WNI_CFG_HT_INFO_FIELD2,
WNI_CFG_HT_INFO_FIELD3,
WNI_CFG_BASIC_MCS_SET,
WNI_CFG_CURRENT_MCS_SET,
WNI_CFG_MPDU_DENSITY,
WNI_CFG_MAX_RX_AMPDU_FACTOR,
WNI_CFG_SCAN_IN_POWERSAVE,
@@ -210,19 +203,12 @@ enum {
#define WNI_CFG_STA_ID_LEN 6
#define WNI_CFG_SSID_LEN 32
#define WNI_CFG_SUPPORTED_RATES_11B_LEN 4
#define WNI_CFG_SUPPORTED_RATES_11A_LEN 8
#define WNI_CFG_OPERATIONAL_RATE_SET_LEN 12
#define WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET_LEN 8
#define WNI_CFG_PROPRIETARY_OPERATIONAL_RATE_SET_LEN 4
#define WNI_CFG_VALID_CHANNEL_LIST_LEN 100
#define WNI_CFG_MAX_TX_POWER_2_4_LEN 128
#define WNI_CFG_MAX_TX_POWER_5_LEN 128
#define WNI_CFG_COUNTRY_CODE_LEN 3
#define WNI_CFG_SCAN_CONTROL_LIST_LEN 128
#define WNI_CFG_SUPPORTED_MCS_SET_LEN 16
#define WNI_CFG_BASIC_MCS_SET_LEN 16
#define WNI_CFG_CURRENT_MCS_SET_LEN 16
#define WNI_CFG_PROBE_RSP_ADDNIE_DATA1_LEN 255
#define WNI_CFG_ASSOC_RSP_ADDNIE_DATA_LEN 255
#define WNI_CFG_PROBE_RSP_BCN_ADDNIE_DATA_LEN 255

View File

@@ -47,11 +47,7 @@ const char *cfg_get_string(uint16_t cfg_id)
CASE_RETURN_STRING(WNI_CFG_DTIM_PERIOD);
CASE_RETURN_STRING(WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME);
CASE_RETURN_STRING(WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME);
CASE_RETURN_STRING(WNI_CFG_SUPPORTED_RATES_11B);
CASE_RETURN_STRING(WNI_CFG_SUPPORTED_RATES_11A);
CASE_RETURN_STRING(WNI_CFG_DOT11_MODE);
CASE_RETURN_STRING(WNI_CFG_OPERATIONAL_RATE_SET);
CASE_RETURN_STRING(WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET);
CASE_RETURN_STRING(WNI_CFG_LISTEN_INTERVAL);
CASE_RETURN_STRING(WNI_CFG_VALID_CHANNEL_LIST);
CASE_RETURN_STRING(WNI_CFG_APSD_ENABLED);
@@ -71,15 +67,12 @@ const char *cfg_get_string(uint16_t cfg_id)
CASE_RETURN_STRING(WNI_CFG_SCAN_CONTROL_LIST);
CASE_RETURN_STRING(WNI_CFG_HT_CAP_INFO);
CASE_RETURN_STRING(WNI_CFG_HT_AMPDU_PARAMS);
CASE_RETURN_STRING(WNI_CFG_SUPPORTED_MCS_SET);
CASE_RETURN_STRING(WNI_CFG_EXT_HT_CAP_INFO);
CASE_RETURN_STRING(WNI_CFG_TX_BF_CAP);
CASE_RETURN_STRING(WNI_CFG_AS_CAP);
CASE_RETURN_STRING(WNI_CFG_HT_INFO_FIELD1);
CASE_RETURN_STRING(WNI_CFG_HT_INFO_FIELD2);
CASE_RETURN_STRING(WNI_CFG_HT_INFO_FIELD3);
CASE_RETURN_STRING(WNI_CFG_BASIC_MCS_SET);
CASE_RETURN_STRING(WNI_CFG_CURRENT_MCS_SET);
CASE_RETURN_STRING(WNI_CFG_MPDU_DENSITY);
CASE_RETURN_STRING(WNI_CFG_MAX_RX_AMPDU_FACTOR);
CASE_RETURN_STRING(WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE);

View File

@@ -63,23 +63,12 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME_STAMIN,
WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME_STAMAX,
WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME_STADEF},
{WNI_CFG_SUPPORTED_RATES_11B,
CFG_CTL_VALID | CFG_CTL_RE,
0, 3, 1},
{WNI_CFG_SUPPORTED_RATES_11A, CFG_CTL_VALID | CFG_CTL_RE,
0, 255, 15},
{WNI_CFG_DOT11_MODE,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | CFG_CTL_RESTART |
CFG_CTL_NTF_LIM,
WNI_CFG_DOT11_MODE_STAMIN,
WNI_CFG_DOT11_MODE_STAMAX,
WNI_CFG_DOT11_MODE_STADEF},
{WNI_CFG_OPERATIONAL_RATE_SET,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_RESTART,
0, 1, 1},
{WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_RESTART,
0, 65535, 65534},
{WNI_CFG_LISTEN_INTERVAL,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
CFG_CTL_RESTART,
@@ -178,10 +167,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
WNI_CFG_HT_AMPDU_PARAMS_STAMIN,
WNI_CFG_HT_AMPDU_PARAMS_STAMAX,
WNI_CFG_HT_AMPDU_PARAMS_STADEF},
{WNI_CFG_SUPPORTED_MCS_SET,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_SAVE |
CFG_CTL_RESTART | CFG_CTL_NTF_LIM,
0, 0, 0},
{WNI_CFG_EXT_HT_CAP_INFO,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT | CFG_CTL_SAVE |
CFG_CTL_RESTART | CFG_CTL_NTF_LIM,
@@ -218,14 +203,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
WNI_CFG_HT_INFO_FIELD3_STAMIN,
WNI_CFG_HT_INFO_FIELD3_STAMAX,
WNI_CFG_HT_INFO_FIELD3_STADEF},
{WNI_CFG_BASIC_MCS_SET,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_SAVE |
CFG_CTL_RESTART | CFG_CTL_NTF_LIM,
0, 0, 0},
{WNI_CFG_CURRENT_MCS_SET,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_SAVE |
CFG_CTL_RESTART | CFG_CTL_NTF_LIM,
0, 0, 0},
{WNI_CFG_MPDU_DENSITY,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
CFG_CTL_RESTART | CFG_CTL_NTF_LIM,
@@ -859,22 +836,6 @@ cfgstatic_string cfg_static_string[CFG_MAX_STATIC_STRING] = {
WNI_CFG_SSID_LEN,
10,
{1, 2, 3, 4, 5, 6, 7, 8, 9, 0} },
{WNI_CFG_SUPPORTED_RATES_11B,
WNI_CFG_SUPPORTED_RATES_11B_LEN,
4,
{2, 4, 11, 22} },
{WNI_CFG_SUPPORTED_RATES_11A,
WNI_CFG_SUPPORTED_RATES_11A_LEN,
8,
{12, 18, 24, 36, 48, 72, 96, 108} },
{WNI_CFG_OPERATIONAL_RATE_SET,
WNI_CFG_OPERATIONAL_RATE_SET_LEN,
0,
{0} },
{WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET,
WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET_LEN,
0,
{0} },
{WNI_CFG_VALID_CHANNEL_LIST,
WNI_CFG_VALID_CHANNEL_LIST_LEN,
55,
@@ -906,21 +867,6 @@ cfgstatic_string cfg_static_string[CFG_MAX_STATIC_STRING] = {
0x8c, 0x0, 0x90, 0x0, 0x95, 0x1, 0x97, 0x1, 0x99, 0x1, 0x9b, 0x1, 0x9d,
0x1, 0x9f, 0x1, 0xa1, 0x1, 0xa5, 0x1, 0xf0, 0x1, 0xf2, 0x1, 0xf4, 0x1,
0xf6, 0x1, 0xf8, 0x1, 0xfa, 0x1, 0xfc, 0x1} },
{WNI_CFG_SUPPORTED_MCS_SET,
WNI_CFG_SUPPORTED_MCS_SET_LEN,
16,
{0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0} },
{WNI_CFG_BASIC_MCS_SET,
WNI_CFG_BASIC_MCS_SET_LEN,
16,
{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0} },
{WNI_CFG_CURRENT_MCS_SET,
WNI_CFG_CURRENT_MCS_SET_LEN,
16,
{0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0} },
{WNI_CFG_WPS_UUID,
WNI_CFG_WPS_UUID_LEN,
6,

View File

@@ -54,6 +54,7 @@
#include "wma_types.h"
#include "lim_types.h"
#include "wlan_utility.h"
#include "wlan_mlme_api.h"
#ifdef FEATURE_WLAN_TDLS
#define IS_TDLS_PEER(type) ((type) == STA_ENTRY_TDLS_PEER)
@@ -259,15 +260,15 @@ lim_check_rx_basic_rates(tpAniSirGlobal pMac, tSirMacRateSet rxRateSet,
uint8_t lim_check_mcs_set(tpAniSirGlobal pMac, uint8_t *supportedMCSSet)
{
uint8_t basicMCSSet[SIZE_OF_BASIC_MCS_SET] = { 0 };
uint32_t cfgLen = 0;
qdf_size_t cfg_len = 0;
uint8_t i;
uint8_t validBytes;
uint8_t lastByteMCSMask = 0x1f;
cfgLen = WNI_CFG_BASIC_MCS_SET_LEN;
if (wlan_cfg_get_str(pMac, WNI_CFG_BASIC_MCS_SET,
(uint8_t *) basicMCSSet,
(uint32_t *) &cfgLen) != QDF_STATUS_SUCCESS) {
cfg_len = pMac->mlme_cfg->rates.basic_mcs_set.len;
if (wlan_mlme_get_cfg_str((uint8_t *)basicMCSSet,
&pMac->mlme_cfg->rates.basic_mcs_set,
&cfg_len) != QDF_STATUS_SUCCESS) {
/* / Could not get Basic MCS rateset from CFG. Log error. */
pe_err("could not retrieve Basic MCS rateset");
return false;
@@ -1488,6 +1489,7 @@ lim_populate_own_rate_set(tpAniSirGlobal mac_ctx,
uint32_t self_sta_dot11mode = 0;
uint8_t a_rate_index = 0;
uint8_t b_rate_index = 0;
qdf_size_t val_len;
is_arate = 0;
@@ -1504,20 +1506,22 @@ lim_populate_own_rate_set(tpAniSirGlobal mac_ctx,
(self_sta_dot11mode == WNI_CFG_DOT11_MODE_11N) ||
(self_sta_dot11mode == WNI_CFG_DOT11_MODE_11G) ||
(self_sta_dot11mode == WNI_CFG_DOT11_MODE_11B)) {
val = WNI_CFG_SUPPORTED_RATES_11B_LEN;
wlan_cfg_get_str(mac_ctx, WNI_CFG_SUPPORTED_RATES_11B,
(uint8_t *) &temp_rate_set.rate, &val);
temp_rate_set.numRates = (uint8_t) val;
val_len = mac_ctx->mlme_cfg->rates.supported_11b.len;
wlan_mlme_get_cfg_str((uint8_t *)&temp_rate_set.rate,
&mac_ctx->mlme_cfg->rates.supported_11b,
&val_len);
temp_rate_set.numRates = (uint8_t)val_len;
} else {
temp_rate_set.numRates = 0;
}
/* Include 11a rates when the device configured in non-11b mode */
if (!IS_DOT11_MODE_11B(self_sta_dot11mode)) {
val = WNI_CFG_SUPPORTED_RATES_11A_LEN;
wlan_cfg_get_str(mac_ctx, WNI_CFG_SUPPORTED_RATES_11A,
(uint8_t *) &temp_rate_set2.rate, &val);
temp_rate_set2.numRates = (uint8_t) val;
val_len = mac_ctx->mlme_cfg->rates.supported_11a.len;
wlan_mlme_get_cfg_str((uint8_t *)&temp_rate_set2.rate,
&mac_ctx->mlme_cfg->rates.supported_11a,
&val_len);
temp_rate_set2.numRates = (uint8_t)val_len;
} else {
temp_rate_set2.numRates = 0;
}
@@ -1566,10 +1570,11 @@ lim_populate_own_rate_set(tpAniSirGlobal mac_ctx,
}
if (IS_DOT11_MODE_HT(self_sta_dot11mode)) {
val = SIZE_OF_SUPPORTED_MCS_SET;
if (wlan_cfg_get_str(mac_ctx, WNI_CFG_SUPPORTED_MCS_SET,
rates->supportedMCSSet,
&val) != QDF_STATUS_SUCCESS) {
val_len = SIZE_OF_SUPPORTED_MCS_SET;
if (wlan_mlme_get_cfg_str(
rates->supportedMCSSet,
&mac_ctx->mlme_cfg->rates.supported_mcs_set,
&val_len) != QDF_STATUS_SUCCESS) {
pe_err("could not retrieve supportedMCSSet");
return QDF_STATUS_E_FAILURE;
}
@@ -1629,6 +1634,7 @@ lim_populate_peer_rate_set(tpAniSirGlobal pMac,
tSirMacRateSet tempRateSet;
tSirMacRateSet tempRateSet2;
uint32_t i, j, val, min, isArate = 0;
qdf_size_t val_len;
/* copy operational rate set from psessionEntry */
if (psessionEntry->rateSet.numRates <= SIR_MAC_RATESET_EID_MAX) {
@@ -1721,10 +1727,11 @@ lim_populate_peer_rate_set(tpAniSirGlobal pMac,
}
if (IS_DOT11_MODE_HT(psessionEntry->dot11mode)) {
val = SIZE_OF_SUPPORTED_MCS_SET;
if (wlan_cfg_get_str(pMac, WNI_CFG_SUPPORTED_MCS_SET,
pRates->supportedMCSSet,
&val) != QDF_STATUS_SUCCESS) {
val_len = SIZE_OF_SUPPORTED_MCS_SET;
if (wlan_mlme_get_cfg_str(
pRates->supportedMCSSet,
&pMac->mlme_cfg->rates.supported_mcs_set,
&val_len) != QDF_STATUS_SUCCESS) {
pe_err("could not retrieve supportedMCSSet");
return QDF_STATUS_E_FAILURE;
}
@@ -1819,6 +1826,7 @@ QDF_STATUS lim_populate_matching_rate_set(tpAniSirGlobal mac_ctx,
tpSirSupportedRates rates;
uint8_t a_rate_index = 0;
uint8_t b_rate_index = 0;
qdf_size_t val_len;
is_arate = 0;
@@ -1969,9 +1977,11 @@ QDF_STATUS lim_populate_matching_rate_set(tpAniSirGlobal mac_ctx,
(sta_ds->mlmStaContext.htCapability))
#endif
{
val = SIZE_OF_SUPPORTED_MCS_SET;
if (wlan_cfg_get_str(mac_ctx, WNI_CFG_SUPPORTED_MCS_SET,
mcs_set, &val) != QDF_STATUS_SUCCESS) {
val_len = SIZE_OF_SUPPORTED_MCS_SET;
if (wlan_mlme_get_cfg_str(
mcs_set,
&mac_ctx->mlme_cfg->rates.supported_mcs_set,
&val_len) != QDF_STATUS_SUCCESS) {
pe_err("could not retrieve supportedMCSet");
return QDF_STATUS_E_FAILURE;
}
@@ -1979,7 +1989,7 @@ QDF_STATUS lim_populate_matching_rate_set(tpAniSirGlobal mac_ctx,
if (session_entry->nss == NSS_1x1_MODE)
mcs_set[1] = 0;
for (i = 0; i < val; i++)
for (i = 0; i < val_len; i++)
sta_ds->supportedRates.supportedMCSSet[i] =
mcs_set[i] & supported_mcs_set[i];

View File

@@ -30,6 +30,7 @@
#include "lim_session.h"
#include "lim_ibss_peer_mgmt.h"
#include "lim_types.h"
#include "wlan_mlme_api.h"
/**
* ibss_peer_find
@@ -482,7 +483,7 @@ static void ibss_bss_add(tpAniSirGlobal pMac, tpPESession psessionEntry)
tpSirMacMgmtHdr pHdr = (tpSirMacMgmtHdr) pMac->lim.ibssInfo.pHdr;
tpSchBeaconStruct pBeacon =
(tpSchBeaconStruct) pMac->lim.ibssInfo.pBeacon;
uint8_t numExtRates = 0;
qdf_size_t num_ext_rates = 0;
if ((pHdr == NULL) || (pBeacon == NULL)) {
pe_err("Unable to add BSS (no cached BSS info)");
@@ -525,10 +526,11 @@ static void ibss_bss_add(tpAniSirGlobal pMac, tpPESession psessionEntry)
*/
if (pBeacon->extendedRatesPresent)
numExtRates = pBeacon->extendedRates.numRates;
if (cfg_set_str(pMac, WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET,
(uint8_t *) &pBeacon->extendedRates.rate,
numExtRates) != QDF_STATUS_SUCCESS) {
num_ext_rates = pBeacon->extendedRates.numRates;
if (wlan_mlme_set_cfg_str(
(uint8_t *)&pBeacon->extendedRates.rate,
&pMac->mlme_cfg->rates.ext_opr_rate_set,
num_ext_rates) != QDF_STATUS_SUCCESS) {
pe_err("could not update ExtendedOperRateset at CFG");
return;
}

View File

@@ -72,6 +72,7 @@
#include "wlan_reg_services_api.h"
#include "wlan_tdls_tgt_api.h"
#include "wlan_mlme_public_struct.h"
#include "wlan_mlme_api.h"
/* define NO_PAD_TDLS_MIN_8023_SIZE to NOT padding: See CR#447630
There was IOT issue with cisco 1252 open mode, where it pads
@@ -697,7 +698,7 @@ static void populate_dot11f_tdls_ht_vht_cap(tpAniSirGlobal pMac,
tpPESession psessionEntry)
{
uint8_t nss;
uint32_t val;
qdf_size_t val_len;
struct mlme_vht_capabilities_info vht_cap_info;
vht_cap_info = pMac->mlme_cfg->vht_caps.vht_cap_info;
@@ -711,9 +712,10 @@ static void populate_dot11f_tdls_ht_vht_cap(tpAniSirGlobal pMac,
if (IS_DOT11_MODE_HT(selfDot11Mode)) {
/* Include HT Capability IE */
populate_dot11f_ht_caps(pMac, NULL, htCap);
val = SIZE_OF_SUPPORTED_MCS_SET;
wlan_cfg_get_str(pMac, WNI_CFG_SUPPORTED_MCS_SET,
&htCap->supportedMCSSet[0], &val);
val_len = SIZE_OF_SUPPORTED_MCS_SET;
wlan_mlme_get_cfg_str(&htCap->supportedMCSSet[0],
&pMac->mlme_cfg->rates.supported_mcs_set,
&val_len);
if (NSS_1x1_MODE == nss)
htCap->supportedMCSSet[1] = 0;
/*
@@ -2256,6 +2258,7 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
uint8_t a_rateindex = 0;
uint8_t b_rateindex = 0;
uint8_t nss;
qdf_size_t val_len;
is_a_rate = 0;
temp_rate_set2.numRates = 0;
@@ -2263,24 +2266,28 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
lim_get_phy_mode(mac_ctx, &phymode, NULL);
/* get own rate set */
val = WNI_CFG_OPERATIONAL_RATE_SET_LEN;
if (wlan_cfg_get_str(mac_ctx, WNI_CFG_OPERATIONAL_RATE_SET,
(uint8_t *) &temp_rate_set.rate,
&val) != QDF_STATUS_SUCCESS) {
val_len = mac_ctx->mlme_cfg->rates.opr_rate_set.len;
if (wlan_mlme_get_cfg_str((uint8_t *)&temp_rate_set.rate,
&mac_ctx->mlme_cfg->rates.opr_rate_set,
&val_len) != QDF_STATUS_SUCCESS) {
/* Could not get rateset from CFG. Log error. */
pe_err("could not retrieve rateset");
val = 0;
val_len = 0;
}
temp_rate_set.numRates = val;
temp_rate_set.numRates = val_len;
if (phymode == WNI_CFG_PHY_MODE_11G) {
/* get own extended rate set */
val = WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET_LEN;
if (wlan_cfg_get_str(mac_ctx,
WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET,
(uint8_t *) &temp_rate_set2.rate,
&val) != QDF_STATUS_SUCCESS)
temp_rate_set2.numRates = val;
val_len = mac_ctx->mlme_cfg->rates.ext_opr_rate_set.len;
if (wlan_mlme_get_cfg_str(
(uint8_t *)&temp_rate_set2.rate,
&mac_ctx->mlme_cfg->rates.ext_opr_rate_set,
&val_len) != QDF_STATUS_SUCCESS) {
/* Could not get rateset from CFG. Log error. */
pe_err("could not retrieve extrateset");
val_len = 0;
}
temp_rate_set2.numRates = val_len;
}
if ((temp_rate_set.numRates + temp_rate_set2.numRates) > 12) {
@@ -2379,9 +2386,11 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
(stads->mlmStaContext.htCapability))
#endif
{
val = SIZE_OF_SUPPORTED_MCS_SET;
if (wlan_cfg_get_str(mac_ctx, WNI_CFG_SUPPORTED_MCS_SET,
mcsSet, &val) != QDF_STATUS_SUCCESS) {
val_len = SIZE_OF_SUPPORTED_MCS_SET;
if (wlan_mlme_get_cfg_str(
mcsSet,
&mac_ctx->mlme_cfg->rates.supported_mcs_set,
&val_len) != QDF_STATUS_SUCCESS) {
/* Could not get rateset from CFG. Log error. */
pe_err("could not retrieve supportedMCSSet");
return QDF_STATUS_E_FAILURE;
@@ -2389,7 +2398,7 @@ lim_tdls_populate_matching_rate_set(tpAniSirGlobal mac_ctx, tpDphHashNode stads,
if (NSS_1x1_MODE == nss)
mcsSet[1] = 0;
for (i = 0; i < val; i++)
for (i = 0; i < val_len; i++)
stads->supportedRates.supportedMCSSet[i] =
mcsSet[i] & supp_mcs_set[i];

View File

@@ -45,6 +45,7 @@
#include "wifi_pos_api.h"
#include "wlan_mlme_public_struct.h"
#include "wlan_mlme_ucfg_api.h"
#include "wlan_mlme_api.h"
#define RSN_OUI_SIZE 4
/* ////////////////////////////////////////////////////////////////////// */
@@ -528,8 +529,8 @@ populate_dot11f_ext_supp_rates(tpAniSirGlobal pMac, uint8_t nChannelNum,
tDot11fIEExtSuppRates *pDot11f,
tpPESession psessionEntry)
{
QDF_STATUS nSirStatus;
uint32_t nRates = 0;
QDF_STATUS nsir_status;
qdf_size_t nRates = 0;
uint8_t rates[SIR_MAC_RATESET_EID_MAX];
/* Use the ext rates present in session entry whenever nChannelNum is set to OPERATIONAL
@@ -545,9 +546,16 @@ populate_dot11f_ext_supp_rates(tpAniSirGlobal pMac, uint8_t nChannelNum,
pe_err("no session context exists while populating Operational Rate Set");
}
} else if (HIGHEST_24GHZ_CHANNEL_NUM >= nChannelNum) {
CFG_GET_STR(nSirStatus, pMac,
WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET, rates,
nRates, WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET_LEN);
nRates = pMac->mlme_cfg->rates.ext_opr_rate_set.len;
nsir_status = wlan_mlme_get_cfg_str(
rates,
&pMac->mlme_cfg->rates.ext_opr_rate_set, &nRates);
if (QDF_IS_STATUS_ERROR(nsir_status)) {
nRates = 0;
pe_err("Failed to retrieve nItem from CFG status: %d",
(nsir_status));
return nsir_status;
}
}
if (0 != nRates) {
@@ -565,8 +573,8 @@ populate_dot11f_ext_supp_rates1(tpAniSirGlobal pMac,
uint8_t nChannelNum,
tDot11fIEExtSuppRates *pDot11f)
{
uint32_t nRates;
QDF_STATUS nSirStatus;
qdf_size_t nRates;
QDF_STATUS nsir_status;
uint8_t rates[SIR_MAC_MAX_NUMBER_OF_RATES];
if (14 < nChannelNum) {
@@ -576,8 +584,16 @@ populate_dot11f_ext_supp_rates1(tpAniSirGlobal pMac,
/* N.B. I have *no* idea why we're calling 'wlan_cfg_get_str' with an argument */
/* of WNI_CFG_SUPPORTED_RATES_11A here, but that's what was done */
/* previously & I'm afraid to change it! */
CFG_GET_STR(nSirStatus, pMac, WNI_CFG_SUPPORTED_RATES_11A,
rates, nRates, SIR_MAC_MAX_NUMBER_OF_RATES);
nRates = SIR_MAC_MAX_NUMBER_OF_RATES;
nsir_status = wlan_mlme_get_cfg_str(
rates,
&pMac->mlme_cfg->rates.supported_11a,
&nRates);
if (QDF_IS_STATUS_ERROR(nsir_status)) {
pe_err("Failed to retrieve nItem from CFG status: %d",
(nsir_status));
return nsir_status;
}
if (0 != nRates) {
pDot11f->num_rates = (uint8_t) nRates;
@@ -592,8 +608,9 @@ QDF_STATUS
populate_dot11f_ht_caps(tpAniSirGlobal pMac,
tpPESession psessionEntry, tDot11fIEHTCaps *pDot11f)
{
uint32_t nCfgValue, nCfgLen;
uint32_t nCfgValue;
uint8_t nCfgValue8;
qdf_size_t ncfglen;
QDF_STATUS nSirStatus;
tSirMacHTParametersInfo *pHTParametersInfo;
uint8_t disable_high_ht_mcs_2x2 = 0;
@@ -651,9 +668,16 @@ populate_dot11f_ht_caps(tpAniSirGlobal pMac,
pDot11f->mpduDensity = pHTParametersInfo->mpduDensity;
pDot11f->reserved1 = pHTParametersInfo->reserved;
CFG_GET_STR(nSirStatus, pMac, WNI_CFG_SUPPORTED_MCS_SET,
pDot11f->supportedMCSSet, nCfgLen,
SIZE_OF_SUPPORTED_MCS_SET);
ncfglen = SIZE_OF_SUPPORTED_MCS_SET;
nSirStatus = wlan_mlme_get_cfg_str(
pDot11f->supportedMCSSet,
&pMac->mlme_cfg->rates.supported_mcs_set,
&ncfglen);
if (QDF_IS_STATUS_ERROR(nSirStatus)) {
pe_err("Failed to retrieve nItem from CFG status: %d",
(nSirStatus));
return nSirStatus;
}
if (psessionEntry) {
disable_high_ht_mcs_2x2 =
@@ -1131,7 +1155,8 @@ QDF_STATUS
populate_dot11f_ht_info(tpAniSirGlobal pMac,
tDot11fIEHTInfo *pDot11f, tpPESession psessionEntry)
{
uint32_t nCfgValue, nCfgLen;
uint32_t nCfgValue;
qdf_size_t ncfglen;
uint8_t htInfoField1;
uint16_t htInfoField2;
QDF_STATUS nSirStatus;
@@ -1233,8 +1258,15 @@ populate_dot11f_ht_info(tpAniSirGlobal pMac,
pDot11f->pcoActive = uHTInfoField.infoField3.pcoActive;
pDot11f->pcoPhase = uHTInfoField.infoField3.pcoPhase;
pDot11f->reserved2 = uHTInfoField.infoField3.reserved;
CFG_GET_STR(nSirStatus, pMac, WNI_CFG_BASIC_MCS_SET,
pDot11f->basicMCSSet, nCfgLen, SIZE_OF_BASIC_MCS_SET);
ncfglen = SIZE_OF_BASIC_MCS_SET;
nSirStatus = wlan_mlme_get_cfg_str(pDot11f->basicMCSSet,
&pMac->mlme_cfg->rates.basic_mcs_set,
&ncfglen);
if (QDF_IS_STATUS_ERROR(nSirStatus)) {
pe_err("Failed to retrieve nItem from CFG status: %d",
(nSirStatus));
return nSirStatus;
}
pDot11f->present = 1;
@@ -1546,8 +1578,8 @@ populate_dot11f_supp_rates(tpAniSirGlobal pMac,
uint8_t nChannelNum,
tDot11fIESuppRates *pDot11f, tpPESession psessionEntry)
{
QDF_STATUS nSirStatus;
uint32_t nRates;
QDF_STATUS nsir_status;
qdf_size_t nRates;
uint8_t rates[SIR_MAC_MAX_NUMBER_OF_RATES];
/* Use the operational rates present in session entry whenever nChannelNum is set to OPERATIONAL
@@ -1556,7 +1588,7 @@ populate_dot11f_supp_rates(tpAniSirGlobal pMac,
*/
if (POPULATE_DOT11F_RATES_OPERATIONAL == nChannelNum) {
#if 0
CFG_GET_STR(nSirStatus, pMac, WNI_CFG_OPERATIONAL_RATE_SET,
CFG_GET_STR(nsir_status, pMac, WNI_CFG_OPERATIONAL_RATE_SET,
rates, nRates, SIR_MAC_MAX_NUMBER_OF_RATES);
#endif /* TO SUPPORT BT-AMP */
if (psessionEntry != NULL) {
@@ -1568,11 +1600,27 @@ populate_dot11f_supp_rates(tpAniSirGlobal pMac,
nRates = 0;
}
} else if (14 >= nChannelNum) {
CFG_GET_STR(nSirStatus, pMac, WNI_CFG_SUPPORTED_RATES_11B,
rates, nRates, SIR_MAC_MAX_NUMBER_OF_RATES);
nRates = SIR_MAC_MAX_NUMBER_OF_RATES;
nsir_status = wlan_mlme_get_cfg_str(
rates,
&pMac->mlme_cfg->rates.supported_11b,
&nRates);
if (QDF_IS_STATUS_ERROR(nsir_status)) {
pe_err("Failed to retrieve nItem from CFG status: %d",
(nsir_status));
return nsir_status;
}
} else {
CFG_GET_STR(nSirStatus, pMac, WNI_CFG_SUPPORTED_RATES_11A,
rates, nRates, SIR_MAC_MAX_NUMBER_OF_RATES);
nRates = SIR_MAC_MAX_NUMBER_OF_RATES;
nsir_status = wlan_mlme_get_cfg_str(
rates,
&pMac->mlme_cfg->rates.supported_11a,
&nRates);
if (QDF_IS_STATUS_ERROR(nsir_status)) {
pe_err("Failed to retrieve nItem from CFG status: %d",
(nsir_status));
return nsir_status;
}
}
if (0 != nRates) {
@@ -1610,8 +1658,9 @@ populate_dot11f_rates_tdls(tpAniSirGlobal p_mac,
{
tSirMacRateSet temp_rateset;
tSirMacRateSet temp_rateset2;
uint32_t val, i;
uint32_t i;
uint32_t self_dot11mode = 0;
qdf_size_t num_rates;
wlan_cfg_get_int(p_mac, WNI_CFG_DOT11_MODE, &self_dot11mode);
@@ -1632,20 +1681,22 @@ populate_dot11f_rates_tdls(tpAniSirGlobal p_mac,
(self_dot11mode == WNI_CFG_DOT11_MODE_11N) ||
(self_dot11mode == WNI_CFG_DOT11_MODE_11G) ||
(self_dot11mode == WNI_CFG_DOT11_MODE_11B))) {
val = WNI_CFG_SUPPORTED_RATES_11B_LEN;
wlan_cfg_get_str(p_mac, WNI_CFG_SUPPORTED_RATES_11B,
(uint8_t *)&temp_rateset.rate, &val);
temp_rateset.numRates = (uint8_t) val;
num_rates = p_mac->mlme_cfg->rates.supported_11b.len;
wlan_mlme_get_cfg_str((uint8_t *)&temp_rateset.rate,
&p_mac->mlme_cfg->rates.supported_11b,
&num_rates);
temp_rateset.numRates = (uint8_t)num_rates;
} else {
temp_rateset.numRates = 0;
}
/* Include 11a rates when the device configured in non-11b mode */
if (!IS_DOT11_MODE_11B(self_dot11mode)) {
val = WNI_CFG_SUPPORTED_RATES_11A_LEN;
wlan_cfg_get_str(p_mac, WNI_CFG_SUPPORTED_RATES_11A,
(uint8_t *)&temp_rateset2.rate, &val);
temp_rateset2.numRates = (uint8_t) val;
num_rates = p_mac->mlme_cfg->rates.supported_11a.len;
wlan_mlme_get_cfg_str((uint8_t *)&temp_rateset2.rate,
&p_mac->mlme_cfg->rates.supported_11a,
&num_rates);
temp_rateset2.numRates = (uint8_t)num_rates;
} else {
temp_rateset2.numRates = 0;
}

View File

@@ -5090,13 +5090,13 @@ static void csr_set_cfg_rate_set(tpAniSirGlobal pMac, eCsrPhyMode phyMode,
enum csr_cfgdot11mode cfgDot11Mode;
/* leave enough room for the max number of rates */
uint8_t OperationalRates[CSR_DOT11_SUPPORTED_RATES_MAX];
uint32_t OperationalRatesLength = 0;
qdf_size_t OperationalRatesLength = 0;
/* leave enough room for the max number of rates */
uint8_t ExtendedOperationalRates
[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX];
uint32_t ExtendedOperationalRatesLength = 0;
qdf_size_t ExtendedOperationalRatesLength = 0;
uint8_t MCSRateIdxSet[SIZE_OF_SUPPORTED_MCS_SET];
uint32_t MCSRateLength = 0;
qdf_size_t MCSRateLength = 0;
QDF_ASSERT(pIes != NULL);
if (NULL != pIes) {
@@ -5168,13 +5168,15 @@ static void csr_set_cfg_rate_set(tpAniSirGlobal pMac, eCsrPhyMode phyMode,
}
}
/* Set the operational rate set CFG variables... */
cfg_set_str(pMac, WNI_CFG_OPERATIONAL_RATE_SET,
OperationalRates, OperationalRatesLength);
cfg_set_str(pMac, WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET,
ExtendedOperationalRates,
ExtendedOperationalRatesLength);
cfg_set_str(pMac, WNI_CFG_CURRENT_MCS_SET, MCSRateIdxSet,
MCSRateLength);
wlan_mlme_set_cfg_str(OperationalRates,
&pMac->mlme_cfg->rates.opr_rate_set,
OperationalRatesLength);
wlan_mlme_set_cfg_str(ExtendedOperationalRates,
&pMac->mlme_cfg->rates.ext_opr_rate_set,
ExtendedOperationalRatesLength);
wlan_mlme_set_cfg_str(MCSRateIdxSet,
&pMac->mlme_cfg->rates.current_mcs_set,
MCSRateLength);
} /* Parsing BSSDesc */
else
sme_err("failed to parse BssDesc");
@@ -5203,11 +5205,11 @@ static void csr_set_cfg_rate_set_from_profile(tpAniSirGlobal pMac,
enum band_info eBand;
/* leave enough room for the max number of rates */
uint8_t OperationalRates[CSR_DOT11_SUPPORTED_RATES_MAX];
uint32_t OperationalRatesLength = 0;
qdf_size_t OperationalRatesLength = 0;
/* leave enough room for the max number of rates */
uint8_t ExtendedOperationalRates
[CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX];
uint32_t ExtendedOperationalRatesLength = 0;
qdf_size_t ExtendedOperationalRatesLength = 0;
uint8_t operationChannel = 0;
if (pProfile->ChannelInfo.ChannelList)
@@ -5263,11 +5265,12 @@ static void csr_set_cfg_rate_set_from_profile(tpAniSirGlobal pMac,
}
/* Set the operational rate set CFG variables... */
cfg_set_str(pMac, WNI_CFG_OPERATIONAL_RATE_SET, OperationalRates,
OperationalRatesLength);
cfg_set_str(pMac, WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET,
ExtendedOperationalRates,
ExtendedOperationalRatesLength);
wlan_mlme_set_cfg_str(OperationalRates,
&pMac->mlme_cfg->rates.opr_rate_set,
OperationalRatesLength);
wlan_mlme_set_cfg_str(ExtendedOperationalRates,
&pMac->mlme_cfg->rates.ext_opr_rate_set,
ExtendedOperationalRatesLength);
}
static void csr_roam_ccm_cfg_set_callback(tpAniSirGlobal pMac,

View File

@@ -69,6 +69,7 @@
#include <wlan_scan_public_structs.h>
#include <wlan_scan_ucfg_api.h>
#include "wma_nan_datapath.h"
#include "wlan_mlme_api.h"
#define WMA_MCC_MIRACAST_REST_TIME 400
#define WMA_SCAN_ID_MASK 0x0fff
@@ -2671,6 +2672,7 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
roam_offload_params,
tSirRoamOffloadScanReq *roam_req)
{
qdf_size_t val_len;
struct sAniSirGlobal *pMac = NULL;
tSirMacCapabilityInfo selfCaps;
uint32_t val = 0;
@@ -2772,12 +2774,12 @@ QDF_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
nCfgValue8 = (uint8_t) nCfgValue;
roam_offload_params->ampdu_param = (nCfgValue8) & 0xFF;
val = ROAM_OFFLOAD_NUM_MCS_SET;
if (wlan_cfg_get_str(pMac, WNI_CFG_SUPPORTED_MCS_SET,
(uint8_t *) roam_offload_params->mcsset,
&val) != QDF_STATUS_SUCCESS) {
val_len = ROAM_OFFLOAD_NUM_MCS_SET;
if (wlan_mlme_get_cfg_str((uint8_t *)roam_offload_params->mcsset,
&pMac->mlme_cfg->rates.supported_mcs_set,
&val_len) != QDF_STATUS_SUCCESS) {
QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
"Failed to get WNI_CFG_SUPPORTED_MCS_SET");
"Failed to get CFG_SUPPORTED_MCS_SET");
return QDF_STATUS_E_FAILURE;
}
if (wlan_cfg_get_int(pMac, WNI_CFG_EXT_HT_CAP_INFO, &nCfgValue) !=