qcacld-3.0: Fix sap_acs_channel_check

In sap_acs_channel_check fix ‘if’ condition will be always true for any
given channel, this will fail to validate if the given channel is in ACS
channel range.

Fix the if condition check from logical OR to AND to validate given channel
is within the ACS start and end channel range.

Change-Id: I1d69c9d440e641b052fd6098d1c99f22a64e9a9d
CRs-Fixed: 1056036
This commit is contained in:
Arif Hussain
2016-08-17 18:16:10 -07:00
committed by qcabuildsw
parent 1b21e81150
commit a34700c82e

View File

@@ -1746,7 +1746,7 @@ bool sap_acs_channel_check(ptSapContext sapContext, uint8_t channelNumber)
if (!sapContext->acs_cfg->acs_mode) if (!sapContext->acs_cfg->acs_mode)
return false; return false;
if ((channelNumber >= sapContext->acs_cfg->start_ch) || if ((channelNumber >= sapContext->acs_cfg->start_ch) &&
(channelNumber <= sapContext->acs_cfg->end_ch)) { (channelNumber <= sapContext->acs_cfg->end_ch)) {
if (!sapContext->acs_cfg->ch_list) { if (!sapContext->acs_cfg->ch_list) {
return false; return false;