Эх сурвалжийг харах

qcacld-3.0: Refine API wlansap_get_acl_deny_list()

See change "qcacld-3.0: Refine API wlansap_open()" for the API history.
Update wlansap_get_acl_deny_list() to use the true struct pointer type.

Change-Id: I8d0981b6a11d854fc3f4b228703271608367bcab
CRs-Fixed: 2116267
Jeff Johnson 7 жил өмнө
parent
commit
49c819f9a0

+ 13 - 2
core/sap/inc/sap_api.h

@@ -1018,8 +1018,19 @@ QDF_STATUS wlansap_get_acl_accept_list(struct sap_context *pSapCtx,
 				       struct qdf_mac_addr *pAcceptList,
 				       uint8_t *nAcceptList);
 
-QDF_STATUS wlansap_get_acl_deny_list(void *pCtx,
-	struct qdf_mac_addr *pDenyList, uint8_t *nDenyList);
+/**
+ * wlansap_get_acl_deny_list() - Get ACL deny list
+ * @pSapCtx: Pointer to the SAP context
+ * @pDenyList: Pointer to the buffer to store the ACL deny list
+ * @nDenyList: Pointer to the location to store the number of
+ *    entries in the ACL deny list.
+ *
+ * Return: QDF_STATUS. If success the data was returned, otherwise an
+ *    error occurred.
+ */
+QDF_STATUS wlansap_get_acl_deny_list(struct sap_context *pSapCtx,
+				     struct qdf_mac_addr *pDenyList,
+				     uint8_t *nDenyList);
 
 /**
  * wlansap_set_acl_mode() - Set the SAP ACL mode

+ 4 - 6
core/sap/src/sap_module.c

@@ -876,19 +876,17 @@ QDF_STATUS wlansap_get_acl_accept_list(struct sap_context *pSapCtx,
 	return QDF_STATUS_SUCCESS;
 }
 
-/* API to get Deny List */
-QDF_STATUS
-wlansap_get_acl_deny_list(void *pCtx, struct qdf_mac_addr *pDenyList,
-			  uint8_t *nDenyList)
+QDF_STATUS wlansap_get_acl_deny_list(struct sap_context *pSapCtx,
+				     struct qdf_mac_addr *pDenyList,
+				     uint8_t *nDenyList)
 {
-	struct sap_context *pSapCtx = CDS_GET_SAP_CB(pCtx);
 	if (NULL == pSapCtx) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Invalid SAP pointer from p_cds_gctx", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 
-	memcpy((void *)pDenyList, (void *)pSapCtx->denyMacList,
+	memcpy(pDenyList, pSapCtx->denyMacList,
 	       (pSapCtx->nDenyMac * QDF_MAC_ADDR_SIZE));
 	*nDenyList = pSapCtx->nDenyMac;
 	return QDF_STATUS_SUCCESS;