From c3b15737e116922d2af71791bfa3d28d31c276bb Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 24 Mar 2018 11:48:44 -0700 Subject: [PATCH] qcacld-3.0: Remove obsolete sme_change_country_code() Function sme_change_country_code() is obsolete, so remove it. Change-Id: I1d4ce3cb8931982415f5c457d01cd6046208db44 CRs-Fixed: 2212903 --- core/sme/inc/sme_api.h | 7 ---- core/sme/src/common/sme_api.c | 72 ----------------------------------- 2 files changed, 79 deletions(-) diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index a88dad4ff858..fdf79dfc42b3 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -510,13 +510,6 @@ bool sme_is11h_supported(tHalHandle hHal); bool sme_is_wmm_supported(tHalHandle hHal); typedef void (*tSmeChangeCountryCallback)(void *pContext); -QDF_STATUS sme_change_country_code(tHalHandle hHal, - tSmeChangeCountryCallback callback, - uint8_t *pCountry, - void *pContext, - void *p_cds_context, - bool countryFromUserSpace, - bool sendRegHint); QDF_STATUS sme_generic_change_country_code(tHalHandle hHal, uint8_t *pCountry); diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 71b1608da142..10c37c11985b 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -4394,78 +4394,6 @@ bool sme_is_wmm_supported(tHalHandle hHal) return csr_is_wmm_supported(pMac); } -/* - * sme_change_country_code() - - * Change Country code from upperlayer during WLAN driver operation. - * This is a synchronous API. - * - * hHal - The handle returned by mac_open. - * pCountry New Country Code String - * sendRegHint If we want to send reg hint to nl80211 - * Return QDF_STATUS SUCCESS. - * FAILURE or RESOURCES The API finished and failed. - */ -QDF_STATUS sme_change_country_code(tHalHandle hHal, - tSmeChangeCountryCallback callback, - uint8_t *pCountry, - void *pContext, - void *p_cds_context, - bool countryFromUserSpace, - bool sendRegHint) -{ - QDF_STATUS status = QDF_STATUS_E_FAILURE; - tpAniSirGlobal pMac = PMAC_STRUCT(hHal); - struct scheduler_msg msg = {0}; - tAniChangeCountryCodeReq *pMsg; - - MTRACE(qdf_trace(QDF_MODULE_ID_SME, - TRACE_CODE_SME_RX_HDD_CHANGE_CNTRYCODE, NO_SESSION, - 0)); - status = sme_acquire_global_lock(&pMac->sme); - if (QDF_IS_STATUS_SUCCESS(status)) { - if ((pMac->roam.configParam.Is11dSupportEnabledOriginal == true) - && (!pMac->roam.configParam. - fSupplicantCountryCodeHasPriority)) { - - sme_warn("Set Country Code Fail since the STA is associated and userspace does not have priority"); - - sme_release_global_lock(&pMac->sme); - status = QDF_STATUS_E_FAILURE; - return status; - } - - pMsg = qdf_mem_malloc(sizeof(tAniChangeCountryCodeReq)); - if (NULL == pMsg) { - sme_err("csrChangeCountryCode: failed to allocate mem for req"); - sme_release_global_lock(&pMac->sme); - return QDF_STATUS_E_NOMEM; - } - - pMsg->msgType = eWNI_SME_CHANGE_COUNTRY_CODE; - pMsg->msgLen = (uint16_t) sizeof(tAniChangeCountryCodeReq); - qdf_mem_copy(pMsg->countryCode, pCountry, 3); - pMsg->countryFromUserSpace = countryFromUserSpace; - pMsg->sendRegHint = sendRegHint; - pMsg->changeCCCallback = callback; - pMsg->pDevContext = pContext; - pMsg->p_cds_context = p_cds_context; - - msg.type = eWNI_SME_CHANGE_COUNTRY_CODE; - msg.bodyptr = pMsg; - msg.reserved = 0; - - if (QDF_STATUS_SUCCESS != - scheduler_post_msg(QDF_MODULE_ID_SME, &msg)) { - sme_err("sme_change_country_code failed to post msg to self"); - qdf_mem_free((void *)pMsg); - status = QDF_STATUS_E_FAILURE; - } - sme_release_global_lock(&pMac->sme); - } - - return status; -} - /* * sme_generic_change_country_code() - * Change Country code from upperlayer during WLAN driver operation.