Explorar o código

qcacld-3.0: Add support for new ini param RoamCU_MonitorTime

Add support for new ini param RoamCU_MonitorTime. This param
is similar to the existing bss_load_sample_time but unit
change

Change-Id: Iae05a9568aa29a5f6a9cfc771e66184e51963ab6
CRs-Fixed: 3015967
Jyoti Kumari %!s(int64=3) %!d(string=hai) anos
pai
achega
2df32ba66e

+ 11 - 1
components/mlme/core/src/wlan_mlme_main.c

@@ -1855,10 +1855,20 @@ static void
 mlme_init_bss_load_trigger_params(struct wlan_objmgr_psoc *psoc,
 				  struct bss_load_trigger *bss_load_trig)
 {
+	bool val = false;
+
 	bss_load_trig->enabled =
 		cfg_get(psoc, CFG_ENABLE_BSS_LOAD_TRIGGERED_ROAM);
 	bss_load_trig->threshold = cfg_get(psoc, CFG_BSS_LOAD_THRESHOLD);
-	bss_load_trig->sample_time = cfg_get(psoc, CFG_BSS_LOAD_SAMPLE_TIME);
+
+	ucfg_mlme_get_connection_roaming_ini_present(psoc, &val);
+	if (val)
+		bss_load_trig->sample_time =
+				cfg_get(psoc, CFG_ROAM_CU_MONITOR_TIME) * 1000;
+	else
+		bss_load_trig->sample_time = cfg_get(psoc,
+						     CFG_BSS_LOAD_SAMPLE_TIME);
+
 	bss_load_trig->rssi_threshold_5ghz =
 			cfg_get(psoc, CFG_BSS_LOAD_TRIG_5G_RSSI_THRES);
 	bss_load_trig->rssi_threshold_24ghz =

+ 25 - 0
components/mlme/dispatcher/inc/cfg_mlme_lfr.h

@@ -2017,6 +2017,30 @@
 			CFG_VALUE_OR_DEFAULT, \
 			"bss load sampling time")
 
+/*
+ * <ini>
+ * RoamCU_MonitorTime - Time in seconds for which the bss load values
+ * obtained from the beacons is sampled.
+ * @Min: 0
+ * @Max: 20
+ * @Default: 10
+ *
+ * Related: None
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_ROAM_CU_MONITOR_TIME CFG_INI_UINT( \
+			"RoamCU_MonitorTime", \
+			0, \
+			20, \
+			10, \
+			CFG_VALUE_OR_DEFAULT, \
+			"bss load sampling time")
+
 /*
  * <ini>
  * bss_load_trigger_5g_rssi_threshold/RoamCU_5GRSSIRange -
@@ -3029,6 +3053,7 @@
 	CFG(CFG_ENABLE_BSS_LOAD_TRIGGERED_ROAM) \
 	CFG(CFG_BSS_LOAD_THRESHOLD) \
 	CFG(CFG_BSS_LOAD_SAMPLE_TIME) \
+	CFG(CFG_ROAM_CU_MONITOR_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) \