Ver Fonte

qcacld-3.0: Add support to configure candidate min roam score delta

During CU and low rssi based roam triggers, consider AP as roam candidate
only if its roam score is better than connected AP score by at least
min_roam_score_delta.

User configures this candidate minimum roam score delta value using
"min_roam_score_delta" INI. User can set candidate minimum score delta
value between 0 to 10000 and default value is 1850.

Firmware will trigger roaming only if roam score of candidate AP is
greater than "min_roam_score_delta" & "roam_score_delta" values of
connected AP.

Change-Id: I180e769b5629aa405dbd89ed73e39e228adf92db
CRS-Fixed: 2614117
Abhishek Ambure há 5 anos atrás
pai
commit
83c11be72e

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

@@ -1863,6 +1863,8 @@ static void mlme_init_scoring_cfg(struct wlan_objmgr_psoc *psoc,
 				cfg_get(psoc, CFG_ROAM_TRIGGER_BITMAP);
 	scoring_cfg->roam_score_delta = cfg_get(psoc, CFG_ROAM_SCORE_DELTA);
 	scoring_cfg->apsd_enabled = (bool)cfg_default(CFG_APSD_ENABLED);
+	scoring_cfg->min_roam_score_delta =
+				cfg_get(psoc, CFG_CAND_MIN_ROAM_SCORE_DELTA);
 }
 
 static void mlme_init_oce_cfg(struct wlan_objmgr_psoc *psoc,

+ 36 - 1
components/mlme/dispatcher/inc/cfg_mlme_scoring.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 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
@@ -1035,6 +1035,40 @@
 			CFG_VALUE_OR_DEFAULT, \
 			"candidate AP's percentage roam score delta")
 
+/*
+ * <ini>
+ * min_roam_score_delta - Difference of roam score values between connected
+ * AP and roam candidate AP.
+ * @Min: 0
+ * @Max: 10000
+ * @Default: 1850
+ *
+ * This ini is used during CU and low rssi based roam triggers, consider
+ * AP as roam candidate only if its roam score is better than connected
+ * AP score by at least min_roam_score_delta.
+ * If user configured "roam_score_delta" and "min_roam_score_delta" both,
+ * then firmware selects roam candidate AP by considering values of both
+ * INIs.
+ * Example: If DUT is connected with AP1 and roam candidate AP2 has roam
+ * score greater than roam_score_delta and min_roam_score_delta then only
+ * firmware will trigger roaming to AP2.
+ *
+ * Related: roam_score_delta
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_CAND_MIN_ROAM_SCORE_DELTA CFG_INI_UINT( \
+			"min_roam_score_delta", \
+			0, \
+			10000, \
+			1850, \
+			CFG_VALUE_OR_DEFAULT, \
+			"Diff between connected AP's and candidate AP's roam score")
+
 /*
  * <ini>
  * enable_scoring_for_roam - enable/disable scoring logic in FW for candidate
@@ -1256,6 +1290,7 @@
 	CFG(CFG_SCORING_OCE_WAN_SCORE_IDX_15_TO_12) \
 	CFG(CFG_ROAM_TRIGGER_BITMAP) \
 	CFG(CFG_ROAM_SCORE_DELTA) \
+	CFG(CFG_CAND_MIN_ROAM_SCORE_DELTA) \
 	CFG(CFG_ENABLE_SCORING_FOR_ROAM) \
 	CFG(CFG_APSD_ENABLED) \
 	CFG(CFG_DISCONNECT_ROAM_TRIGGER_MIN_RSSI) \

+ 3 - 0
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -1877,6 +1877,8 @@ struct wlan_mlme_per_slot_scoring {
  * @roam_score_delta: percentage delta in roam score
  * @apsd_enabled: Enable automatic power save delivery
  * @vendor_roam_score_algorithm: Preferred vendor roam score algorithm
+ * @min_roam_score_delta: Minimum difference between connected AP's and
+ *			candidate AP's roam score to start roaming.
  */
 struct wlan_mlme_scoring_cfg {
 	bool enable_scoring_for_roam;
@@ -1891,6 +1893,7 @@ struct wlan_mlme_scoring_cfg {
 	uint32_t roam_score_delta;
 	bool apsd_enabled;
 	uint32_t vendor_roam_score_algorithm;
+	uint32_t min_roam_score_delta;
 };
 
 /* struct wlan_mlme_threshold - Threshold related config items

+ 2 - 0
core/sme/src/csr/csr_api_roam.c

@@ -18817,6 +18817,8 @@ static void csr_update_score_params(struct mac_context *mac_ctx,
 		bss_score_params->oce_wan_scoring.score_pcnt11_to_8;
 	req_score_params->oce_wan_scoring.score_pcnt15_to_12 =
 		bss_score_params->oce_wan_scoring.score_pcnt15_to_12;
+	req_score_params->cand_min_roam_score_delta =
+		bss_score_params->min_roam_score_delta;
 }
 
 uint8_t csr_get_roam_enabled_sta_sessionid(struct mac_context *mac_ctx)