浏览代码

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
Arif Hussain 8 年之前
父节点
当前提交
a34700c82e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      core/sap/src/sap_fsm.c

+ 1 - 1
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;