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:
Jeff Johnson
2017-04-04 08:19:37 -07:00
committed by Sandeep Puligilla
parent ea24508070
commit 12a744bad0
3 changed files with 49 additions and 0 deletions

View File

@@ -9415,6 +9415,28 @@ enum l1ss_sleep_allowed {
#define CFG_L1SS_SLEEP_ALLOWED_MAX (L1SS_SLEEP_ALLOWED_ALWAYS) #define CFG_L1SS_SLEEP_ALLOWED_MAX (L1SS_SLEEP_ALLOWED_ALWAYS)
#define CFG_L1SS_SLEEP_ALLOWED_DEFAULT (L1SS_SLEEP_ALLOWED_STA_CONNECTED) #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 * Type declarations
*/ */
@@ -10131,6 +10153,7 @@ struct hdd_config {
#endif #endif
enum l1ss_sleep_allowed l1ss_sleep_allowed; enum l1ss_sleep_allowed l1ss_sleep_allowed;
uint32_t arp_ac_category; uint32_t arp_ac_category;
bool ani_enabled;
}; };
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var)) #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

View File

@@ -4294,6 +4294,13 @@ REG_TABLE_ENTRY g_registry_table[] = {
CFG_ARP_AC_CATEGORY_DEFAULT, CFG_ARP_AC_CATEGORY_DEFAULT,
CFG_ARP_AC_CATEGORY_MIN, CFG_ARP_AC_CATEGORY_MIN,
CFG_ARP_AC_CATEGORY_MAX), 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),
}; };
/** /**

View File

@@ -8274,6 +8274,21 @@ static int hdd_set_alternative_chainmask_enabled(hdd_context_t *hdd_ctx)
return ret; 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_pre_enable_configure() - Configurations prior to cds_enable
* @hdd_ctx: HDD context * @hdd_ctx: HDD context
@@ -8335,6 +8350,10 @@ static int hdd_pre_enable_configure(hdd_context_t *hdd_ctx)
if (ret) if (ret)
goto out; goto out;
ret = hdd_set_ani_enabled(hdd_ctx);
if (ret)
goto out;
hdd_program_country_code(hdd_ctx); hdd_program_country_code(hdd_ctx);
ret = wma_cli_set_command(0, WMI_PDEV_PARAM_ARP_AC_OVERRIDE, ret = wma_cli_set_command(0, WMI_PDEV_PARAM_ARP_AC_OVERRIDE,