qcacld-3.0: Refine API wlansap_stop()

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

Change-Id: Ic5b8108cd599de44ae1f03489b4621630fa56662
CRs-Fixed: 2116267
This commit is contained in:
Jeff Johnson 2017-09-15 11:36:19 -07:00 • committed by snandini
commit 3d4c7100a9
2 changed files with 16 additions and 22 deletions

View file

@ -835,6 +835,19 @@ QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
enum tQDF_ADAPTER_MODE mode,
uint8_t *addr, uint32_t session_id);
/**
* wlansap_stop() - stop per-BSS SAP
* @pSapCtx: Pointer to the SAP context
*
* Called as part of the BSS stop procedure. SAP will use this call
* to perform all activities needed to stop the BSS.
*
* Return: The result code associated with performing the operation
* QDF_STATUS_E_FAULT: BSS could not be stopped
* QDF_STATUS_SUCCESS: Success
*/
QDF_STATUS wlansap_stop(struct sap_context *pSapCtx);
void sap_cleanup_channel_list(void *sapContext);
/**
@ -847,7 +860,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_stop(void *p_cds_gctx);
typedef QDF_STATUS (*tpWLAN_SAPEventCB)(tpSap_Event pSapEvent,
void *pUsrContext);

View file

@ -355,24 +355,8 @@ QDF_STATUS wlansap_start(struct sap_context *pSapCtx,
return QDF_STATUS_SUCCESS;
}
/**
* wlansap_stop() - stop SAP module.
* @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
*
* Called by cds_disable to stop operation in SAP, before close. SAP will
* suspend all BT-AMP Protocol Adaption Layer operation and will wait for the
* close request to clean up its resources.
*
* 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_stop(void *pCtx)
QDF_STATUS wlansap_stop(struct sap_context *pSapCtx)
{
struct sap_context *pSapCtx = NULL;
tHalHandle hal;
tpAniSirGlobal pmac;
@ -380,18 +364,16 @@ QDF_STATUS wlansap_stop(void *pCtx)
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG,
"wlansap_stop invoked successfully ");
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;
}
hal = CDS_GET_HAL_CB();
pmac = (tpAniSirGlobal) hal;
if (NULL == pmac) {
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
"%s: Invalid MAC context from p_cds_gctx",
__func__);
"%s: Invalid MAC context", __func__);
return QDF_STATUS_E_FAULT;
}
if (QDF_STATUS_SUCCESS !=