From ff26c619892066486d2cd5415c930ec6b78c1421 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sun, 10 Jun 2018 20:57:13 -0700 Subject: [PATCH] qcacld-3.0: Fix csr_set_channels() context param Currently csr_set_channels() takes a tHalHandle context param. However csr is internal to the UMAC, and hence it should be using the "real" context pointer type tpAniSirGlobal instead of the opaque reference tHalHandle, so update the API to expect tpAniSirGlobal. Change-Id: Idf260cce60cd436ac871b4df3620cf1baf2b06c3 CRs-Fixed: 2268810 --- core/sme/inc/csr_api.h | 2 +- core/sme/src/common/sme_api.c | 5 +++-- core/sme/src/csr/csr_api_roam.c | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 06355dba96a1..b74e90fd9d9e 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -1706,7 +1706,7 @@ typedef QDF_STATUS (*csr_session_close_cb)(uint8_t session_id); #define CSR_IS_AUTH_TYPE_SAE(auth_type) (false) #endif -QDF_STATUS csr_set_channels(tHalHandle hHal, tCsrConfigParam *pParam); +QDF_STATUS csr_set_channels(tpAniSirGlobal pMac, tCsrConfigParam *pParam); /* enum to string conversion for debug output */ const char *get_e_roam_cmd_status_str(eRoamCmdStatus val); diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index b5e65454b5df..ca1987fa8616 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -775,8 +775,9 @@ QDF_STATUS sme_init_chan_list(tHalHandle hal, uint8_t *alpha2, * Other status means SME is failed to update the config parameters. */ -QDF_STATUS sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams) +QDF_STATUS sme_set11dinfo(tHalHandle hal, tpSmeConfigParams pSmeConfigParams) { + tpAniSirGlobal mac_ctx = MAC_CONTEXT(hal); QDF_STATUS status = QDF_STATUS_E_FAILURE; MTRACE(qdf_trace(QDF_MODULE_ID_SME, @@ -786,7 +787,7 @@ QDF_STATUS sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams) return status; } - status = csr_set_channels(hHal, &pSmeConfigParams->csrConfig); + status = csr_set_channels(mac_ctx, &pSmeConfigParams->csrConfig); if (!QDF_IS_STATUS_SUCCESS(status)) sme_err("csr_set_channels failed with status: %d", status); diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 8aac99bc4e40..0815a9272b09 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -608,10 +608,9 @@ QDF_STATUS csr_init_chan_list(tpAniSirGlobal mac, uint8_t *alpha2) return status; } -QDF_STATUS csr_set_channels(tHalHandle hHal, tCsrConfigParam *pParam) +QDF_STATUS csr_set_channels(tpAniSirGlobal pMac, tCsrConfigParam *pParam) { QDF_STATUS status = QDF_STATUS_SUCCESS; - tpAniSirGlobal pMac = PMAC_STRUCT(hHal); uint8_t index = 0; qdf_mem_copy(pParam->Csr11dinfo.countryCode,