Sfoglia il codice sorgente

qcacld-3.0: Refine API wlansap_get_acl_accept_list()

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

Change-Id: I6dd326745fee2769753afb71f64bbf6ef3023a22
CRs-Fixed: 2116267
Jeff Johnson 7 anni fa
parent
commit
878f6d5cff
2 ha cambiato i file con 20 aggiunte e 9 eliminazioni
  1. 15 2
      core/sap/inc/sap_api.h
  2. 5 7
      core/sap/src/sap_module.c

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

@@ -1003,8 +1003,21 @@ QDF_STATUS wlan_sap_getstation_ie_information(struct sap_context *sap_ctx,
 					      uint32_t *len, uint8_t *buf);
 
 QDF_STATUS wlansap_clear_acl(void *p_cds_gctx);
-QDF_STATUS wlansap_get_acl_accept_list(void *p_cds_gctx,
-	 struct qdf_mac_addr *pAcceptList, uint8_t *nAcceptList);
+
+/**
+ * wlansap_get_acl_accept_list() - Get ACL accept list
+ * @pSapCtx: Pointer to the SAP context
+ * @pAcceptList: Pointer to the buffer to store the ACL accept list
+ * @nAcceptList: Pointer to the location to store the number of
+ *    entries in the ACL accept list.
+ *
+ * Return: QDF_STATUS. If success the data was returned, otherwise an
+ *    error occurred.
+ */
+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);
 

+ 5 - 7
core/sap/src/sap_module.c

@@ -860,19 +860,17 @@ QDF_STATUS wlansap_get_acl_mode(struct sap_context *pSapCtx,
 	return QDF_STATUS_SUCCESS;
 }
 
-/* API to get ACL Accept List */
-QDF_STATUS
-wlansap_get_acl_accept_list(void *pCtx, struct qdf_mac_addr *pAcceptList,
-				uint8_t *nAcceptList)
+QDF_STATUS wlansap_get_acl_accept_list(struct sap_context *pSapCtx,
+				       struct qdf_mac_addr *pAcceptList,
+				       uint8_t *nAcceptList)
 {
-	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__);
+			  "%s: Invalid SAP pointer", __func__);
 		return QDF_STATUS_E_FAULT;
 	}
 
-	memcpy((void *)pAcceptList, (void *)pSapCtx->acceptMacList,
+	memcpy(pAcceptList, pSapCtx->acceptMacList,
 	       (pSapCtx->nAcceptMac * QDF_MAC_ADDR_SIZE));
 	*nAcceptList = pSapCtx->nAcceptMac;
 	return QDF_STATUS_SUCCESS;