Prechádzať zdrojové kódy

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
Ravi Joshi 9 rokov pred
rodič
commit
4a9c884d7b
2 zmenil súbory, kde vykonal 32 pridanie a 0 odobranie
  1. 18 0
      core/hdd/inc/wlan_hdd_cfg.h
  2. 14 0
      core/hdd/src/wlan_hdd_cfg.c

+ 18 - 0
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))

+ 14 - 0
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
 }