From 52a2ce3d16fb572a43605d08994205a9c024df55 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Mon, 25 Sep 2017 14:13:27 -0700 Subject: [PATCH] qcacld-3.0: Refine API wlansap_set_channel_change_with_csa() See change "qcacld-3.0: Refine API wlansap_open()" for the API history. Update wlansap_set_channel_change_with_csa() to use the true struct pointer type. Change-Id: Ia4b31f9f726528e9c76f60d4fc314fc87b892555 CRs-Fixed: 2116267 --- core/sap/inc/sap_api.h | 20 ++++++++++++++++++-- core/sap/src/sap_module.c | 13 ++++++------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index 7e0e89ece44f..6bee1178c8f5 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -1005,8 +1005,24 @@ QDF_STATUS wlansap_disassoc_sta(struct sap_context *pSapCtx, QDF_STATUS wlansap_deauth_sta(struct sap_context *pSapCtx, struct tagCsrDelStaParams *pDelStaParams); -QDF_STATUS wlansap_set_channel_change_with_csa(void *p_cds_gctx, - uint32_t targetChannel, enum phy_ch_width target_bw, bool strict); +/** + * wlansap_set_channel_change_with_csa() - Set channel change with CSA + * @sapContext: Pointer to SAP context + * @targetChannel: Target channel + * @target_bw: Target bandwidth + * @strict: if true switch to the requested channel always, fail + * otherwise + * + * This api function does a channel change to the target channel specified. + * CSA IE is included in the beacons before doing a channel change. + * + * Return: QDF_STATUS + */ +QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext, + uint32_t targetChannel, + enum phy_ch_width target_bw, + bool strict); + QDF_STATUS wlansap_set_key_sta(void *p_cds_gctx, tCsrRoamSetKey *pSetKeyInfo); diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 8389b82793c8..60d789a4f975 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -1250,7 +1250,7 @@ wlansap_update_csa_channel_params(struct sap_context *sap_context, /** * wlansap_set_channel_change_with_csa() - Set channel change with CSA - * @p_cds_gctx: Pointer to cds global context structure + * @sapContext: Pointer to SAP context * @targetChannel: Target channel * @target_bw: Target bandwidth * @strict: if true switch to the requested channel always, fail @@ -1261,22 +1261,21 @@ wlansap_update_csa_channel_params(struct sap_context *sap_context, * * Return: QDF_STATUS */ -QDF_STATUS -wlansap_set_channel_change_with_csa(void *p_cds_gctx, uint32_t targetChannel, - enum phy_ch_width target_bw, bool strict) +QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sapContext, + uint32_t targetChannel, + enum phy_ch_width target_bw, + bool strict) { - struct sap_context *sapContext = NULL; tWLAN_SAPEvent sapEvent; tpAniSirGlobal pMac = NULL; void *hHal = NULL; bool valid; QDF_STATUS status; - sapContext = CDS_GET_SAP_CB(p_cds_gctx); if (NULL == sapContext) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, - "%s: Invalid SAP pointer from p_cds_gctx", __func__); + "%s: Invalid SAP pointer", __func__); return QDF_STATUS_E_FAULT; }