qcacld-3.0: Add gEnableANI INI item
Per OEM request an INI item is needed to enable/disable the Adaptive Noise Immunity feature, so add support for gEnableANI. Change-Id: Ie6867c0024a716bf65dca1eeab8dd2b58141eff7 CRs-Fixed: 2028697
This commit is contained in:

committed by
Sandeep Puligilla

parent
ea24508070
commit
12a744bad0
@@ -9415,6 +9415,28 @@ enum l1ss_sleep_allowed {
|
||||
#define CFG_L1SS_SLEEP_ALLOWED_MAX (L1SS_SLEEP_ALLOWED_ALWAYS)
|
||||
#define CFG_L1SS_SLEEP_ALLOWED_DEFAULT (L1SS_SLEEP_ALLOWED_STA_CONNECTED)
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* gEnableANI - Enable Adaptive Noise Immunity
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 1
|
||||
*
|
||||
* This ini is used to enable or disable Adaptive Noise Immunity.
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: ANI
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_ANI_NAME "gEnableANI"
|
||||
#define CFG_ENABLE_ANI_MIN (0)
|
||||
#define CFG_ENABLE_ANI_MAX (1)
|
||||
#define CFG_ENABLE_ANI_DEFAULT (1)
|
||||
|
||||
/*
|
||||
* Type declarations
|
||||
*/
|
||||
@@ -10131,6 +10153,7 @@ struct hdd_config {
|
||||
#endif
|
||||
enum l1ss_sleep_allowed l1ss_sleep_allowed;
|
||||
uint32_t arp_ac_category;
|
||||
bool ani_enabled;
|
||||
};
|
||||
|
||||
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
|
||||
|
@@ -4294,6 +4294,13 @@ REG_TABLE_ENTRY g_registry_table[] = {
|
||||
CFG_ARP_AC_CATEGORY_DEFAULT,
|
||||
CFG_ARP_AC_CATEGORY_MIN,
|
||||
CFG_ARP_AC_CATEGORY_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_ENABLE_ANI_NAME, WLAN_PARAM_Integer,
|
||||
struct hdd_config, ani_enabled,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_ENABLE_ANI_DEFAULT,
|
||||
CFG_ENABLE_ANI_MIN,
|
||||
CFG_ENABLE_ANI_MAX),
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -8274,6 +8274,21 @@ static int hdd_set_alternative_chainmask_enabled(hdd_context_t *hdd_ctx)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int hdd_set_ani_enabled(hdd_context_t *hdd_ctx)
|
||||
{
|
||||
int vdev_id = 0;
|
||||
int param_id = WMI_PDEV_PARAM_ANI_ENABLE;
|
||||
int value = hdd_ctx->config->ani_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_ANI_ENABLE failed %d", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_pre_enable_configure() - Configurations prior to cds_enable
|
||||
* @hdd_ctx: HDD context
|
||||
@@ -8335,6 +8350,10 @@ static int hdd_pre_enable_configure(hdd_context_t *hdd_ctx)
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = hdd_set_ani_enabled(hdd_ctx);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
hdd_program_country_code(hdd_ctx);
|
||||
|
||||
ret = wma_cli_set_command(0, WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
|
||||
|
Reference in New Issue
Block a user