Browse Source

qcacld-3.0: Refactor six LFR INI cfg

Based on new cfg component, refactor below LFR INI cfg and remove
unused legacy codes.
 - CFG_ENABLE_LFR_SUBNET_DETECTION
 - CFG_ROAM_HO_DELAY_FOR_RX_NAME
 - CFG_MIN_DELAY_BTW_ROAM_SCAN_NAME
 - CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_NAME
 - CFG_ROAM_FT_OPEN_ENABLE_NAME
 - CFG_ROAM_FORCE_RSSI_TRIGGER_NAME

Change-Id: Iaa738c6416dffe8159b49d59fc9a514da2fbb7ff
CRs-Fixed: 2376637
Wu Gao 6 years ago
parent
commit
6294afcfa7

+ 25 - 2
components/mlme/core/src/wlan_mlme_main.c

@@ -1345,6 +1345,20 @@ static void mlme_init_ese_cfg(struct wlan_objmgr_psoc *psoc,
 }
 #endif
 
+#ifdef FEATURE_LFR_SUBNET_DETECTION
+static void mlme_init_subnet_detection(struct wlan_objmgr_psoc *psoc,
+				       struct wlan_mlme_lfr_cfg *lfr)
+{
+	lfr->enable_lfr_subnet_detection =
+		cfg_get(psoc, CFG_LFR3_ENABLE_SUBNET_DETECTION);
+}
+#else
+static void mlme_init_subnet_detection(struct wlan_objmgr_psoc *psoc,
+				       struct wlan_mlme_lfr_cfg *lfr)
+{
+}
+#endif
+
 static void
 mlme_init_bss_load_trigger_params(struct wlan_objmgr_psoc *psoc,
 				  struct bss_load_trigger *bss_load_trig)
@@ -1366,8 +1380,6 @@ static void mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_LFR_ENABLE_FAST_ROAM_IN_CONCURRENCY);
 	lfr->early_stop_scan_enable =
 		cfg_get(psoc, CFG_LFR_EARLY_STOP_SCAN_ENABLE);
-	lfr->lfr3_enable_subnet_detection =
-		cfg_get(psoc, CFG_LFR3_ENABLE_SUBNET_DETECTION);
 	lfr->enable_5g_band_pref =
 		cfg_get(psoc, CFG_LFR_ENABLE_5G_BAND_PREF);
 	lfr->lfr_enabled = cfg_get(psoc, CFG_LFR_FEATURE_ENABLED);
@@ -1502,9 +1514,20 @@ static void mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc,
 			      &neighbor_scan_chan_list_num);
 	lfr->neighbor_scan_channel_list_num =
 				(uint8_t)neighbor_scan_chan_list_num;
+	lfr->ho_delay_for_rx =
+		cfg_get(psoc, CFG_LFR3_ROAM_HO_DELAY_FOR_RX);
+	lfr->min_delay_btw_roam_scans =
+		cfg_get(psoc, CFG_LFR_MIN_DELAY_BTW_ROAM_SCAN);
+	lfr->roam_trigger_reason_bitmask =
+		cfg_get(psoc, CFG_LFR_ROAM_SCAN_TRIGGER_REASON_BITMASK);
+	lfr->enable_ftopen =
+		cfg_get(psoc, CFG_LFR_ROAM_FT_OPEN_ENABLE);
+	lfr->roam_force_rssi_trigger =
+		cfg_get(psoc, CFG_LFR_ROAM_FORCE_RSSI_TRIGGER);
 	mlme_init_roam_offload_cfg(psoc, lfr);
 	mlme_init_ese_cfg(psoc, lfr);
 	mlme_init_bss_load_trigger_params(psoc, &lfr->bss_load_trig);
+	mlme_init_subnet_detection(psoc, lfr);
 }
 
 static uint32_t

+ 186 - 30
components/mlme/dispatcher/inc/cfg_mlme_lfr.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -350,33 +350,6 @@
 	CFG_VALUE_OR_DEFAULT, \
 	"Set first scan bucket")
 
-/*
- * <ini>
- * gLFRSubnetDetectionEnable - Enable LFR3 subnet detection
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * 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.
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_LFR3_ENABLE_SUBNET_DETECTION CFG_INI_BOOL( \
-	"gLFRSubnetDetectionEnable", \
-	1, \
-	"Set early stop scan")
-
 /*
  * <ini>
  * gtraffic_threshold - Dense traffic threshold
@@ -1920,6 +1893,151 @@
 			CFG_VALUE_OR_DEFAULT, \
 			"bss load sampling time")
 
+/*
+ * <ini>
+ * ho_delay_for_rx - Delay hand-off (in msec) by this duration to receive
+ * pending rx frames from current BSS
+ * @Min: 0
+ * @Max: 200
+ * @Default: 0
+ *
+ * For LFR 3.0 roaming scenario, once roam candidate is found, firmware
+ * waits for minimum this much duration to receive pending rx frames from
+ * current BSS before switching to new channel for handoff to new AP.
+ *
+ * Related: None
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_LFR3_ROAM_HO_DELAY_FOR_RX CFG_INI_UINT( \
+	"ho_delay_for_rx", \
+	0, \
+	200, \
+	0, \
+	CFG_VALUE_OR_DEFAULT, \
+	"Delay Hand-off by this duration to receive")
+
+/*
+ * <ini>
+ * min_delay_btw_roam_scans - Min duration (in sec) allowed btw two
+ * consecutive roam scans
+ * @Min: 0
+ * @Max: 60
+ * @Default: 10
+ *
+ * Roam scan is not allowed if duration between two consecutive
+ * roam scans is less than this time.
+ *
+ * Related: None
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_LFR_MIN_DELAY_BTW_ROAM_SCAN CFG_INI_UINT( \
+	"min_delay_btw_roam_scans", \
+	0, \
+	60, \
+	10, \
+	CFG_VALUE_OR_DEFAULT, \
+	"Min duration")
+
+/*
+ * <ini>
+ * roam_trigger_reason_bitmask - Contains roam_trigger_reasons
+ * @Min: 0
+ * @Max: 0xFFFFFFFF
+ * @Default: 0x10DA
+ *
+ * Bitmask containing roam_trigger_reasons for which
+ * min_delay_btw_roam_scans constraint should be applied.
+ * Currently supported bit positions are as follows:
+ * Bit 0 is reserved in the firmware.
+ * WMI_ROAM_TRIGGER_REASON_PER - 1
+ * WMI_ROAM_TRIGGER_REASON_BMISS - 2
+ * WMI_ROAM_TRIGGER_REASON_LOW_RSSI - 3
+ * WMI_ROAM_TRIGGER_REASON_HIGH_RSSI - 4
+ * WMI_ROAM_TRIGGER_REASON_PERIODIC - 5
+ * WMI_ROAM_TRIGGER_REASON_MAWC - 6
+ * WMI_ROAM_TRIGGER_REASON_DENSE - 7
+ * WMI_ROAM_TRIGGER_REASON_BACKGROUND - 8
+ * WMI_ROAM_TRIGGER_REASON_FORCED - 9
+ * WMI_ROAM_TRIGGER_REASON_BTM - 10
+ * WMI_ROAM_TRIGGER_REASON_UNIT_TEST - 11
+ * WMI_ROAM_TRIGGER_REASON_BSS_LOAD - 12
+ * WMI_ROAM_TRIGGER_REASON_MAX - 13
+ *
+ * For Ex: 0xDA (PER, LOW_RSSI, HIGH_RSSI, MAWC, DENSE)
+ *
+ * Related: None
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_LFR_ROAM_SCAN_TRIGGER_REASON_BITMASK CFG_INI_UINT( \
+	"roam_trigger_reason_bitmask", \
+	0, \
+	0xFFFFFFFF, \
+	0x10DA, \
+	CFG_VALUE_OR_DEFAULT, \
+	"Contains roam_trigger_reasons")
+
+/*
+ * <ini>
+ * enable_ftopen - enable/disable FT open feature
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This INI is used to enable/disable FT open feature
+ *
+ * Related: None
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_LFR_ROAM_FT_OPEN_ENABLE CFG_INI_BOOL( \
+	"enable_ftopen", \
+	1, \
+	"enable/disable FT open feature")
+
+/*
+ * <ini>
+ * roam_force_rssi_trigger - To force RSSI trigger
+ * irrespective of channel list type
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to set roam scan mode
+ * WMI_ROAM_SCAN_MODE_RSSI_CHANGE, irrespective of whether
+ * channel list type is CHANNEL_LIST_STATIC or not
+ *
+ * Related: None
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_LFR_ROAM_FORCE_RSSI_TRIGGER CFG_INI_BOOL( \
+	"roam_force_rssi_trigger", \
+	1, \
+	"To force RSSI trigger")
+
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 /*
  * <ini>
@@ -1975,6 +2093,39 @@
 #define LFR_ESE_ALL
 #endif
 
+#ifdef FEATURE_LFR_SUBNET_DETECTION
+/*
+ * <ini>
+ * gLFRSubnetDetectionEnable - Enable LFR3 subnet detection
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * 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.
+ *
+ * Related: None
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_LFR3_ENABLE_SUBNET_DETECTION CFG_INI_BOOL( \
+	"gLFRSubnetDetectionEnable", \
+	1, \
+	"Enable LFR3 subnet detection")
+
+#define LFR_SUBNET_DETECTION_ALL CFG(CFG_LFR3_ENABLE_SUBNET_DETECTION)
+#else
+#define LFR_SUBNET_DETECTION_ALL
+#endif
+
 #define CFG_LFR_ALL \
 	CFG(CFG_LFR_MAWC_ROAM_ENABLED) \
 	CFG(CFG_LFR_MAWC_ROAM_TRAFFIC_THRESHOLD) \
@@ -1988,7 +2139,6 @@
 	CFG(CFG_LFR_EARLY_STOP_SCAN_MIN_THRESHOLD) \
 	CFG(CFG_LFR_EARLY_STOP_SCAN_MAX_THRESHOLD) \
 	CFG(CFG_LFR_FIRST_SCAN_BUCKET_THRESHOLD) \
-	CFG(CFG_LFR3_ENABLE_SUBNET_DETECTION) \
 	CFG(CFG_LFR_ROAM_DENSE_TRAFFIC_THRESHOLD) \
 	CFG(CFG_LFR_ROAM_DENSE_RSSI_THRE_OFFSET) \
 	CFG(CFG_LFR_ROAM_DENSE_MIN_APS) \
@@ -2048,7 +2198,13 @@
 	CFG(CFG_ENABLE_BSS_LOAD_TRIGGERED_ROAM) \
 	CFG(CFG_BSS_LOAD_THRESHOLD) \
 	CFG(CFG_BSS_LOAD_SAMPLE_TIME) \
+	CFG(CFG_LFR3_ROAM_HO_DELAY_FOR_RX) \
+	CFG(CFG_LFR_MIN_DELAY_BTW_ROAM_SCAN) \
+	CFG(CFG_LFR_ROAM_SCAN_TRIGGER_REASON_BITMASK) \
+	CFG(CFG_LFR_ROAM_FT_OPEN_ENABLE) \
+	CFG(CFG_LFR_ROAM_FORCE_RSSI_TRIGGER) \
 	ROAM_OFFLOAD_ALL \
-	LFR_ESE_ALL
+	LFR_ESE_ALL \
+	LFR_SUBNET_DETECTION_ALL
 
 #endif /* CFG_MLME_LFR_H__ */

+ 14 - 2
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -1221,7 +1221,6 @@ struct bss_load_trigger {
  * @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
  * @lfr3_roaming_offload:           Enable/disable roam offload feature
  * @early_stop_scan_enable:         Set early stop scan
- * @lfr3_enable_subnet_detection:   Enable LFR3 subnet detection
  * @enable_5g_band_pref:            Enable preference for 5G from INI
  * @ese_enabled:                    Enable ESE feature
  * @lfr_enabled:                    Enable fast roaming
@@ -1289,6 +1288,12 @@ struct bss_load_trigger {
  * @delay_before_vdev_stop:Wait time for tx complete before vdev stop
  * @neighbor_scan_channel_list:     Neighbor scan channel list
  * @neighbor_scan_channel_list_num: Neighbor scan channel list number
+ * @enable_lfr_subnet_detection:    Enable LFR3 subnet detection
+ * @ho_delay_for_rx:                Delay hand-off by this duration to receive
+ * @min_delay_btw_roam_scans:       Min duration
+ * @roam_trigger_reason_bitmask:    Contains roam_trigger_reasons
+ * @enable_ftopen:                  Enable/disable FT open feature
+ * @roam_force_rssi_trigger:        Force RSSI trigger or not
  */
 struct wlan_mlme_lfr_cfg {
 	bool mawc_roam_enabled;
@@ -1297,7 +1302,6 @@ struct wlan_mlme_lfr_cfg {
 	bool lfr3_roaming_offload;
 #endif
 	bool early_stop_scan_enable;
-	bool lfr3_enable_subnet_detection;
 	bool enable_5g_band_pref;
 #ifdef FEATURE_WLAN_ESE
 	bool ese_enabled;
@@ -1367,6 +1371,14 @@ struct wlan_mlme_lfr_cfg {
 	uint8_t delay_before_vdev_stop;
 	uint8_t neighbor_scan_channel_list[CFG_VALID_CHANNEL_LIST_LEN];
 	uint8_t neighbor_scan_channel_list_num;
+#ifdef FEATURE_LFR_SUBNET_DETECTION
+	bool enable_lfr_subnet_detection;
+#endif
+	uint8_t ho_delay_for_rx;
+	uint8_t min_delay_btw_roam_scans;
+	uint32_t roam_trigger_reason_bitmask;
+	bool enable_ftopen;
+	bool roam_force_rssi_trigger;
 	struct bss_load_trigger bss_load_trig;
 };
 

+ 23 - 1
components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -3482,4 +3482,26 @@ QDF_STATUS
 ucfg_mlme_get_scan_11d_interval(struct wlan_objmgr_psoc *psoc,
 				uint32_t *value);
 
+#ifdef FEATURE_LFR_SUBNET_DETECTION
+/**
+ * ucfg_mlme_is_subnet_detection_enabled() - check if sub net detection is
+ * enabled/disabled
+ * @psoc: pointer to psoc object
+ * @value: value that is requested by the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF_STATUS_SUCCESS - in case of success
+ */
+QDF_STATUS
+ucfg_mlme_is_subnet_detection_enabled(struct wlan_objmgr_psoc *psoc, bool *val);
+#else
+static QDF_STATUS
+ucfg_mlme_is_subnet_detection_enabled(struct wlan_objmgr_psoc *psoc, bool *val)
+{
+	*val = false;
+
+	return QDF_STATUS_SUCCESS;
+}
+#endif /* FEATURE_LFR_SUBNET_DETECTION */
 #endif /* _WLAN_MLME_UCFG_API_H_ */

+ 18 - 1
components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -1455,3 +1455,20 @@ ucfg_mlme_get_scan_11d_interval(struct wlan_objmgr_psoc *psoc,
 	*value = mlme_obj->cfg.reg.scan_11d_interval;
 	return QDF_STATUS_SUCCESS;
 }
+
+#ifdef FEATURE_LFR_SUBNET_DETECTION
+QDF_STATUS
+ucfg_mlme_is_subnet_detection_enabled(struct wlan_objmgr_psoc *psoc, bool *val)
+{
+	struct wlan_mlme_psoc_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_obj(psoc);
+	if (!mlme_obj) {
+		*val = cfg_default(CFG_LFR3_ENABLE_SUBNET_DETECTION);
+		return QDF_STATUS_E_INVAL;
+	}
+	*val = mlme_obj->cfg.lfr.enable_lfr_subnet_detection;
+
+	return QDF_STATUS_SUCCESS;
+}
+#endif

+ 0 - 141
core/hdd/inc/wlan_hdd_cfg.h

@@ -519,142 +519,6 @@ enum hdd_dot11_mode {
 #define CFG_ENABLE_LFR_SUBNET_DEFAULT      (1)
 #endif /* FEATURE_LFR_SUBNET_DETECTION */
 
-/*
- * <ini>
- * enable_ftopen - enable/disable FT open feature
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This INI is used to enable/disable FT open feature
-*
-* Related: None
-*
-* Supported Feature: Roaming
-*
-* Usage: External
-*
-* </ini>
-*/
-#define CFG_ROAM_FT_OPEN_ENABLE_NAME                "enable_ftopen"
-#define CFG_ROAM_FT_OPEN_ENABLE_MIN                 (0)
-#define CFG_ROAM_FT_OPEN_ENABLE_MAX                 (1)
-#define CFG_ROAM_FT_OPEN_ENABLE_DEFAULT             (1)
-
-/*
- * <ini>
- * min_delay_btw_roam_scans - Min duration (in sec) allowed btw two
- * consecutive roam scans
- * @Min: 0
- * @Max: 60
- * @Default: 10
- *
- * Roam scan is not allowed if duration between two consecutive
- * roam scans is less than this time.
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_MIN_DELAY_BTW_ROAM_SCAN_NAME    "min_delay_btw_roam_scans"
-#define CFG_MIN_DELAY_BTW_ROAM_SCAN_MIN     (0)
-#define CFG_MIN_DELAY_BTW_ROAM_SCAN_MAX     (60)
-#define CFG_MIN_DELAY_BTW_ROAM_SCAN_DEFAULT (10)
-
-/*
- * <ini>
- * roam_trigger_reason_bitmask - Contains roam_trigger_reasons
- * @Min: 0
- * @Max: 0xFFFFFFFF
- * @Default: 0xDA
- *
- * Bitmask containing roam_trigger_reasons for which
- * min_delay_btw_roam_scans constraint should be applied.
- * Currently supported bit positions are as follows:
- * Bit 0 is reserved in the firmware.
- * WMI_ROAM_TRIGGER_REASON_PER - 1
- * WMI_ROAM_TRIGGER_REASON_BMISS - 2
- * WMI_ROAM_TRIGGER_REASON_LOW_RSSI - 3
- * WMI_ROAM_TRIGGER_REASON_HIGH_RSSI - 4
- * WMI_ROAM_TRIGGER_REASON_PERIODIC - 5
- * WMI_ROAM_TRIGGER_REASON_MAWC - 6
- * WMI_ROAM_TRIGGER_REASON_DENSE - 7
- * WMI_ROAM_TRIGGER_REASON_BACKGROUND - 8
- * WMI_ROAM_TRIGGER_REASON_FORCED - 9
- * WMI_ROAM_TRIGGER_REASON_BTM - 10
- * WMI_ROAM_TRIGGER_REASON_UNIT_TEST - 11
- * WMI_ROAM_TRIGGER_REASON_BSS_LOAD - 12
- * WMI_ROAM_TRIGGER_REASON_MAX - 13
- *
- * For Ex: 0xDA (PER, LOW_RSSI, HIGH_RSSI, MAWC, DENSE)
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_NAME "roam_trigger_reason_bitmask"
-#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MIN     (0)
-#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MAX     (0xFFFFFFFF)
-#define CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_DEFAULT (0x10DA)
-
-/*
- * <ini>
- * ho_delay_for_rx - Delay Hand-off (In msec) by this duration to receive
- * pending rx frames from current BSS
- * @Min: 0
- * @Max: 200
- * @Default: 0
- *
- * For LFR 3.0 roaming scenario, once roam candidate is found, firmware
- * waits for minimum this much duration to receive pending rx frames from
- * current BSS before switching to new channel for handoff to new AP.
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_ROAM_HO_DELAY_FOR_RX_NAME    "ho_delay_for_rx"
-#define CFG_ROAM_HO_DELAY_FOR_RX_MIN     (0)
-#define CFG_ROAM_HO_DELAY_FOR_RX_MAX     (200)
-#define CFG_ROAM_HO_DELAY_FOR_RX_DEFAULT (0)
-
-/*
- * <ini>
- * roam_force_rssi_trigger - To force RSSI trigger
- * irrespective of channel list type
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to set roam scan mode
- * WMI_ROAM_SCAN_MODE_RSSI_CHANGE, irrespective of whether
- * channel list type is CHANNEL_LIST_STATIC or not
- *
- * Related: None
- *
- * Supported Feature: Roaming
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_ROAM_FORCE_RSSI_TRIGGER_NAME  "roam_force_rssi_trigger"
-#define CFG_ROAM_FORCE_RSSI_TRIGGER_MIN     (0)
-#define CFG_ROAM_FORCE_RSSI_TRIGGER_MAX     (1)
-#define CFG_ROAM_FORCE_RSSI_TRIGGER_DEFAULT (1)
-
 /*
  * <ini>
  * gDot11Mode - SAP phy mode
@@ -1378,9 +1242,6 @@ struct hdd_config {
 #ifdef FEATURE_LFR_SUBNET_DETECTION
 	bool enable_lfr_subnet_detection;
 #endif
-	uint32_t ho_delay_for_rx;
-	uint32_t min_delay_btw_roam_scans;
-	uint32_t roam_trigger_reason_bitmask;
 	bool apf_enabled;
 	bool adaptive_dwell_mode_enabled;
 	enum scan_dwelltime_adaptive_mode extscan_adaptive_dwell_mode;
@@ -1411,8 +1272,6 @@ struct hdd_config {
 	bool action_oui_enable;
 	uint8_t action_oui_str[ACTION_OUI_MAXIMUM_ID][ACTION_OUI_MAX_STR_LEN];
 	bool is_unit_test_framework_enabled;
-	bool enable_ftopen;
-	bool roam_force_rssi_trigger;
 	bool enable_change_channel_bandwidth;
 
 	/* HDD converged ini items are listed below this*/

+ 0 - 50
core/hdd/src/wlan_hdd_cfg.c

@@ -268,30 +268,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_LFR_SUBNET_MAX),
 #endif
 
-	REG_VARIABLE(CFG_ROAM_HO_DELAY_FOR_RX_NAME,
-		WLAN_PARAM_Integer, struct hdd_config,
-		ho_delay_for_rx,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_ROAM_HO_DELAY_FOR_RX_DEFAULT,
-		CFG_ROAM_HO_DELAY_FOR_RX_MIN,
-		CFG_ROAM_HO_DELAY_FOR_RX_MAX),
-
-	REG_VARIABLE(CFG_MIN_DELAY_BTW_ROAM_SCAN_NAME,
-		WLAN_PARAM_Integer, struct hdd_config,
-		min_delay_btw_roam_scans,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_MIN_DELAY_BTW_ROAM_SCAN_DEFAULT,
-		CFG_MIN_DELAY_BTW_ROAM_SCAN_MIN,
-		CFG_MIN_DELAY_BTW_ROAM_SCAN_MAX),
-
-	REG_VARIABLE(CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_NAME,
-		WLAN_PARAM_HexInteger, struct hdd_config,
-		roam_trigger_reason_bitmask,
-		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_DEFAULT,
-		CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MIN,
-		CFG_ROAM_SCAN_TRIGGER_REASON_BITMASK_MAX),
-
 	REG_VARIABLE(CFG_ADAPTIVE_EXTSCAN_DWELL_MODE_NAME, WLAN_PARAM_Integer,
 		struct hdd_config, extscan_adaptive_dwell_mode,
 		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -427,21 +403,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_UNIT_TEST_FRAMEWORK_MIN,
 		     CFG_ENABLE_UNIT_TEST_FRAMEWORK_MAX),
 
-	REG_VARIABLE(CFG_ROAM_FT_OPEN_ENABLE_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, enable_ftopen,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_ROAM_FT_OPEN_ENABLE_DEFAULT,
-		     CFG_ROAM_FT_OPEN_ENABLE_MIN,
-		     CFG_ROAM_FT_OPEN_ENABLE_MAX),
-
-	REG_VARIABLE(CFG_ROAM_FORCE_RSSI_TRIGGER_NAME,
-		     WLAN_PARAM_Integer, struct hdd_config,
-		     roam_force_rssi_trigger,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_ROAM_FORCE_RSSI_TRIGGER_DEFAULT,
-		     CFG_ROAM_FORCE_RSSI_TRIGGER_MIN,
-		     CFG_ROAM_FORCE_RSSI_TRIGGER_MAX),
-
 	REG_VARIABLE(CFG_CHANGE_CHANNEL_BANDWIDTH_NAME,
 		     WLAN_PARAM_Integer,
 		     struct hdd_config, enable_change_channel_bandwidth,
@@ -2012,17 +1973,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
 
 	cds_set_multicast_logging(hdd_ctx->config->multicast_host_fw_msgs);
 
-	smeConfig->csrConfig.ho_delay_for_rx =
-		hdd_ctx->config->ho_delay_for_rx;
-	smeConfig->csrConfig.min_delay_btw_roam_scans =
-		hdd_ctx->config->min_delay_btw_roam_scans;
-	smeConfig->csrConfig.roam_trigger_reason_bitmask =
-		hdd_ctx->config->roam_trigger_reason_bitmask;
-	smeConfig->csrConfig.enable_ftopen =
-			hdd_ctx->config->enable_ftopen;
-	smeConfig->csrConfig.roam_force_rssi_trigger =
-			hdd_ctx->config->roam_force_rssi_trigger;
-
 	smeConfig->csrConfig.sta_roam_policy_params.dfs_mode =
 		CSR_STA_ROAM_POLICY_DFS_ENABLED;
 	smeConfig->csrConfig.sta_roam_policy_params.skip_unsafe_channels = 0;

+ 5 - 2
core/hdd/src/wlan_hdd_subnet_detect.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -77,6 +77,7 @@ static int __wlan_hdd_cfg80211_set_gateway_params(struct wiphy *wiphy,
 	struct gateway_param_update_req req = { 0 };
 	int ret;
 	QDF_STATUS status;
+	bool subnet_detection_enabled;
 
 	hdd_enter_dev(dev);
 
@@ -85,7 +86,9 @@ static int __wlan_hdd_cfg80211_set_gateway_params(struct wiphy *wiphy,
 		return ret;
 
 	/* user may have disabled the feature in INI */
-	if (!hdd_ctx->config->enable_lfr_subnet_detection) {
+	ucfg_mlme_is_subnet_detection_enabled(hdd_ctx->psoc,
+					      &subnet_detection_enabled);
+	if (!subnet_detection_enabled) {
 		hdd_info("LFR Subnet Detection disabled in INI");
 		return -ENOTSUPP;
 	}

+ 0 - 5
core/sme/inc/csr_api.h

@@ -1028,9 +1028,6 @@ typedef struct tagCsrConfigParam {
 	bool send_smps_action;
 
 	uint8_t disable_high_ht_mcs_2x2;
-	uint32_t ho_delay_for_rx;
-	uint32_t min_delay_btw_roam_scans;
-	uint32_t roam_trigger_reason_bitmask;
 	uint8_t isCoalesingInIBSSAllowed;
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 	uint8_t cc_switch_mode;
@@ -1064,8 +1061,6 @@ typedef struct tagCsrConfigParam {
 	uint32_t offload_11k_enable_bitmask;
 	bool wep_tkip_in_he;
 	struct csr_neighbor_report_offload_params neighbor_report_offload;
-	bool enable_ftopen;
-	bool roam_force_rssi_trigger;
 } tCsrConfigParam;
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD

+ 0 - 5
core/sme/inc/csr_internal.h

@@ -413,9 +413,6 @@ struct csr_config {
 	 * Enable/Disable heartbeat offload
 	 */
 	bool enableHeartBeatOffload;
-	uint32_t ho_delay_for_rx;
-	uint32_t min_delay_btw_roam_scans;
-	uint32_t roam_trigger_reason_bitmask;
 	uint8_t isCoalesingInIBSSAllowed;
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
 	uint8_t cc_switch_mode;
@@ -438,8 +435,6 @@ struct csr_config {
 	uint32_t offload_11k_enable_bitmask;
 	bool wep_tkip_in_he;
 	struct csr_neighbor_report_offload_params neighbor_report_offload;
-	bool enable_ftopen;
-	bool roam_force_rssi_trigger;
 };
 
 struct csr_channel_powerinfo {

+ 4 - 21
core/sme/src/csr/csr_api_roam.c

@@ -2588,12 +2588,6 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac,
 			pParam->send_smps_action;
 		mac->roam.configParam.disable_high_ht_mcs_2x2 =
 					pParam->disable_high_ht_mcs_2x2;
-		mac->roam.configParam.ho_delay_for_rx =
-			pParam->ho_delay_for_rx;
-		mac->roam.configParam.min_delay_btw_roam_scans =
-			pParam->min_delay_btw_roam_scans;
-		mac->roam.configParam.roam_trigger_reason_bitmask =
-			pParam->roam_trigger_reason_bitmask;
 		mac->roam.configParam.isCoalesingInIBSSAllowed =
 			pParam->isCoalesingInIBSSAllowed;
 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
@@ -2612,9 +2606,6 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac,
 		mac->isCoalesingInIBSSAllowed =
 			pParam->isCoalesingInIBSSAllowed;
 
-		mac->roam.configParam.enable_ftopen =
-			pParam->enable_ftopen;
-
 		/* update interface configuration */
 		mac->sme.max_intf_count = pParam->max_intf_count;
 
@@ -2642,8 +2633,6 @@ QDF_STATUS csr_change_default_config_param(struct mac_context *mac,
 			pParam->is_fils_enabled;
 		mac->roam.configParam.oce_feature_bitmap =
 			pParam->oce_feature_bitmap;
-		mac->roam.configParam.roam_force_rssi_trigger =
-			pParam->roam_force_rssi_trigger;
 
 		csr_update_he_config_param(mac, pParam);
 		csr_set_11k_offload_config_param(&mac->roam.configParam,
@@ -2717,10 +2706,6 @@ QDF_STATUS csr_get_config_param(struct mac_context *mac, tCsrConfigParam *pParam
 #endif
 	pParam->wep_tkip_in_he = cfg_params->wep_tkip_in_he;
 	pParam->disable_high_ht_mcs_2x2 = cfg_params->disable_high_ht_mcs_2x2;
-	pParam->ho_delay_for_rx = cfg_params->ho_delay_for_rx;
-	pParam->min_delay_btw_roam_scans = cfg_params->min_delay_btw_roam_scans;
-	pParam->roam_trigger_reason_bitmask =
-			cfg_params->roam_trigger_reason_bitmask;
 	pParam->isCoalesingInIBSSAllowed = cfg_params->isCoalesingInIBSSAllowed;
 	csr_set_channels(mac, pParam);
 	pParam->obssEnabled = cfg_params->obssEnabled;
@@ -2734,7 +2719,6 @@ QDF_STATUS csr_get_config_param(struct mac_context *mac, tCsrConfigParam *pParam
 	pParam->roam_bad_rssi_thresh_offset_2g =
 		cfg_params->roam_params.roam_bad_rssi_thresh_offset_2g;
 
-	pParam->enable_ftopen = cfg_params->enable_ftopen;
 	pParam->conc_custom_rule1 = cfg_params->conc_custom_rule1;
 	pParam->conc_custom_rule2 = cfg_params->conc_custom_rule2;
 	pParam->is_sta_connection_in_5gz_enabled =
@@ -2760,7 +2744,6 @@ QDF_STATUS csr_get_config_param(struct mac_context *mac, tCsrConfigParam *pParam
 		mac->roam.configParam.is_fils_enabled;
 	pParam->oce_feature_bitmap =
 		mac->roam.configParam.oce_feature_bitmap;
-	pParam->roam_force_rssi_trigger = cfg_params->roam_force_rssi_trigger;
 
 	csr_get_he_config_param(pParam, mac);
 
@@ -17243,17 +17226,17 @@ csr_update_roam_scan_offload_request(struct mac_context *mac_ctx,
 	req_buf->Prefer5GHz = (uint8_t)mac_ctx->mlme_cfg->lfr.roam_prefer_5ghz;
 	req_buf->RoamRssiCatGap = mac_ctx->roam.configParam.bCatRssiOffset;
 	req_buf->Select5GHzMargin = mac_ctx->mlme_cfg->gen.select_5ghz_margin;
-	req_buf->ho_delay_for_rx = mac_ctx->roam.configParam.ho_delay_for_rx;
+	req_buf->ho_delay_for_rx = mac_ctx->mlme_cfg->lfr.ho_delay_for_rx;
 	req_buf->roam_preauth_retry_count =
 			mac_ctx->mlme_cfg->lfr.roam_preauth_retry_count;
 	req_buf->roam_preauth_no_ack_timeout =
 			mac_ctx->mlme_cfg->lfr.roam_preauth_no_ack_timeout;
 	req_buf->min_delay_btw_roam_scans =
-			mac_ctx->roam.configParam.min_delay_btw_roam_scans;
+			mac_ctx->mlme_cfg->lfr.min_delay_btw_roam_scans;
 	req_buf->roam_trigger_reason_bitmask =
-			mac_ctx->roam.configParam.roam_trigger_reason_bitmask;
+			mac_ctx->mlme_cfg->lfr.roam_trigger_reason_bitmask;
 	req_buf->roam_force_rssi_trigger =
-			mac_ctx->roam.configParam.roam_force_rssi_trigger;
+			mac_ctx->mlme_cfg->lfr.roam_force_rssi_trigger;
 
 	/* fill bss load triggered roam related configs */
 	req_buf->bss_load_trig_enabled =

+ 1 - 1
core/sme/src/csr/csr_util.c

@@ -2560,7 +2560,7 @@ bool csr_is_auth_type11r(struct mac_context *mac, eCsrAuthType auth_type,
 	switch (auth_type) {
 	case eCSR_AUTH_TYPE_OPEN_SYSTEM:
 		if (mdie_present &&
-		    mac->roam.configParam.enable_ftopen)
+		    mac->mlme_cfg->lfr.enable_ftopen)
 			return true;
 		break;
 	case eCSR_AUTH_TYPE_FT_RSN_PSK: