From eea4e304b6df0c52d55815483be03b79cb2aab03 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Mon, 25 Sep 2017 14:40:14 -0700 Subject: [PATCH] qcacld-3.0: Refine API wlansap_remain_on_channel() See change "qcacld-3.0: Refine API wlansap_open()" for the API history. Update wlansap_remain_on_channel() to use the true struct pointer type. Change-Id: Iaa8be32f34e61da652b74e67c36d1cf27f13d961 CRs-Fixed: 2116267 --- core/sap/inc/sap_api.h | 25 ++++++++++++++++++++----- core/sap/src/sap_module.c | 28 +++++----------------------- 2 files changed, 25 insertions(+), 28 deletions(-) diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index 95b44ad641ad..7b2d782cc0ba 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -1140,11 +1140,26 @@ QDF_STATUS wlansap_send_action(struct sap_context *pSapCtx, const uint8_t *pBuf, uint32_t len, uint16_t wait, uint16_t channel_freq); -QDF_STATUS wlansap_remain_on_channel - (void *p_cds_gctx, - uint8_t channel, - uint32_t duration, remainOnChanCallback callback, void *pContext, - uint32_t *scan_id); +/** + * wlansap_remain_on_channel() - set remain on channel + * @pSapCtx: Pointer to the SAP context + * @channel: Channel on which driver has to listen + * @duration: Duration for which driver has to listen on specified channel + * @callback: Callback function to be called once Listen is done. + * @pContext: Context needs to be called in callback function. + * @scan_id: scan identifier + * + * This api function provides to set Remain On channel on specified channel + * for specified duration. + * + * Return: The QDF_STATUS code associated with performing the operation + * QDF_STATUS_SUCCESS: Success and error code otherwise + */ +QDF_STATUS wlansap_remain_on_channel(struct sap_context *pSapCtx, + uint8_t channel, uint32_t duration, + remainOnChanCallback callback, + void *pContext, uint32_t *scan_id); + QDF_STATUS wlansap_cancel_remain_on_channel(void *p_cds_gctx, uint32_t scan_id); diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 2f7212f7d1cf..75c623f7ce1c 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -1523,35 +1523,17 @@ QDF_STATUS wlansap_send_action(struct sap_context *pSapCtx, return QDF_STATUS_E_FAULT; } -/** - * wlansap_remain_on_channel() - set remain on channel - * @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. - * @channel: Channel on which driver has to listen - * @duration: Duration for which driver has to listen on specified channel - * @callback: Callback function to be called once Listen is done. - * @pContext: Context needs to be called in callback function. - * @scan_id: scan identifier - * - * This api function provides to set Remain On channel on specified channel - * for specified duration. - * - * Return: The QDF_STATUS code associated with performing the operation - * QDF_STATUS_SUCCESS: Success and error code otherwise - */ -QDF_STATUS wlansap_remain_on_channel(void *pCtx, - uint8_t channel, uint32_t duration, remainOnChanCallback callback, - void *pContext, uint32_t *scan_id) +QDF_STATUS wlansap_remain_on_channel(struct sap_context *pSapCtx, + uint8_t channel, uint32_t duration, + remainOnChanCallback callback, + void *pContext, uint32_t *scan_id) { - struct sap_context *pSapCtx = NULL; 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", + "%s: Invalid SAP pointer", __func__); return QDF_STATUS_E_FAULT; }