qcacld-3.0: Check for beacon channel in ACS channel list correctly

Beacon's channel is checked against ACS channel list before even
getting the beacon's channel resulting in no beacon parsing at all.

Check for beacon channel in ACS channel list after getting the
beacon's channel.

Change-Id: I16edcf9eaa0eafce289cc050652702eb90d79c9d
CRs-Fixed: 2271461
This commit is contained in:
Himanshu Agarwal
2018-07-02 18:06:49 +05:30
committed by nshrivas
parent eceda1e04b
commit cf5b89316f

View File

@@ -1590,13 +1590,24 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
for (chn_num = 0; chn_num < pSpectInfoParams->numSpectChans; for (chn_num = 0; chn_num < pSpectInfoParams->numSpectChans;
chn_num++) { chn_num++) {
/*
* If the Beacon has channel ID, use it other wise we
* will rely on the channelIdSelf
*/
if (pScanResult->BssDescriptor.channelId == 0)
channel_id =
pScanResult->BssDescriptor.channelIdSelf;
else
channel_id =
pScanResult->BssDescriptor.channelId;
/* /*
* Check if channel is present in scan channel list or * Check if channel is present in scan channel list or
* not. If not present, then continue as no need to * not. If not present, then continue as no need to
* process the beacon on this channel. * process the beacon on this channel.
*/ */
for (i = 0; i < sap_ctx->num_of_channel; i++) { for (i = 0; i < sap_ctx->num_of_channel; i++) {
if (pSpectCh->chNum == if (channel_id ==
sap_ctx->channelList[i]) { sap_ctx->channelList[i]) {
found = true; found = true;
break; break;
@@ -1606,17 +1617,6 @@ static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
if (!found) if (!found)
continue; continue;
/*
* if the Beacon has channel ID, use it other wise we will
* rely on the channelIdSelf
*/
if (pScanResult->BssDescriptor.channelId == 0)
channel_id =
pScanResult->BssDescriptor.channelIdSelf;
else
channel_id =
pScanResult->BssDescriptor.channelId;
if (pSpectCh && (channel_id == pSpectCh->chNum)) { if (pSpectCh && (channel_id == pSpectCh->chNum)) {
if (pSpectCh->rssiAgr < if (pSpectCh->rssiAgr <
pScanResult->BssDescriptor.rssi) pScanResult->BssDescriptor.rssi)