diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index 6bee1178c8f5..0ea6b422d32e 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -1023,8 +1023,18 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext, enum phy_ch_width target_bw, bool strict); -QDF_STATUS wlansap_set_key_sta(void *p_cds_gctx, - tCsrRoamSetKey *pSetKeyInfo); +/** + * wlansap_set_key_sta() - set keys for a stations. + * @pSapCtx: Pointer to the SAP context + * @pSetKeyInfo : tCsrRoamSetKey structure for the station + * + * This api function provides for Ap App/HDD to set key for a station. + * + * Return: The QDF_STATUS code associated with performing the operation + * QDF_STATUS_SUCCESS: Success + */ +QDF_STATUS wlansap_set_key_sta(struct sap_context *pSapCtx, + tCsrRoamSetKey *pSetKeyInfo); /** * wlan_sap_getstation_ie_information() - RSNIE Population diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 60d789a4f975..347df49cd97a 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -1425,37 +1425,24 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext, return QDF_STATUS_SUCCESS; } -/** - * wlansap_set_key_sta() - set keys for a stations. - * @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. - * @pSetKeyInfo : tCsrRoamSetKey structure for the station - * - * This api function provides for Ap App/HDD to set key for a station. - * - * Return: The QDF_STATUS code associated with performing the operation - * QDF_STATUS_SUCCESS: Success - */ -QDF_STATUS wlansap_set_key_sta(void *pCtx, tCsrRoamSetKey *pSetKeyInfo) +QDF_STATUS wlansap_set_key_sta(struct sap_context *pSapCtx, + tCsrRoamSetKey *pSetKeyInfo) { QDF_STATUS qdf_status = QDF_STATUS_SUCCESS; - struct sap_context *pSapCtx = NULL; void *hHal = NULL; QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE; uint32_t roamId = 0xFF; - 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; } 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", + "%s: Invalid HAL pointer", __func__); return QDF_STATUS_E_FAULT; }