summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimanshu Agarwal <himanaga@codeaurora.org>2018-06-27 17:01:40 +0530
committernshrivas <nshrivas@codeaurora.org>2018-06-27 21:08:50 -0700
commitba6a325effd68abc2b7a3636f36a63f69db4887e (patch)
tree48d68a3f709643842ce9d7374ec02bc3956c1f34
parentc62163fac051dc11ff6ade239399d4b9127ba2a8 (diff)
qcacld-3.0: Avoid beacon parsing on channels not in scan list for ACS
When STA is already up on some 2.4Ghz channel and SAP needs to be started on some 5Ghz channel through ACS, scan channel list contains only 5Ghz channels. But scan results contains beacons on STA 2.4Ghz channel as well which is getting parsed contributing to bsscount and rssi on that 2.4Ghz channel which should not be the scenario as bsscount should be 0 and rssi should be -100 on this 2.4Ghz channel as it is not present in the scan channel list sent by HOST to fw. Avoid beacon parsing on all the channels other than the channels present in ACS scan channel list. Change-Id: I85ab967386b19748c32e98a7e468d471e31f9b9a CRs-Fixed: 2266170
-rw-r--r--core/sap/src/sap_ch_select.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c
index ef4ad35b393e..97a5a1757449 100644
--- a/core/sap/src/sap_ch_select.c
+++ b/core/sap/src/sap_ch_select.c
@@ -1572,6 +1572,8 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
int8_t rssi = 0;
uint8_t chn_num = 0;
uint8_t channel_id = 0;
+ uint8_t i;
+ bool found = false;
tCsrScanResultInfo *pScanResult;
tSapSpectChInfo *pSpectCh = pSpectInfoParams->pSpectCh;
@@ -1635,6 +1637,22 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
chn_num++) {
/*
+ * Check if channel is present in scan channel list or
+ * not. If not present, then continue as no need to
+ * process the beacon on this channel.
+ */
+ for (i = 0; i < sap_ctx->num_of_channel; i++) {
+ if (pSpectCh->chNum ==
+ sap_ctx->channelList[i]) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ continue;
+
+ /*
* if the Beacon has channel ID, use it other wise we will
* rely on the channelIdSelf
*/