wlan: Remove support for deprecated api get/set countryrev
Customer has deprecated the run time configuration
APIs get/set countryrev.
Change-Id: I1f071bce41375657635967fb05d961bf828600eb
CRs-Fixed: 531806
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 64469e5..75ec020 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -195,7 +195,6 @@
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
void hdd_getBand_helper(hdd_context_t *pHddCtx, int *pBand);
static VOS_STATUS hdd_parse_channellist(tANI_U8 *pValue, tANI_U8 *pChannelList, tANI_U8 *pNumChannels);
-static VOS_STATUS hdd_parse_countryrev(tANI_U8 *pValue, tANI_U8 *pChannelList, tANI_U8 *pNumChannels);
static VOS_STATUS hdd_parse_send_action_frame_data(tANI_U8 *pValue, tANI_U8 *pTargetApBssid,
tANI_U8 *pChannel, tANI_U8 *pDwellTime,
tANI_U8 **pBuf, tANI_U8 *pBufLen);
@@ -643,69 +642,6 @@
}
}
-#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
- else if ( strncasecmp(command, "SETCOUNTRYREV", 13) == 0 )
- {
- tANI_U8 *value = command;
- tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN] = {0};
- tANI_U8 revision = 0;
- eHalStatus status = eHAL_STATUS_SUCCESS;
- v_REGDOMAIN_t regId;
-
- status = hdd_parse_countryrev(value, countryCode, &revision);
- if (eHAL_STATUS_SUCCESS != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Failed to parse country revision information", __func__);
- ret = -EINVAL;
- goto exit;
- }
-
- /* Validate country code */
- status = sme_GetRegulatoryDomainForCountry(pHddCtx->hHal, countryCode, ®Id);
- if (eHAL_STATUS_SUCCESS != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Invalid country code %s", __func__, countryCode);
- ret = -EINVAL;
- goto exit;
- }
-
- /* Validate revision */
- if ((SME_KR_3 != revision) && (SME_KR_24 != revision) && (SME_KR_25 != revision))
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Invalid revision %d", __func__, revision);
- ret = -EINVAL;
- goto exit;
- }
-
- hdd_checkandupdate_dfssetting(pAdapter, countryCode);
- hdd_checkandupdate_phymode(pAdapter, countryCode);
- ret = (int)sme_ChangeCountryCode(pHddCtx->hHal, NULL, countryCode,
- pAdapter, pHddCtx->pvosContext, eSIR_TRUE);
- if (0 != ret)
- {
- VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: SME Change Country code fail ret=%d", __func__, ret);
- ret = -EINVAL;
- goto exit;
- }
-
- if (0 == strncmp(countryCode, "KR", 2))
- {
- status = sme_ChangeCountryValidChannelListByRevision((tHalHandle)(pHddCtx->hHal),
- revision);
- if (eHAL_STATUS_SUCCESS != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Failed to build valid channel list", __func__);
- ret = -EINVAL;
- goto exit;
- }
- }
- }
-#endif
/*
command should be a string having format
SET_SAP_CHANNEL_LIST <num of channels> <the channels seperated by spaces>
@@ -1071,39 +1007,6 @@
goto exit;
}
}
- else if (strncmp(command, "GETCOUNTRYREV", 13) == 0)
- {
- tANI_U8 pBuf[WNI_CFG_COUNTRY_CODE_LEN];
- tANI_U8 uBufLen = WNI_CFG_COUNTRY_CODE_LEN;
- tANI_U8 revision = 0;
- /* The format of the data copied to the user is GETCOUNTRYREV KR 25,
- hence size of the array is country code + whitespace + 2 byte revision + ASCII NUL */
- char extra[32] = {0};
- tANI_U8 len = 0;
-
- if (eHAL_STATUS_SUCCESS != sme_GetCountryCode( (tHalHandle)(pHddCtx->hHal), pBuf, &uBufLen ))
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: failed to get country code", __func__);
- ret = -EFAULT;
- goto exit;
- }
- pBuf[uBufLen] = '\0';
- sme_GetCountryRevision((tHalHandle)(pHddCtx->hHal), &revision);
-
- if (0 == strncmp(pBuf, "KR", 2))
- len = snprintf(extra, sizeof(extra), "%s %s %u", command, pBuf, revision);
- else
- len = snprintf(extra, sizeof(extra), "%s %s", command, pBuf);
-
- if (copy_to_user(priv_data.buf, &extra, len + 1))
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: failed to copy data to user buffer", __func__);
- ret = -EFAULT;
- goto exit;
- }
- }
else if (strncmp(command, "SETROAMSCANCHANNELS", 19) == 0)
{
tANI_U8 *value = command;
@@ -2152,7 +2055,7 @@
This function parses the send action frame data passed in the format
SENDACTIONFRAME<space><bssid><space><channel><space><dwelltime><space><data>
- \param - pValue Pointer to input country code revision
+ \param - pValue Pointer to input data
\param - pTargetApBssid Pointer to target Ap bssid
\param - pChannel Pointer to the Target AP channel
\param - pDwellTime Pointer to the time to stay off-channel after transmitting action frame
@@ -2298,86 +2201,6 @@
/**---------------------------------------------------------------------------
- \brief hdd_parse_countryrev() - HDD Parse country code revision
-
- This function parses the country code revision passed in the format
- SETCOUNTRYREV<space><Country code><space>revision
-
- \param - pValue Pointer to input country code revision
- \param - pCountryCode Pointer to local output array to record country code
- \param - pRevision Pointer to store revision integer number
-
- \return - 0 for success non-zero for failure
-
- --------------------------------------------------------------------------*/
-VOS_STATUS hdd_parse_countryrev(tANI_U8 *pValue, tANI_U8 *pCountryCode, tANI_U8 *pRevision)
-{
- tANI_U8 *inPtr = pValue;
- int tempInt;
-
- inPtr = strnchr(pValue, strlen(pValue), SPACE_ASCII_VALUE);
- /*no argument after the command*/
- if (NULL == inPtr)
- {
- return -EINVAL;
- }
-
- /*no space after the command*/
- else if (SPACE_ASCII_VALUE != *inPtr)
- {
- return -EINVAL;
- }
-
- /*removing empty spaces*/
- while ((SPACE_ASCII_VALUE == *inPtr)&& ('\0' != *inPtr) ) inPtr++;
-
- /*no argument followed by spaces*/
- if ('\0' == *inPtr)
- {
- return -EINVAL;
- }
-
- /*getting the first argument ie the country code */
- sscanf(inPtr, "%3s ", pCountryCode);
-
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
- "Country code is : %s", pCountryCode);
-
- /*inPtr pointing to the beginning of first space after country code */
- inPtr = strpbrk( inPtr, " " );
- /*no revision number after the country code argument */
- if (NULL == inPtr)
- {
- return -EINVAL;
- }
-
- inPtr++;
-
- /*removing empty space*/
- while ((SPACE_ASCII_VALUE == *inPtr) && ('\0' != *inPtr) ) inPtr++;
-
- /*no channel list after the number of channels argument and spaces*/
- if (0 == strncmp(pCountryCode, "KR", 2))
- {
- if ('\0' == *inPtr)
- {
- return -EINVAL;
- }
-
- sscanf(inPtr, "%d", &tempInt);
- *pRevision = tempInt;
- }
- else
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
- "Revision input is required only for Country KR");
- return -EINVAL;
- }
- return VOS_STATUS_SUCCESS;
-}
-
-/**---------------------------------------------------------------------------
-
\brief hdd_parse_channellist() - HDD Parse channel list
This function parses the channel list passed in the format
@@ -2501,7 +2324,7 @@
This function parses the reasoc command data passed in the format
REASSOC<space><bssid><space><channel>
- \param - pValue Pointer to input country code revision
+ \param - pValue Pointer to input data
\param - pTargetApBssid Pointer to target Ap bssid
\param - pChannel Pointer to the Target AP channel