summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArif Hussain <arifhussain@codeaurora.org>2016-12-21 13:36:39 -0800
committerqcabuildsw <qcabuildsw@localhost>2016-12-22 13:21:31 -0800
commita10377ca8a8b3c99558826683e99f3eb9c49999d (patch)
tree819b7de8de725897e9ecb4b87460c695fe9189b0
parent54a8b10310c8f1a78df92ffb2871e734098928f9 (diff)
qcacld-3.0: Fix incorrect condition in sap_add_mac_to_acl function
Currently sap_add_mac_to_acl() function has incorrect validation check, size of MacList will be always zero if no elements added to the list. Validating size always be greater than zero will prevent adding first element itself. There by breaking whole ACL functionality. To fix this, remove ‘*size == 0’ condition in validation code. Change-Id: Ic3e51db798a996870ef65cda0eddfd1ec738d290 CRs-Fixed: 1104152
-rw-r--r--core/sap/src/sap_fsm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c
index 6f4ab26fe79a..62b0594e5d8e 100644
--- a/core/sap/src/sap_fsm.c
+++ b/core/sap/src/sap_fsm.c
@@ -4480,7 +4480,7 @@ void sap_add_mac_to_acl(struct qdf_mac_addr *macList,
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
"add acl entered");
- if (NULL == macList || *size == 0 || *size > MAX_ACL_MAC_ADDRESS) {
+ if (NULL == macList || *size > MAX_ACL_MAC_ADDRESS) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH,
FL("either buffer is NULL or size = %d is incorrect."),
*size);