mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacld-3.0: Fix combined weight issue in ACS
Currently the driver calculates the best channel amoung the given spectrum and uses logic to select best frequency amoung the BW members, but the logic to maximize the weight before selecting the min weight is wrong, and must be done after the selection of the minimum weight frequency. Fix is to maximize the weight after the minimum weight channel is selected. Change-Id: Ie196462fbcc4215e6eb655168d07305110ff0ee7 CRs-Fixed: 2578582
This commit is contained in:
parent
91f22a0bb7
commit
71562069e1
1 changed files with 3 additions and 4 deletions
|
|
@ -1653,11 +1653,11 @@ static void sap_sort_chl_weight_80_mhz(struct mac_context *mac_ctx,
|
|||
minIdx = 0;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
pSpectInfo[j + i].weight = SAP_ACS_WEIGHT_MAX * 4;
|
||||
if (min_ch_weight > pSpectInfo[j + i].weight) {
|
||||
min_ch_weight = pSpectInfo[j + i].weight;
|
||||
minIdx = i;
|
||||
}
|
||||
pSpectInfo[j + i].weight = SAP_ACS_WEIGHT_MAX * 4;
|
||||
}
|
||||
|
||||
pSpectInfo[j + minIdx].weight = combined_weight;
|
||||
|
|
@ -1818,12 +1818,11 @@ static void sap_sort_chl_weight_160_mhz(struct mac_context *mac_ctx,
|
|||
minIdx = 0;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
pSpectInfo[j + i].weight = SAP_ACS_WEIGHT_MAX * 8;
|
||||
|
||||
if (min_ch_weight > pSpectInfo[j + i].weight) {
|
||||
min_ch_weight = pSpectInfo[j + i].weight;
|
||||
minIdx = i;
|
||||
}
|
||||
pSpectInfo[j + i].weight = SAP_ACS_WEIGHT_MAX * 8;
|
||||
}
|
||||
|
||||
pSpectInfo[j + minIdx].weight = combined_weight;
|
||||
|
|
@ -2118,11 +2117,11 @@ static void sap_sort_chl_weight_40_mhz(struct mac_context *mac_ctx,
|
|||
minIdx = 0;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
pSpectInfo[j + i].weight = SAP_ACS_WEIGHT_MAX * 2;
|
||||
if (min_ch_weight > pSpectInfo[j + i].weight) {
|
||||
min_ch_weight = pSpectInfo[j + i].weight;
|
||||
minIdx = i;
|
||||
}
|
||||
pSpectInfo[j + i].weight = SAP_ACS_WEIGHT_MAX * 2;
|
||||
}
|
||||
|
||||
pSpectInfo[j + minIdx].weight = combined_weight;
|
||||
|
|
|
|||
Loading…
Reference in a new issue