From 42e7c403e5ced61cc8b1989db9ddf9004c2af1c3 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sun, 24 Sep 2017 18:18:10 -0700 Subject: [PATCH] qcacld-3.0: Refine API wlansap_de_register_mgmt_frame() See change "qcacld-3.0: Refine API wlansap_open()" for the API history. Update wlansap_de_register_mgmt_frame() to use the true struct pointer type. Change-Id: I41231b3ed7d43bdd8d3e250673b3ad1985ecd60d CRs-Fixed: 2116267 --- core/sap/inc/sap_api.h | 21 ++++++++++++++++++--- core/sap/src/sap_module.c | 24 +++++------------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index cca36132abd4..061a63c966ac 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -990,9 +990,24 @@ QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *pSapCtx, uint8_t *match_data, uint16_t match_len); -QDF_STATUS wlansap_de_register_mgmt_frame - (void *p_cds_gctx, - uint16_t frameType, uint8_t *matchData, uint16_t matchLen); +/** + * wlansap_de_register_mgmt_frame() - de register management frame + * @pSapCtx: Pointer to SAP context + * @frame_type: frame type that needs to be de-registered with PE. + * @match_data: pointer to data which should be matched after @frame_type + * is matched. + * @match_len: Length of the @match_data + * + * HDD use this API to deregister a previously registered frame + * + * Return: The QDF_STATUS code associated with performing the operation + * QDF_STATUS_SUCCESS: Success and error code otherwise + */ +QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *pSapCtx, + uint16_t frame_type, + uint8_t *match_data, + uint16_t match_len); + QDF_STATUS wlansap_channel_change_request(void *p_cds_gctx, uint8_t tArgetChannel); QDF_STATUS wlansap_start_beacon_req(void *pSapCtx); diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 8e40390f6f6c..c6a8ae481574 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -2012,28 +2012,14 @@ QDF_STATUS wlansap_register_mgmt_frame(struct sap_context *pSapCtx, return QDF_STATUS_E_FAULT; } -/** - * wlansap_de_register_mgmt_frame() - de register management frame - * @pCtx: Pointer to the global cds context; a handle to SAP's control block - * can be extracted from its context. When MBSSID feature is enabled, - * SAP context is directly passed to SAP APIs. - * @frameType: frameType that needs to be De-registered with PE. - * @matchData: Data pointer which should be matched after frame type is matched. - * @matchLen: Length of the matchData - * - * This API is used to deregister previously registered frame. - * - * Return: The QDF_STATUS code associated with performing the operation - * QDF_STATUS_SUCCESS: Success and error code otherwise - */ -QDF_STATUS wlansap_de_register_mgmt_frame - (void *pCtx, - uint16_t frameType, uint8_t *matchData, uint16_t matchLen) { - struct sap_context *pSapCtx = NULL; +QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *pSapCtx, + uint16_t frameType, + uint8_t *matchData, + uint16_t matchLen) +{ void *hHal = NULL; QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE; - pSapCtx = CDS_GET_SAP_CB(pCtx); if (NULL == pSapCtx) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, "%s: Invalid SAP pointer from pCtx",