瀏覽代碼

qcacld-3.0: Send bss load trigger values to firmware

Introduce the following new WCNSS_qcom.ini values:
"enable_bss_load_roam_trigger"
"bss_load_threshold"
Send these values over the new wmi command,
WMI_ROAM_BSS_LOAD_CONFIG_CMDID if "enable_bss_load_roam_trigger"
is set to true.

This wmi command will be sent to firmware as part of the RSO
start or update config.

Change-Id: Ib2e21904bc7b8d87e5f51824d2694b90a3ac53f2
CRs-Fixed: 2367770
Pragaspathi Thilagaraj 6 年之前
父節點
當前提交
a69f20c2ad
共有 3 個文件被更改,包括 73 次插入0 次删除
  1. 10 0
      mlme/core/src/wlan_mlme_main.c
  2. 52 0
      mlme/dispatcher/inc/cfg_mlme_lfr.h
  3. 11 0
      mlme/dispatcher/inc/wlan_mlme_public_struct.h

+ 10 - 0
mlme/core/src/wlan_mlme_main.c

@@ -1314,6 +1314,15 @@ static void mlme_init_ese_cfg(struct wlan_objmgr_psoc *psoc,
 }
 #endif
 
+static void
+mlme_init_bss_load_trigger_params(struct wlan_objmgr_psoc *psoc,
+				  struct bss_load_trigger *bss_load_trig)
+{
+	bss_load_trig->enabled =
+		cfg_get(psoc, CFG_ENABLE_BSS_LOAD_TRIGGERED_ROAM);
+	bss_load_trig->threshold = cfg_get(psoc, CFG_BSS_LOAD_THRESHOLD);
+}
+
 static void mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc,
 			      struct wlan_mlme_lfr_cfg *lfr)
 {
@@ -1463,6 +1472,7 @@ static void mlme_init_lfr_cfg(struct wlan_objmgr_psoc *psoc,
 				(uint8_t)neighbor_scan_chan_list_num;
 	mlme_init_roam_offload_cfg(psoc, lfr);
 	mlme_init_ese_cfg(psoc, lfr);
+	mlme_init_bss_load_trigger_params(psoc, &lfr->bss_load_trig);
 }
 
 static uint32_t

+ 52 - 0
mlme/dispatcher/inc/cfg_mlme_lfr.h

@@ -1846,6 +1846,56 @@
 	20, \
 	CFG_VALUE_OR_DEFAULT, \
 	"wait time for tx complete before vdev stop")
+/*
+ * <ini>
+ * enable_bss_load_roam_trigger - enable/disable bss load based roam trigger
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini when enabled, allows the firmware to roam when bss load outpaces
+ * the configured bss load threshold. When this ini is disabled, firmware
+ * doesn't consider bss load values to trigger roam.
+ *
+ * Related: None
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_ENABLE_BSS_LOAD_TRIGGERED_ROAM CFG_INI_BOOL( \
+			"enable_bss_load_roam_trigger", \
+			1, \
+			"enable bss load triggered roaming")
+
+/*
+ * <ini>
+ * bss_load_threshold - bss load above which the STA should trigger roaming
+ * @Min: 0
+ * @Max: 100
+ * @Default: 70
+ *
+ * When the bss laod value that is sampled exceeds this threshold, firmware
+ * will trigger roaming if bss load trigger is enabled.
+ *
+ * Related: None
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_BSS_LOAD_THRESHOLD CFG_INI_UINT( \
+		"bss_load_threshold", \
+		0, \
+		100, \
+		70, \
+		CFG_VALUE_OR_DEFAULT, \
+		"bss load threshold")
+
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 /*
@@ -1972,6 +2022,8 @@
 	CFG(CFG_LFR_ROAM_SCAN_N_PROBES) \
 	CFG(CFG_LFR_ROAM_SCAN_HOME_AWAY_TIME) \
 	CFG(CFG_LFR_DELAY_BEFORE_VDEV_STOP) \
+	CFG(CFG_ENABLE_BSS_LOAD_TRIGGERED_ROAM) \
+	CFG(CFG_BSS_LOAD_THRESHOLD) \
 	ROAM_OFFLOAD_ALL \
 	LFR_ESE_ALL
 

+ 11 - 0
mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -1164,6 +1164,16 @@ enum roaming_dfs_channel_type {
 	ROAMING_DFS_CHANNEL_ENABLED_ACTIVE,
 };
 
+/*
+ * struct bss_load_trigger - parameters related to bss load triggered roam
+ * @enabled - flag to check if this trigger is enabled/disabled
+ * @threshold - Bss load threshold value above which roaming should start
+ */
+struct bss_load_trigger {
+	bool enabled;
+	uint32_t threshold;
+};
+
 /*
  * @mawc_roam_enabled:              Enable/Disable MAWC during roaming
  * @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
@@ -1315,6 +1325,7 @@ 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;
+	struct bss_load_trigger bss_load_trig;
 };
 
 /**