From d8b6057125e01a81ae34ec0a0e37ada694b20bb9 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Fri, 15 Sep 2017 11:25:05 -0700 Subject: [PATCH] qcacld-3.0: Refine API wlansap_start() See change "qcacld-3.0: Refine API wlansap_open()" for the API history. Update wlansap_start() to use the true struct pointer type. Change-Id: I20c27e75c0e4d1dce52316f39ce3cad9f4187533 CRs-Fixed: 2116267 --- core/sap/inc/sap_api.h | 20 ++++++++++++++++++-- core/sap/src/sap_module.c | 31 +++---------------------------- 2 files changed, 21 insertions(+), 30 deletions(-) diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index 92e454a46716..9a4b4dc01648 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -817,6 +817,24 @@ struct sap_context *wlansap_open(void); */ QDF_STATUS wlansap_close(struct sap_context *pSapCtx); +/** + * wlansap_start - start per-BSS SAP + * @pSapCtx: Pointer to the SAP context + * @mode: Device mode + * @addr: MAC address of the SAP + * @session_id: Pointer to the session id + * + * Called as part of the BSS start procedure. SAP will use this call + * to perform all activities needed to start the BSS. + * + * Return: The result code associated with performing the operation + * QDF_STATUS_E_FAULT: BSS could not be started + * QDF_STATUS_SUCCESS: Success + */ +QDF_STATUS wlansap_start(struct sap_context *pSapCtx, + enum tQDF_ADAPTER_MODE mode, + uint8_t *addr, uint32_t session_id); + void sap_cleanup_channel_list(void *sapContext); /** @@ -829,8 +847,6 @@ bool sap_is_auto_channel_select(void *pvos_gctx); QDF_STATUS wlansap_global_init(void); QDF_STATUS wlansap_global_deinit(void); -QDF_STATUS wlansap_start(void *p_cds_gctx, enum tQDF_ADAPTER_MODE mode, - uint8_t *addr, uint32_t session_id); QDF_STATUS wlansap_stop(void *p_cds_gctx); typedef QDF_STATUS (*tpWLAN_SAPEventCB)(tpSap_Event pSapEvent, void *pUsrContext); diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 9f8a9f954c4b..835309c368c9 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -281,45 +281,20 @@ struct sap_context *wlansap_open(void) return pSapCtx; } /* wlansap_open */ -/** - * wlansap_start() - wlan start SAP. - * @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 - * @mode: Device mode - * @addr: MAC address of the SAP - * @session_id: Pointer to the session id - * - * Called as part of the overall start procedure (cds_enable). SAP will - * use this call to register with TL as the SAP entity for SAP RSN frames. - * - * Return: The result code associated with performing the operation - * QDF_STATUS_E_FAULT: Pointer to SAP cb is NULL; - * access would cause a page fault. - * QDF_STATUS_SUCCESS: Success - */ -QDF_STATUS wlansap_start(void *pCtx, enum tQDF_ADAPTER_MODE mode, +QDF_STATUS wlansap_start(struct sap_context *pSapCtx, + enum tQDF_ADAPTER_MODE mode, uint8_t *addr, uint32_t session_id) { - struct sap_context *pSapCtx = NULL; QDF_STATUS qdf_ret_status; tHalHandle hal; tpAniSirGlobal pmac; - /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ - QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, "wlansap_start invoked successfully"); - /*------------------------------------------------------------------------ - Sanity check - Extract SAP control block - ------------------------------------------------------------------------*/ - 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", __func__); + "%s: Invalid SAP pointer", __func__); return QDF_STATUS_E_FAULT; }