소스 검색

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;