qcacld-3.0: Fix channel weight calculation errors in ACS mode

Channel 13 and channel 9 can be combined to HT40. The channel weight of
13 is updated with channel 9 when chStartNum of acs_ht40_channels24_g
is 9 in sap_sort_chl_weight_ht40_24_g, however at this time the channel
weight of 9 may be already updated to SAP_ACS_WEIGHT_MAX * 2 when the
chStartNum of acs_ht40_channels24_g is 1. In such case channel weight of
13 is updated incorrectly.

When update the channel weight of 13, use original channel weight of
channel 9 and channel 13.

Change-Id: Iab16cd5b1ab45fdf2f9805767d81c6fc997ee4be
CRs-Fixed: 2105213
This commit is contained in:
bings 2017-09-11 09:49:43 +08:00 • committed by snandini
commit aa6f96a345

View file

@ -2188,10 +2188,10 @@ static void sap_sort_chl_weight_ht40_24_g(tSapChSelSpectInfo *pSpectInfoParams,
}
}
} else {
tmpWeight1 = pSpectInfo[j].weight +
pSpectInfo[j + 4].weight;
if (pSpectInfo[j].weight <=
pSpectInfo[j + 4].weight) {
tmpWeight1 = pSpectInfo[j].weight_copy +
pSpectInfo[j + 4].weight_copy;
if (pSpectInfo[j].weight_copy <=
pSpectInfo[j + 4].weight_copy) {
pSpectInfo[j].weight = tmpWeight1;
pSpectInfo[j + 4].weight =
SAP_ACS_WEIGHT_MAX * 2;