From a10377ca8a8b3c99558826683e99f3eb9c49999d Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Wed, 21 Dec 2016 13:36:39 -0800 Subject: qcacld-3.0: Fix incorrect condition in sap_add_mac_to_acl function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- 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 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); -- cgit v1.2.3