qcacld-3.0: Add support for new ini param RoamCommon_MinRoamDelta

Add support for new ini param RoamCommon_MinRoamDelta. This param
is similar to the existing min_roam_score_delta param but units
change

Change-Id: If04ff2344a2651e7d8d71c92f05dfebc229f9fe1
CRs-Fixed: 3015930
This commit is contained in:
Jyoti Kumari
2021-08-13 15:34:51 +05:30
committed by Madan Koyyalamudi
parent 025e717335
commit dc5a5c30f8
2 changed files with 48 additions and 2 deletions

View File

@@ -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, static void mlme_init_roam_scoring_cfg(struct wlan_objmgr_psoc *psoc,
struct wlan_mlme_roam_scoring_cfg *scoring_cfg) struct wlan_mlme_roam_scoring_cfg *scoring_cfg)
{ {
bool val = false;
scoring_cfg->enable_scoring_for_roam = scoring_cfg->enable_scoring_for_roam =
cfg_get(psoc, CFG_ENABLE_SCORING_FOR_ROAM); cfg_get(psoc, CFG_ENABLE_SCORING_FOR_ROAM);
scoring_cfg->roam_trigger_bitmap = scoring_cfg->roam_trigger_bitmap =
cfg_get(psoc, CFG_ROAM_SCORE_DELTA_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->roam_score_delta = cfg_get(psoc, CFG_ROAM_SCORE_DELTA);
scoring_cfg->apsd_enabled = (bool)cfg_default(CFG_APSD_ENABLED); scoring_cfg->apsd_enabled = (bool)cfg_default(CFG_APSD_ENABLED);
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 = scoring_cfg->min_roam_score_delta =
cfg_get(psoc, CFG_CAND_MIN_ROAM_SCORE_DELTA); cfg_get(psoc, CFG_CAND_MIN_ROAM_SCORE_DELTA);
}
} }
static void mlme_init_oce_cfg(struct wlan_objmgr_psoc *psoc, static void mlme_init_oce_cfg(struct wlan_objmgr_psoc *psoc,

View File

@@ -1,5 +1,6 @@
/* /*
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. * 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 * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@@ -129,6 +130,41 @@
CFG_VALUE_OR_DEFAULT, \ CFG_VALUE_OR_DEFAULT, \
"Diff between connected AP's and candidate AP's roam score") "Diff between connected AP's and candidate AP's roam score")
/*
* <ini>
* 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
*
* </ini>
*/
#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")
/* /*
* <ini> * <ini>
* enable_scoring_for_roam - enable/disable scoring logic in FW for candidate * 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_TRIGGER_BITMAP) \
CFG(CFG_ROAM_SCORE_DELTA) \ CFG(CFG_ROAM_SCORE_DELTA) \
CFG(CFG_CAND_MIN_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_ENABLE_SCORING_FOR_ROAM) \
CFG(CFG_APSD_ENABLED) \ CFG(CFG_APSD_ENABLED) \
CFG(CFG_DISCONNECT_ROAM_TRIGGER_MIN_RSSI) \ CFG(CFG_DISCONNECT_ROAM_TRIGGER_MIN_RSSI) \