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

@@ -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);
}