Browse Source

qcacmn: Initialize total_weight while initializing BSS score config

Currently, total_weight is not initialized before calculating
default ML BSS weightage with INI configuration. This may result in
unexpected behavior.

To resolve this, calculate ML bss weight after calculating non-ML
BSS score weight.

Change-Id: I4b9455e0ce69dec5c837f92acad60ac83cdd2502
CRs-Fixed: 3127454
Bapiraju Alla 3 years ago
parent
commit
c0267fdbb4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c

+ 2 - 2
umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c

@@ -2328,8 +2328,6 @@ void wlan_cm_init_score_config(struct wlan_objmgr_psoc *psoc,
 	score_cfg->weight_config.sae_pk_ap_weightage =
 				cfg_get(psoc, CFG_SAE_PK_AP_WEIGHTAGE);
 
-	cm_init_mlo_score_config(psoc, score_cfg, &total_weight);
-
 	total_weight =  score_cfg->weight_config.rssi_weightage +
 			score_cfg->weight_config.ht_caps_weightage +
 			score_cfg->weight_config.vht_caps_weightage +
@@ -2345,6 +2343,8 @@ void wlan_cm_init_score_config(struct wlan_objmgr_psoc *psoc,
 			score_cfg->weight_config.oce_subnet_id_weightage +
 			score_cfg->weight_config.sae_pk_ap_weightage;
 
+	cm_init_mlo_score_config(psoc, score_cfg, &total_weight);
+
 	/*
 	 * If configured weights are greater than max weight,
 	 * fallback to default weights