From dd6a45daced37fc58ea3a043e8c1dd4285ca10ae Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Fri, 13 Sep 2019 17:36:10 +0530 Subject: [PATCH] qcacld-3.0: Fix roam scoring weightage ini configuration To ensure the total weigtage of various factors doesn't exceed 100, there is a check in mlme_init_scoring_cfg(). If the total weightage for roam score exceeds 100, the default values are pushed for the weight configs. In this computation, the enable/disable value is also added, which results in configuration only upto 99%. Fix this weight configuration and remove the enable flag value addition to the total weight. Change-Id: I15cf70428b2e8afa2203299dae98c287e5e2222d CRs-Fixed: 2527361 --- components/mlme/core/src/wlan_mlme_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index ac0532584ead..471e9b84a384 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -1750,8 +1750,7 @@ static void mlme_init_scoring_cfg(struct wlan_objmgr_psoc *psoc, scoring_cfg->weight_cfg.oce_wan_weightage = cfg_get(psoc, CFG_SCORING_OCE_WAN_WEIGHTAGE); - total_weight = scoring_cfg->enable_scoring_for_roam + - scoring_cfg->weight_cfg.rssi_weightage + + total_weight = scoring_cfg->weight_cfg.rssi_weightage + scoring_cfg->weight_cfg.ht_caps_weightage + scoring_cfg->weight_cfg.vht_caps_weightage + scoring_cfg->weight_cfg.he_caps_weightage +