qcacld-3.0: Remove eWNI_SME_CHANGE_COUNTRY_CODE message handling

Message eWNI_SME_CHANGE_COUNTRY_CODE is no longer being sent, so
remove it along with the handler for it.

Change-Id: I8fe5e1e8c0c18ab51d496dddd9604c3a4cb2b236
CRs-Fixed: 2212920
This commit is contained in:
Jeff Johnson
2018-03-24 11:58:51 -07:00
zatwierdzone przez nshrivas
rodzic 0820d32488
commit bc5aecd951
5 zmienionych plików z 0 dodań i 151 usunięć

Wyświetl plik

@@ -1823,20 +1823,6 @@ typedef struct sAniGetSnrReq {
int8_t snr;
} tAniGetSnrReq, *tpAniGetSnrReq;
/* Change country code request MSG structure */
typedef struct sAniChangeCountryCodeReq {
/* Common for all types are requests */
uint16_t msgType; /* message type is same as the request type */
uint16_t msgLen; /* length of the entire request */
uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN]; /* 3 char country code */
bool countryFromUserSpace;
bool sendRegHint; /* true if we want to send hint to NL80211 */
void *changeCCCallback;
void *pDevContext; /* device context */
void *p_cds_context; /* cds context */
} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
/**
* struct ani_scan_req - Scan request
* @msg_type: Message type

Wyświetl plik

@@ -121,7 +121,6 @@ enum eWniMsgTypes {
#endif
eWNI_SME_REGISTER_MGMT_FRAME_REQ,
eWNI_SME_CHANGE_COUNTRY_CODE,
eWNI_SME_GENERIC_CHANGE_COUNTRY_CODE,
eWNI_SME_MAX_ASSOC_EXCEEDED,
#ifdef FEATURE_WLAN_TDLS

Wyświetl plik

@@ -289,7 +289,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
CASE_RETURN_STRING(eWNI_SME_ESE_ADJACENT_AP_REPORT);
#endif
CASE_RETURN_STRING(eWNI_SME_REGISTER_MGMT_FRAME_REQ);
CASE_RETURN_STRING(eWNI_SME_CHANGE_COUNTRY_CODE);
CASE_RETURN_STRING(eWNI_SME_GENERIC_CHANGE_COUNTRY_CODE);
CASE_RETURN_STRING(eWNI_SME_MAX_ASSOC_EXCEEDED);
#ifdef WLAN_FEATURE_GTK_OFFLOAD

Wyświetl plik

@@ -509,7 +509,6 @@ bool sme_is11d_supported(tHalHandle hHal);
bool sme_is11h_supported(tHalHandle hHal);
bool sme_is_wmm_supported(tHalHandle hHal);
typedef void (*tSmeChangeCountryCallback)(void *pContext);
QDF_STATUS sme_generic_change_country_code(tHalHandle hHal,
uint8_t *pCountry);

Wyświetl plik

@@ -71,9 +71,6 @@ static tSelfRecoveryStats g_self_recovery_stats;
static QDF_STATUS init_sme_cmd_list(tpAniSirGlobal pMac);
static QDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac,
void *pMsgBuf);
static void sme_disconnect_connected_sessions(tpAniSirGlobal pMac);
static QDF_STATUS sme_handle_generic_change_country_code(tpAniSirGlobal pMac,
@@ -2023,15 +2020,6 @@ QDF_STATUS sme_process_msg(tHalHandle hHal, struct scheduler_msg *pMsg)
sme_err("Empty message for: %d", pMsg->type);
}
break;
case eWNI_SME_CHANGE_COUNTRY_CODE:
if (pMsg->bodyptr) {
status = sme_handle_change_country_code((void *)pMac,
pMsg->bodyptr);
qdf_mem_free(pMsg->bodyptr);
} else {
sme_err("Empty message for: %d", pMsg->type);
}
break;
case eWNI_SME_GENERIC_CHANGE_COUNTRY_CODE:
if (pMsg->bodyptr) {
status = sme_handle_generic_change_country_code(
@@ -5672,128 +5660,6 @@ void sme_set_cc_src(tHalHandle hHal, enum country_src cc_src)
sme_debug("Country source is %s",
sme_reg_hint_to_str(cc_src));
}
/*
* sme_handle_change_country_code() -
* Change Country code, Reg Domain and channel list
*
* Details Country Code Priority
* If Supplicant country code is priority than 11d is disabled.
* If 11D is enabled, we update the country code after every scan.
* Hence when Supplicant country code is priority, we don't need 11D info.
* Country code from Supplicant is set as current courtry code.
* User can send reset command XX (instead of country code) to reset the
* country code to default values. If 11D is priority,
* Than Supplicant country code code is set to default code. But 11D code
* is set as current country code
*
* pMac - The handle returned by mac_open.
* pMsgBuf - MSG Buffer
* Return QDF_STATUS
*/
static QDF_STATUS sme_handle_change_country_code(tpAniSirGlobal pMac,
void *pMsgBuf)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
tAniChangeCountryCodeReq *pMsg;
v_REGDOMAIN_t domainIdIoctl;
QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
static uint8_t default_country[CDS_COUNTRY_CODE_LEN + 1];
pMsg = (tAniChangeCountryCodeReq *) pMsgBuf;
/*
* if the reset Supplicant country code command is triggered,
* enable 11D, reset the country code and return
*/
if (!qdf_mem_cmp(pMsg->countryCode, SME_INVALID_COUNTRY_CODE, 2)) {
pMac->roam.configParam.Is11dSupportEnabled =
pMac->roam.configParam.Is11dSupportEnabledOriginal;
qdf_status = ucfg_reg_get_default_country(pMac->psoc,
default_country);
/* read the country code and use it */
if (QDF_IS_STATUS_SUCCESS(qdf_status)) {
qdf_mem_copy(pMsg->countryCode,
default_country,
WNI_CFG_COUNTRY_CODE_LEN);
} else {
status = QDF_STATUS_E_FAILURE;
return status;
}
/*
* Update the 11d country to default country so that when
* callback is received for this default country, driver will
* not disable the 11d taking it as valid country by user.
*/
sme_debug(
"Set default country code (%c%c) as invalid country received",
pMsg->countryCode[0], pMsg->countryCode[1]);
qdf_mem_copy(pMac->scan.countryCode11d,
pMsg->countryCode,
WNI_CFG_COUNTRY_CODE_LEN);
} else {
/* if Supplicant country code has priority, disable 11d */
if (pMac->roam.configParam.fSupplicantCountryCodeHasPriority &&
pMsg->countryFromUserSpace)
pMac->roam.configParam.Is11dSupportEnabled = false;
}
if (pMac->roam.configParam.Is11dSupportEnabled)
return QDF_STATUS_SUCCESS;
/* Set Current Country code and Current Regulatory domain */
status = csr_set_country_code(pMac, pMsg->countryCode);
if (QDF_STATUS_SUCCESS != status) {
/* Supplicant country code failed. So give 11D priority */
pMac->roam.configParam.Is11dSupportEnabled =
pMac->roam.configParam.Is11dSupportEnabledOriginal;
sme_err("Set Country Code Fail %d", status);
return status;
}
/* overwrite the defualt country code */
qdf_mem_copy(pMac->scan.countryCodeDefault,
pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN);
/* Get Domain ID from country code */
status = csr_get_regulatory_domain_for_country(pMac,
pMac->scan.countryCodeCurrent,
(v_REGDOMAIN_t *) &
domainIdIoctl,
SOURCE_QUERY);
if (status != QDF_STATUS_SUCCESS) {
sme_err("Fail to get regId %d", domainIdIoctl);
return status;
} else if (REGDOMAIN_WORLD == domainIdIoctl) {
/* Supplicant country code is invalid, so we are on world mode
* now. So give 11D chance to update
*/
pMac->roam.configParam.Is11dSupportEnabled =
pMac->roam.configParam.Is11dSupportEnabledOriginal;
sme_warn("Country Code unrecognized by driver");
}
if (domainIdIoctl >= REGDOMAIN_COUNT) {
sme_err("Invalid regId %d", domainIdIoctl);
return QDF_STATUS_E_FAILURE;
} else {
/* if 11d has priority, clear currentCountryBssid & countryCode11d to get */
/* set again if we find AP with 11d info during scan */
if (!pMac->roam.configParam.fSupplicantCountryCodeHasPriority) {
sme_warn("Clearing currentCountryBssid, countryCode11d");
qdf_mem_zero(&pMac->scan.currentCountryBssid,
sizeof(struct qdf_mac_addr));
qdf_mem_zero(pMac->scan.countryCode11d,
sizeof(pMac->scan.countryCode11d));
}
}
if (pMsg->changeCCCallback)
((tSmeChangeCountryCallback) (pMsg->changeCCCallback))((void *)
pMsg->pDevContext);
return QDF_STATUS_SUCCESS;
}
/**
* sme_handle_generic_change_country_code() - handles country ch req