diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index d5a1b27e26a3..727c6f8f6d2b 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -1246,7 +1246,23 @@ QDF_STATUS wlansap_de_register_mgmt_frame(struct sap_context *pSapCtx, QDF_STATUS wlansap_channel_change_request(void *p_cds_gctx, uint8_t tArgetChannel); -QDF_STATUS wlansap_start_beacon_req(void *pSapCtx); + +/** + * wlansap_start_beacon_req() - Send Start Beaconing Request + * @sap_ctx: Pointer to the SAP context + * + * This API is used to send an Indication to SME/PE to start + * beaconing on the current operating channel. + * + * When SAP is started on DFS channel and when ADD BSS RESP is received + * LIM temporarily holds off Beaconing for SAP to do CAC WAIT. When + * CAC WAIT is done SAP resumes the Beacon Tx by sending a start beacon + * request to LIM. + * + * Return: The QDF_STATUS code associated with performing the operation + * QDF_STATUS_SUCCESS: Success + */ +QDF_STATUS wlansap_start_beacon_req(struct sap_context *sap_ctx); /** * wlansap_dfs_send_csa_ie_request() - Send CSA IE diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index f220073ada38..3979450a4d99 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -1894,43 +1894,14 @@ wlansap_channel_change_request(void *pSapCtx, uint8_t target_channel) return QDF_STATUS_E_FAULT; } -/*========================================================================== - - FUNCTION wlansap_start_beacon_req - DESCRIPTION - This API is used to send an Indication to SME/PE to start - beaconing on the current operating channel. - - Brief:When SAP is started on DFS channel and when ADD BSS RESP is received - LIM temporarily holds off Beaconing for SAP to do CAC WAIT. When - CAC WAIT is done SAP resumes the Beacon Tx by sending a start beacon - request to LIM. - - DEPENDENCIES - NA. - - PARAMETERS - - IN - pSapCtx: Pointer to cds global context structure - - RETURN VALUE - The QDF_STATUS code associated with performing the operation - - QDF_STATUS_SUCCESS: Success - - SIDE EFFECTS - ============================================================================*/ -QDF_STATUS wlansap_start_beacon_req(void *pSapCtx) +QDF_STATUS wlansap_start_beacon_req(struct sap_context *sap_ctx) { - struct sap_context *sapContext = NULL; QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE; void *hHal = NULL; uint8_t dfsCacWaitStatus = 0; tpAniSirGlobal pMac = NULL; - sapContext = pSapCtx; - if (NULL == sapContext) { + if (NULL == sap_ctx) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, "%s: Invalid SAP pointer", __func__); return QDF_STATUS_E_FAULT; @@ -1939,7 +1910,7 @@ QDF_STATUS wlansap_start_beacon_req(void *pSapCtx) hHal = CDS_GET_HAL_CB(); if (NULL == hHal) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - "%s: Invalid HAL pointer from p_cds_gctx", __func__); + "%s: Invalid HAL pointer", __func__); return QDF_STATUS_E_FAULT; } pMac = PMAC_STRUCT(hHal); @@ -1948,9 +1919,9 @@ QDF_STATUS wlansap_start_beacon_req(void *pSapCtx) if (pMac->sap.SapDfsInfo.sap_radar_found_status == false) { /* CAC Wait done without any Radar Detection */ dfsCacWaitStatus = true; - sapContext->pre_cac_complete = false; + sap_ctx->pre_cac_complete = false; qdf_ret_status = sme_roam_start_beacon_req(hHal, - sapContext->bssid, + sap_ctx->bssid, dfsCacWaitStatus); if (qdf_ret_status == QDF_STATUS_SUCCESS) { return QDF_STATUS_SUCCESS;