From a34700c82ec3b92c8093b5e43d33ba603fd37460 Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Wed, 17 Aug 2016 18:16:10 -0700 Subject: [PATCH] qcacld-3.0: Fix sap_acs_channel_check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- core/sap/src/sap_fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 7135232557f4..97ac929553a6 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -1746,7 +1746,7 @@ bool sap_acs_channel_check(ptSapContext sapContext, uint8_t channelNumber) if (!sapContext->acs_cfg->acs_mode) return false; - if ((channelNumber >= sapContext->acs_cfg->start_ch) || + if ((channelNumber >= sapContext->acs_cfg->start_ch) && (channelNumber <= sapContext->acs_cfg->end_ch)) { if (!sapContext->acs_cfg->ch_list) { return false;