qcacld-3.0: Add support for new chainmask controls
Firmware has implemented two new chanimask control parameters: WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME Add two new INI parameters to control the values of these firmware parameters. Change-Id: Iafe8d38684c5f2ab3f4150eee722461ec21e3e21 CRs-Fixed: 2011634
This commit is contained in:
parent
3c62c86b70
commit
a89e25da8a
@ -7101,6 +7101,53 @@ typedef enum {
|
||||
#define CFG_TX_CHAIN_MASK_1SS_MAX (3)
|
||||
#define CFG_TX_CHAIN_MASK_1SS_DEFAULT (1)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gEnableSmartChainmask - Enable Smart Chainmask
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to enable/disable the Smart Chainmask feature via
|
||||
* the WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME firmware parameter.
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: STA
|
||||
*
|
||||
* Usage: Internal/External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_SMART_CHAINMASK_NAME "gEnableSmartChainmask"
|
||||
#define CFG_ENABLE_SMART_CHAINMASK_MIN (0)
|
||||
#define CFG_ENABLE_SMART_CHAINMASK_MAX (1)
|
||||
#define CFG_ENABLE_SMART_CHAINMASK_DEFAULT (0)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gEnableAlternativeChainmask - Enable Co-Ex Alternative Chainmask
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to enable/disable the Co-ex Alternative Chainmask
|
||||
* feature via the WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME
|
||||
* firmware parameter.
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: STA
|
||||
*
|
||||
* Usage: Internal/External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_COEX_ALT_CHAINMASK_NAME "gEnableAlternativeChainmask"
|
||||
#define CFG_ENABLE_COEX_ALT_CHAINMASK_MIN (0)
|
||||
#define CFG_ENABLE_COEX_ALT_CHAINMASK_MAX (1)
|
||||
#define CFG_ENABLE_COEX_ALT_CHAINMASK_DEFAULT (0)
|
||||
|
||||
/*
|
||||
* set the self gen power value from
|
||||
* 0 to 0xffff
|
||||
@ -9351,6 +9398,8 @@ struct hdd_config {
|
||||
uint32_t dual_mac_feature_disable;
|
||||
bool tx_chain_mask_cck;
|
||||
uint8_t tx_chain_mask_1ss;
|
||||
bool smart_chainmask_enabled;
|
||||
bool alternative_chainmask_enabled;
|
||||
uint16_t self_gen_frm_pwr;
|
||||
#ifdef FEATURE_WLAN_SCAN_PNO
|
||||
bool pno_channel_prediction;
|
||||
|
@ -3679,6 +3679,20 @@ REG_TABLE_ENTRY g_registry_table[] = {
|
||||
CFG_TX_CHAIN_MASK_1SS_MIN,
|
||||
CFG_TX_CHAIN_MASK_1SS_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_ENABLE_SMART_CHAINMASK_NAME, WLAN_PARAM_Integer,
|
||||
struct hdd_config, smart_chainmask_enabled,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_ENABLE_SMART_CHAINMASK_DEFAULT,
|
||||
CFG_ENABLE_SMART_CHAINMASK_MIN,
|
||||
CFG_ENABLE_SMART_CHAINMASK_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_ENABLE_COEX_ALT_CHAINMASK_NAME, WLAN_PARAM_Integer,
|
||||
struct hdd_config, alternative_chainmask_enabled,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_ENABLE_COEX_ALT_CHAINMASK_DEFAULT,
|
||||
CFG_ENABLE_COEX_ALT_CHAINMASK_MIN,
|
||||
CFG_ENABLE_COEX_ALT_CHAINMASK_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_SELF_GEN_FRM_PWR, WLAN_PARAM_Integer,
|
||||
struct hdd_config, self_gen_frm_pwr,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
|
@ -7907,6 +7907,37 @@ static void hdd_tsf_init(hdd_context_t *hdd_ctx)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int hdd_set_smart_chainmask_enabled(hdd_context_t *hdd_ctx)
|
||||
{
|
||||
int vdev_id = 0;
|
||||
int param_id = WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME;
|
||||
int value = hdd_ctx->config->smart_chainmask_enabled;
|
||||
int vpdev = PDEV_CMD;
|
||||
int ret;
|
||||
|
||||
ret = wma_cli_set_command(vdev_id, param_id, value, vpdev);
|
||||
if (ret)
|
||||
hdd_err("WMI_PDEV_PARAM_SMART_CHAINMASK_SCHEME failed %d", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int hdd_set_alternative_chainmask_enabled(hdd_context_t *hdd_ctx)
|
||||
{
|
||||
int vdev_id = 0;
|
||||
int param_id = WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME;
|
||||
int value = hdd_ctx->config->alternative_chainmask_enabled;
|
||||
int vpdev = PDEV_CMD;
|
||||
int ret;
|
||||
|
||||
ret = wma_cli_set_command(vdev_id, param_id, value, vpdev);
|
||||
if (ret)
|
||||
hdd_err("WMI_PDEV_PARAM_ALTERNATIVE_CHAINMASK_SCHEME failed %d",
|
||||
ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_pre_enable_configure() - Configurations prior to cds_enable
|
||||
* @hdd_ctx: HDD context
|
||||
@ -7953,6 +7984,14 @@ static int hdd_pre_enable_configure(hdd_context_t *hdd_ctx)
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = hdd_set_smart_chainmask_enabled(hdd_ctx);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = hdd_set_alternative_chainmask_enabled(hdd_ctx);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
hdd_program_country_code(hdd_ctx);
|
||||
|
||||
status = hdd_set_sme_chan_list(hdd_ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user