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
This commit is contained in:
Bapiraju Alla
2022-02-10 08:27:49 -08:00
committed by Madan Koyyalamudi
orang tua 3cf850fbf1
melakukan c0267fdbb4

Melihat File

@@ -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