qcacld-3.0: [11AX] Add INI parameters related to 11AX
Add INI parameters to enable/disable ul_ofdma and ul_mimo. Change-Id: Iaeac86db11593002bdbf3d6a92029657c3352e94 CRs-Fixed: 1073481
This commit is contained in:

committed by
Sandeep Puligilla

vanhempi
4f1d7724a8
commit
90bb6f12fd
@@ -8923,7 +8923,6 @@ enum hdd_wext_control {
|
|||||||
#define CFG_EXTWOW_TCP_RX_TIMEOUT_DEFAULT (200)
|
#define CFG_EXTWOW_TCP_RX_TIMEOUT_DEFAULT (200)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* <ini>
|
* <ini>
|
||||||
* gper_roam_enabled - To enabled/disable PER based roaming in FW
|
* gper_roam_enabled - To enabled/disable PER based roaming in FW
|
||||||
@@ -9080,10 +9079,6 @@ enum hdd_wext_control {
|
|||||||
#define CFG_ENABLE_BCAST_PROBE_RESP_MAX (1)
|
#define CFG_ENABLE_BCAST_PROBE_RESP_MAX (1)
|
||||||
#define CFG_ENABLE_BCAST_PROBE_RESP_DEFAULT (0)
|
#define CFG_ENABLE_BCAST_PROBE_RESP_DEFAULT (0)
|
||||||
|
|
||||||
/*
|
|
||||||
* Type declarations
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* <ini>
|
* <ini>
|
||||||
* gActiveBpfMode - Control active BPF mode
|
* gActiveBpfMode - Control active BPF mode
|
||||||
@@ -9108,6 +9103,58 @@ enum hdd_wext_control {
|
|||||||
#define CFG_ACTIVE_BPF_MODE_MAX (ACTIVE_BPF_MODE_COUNT - 1)
|
#define CFG_ACTIVE_BPF_MODE_MAX (ACTIVE_BPF_MODE_COUNT - 1)
|
||||||
#define CFG_ACTIVE_BPF_MODE_DEFAULT (ACTIVE_BPF_DISABLED)
|
#define CFG_ACTIVE_BPF_MODE_DEFAULT (ACTIVE_BPF_DISABLED)
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
/* 11AX related INI configuration */
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* enable_ul_mimo- Enable UL MIMO.
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This ini is used to enable or disable UL MIMO.
|
||||||
|
*
|
||||||
|
* Related: NA
|
||||||
|
*
|
||||||
|
* Supported Feature: 11AX
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define CFG_ENABLE_UL_MIMO_NAME "enable_ul_mimo"
|
||||||
|
#define CFG_ENABLE_UL_MIMO_MIN (0)
|
||||||
|
#define CFG_ENABLE_UL_MIMO_MAX (1)
|
||||||
|
#define CFG_ENABLE_UL_MIMO_DEFAULT (0)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* enable_ul_ofdma- Enable UL OFDMA.
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 1
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This ini is used to enable or disable UL OFDMA.
|
||||||
|
*
|
||||||
|
* Related: NA
|
||||||
|
*
|
||||||
|
* Supported Feature: 11AX
|
||||||
|
*
|
||||||
|
* Usage: External
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_ENABLE_UL_OFDMA_NAME "enable_ul_ofdma"
|
||||||
|
#define CFG_ENABLE_UL_OFDMA_MIN (0)
|
||||||
|
#define CFG_ENABLE_UL_OFDMA_MAX (1)
|
||||||
|
#define CFG_ENABLE_UL_OFDMA_DEFAULT (0)
|
||||||
|
|
||||||
|
#endif /* WLAN_FEATURE_11AX */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Type declarations
|
||||||
|
*/
|
||||||
struct hdd_config {
|
struct hdd_config {
|
||||||
/* Bitmap to track what is explicitly configured */
|
/* Bitmap to track what is explicitly configured */
|
||||||
DECLARE_BITMAP(bExplicitCfg, MAX_CFG_INI_ITEMS);
|
DECLARE_BITMAP(bExplicitCfg, MAX_CFG_INI_ITEMS);
|
||||||
@@ -9815,6 +9862,10 @@ struct hdd_config {
|
|||||||
uint32_t per_roam_mon_time;
|
uint32_t per_roam_mon_time;
|
||||||
enum active_bpf_mode active_bpf_mode;
|
enum active_bpf_mode active_bpf_mode;
|
||||||
bool enable_bcast_probe_rsp;
|
bool enable_bcast_probe_rsp;
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
bool enable_ul_mimo;
|
||||||
|
bool enable_ul_ofdma;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
|
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
|
||||||
|
@@ -39,6 +39,10 @@ void hdd_update_tgt_he_cap(struct hdd_context_s *hdd_ctx,
|
|||||||
struct wma_tgt_cfg *cfg);
|
struct wma_tgt_cfg *cfg);
|
||||||
void wlan_hdd_check_11ax_support(struct beacon_data_s *beacon,
|
void wlan_hdd_check_11ax_support(struct beacon_data_s *beacon,
|
||||||
struct sap_Config *config);
|
struct sap_Config *config);
|
||||||
|
void hdd_he_print_ini_config(hdd_context_t *hdd_ctx);
|
||||||
|
int hdd_update_he_cap_in_cfg(hdd_context_t *hdd_ctx);
|
||||||
|
void hdd_he_set_sme_config(tSmeConfigParams *sme_config,
|
||||||
|
struct hdd_config *config);
|
||||||
#else
|
#else
|
||||||
static inline void hdd_update_tgt_he_cap(struct hdd_context_s *hdd_ctx,
|
static inline void hdd_update_tgt_he_cap(struct hdd_context_s *hdd_ctx,
|
||||||
struct wma_tgt_cfg *cfg)
|
struct wma_tgt_cfg *cfg)
|
||||||
@@ -49,5 +53,19 @@ static inline void wlan_hdd_check_11ax_support(struct beacon_data_s *beacon,
|
|||||||
struct sap_Config *config)
|
struct sap_Config *config)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void hdd_he_print_ini_config(hdd_context_t *hdd_ctx)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline int hdd_update_he_cap_in_cfg(hdd_context_t *hdd_ctx)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void hdd_he_set_sme_config(tSmeConfigParams *sme_config,
|
||||||
|
struct hdd_config *config)
|
||||||
|
{
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif /* if !defined(WLAN_HDD_HE_H)*/
|
#endif /* if !defined(WLAN_HDD_HE_H)*/
|
||||||
|
@@ -4263,6 +4263,21 @@ REG_TABLE_ENTRY g_registry_table[] = {
|
|||||||
CFG_ENABLE_BCAST_PROBE_RESP_DEFAULT,
|
CFG_ENABLE_BCAST_PROBE_RESP_DEFAULT,
|
||||||
CFG_ENABLE_BCAST_PROBE_RESP_MIN,
|
CFG_ENABLE_BCAST_PROBE_RESP_MIN,
|
||||||
CFG_ENABLE_BCAST_PROBE_RESP_MAX),
|
CFG_ENABLE_BCAST_PROBE_RESP_MAX),
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
REG_VARIABLE(CFG_ENABLE_UL_MIMO_NAME, WLAN_PARAM_Integer,
|
||||||
|
struct hdd_config, enable_ul_mimo,
|
||||||
|
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||||
|
CFG_ENABLE_UL_MIMO_DEFAULT,
|
||||||
|
CFG_ENABLE_UL_MIMO_MIN,
|
||||||
|
CFG_ENABLE_UL_MIMO_MAX),
|
||||||
|
|
||||||
|
REG_VARIABLE(CFG_ENABLE_UL_OFDMA_NAME, WLAN_PARAM_Integer,
|
||||||
|
struct hdd_config, enable_ul_ofdma,
|
||||||
|
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||||
|
CFG_ENABLE_UL_OFDMA_DEFAULT,
|
||||||
|
CFG_ENABLE_UL_OFDMA_MIN,
|
||||||
|
CFG_ENABLE_UL_OFDMA_MAX),
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -5740,6 +5755,7 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
|
|||||||
CFG_SAP_INTERNAL_RESTART_NAME,
|
CFG_SAP_INTERNAL_RESTART_NAME,
|
||||||
pHddCtx->config->sap_internal_restart);
|
pHddCtx->config->sap_internal_restart);
|
||||||
hdd_per_roam_print_ini_config(pHddCtx);
|
hdd_per_roam_print_ini_config(pHddCtx);
|
||||||
|
hdd_he_print_ini_config(pHddCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -6446,6 +6462,11 @@ bool hdd_update_config_cfg(hdd_context_t *hdd_ctx)
|
|||||||
hdd_err("Couldn't set VHT CAP in cfg");
|
hdd_err("Couldn't set VHT CAP in cfg");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (0 != hdd_update_he_cap_in_cfg(hdd_ctx)) {
|
||||||
|
status = false;
|
||||||
|
hdd_err("Couldn't set HE CAP in cfg");
|
||||||
|
}
|
||||||
|
|
||||||
if (sme_cfg_set_int(hdd_ctx->hHal, WNI_CFG_FIXED_RATE, config->TxRate)
|
if (sme_cfg_set_int(hdd_ctx->hHal, WNI_CFG_FIXED_RATE, config->TxRate)
|
||||||
== QDF_STATUS_E_FAILURE) {
|
== QDF_STATUS_E_FAILURE) {
|
||||||
status = false;
|
status = false;
|
||||||
@@ -6864,6 +6885,7 @@ bool hdd_update_config_cfg(hdd_context_t *hdd_ctx)
|
|||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FEATURE_WLAN_SCAN_PNO
|
#ifdef FEATURE_WLAN_SCAN_PNO
|
||||||
/**
|
/**
|
||||||
* hdd_set_pno_channel_prediction_config() - Set PNO configuration
|
* hdd_set_pno_channel_prediction_config() - Set PNO configuration
|
||||||
@@ -7302,6 +7324,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
|
|||||||
smeConfig->csrConfig.enable_bcast_probe_rsp =
|
smeConfig->csrConfig.enable_bcast_probe_rsp =
|
||||||
pHddCtx->config->enable_bcast_probe_rsp;
|
pHddCtx->config->enable_bcast_probe_rsp;
|
||||||
|
|
||||||
|
hdd_he_set_sme_config(smeConfig, pConfig);
|
||||||
|
|
||||||
status = sme_update_config(pHddCtx->hHal, smeConfig);
|
status = sme_update_config(pHddCtx->hHal, smeConfig);
|
||||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||||
hdd_err("sme_update_config() return failure %d",
|
hdd_err("sme_update_config() return failure %d",
|
||||||
|
@@ -113,16 +113,18 @@ static const char *hdd_he_wni_cfg_to_string(uint16_t cfg_id)
|
|||||||
*
|
*
|
||||||
* Update WNI CFG with the value passed.
|
* Update WNI CFG with the value passed.
|
||||||
*
|
*
|
||||||
* Return: None
|
* Return: 0 on success and errno on failure
|
||||||
*/
|
*/
|
||||||
static void hdd_he_set_wni_cfg(struct hdd_context_s *hdd_ctx,
|
static int hdd_he_set_wni_cfg(struct hdd_context_s *hdd_ctx,
|
||||||
uint16_t cfg_id, uint32_t new_value)
|
uint16_t cfg_id, uint32_t new_value)
|
||||||
{
|
{
|
||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
|
|
||||||
status = sme_cfg_set_int(hdd_ctx->hHal, cfg_id, new_value);
|
status = sme_cfg_set_int(hdd_ctx->hHal, cfg_id, new_value);
|
||||||
if (QDF_IS_STATUS_ERROR(status))
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
hdd_err("could not set %s", hdd_he_wni_cfg_to_string(cfg_id));
|
hdd_err("could not set %s", hdd_he_wni_cfg_to_string(cfg_id));
|
||||||
|
|
||||||
|
return qdf_status_to_os_return(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -269,3 +271,68 @@ void wlan_hdd_check_11ax_support(beacon_data_t *beacon, tsap_Config_t *config)
|
|||||||
if (ie)
|
if (ie)
|
||||||
config->SapHw_mode = eCSR_DOT11_MODE_11ax;
|
config->SapHw_mode = eCSR_DOT11_MODE_11ax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hdd_he_print_ini_config()- Print 11AX(HE) specific INI configuration
|
||||||
|
* @hdd_ctx: handle to hdd context
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void hdd_he_print_ini_config(hdd_context_t *hdd_ctx)
|
||||||
|
{
|
||||||
|
hdd_info("Name = [%s] Value = [%d]", CFG_ENABLE_UL_MIMO_NAME,
|
||||||
|
hdd_ctx->config->enable_ul_mimo);
|
||||||
|
hdd_info("Name = [%s] Value = [%d]", CFG_ENABLE_UL_OFDMA_NAME,
|
||||||
|
hdd_ctx->config->enable_ul_ofdma);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hdd_update_he_cap_in_cfg() - update HE cap in global CFG
|
||||||
|
* @hdd_ctx: pointer to hdd context
|
||||||
|
*
|
||||||
|
* This API will update the HE config in CFG after taking intersection
|
||||||
|
* of INI and firmware capabilities provided reading CFG
|
||||||
|
*
|
||||||
|
* Return: 0 on success and errno on failure
|
||||||
|
*/
|
||||||
|
int hdd_update_he_cap_in_cfg(hdd_context_t *hdd_ctx)
|
||||||
|
{
|
||||||
|
uint32_t val, val1 = 0;
|
||||||
|
QDF_STATUS status;
|
||||||
|
int ret;
|
||||||
|
struct hdd_config *config = hdd_ctx->config;
|
||||||
|
|
||||||
|
status = sme_cfg_get_int(hdd_ctx->hHal, WNI_CFG_HE_UL_MUMIMO, &val);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
hdd_err("could not get WNI_CFG_HE_UL_MUMIMO");
|
||||||
|
return qdf_status_to_os_return(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* In val,
|
||||||
|
* Bit 1 - corresponds to UL MIMO
|
||||||
|
* Bit 2 - corresponds to UL OFDMA
|
||||||
|
*/
|
||||||
|
if (val & 0x1)
|
||||||
|
val1 = config->enable_ul_mimo & 0x1;
|
||||||
|
|
||||||
|
if ((val >> 1) & 0x1)
|
||||||
|
val1 |= ((config->enable_ul_ofdma & 0x1) << 1);
|
||||||
|
|
||||||
|
ret = hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_UL_MUMIMO, val1);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* hdd_he_set_sme_config() - set HE related SME config param
|
||||||
|
* @sme_config: pointer to SME config
|
||||||
|
* @config: pointer to INI config
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void hdd_he_set_sme_config(tSmeConfigParams *sme_config,
|
||||||
|
struct hdd_config *config)
|
||||||
|
{
|
||||||
|
sme_config->csrConfig.enable_ul_ofdma = config->enable_ul_ofdma;
|
||||||
|
sme_config->csrConfig.enable_ul_mimo = config->enable_ul_mimo;
|
||||||
|
}
|
||||||
|
@@ -1311,6 +1311,10 @@ typedef struct tagCsrConfigParam {
|
|||||||
uint32_t rx_aggregation_size;
|
uint32_t rx_aggregation_size;
|
||||||
struct wmi_per_roam_config per_roam_config;
|
struct wmi_per_roam_config per_roam_config;
|
||||||
bool enable_bcast_probe_rsp;
|
bool enable_bcast_probe_rsp;
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
bool enable_ul_ofdma;
|
||||||
|
bool enable_ul_mimo;
|
||||||
|
#endif
|
||||||
} tCsrConfigParam;
|
} tCsrConfigParam;
|
||||||
|
|
||||||
/* Tush */
|
/* Tush */
|
||||||
|
@@ -639,6 +639,10 @@ typedef struct tagCsrConfig {
|
|||||||
uint32_t rx_aggregation_size;
|
uint32_t rx_aggregation_size;
|
||||||
struct wmi_per_roam_config per_roam_config;
|
struct wmi_per_roam_config per_roam_config;
|
||||||
bool enable_bcast_probe_rsp;
|
bool enable_bcast_probe_rsp;
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
bool enable_ul_ofdma;
|
||||||
|
bool enable_ul_mimo;
|
||||||
|
#endif
|
||||||
} tCsrConfig;
|
} tCsrConfig;
|
||||||
|
|
||||||
typedef struct tagCsrChannelPowerInfo {
|
typedef struct tagCsrChannelPowerInfo {
|
||||||
|
@@ -2167,6 +2167,46 @@ uint32_t csr_convert_phy_cb_state_to_ini_value(ePhyChanBondState phyCbState)
|
|||||||
return cbIniValue;
|
return cbIniValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_11AX
|
||||||
|
/**
|
||||||
|
* csr_update_he_config_param() - Update MAC context with HE config param
|
||||||
|
* @mac_ctx: pointer to MAC context
|
||||||
|
* @param: pointer to CSR config params
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
static void csr_update_he_config_param(tpAniSirGlobal mac_ctx,
|
||||||
|
tCsrConfigParam *param)
|
||||||
|
{
|
||||||
|
mac_ctx->roam.configParam.enable_ul_ofdma = param->enable_ul_ofdma;
|
||||||
|
mac_ctx->roam.configParam.enable_ul_mimo = param->enable_ul_mimo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* csr_get_he_config_param() - Get HE config param from MAC context
|
||||||
|
* @param: pointer to CSR config params
|
||||||
|
* @mac_ctx: pointer to MAC context
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
static void csr_get_he_config_param(tCsrConfigParam *param,
|
||||||
|
tpAniSirGlobal mac_ctx)
|
||||||
|
{
|
||||||
|
param->enable_ul_ofdma = mac_ctx->roam.configParam.enable_ul_ofdma;
|
||||||
|
param->enable_ul_mimo = mac_ctx->roam.configParam.enable_ul_mimo;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static inline void csr_update_he_config_param(tpAniSirGlobal mac_ctx,
|
||||||
|
tCsrConfigParam *param)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void csr_get_he_config_param(tCsrConfigParam *param,
|
||||||
|
tpAniSirGlobal mac_ctx)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
|
QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
|
||||||
tCsrConfigParam *pParam)
|
tCsrConfigParam *pParam)
|
||||||
{
|
{
|
||||||
@@ -2624,6 +2664,7 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
|
|||||||
pMac->roam.configParam.enable_bcast_probe_rsp =
|
pMac->roam.configParam.enable_bcast_probe_rsp =
|
||||||
pParam->enable_bcast_probe_rsp;
|
pParam->enable_bcast_probe_rsp;
|
||||||
|
|
||||||
|
csr_update_he_config_param(pMac, pParam);
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -2860,6 +2901,8 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
|
|||||||
pParam->enable_bcast_probe_rsp =
|
pParam->enable_bcast_probe_rsp =
|
||||||
pMac->roam.configParam.enable_bcast_probe_rsp;
|
pMac->roam.configParam.enable_bcast_probe_rsp;
|
||||||
|
|
||||||
|
csr_get_he_config_param(pParam, pMac);
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Viittaa uudesa ongelmassa
Block a user