diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index 08b7ecd81a..d4f20c4656 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -1992,14 +1992,23 @@ static void mlme_init_power_cfg(struct wlan_objmgr_psoc *psoc,
static void mlme_init_roam_scoring_cfg(struct wlan_objmgr_psoc *psoc,
struct wlan_mlme_roam_scoring_cfg *scoring_cfg)
{
+ bool val = false;
+
scoring_cfg->enable_scoring_for_roam =
cfg_get(psoc, CFG_ENABLE_SCORING_FOR_ROAM);
scoring_cfg->roam_trigger_bitmap =
cfg_get(psoc, CFG_ROAM_SCORE_DELTA_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);
+
+ ucfg_mlme_get_connection_roaming_ini_present(psoc, &val);
+ if (val) {
+ scoring_cfg->min_roam_score_delta =
+ cfg_get(psoc, CFG_ROAM_COMMON_MIN_ROAM_DELTA) * 100;
+ } else {
+ 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,
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_roam_scoring.h b/components/mlme/dispatcher/inc/cfg_mlme_roam_scoring.h
index b1ebe9e029..74ff3cc5b4 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme_roam_scoring.h
+++ b/components/mlme/dispatcher/inc/cfg_mlme_roam_scoring.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 above
@@ -129,6 +130,41 @@
CFG_VALUE_OR_DEFAULT, \
"Diff between connected AP's and candidate AP's roam score")
+/*
+ *
+ * RoamCommon_MinRoamDelta - Difference of roam score values between connected
+ * AP and roam candidate AP.
+ * @Min: 0
+ * @Max: 100
+ * @Default: 15
+ *
+ * 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 RoamCommon_MinRoamDelta.
+ * If user configured "RoamCommon_Delta" and "RoamCommon_MinRoamDelta" 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 RoamCommon_Delta and RoamCommon_MinRoamDelta then only
+ * firmware will trigger roaming to AP2.
+ * This value needs to be given in percentage
+ *
+ * Related: RoamCommon_Delta
+ *
+ * Supported Feature: Roaming
+ *
+ * Usage: Internal
+ *
+ *
+ */
+#define CFG_ROAM_COMMON_MIN_ROAM_DELTA CFG_INI_UINT( \
+ "RoamCommon_MinRoamDelta", \
+ 0, \
+ 100, \
+ 15, \
+ CFG_VALUE_OR_DEFAULT, \
+ "Diff bet connected AP's and candidate AP's roam score")
+
/*
*
* enable_scoring_for_roam - enable/disable scoring logic in FW for candidate
@@ -319,6 +355,7 @@
CFG(CFG_ROAM_SCORE_DELTA_TRIGGER_BITMAP) \
CFG(CFG_ROAM_SCORE_DELTA) \
CFG(CFG_CAND_MIN_ROAM_SCORE_DELTA) \
+ CFG(CFG_ROAM_COMMON_MIN_ROAM_DELTA) \
CFG(CFG_ENABLE_SCORING_FOR_ROAM) \
CFG(CFG_APSD_ENABLED) \
CFG(CFG_DISCONNECT_ROAM_TRIGGER_MIN_RSSI) \