diff options
| author | hqu <hqu@codeaurora.org> | 2018-08-09 16:15:31 +0800 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-08-15 08:12:01 -0700 |
| commit | 80663217cdbeec270ca038ba653737a803e3e501 (patch) | |
| tree | b3d0e38ce9ffd4e9e9d044765d244b7c1091d195 | |
| parent | a5833438462e02471989d90a9f3e01a74fa5046c (diff) | |
qcacld-3.0: Initialize weight_copy when weight is SAP_ACS_WEIGHT_MAX
When channel 4 is unsafe channel in 2.4g LTE coex ACS case,
the weight for channel 4 will be calculated as 0 by function
sap_sort_chl_weight_ht40_24_g, it's wrong because weight_copy
doesn't be initialized in this case, so acs channel select
may choose wrong channel to start sap.
Fix is to add initialization for weight_copy when weight is
SAP_ACS_WEIGHT_MAX.
Change-Id: I4aa0fb133774d9980146a9ceae9b91154bd15bbc
CRs-Fixed: 2282371
| -rw-r--r-- | core/sap/src/sap_ch_select.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index 2e5fdd56002a..8cd0d6156f00 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -1737,8 +1737,10 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams, if (rssi < SOFTAP_MIN_RSSI) rssi = SOFTAP_MIN_RSSI; - if (pSpectCh->weight == SAP_ACS_WEIGHT_MAX) + if (pSpectCh->weight == SAP_ACS_WEIGHT_MAX) { + pSpectCh->weight_copy = pSpectCh->weight; goto debug_info; + } /* There may be channels in scanlist, which were not sent to * FW for scanning as part of ACS scan list, but they do have an |
