From 742495dd303dab6547975fe0c3cf64177cd5d251 Mon Sep 17 00:00:00 2001 From: Ravi Joshi Date: Mon, 9 Nov 2015 18:56:53 -0800 Subject: [PATCH] qcacld-3.0: Add an INI item to configure LFR subnet detection Add an INI item to configure LFR subnet detection feature. LFR subnet detection is enabled by default. Change-Id: Ifb4bba60dfcd0347137f4a690db50b0c453d1ae8 CRs-Fixed: 876335 --- core/hdd/inc/wlan_hdd_cfg.h | 18 ++++++++++++++++++ core/hdd/src/wlan_hdd_cfg.c | 14 ++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 3d5efe59ee..e6a7d36ec9 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -2818,6 +2818,21 @@ enum dot11p_mode { #define CFG_FIRST_SCAN_BUCKET_THRESHOLD_MAX (-30) #define CFG_FIRST_SCAN_BUCKET_THRESHOLD_DEFAULT (-30) +#ifdef FEATURE_LFR_SUBNET_DETECTION +/* + * Enable IP subnet detection during legacy fast roming version 3. + * Legacy fast roaming could roam across IP subnets without host + * processors' knowledge. This feature enables firmware to wake up + * the host processor if it successfully determines change in the IP subnet. + * Change in IP subnet could potentially cause disruption in IP connnectivity + * if IP address is not refreshed. + */ +#define CFG_ENABLE_LFR_SUBNET_DETECTION "gLFRSubnetDetectionEnable" +#define CFG_ENABLE_LFR_SUBNET_MIN (0) +#define CFG_ENABLE_LFR_SUBNET_MAX (1) +#define CFG_ENABLE_LFR_SUBNET_DEFAULT (1) +#endif /* FEATURE_LFR_SUBNET_DETECTION */ + /*--------------------------------------------------------------------------- Type declarations -------------------------------------------------------------------------*/ @@ -3400,6 +3415,9 @@ struct hdd_config { int8_t early_stop_scan_max_threshold; int8_t first_scan_bucket_threshold; uint8_t ht_mpdu_density; +#ifdef FEATURE_LFR_SUBNET_DETECTION + bool enable_lfr_subnet_detection; +#endif }; #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var)) diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 5192d0b5a4..b15405ef33 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -3640,6 +3640,14 @@ REG_TABLE_ENTRY g_registry_table[] = { CFG_FIRST_SCAN_BUCKET_THRESHOLD_MIN, CFG_FIRST_SCAN_BUCKET_THRESHOLD_MAX), +#ifdef FEATURE_LFR_SUBNET_DETECTION + REG_VARIABLE(CFG_ENABLE_LFR_SUBNET_DETECTION, WLAN_PARAM_Integer, + struct hdd_config, enable_lfr_subnet_detection, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_ENABLE_LFR_SUBNET_DEFAULT, + CFG_ENABLE_LFR_SUBNET_MIN, + CFG_ENABLE_LFR_SUBNET_MAX), +#endif }; @@ -5193,6 +5201,12 @@ void hdd_cfg_print(hdd_context_t *pHddCtx) CFG_HT_MPDU_DENSITY_NAME, pHddCtx->config->ht_mpdu_density); + +#ifdef FEATURE_LFR_SUBNET_DETECTION + hddLog(LOGE, "Name = [%s] Value = [%d]", + CFG_ENABLE_LFR_SUBNET_DETECTION, + pHddCtx->config->enable_lfr_subnet_detection); +#endif }