summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbings <bings@codeaurora.org>2017-09-11 07:34:21 +0800
committersnandini <snandini@codeaurora.org>2017-09-13 03:07:26 -0700
commit984677b395aeae2a9b369a66bbfa28a0160d2a55 (patch)
tree26393f6184658c7afaec74e787f24cff81fbd05d
parenta1f04bf45b2585e6b96daa232253ec984073c0bd (diff)
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
-rw-r--r--core/sap/src/sap_ch_select.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c
index facb175b371b..1ad60db72fb7 100644
--- a/core/sap/src/sap_ch_select.c
+++ b/core/sap/src/sap_ch_select.c
@@ -2170,10 +2170,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;