qcacld-3.0: Change WNI_CFG_COUNTRY_CODE_LEN to CFG_COUNTRY_CODE_LEN

All WNI configurations will be cleanup based on new cfg framework, so
change Change WNI_CFG_COUNTRY_CODE_LEN to CFG_COUNTRY_CODE_LEN.

Change-Id: I786b62e2c0aff08a89fc3c8a3359e2ffb4044269
CRs-Fixed: 2380488
This commit is contained in:
Wu Gao 2019-01-14 15:09:26 +08:00 committed by nshrivas
parent 97c070b5da
commit aa15514706
11 changed files with 36 additions and 34 deletions

View File

@ -392,10 +392,10 @@ static bool put_wifi_interface_info(tpSirWifiInterfaceInfo stats,
QDF_MAC_ADDR_SIZE, stats->bssid.bytes) ||
nla_put(vendor_event,
QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_AP_COUNTRY_STR,
WNI_CFG_COUNTRY_CODE_LEN, stats->apCountryStr) ||
CFG_COUNTRY_CODE_LEN, stats->apCountryStr) ||
nla_put(vendor_event,
QCA_WLAN_VENDOR_ATTR_LL_STATS_IFACE_INFO_COUNTRY_STR,
WNI_CFG_COUNTRY_CODE_LEN, stats->countryStr)) {
CFG_COUNTRY_CODE_LEN, stats->countryStr)) {
hdd_err("QCA_WLAN_VENDOR_ATTR put fail");
return false;
}
@ -588,10 +588,10 @@ bool hdd_get_interface_info(struct hdd_adapter *adapter,
}
qdf_mem_copy(pInfo->countryStr,
mac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN);
mac->scan.countryCodeCurrent, CFG_COUNTRY_CODE_LEN);
qdf_mem_copy(pInfo->apCountryStr,
mac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN);
mac->scan.countryCodeCurrent, CFG_COUNTRY_CODE_LEN);
return true;
}

View File

@ -6651,8 +6651,8 @@ static int __iw_get_char_setnone(struct net_device *dev,
QDF_STATUS status;
uint8_t i, len;
char *buf;
uint8_t ubuf[WNI_CFG_COUNTRY_CODE_LEN];
uint8_t ubuf_len = WNI_CFG_COUNTRY_CODE_LEN;
uint8_t ubuf[CFG_COUNTRY_CODE_LEN];
uint8_t ubuf_len = CFG_COUNTRY_CODE_LEN;
struct channel_list_info channel_list;
memset(&channel_list, 0, sizeof(channel_list));

View File

@ -57,6 +57,8 @@ struct mac_context;
/* / Max supported channel list */
#define SIR_MAX_SUPPORTED_CHANNEL_LIST 96
#define CFG_VALID_CHANNEL_LIST_LEN 100
#define CFG_COUNTRY_CODE_LEN 3
#define SIR_MDIE_ELEMENT_ID 54
#define SIR_MDIE_SIZE 3 /* MD ID(2 bytes), Capability(1 byte) */
@ -1455,7 +1457,7 @@ typedef struct sAniGetSnrReq {
typedef struct sAniGenericChangeCountryCodeReq {
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 */
uint8_t countryCode[CFG_COUNTRY_CODE_LEN]; /* 3 char country code */
} tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq;
/**
@ -3731,9 +3733,9 @@ typedef struct {
/* bssid */
struct qdf_mac_addr bssid;
/* country string advertised by AP */
uint8_t apCountryStr[WNI_CFG_COUNTRY_CODE_LEN];
uint8_t apCountryStr[CFG_COUNTRY_CODE_LEN];
/* country string for this association */
uint8_t countryStr[WNI_CFG_COUNTRY_CODE_LEN];
uint8_t countryStr[CFG_COUNTRY_CODE_LEN];
} tSirWifiInterfaceInfo, *tpSirWifiInterfaceInfo;
/* channel information */

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -141,8 +141,8 @@ sch_get_params(struct mac_context *mac,
uint32_t *prf;
struct wlan_mlme_edca_params *edca_params;
QDF_STATUS status;
uint8_t country_code_str[WNI_CFG_COUNTRY_CODE_LEN];
uint32_t country_code_len = WNI_CFG_COUNTRY_CODE_LEN;
uint8_t country_code_str[CFG_COUNTRY_CODE_LEN];
uint32_t country_code_len = CFG_COUNTRY_CODE_LEN;
uint32_t ani_l[] = {edca_ani_acbe_local, edca_ani_acbk_local,
edca_ani_acvi_local, edca_ani_acvo_local};

View File

@ -518,7 +518,7 @@ typedef struct sap_config {
/* Max ie length 255 * 2(WPA+RSN) + 2 bytes(vendor specific ID) * 2 */
uint8_t RSNWPAReqIE[(SIR_MAC_MAX_IE_LENGTH * 2) + 4];
/* it is ignored if [0] is 0. */
uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN];
uint8_t countryCode[CFG_COUNTRY_CODE_LEN];
uint8_t RSNAuthType;
uint8_t RSNEncryptType;
uint8_t mcRSNEncryptType;

View File

@ -2919,7 +2919,7 @@ sapconvert_to_csr_profile(tsap_config_t *pconfig_params, eCsrRoamBssType bssType
/* country code */
if (pconfig_params->countryCode[0])
qdf_mem_copy(profile->countryCode, pconfig_params->countryCode,
WNI_CFG_COUNTRY_CODE_LEN);
CFG_COUNTRY_CODE_LEN);
profile->ieee80211d = pconfig_params->ieee80211d;
/* wps config info */
profile->wps_state = pconfig_params->wps_state;

View File

@ -302,7 +302,7 @@ typedef struct tagCsrScanResultFilter {
* If countryCode[0] is not 0, countryCode is checked
* independent of fCheckUnknownCountryCode
*/
uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN];
uint8_t countryCode[CFG_COUNTRY_CODE_LEN];
uint8_t uapsd_mask;
/* For WPS filtering if true => auth and ecryption should be ignored */
bool bWPSAssociation;
@ -342,7 +342,7 @@ typedef struct sCsrChnPower_ {
typedef struct tagCsr11dinfo {
sCsrChannel Channels;
uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN + 1];
uint8_t countryCode[CFG_COUNTRY_CODE_LEN + 1];
/* max power channel list */
sCsrChnPower ChnPower[CFG_VALID_CHANNEL_LIST_LEN];
} tCsr11dinfo;
@ -817,7 +817,7 @@ struct csr_roam_profile {
*/
uint8_t *pAddIEAssoc;
/* it is ignored if [0] is 0. */
uint8_t countryCode[WNI_CFG_COUNTRY_CODE_LEN];
uint8_t countryCode[CFG_COUNTRY_CODE_LEN];
/* WPS Association if true => auth and ecryption should be ignored */
bool bWPSAssociation;
bool bOSENAssociation;

View File

@ -461,9 +461,9 @@ struct csr_scanstruct {
tDblLinkList channelPowerInfoList5G;
uint32_t nLastAgeTimeOut;
uint32_t nAgingCountDown;
uint8_t countryCodeDefault[WNI_CFG_COUNTRY_CODE_LEN];
uint8_t countryCodeCurrent[WNI_CFG_COUNTRY_CODE_LEN];
uint8_t countryCode11d[WNI_CFG_COUNTRY_CODE_LEN];
uint8_t countryCodeDefault[CFG_COUNTRY_CODE_LEN];
uint8_t countryCodeCurrent[CFG_COUNTRY_CODE_LEN];
uint8_t countryCode11d[CFG_COUNTRY_CODE_LEN];
v_REGDOMAIN_t domainIdDefault; /* default regulatory domain */
v_REGDOMAIN_t domainIdCurrent; /* current regulatory domain */
@ -471,7 +471,7 @@ struct csr_scanstruct {
* in 11d IE from probe rsp or beacons of neighboring APs
* will use the most popular one (max count)
*/
uint8_t countryCodeElected[WNI_CFG_COUNTRY_CODE_LEN];
uint8_t countryCodeElected[CFG_COUNTRY_CODE_LEN];
/*
* Customer wants to optimize the scan time. Avoiding scans(passive)
* on DFS channels while swipping through both bands can save some time

View File

@ -5262,12 +5262,12 @@ sme_handle_generic_change_country_code(struct mac_context *mac_ctx,
('0' != msg->countryCode[1]))
qdf_mem_copy(mac_ctx->scan.countryCode11d,
msg->countryCode,
WNI_CFG_COUNTRY_CODE_LEN);
CFG_COUNTRY_CODE_LEN);
}
qdf_mem_copy(mac_ctx->scan.countryCodeCurrent,
msg->countryCode,
WNI_CFG_COUNTRY_CODE_LEN);
CFG_COUNTRY_CODE_LEN);
/* get the channels based on new cc */
status = csr_get_channel_and_power_list(mac_ctx);

View File

@ -646,9 +646,9 @@ QDF_STATUS csr_init_chan_list(struct mac_context *mac, uint8_t *alpha2)
mac->scan.domainIdCurrent = 0;
qdf_mem_copy(mac->scan.countryCodeCurrent,
mac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN);
mac->scan.countryCodeDefault, CFG_COUNTRY_CODE_LEN);
qdf_mem_copy(mac->scan.countryCodeElected,
mac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN);
mac->scan.countryCodeDefault, CFG_COUNTRY_CODE_LEN);
status = csr_get_channel_and_power_list(mac);
return status;
@ -660,7 +660,7 @@ QDF_STATUS csr_set_channels(struct mac_context *mac, tCsrConfigParam *pParam)
uint8_t index = 0;
qdf_mem_copy(pParam->Csr11dinfo.countryCode,
mac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN);
mac->scan.countryCodeCurrent, CFG_COUNTRY_CODE_LEN);
for (index = 0; index < mac->scan.base_channels.numChannels;
index++) {
pParam->Csr11dinfo.Channels.channelList[index] =
@ -2912,7 +2912,7 @@ static QDF_STATUS csr_init11d_info(struct mac_context *mac, tCsr11dinfo *ps11din
/* legacy maintenance */
qdf_mem_copy(mac->scan.countryCodeDefault, ps11dinfo->countryCode,
WNI_CFG_COUNTRY_CODE_LEN);
CFG_COUNTRY_CODE_LEN);
/* Tush: at csropen get this initialized with default,
* during csr reset if this already set with some value
@ -2920,7 +2920,7 @@ static QDF_STATUS csr_init11d_info(struct mac_context *mac, tCsr11dinfo *ps11din
*/
if (0 == mac->scan.countryCodeCurrent[0]) {
qdf_mem_copy(mac->scan.countryCodeCurrent,
ps11dinfo->countryCode, WNI_CFG_COUNTRY_CODE_LEN);
ps11dinfo->countryCode, CFG_COUNTRY_CODE_LEN);
}
/* need to add the max power channel list */
pChanInfo =
@ -10390,7 +10390,7 @@ csr_roam_prepare_filter_from_profile(struct mac_context *mac_ctx,
* of the criteria.
*/
qdf_mem_copy(scan_fltr->countryCode, profile->countryCode,
WNI_CFG_COUNTRY_CODE_LEN);
CFG_COUNTRY_CODE_LEN);
}
scan_fltr->mdid = profile->mdid;
qdf_mem_copy(scan_fltr->bssid_hint.bytes,

View File

@ -1625,11 +1625,11 @@ static void csr_save_tx_power_to_cfg(struct mac_context *pMac,
static void csr_set_cfg_country_code(struct mac_context *mac,
uint8_t *countryCode)
{
uint8_t cc[WNI_CFG_COUNTRY_CODE_LEN];
uint8_t cc[CFG_COUNTRY_CODE_LEN];
/* v_REGDOMAIN_t DomainId */
sme_debug("Setting Country Code in Cfg %s", countryCode);
qdf_mem_copy(cc, countryCode, WNI_CFG_COUNTRY_CODE_LEN);
qdf_mem_copy(cc, countryCode, CFG_COUNTRY_CODE_LEN);
/*
* Don't program the bogus country codes that we created for Korea in
@ -1646,7 +1646,7 @@ static void csr_set_cfg_country_code(struct mac_context *mac,
*/
cc[1] = 'R';
}
cfg_set_str(mac, WNI_CFG_COUNTRY_CODE, cc, WNI_CFG_COUNTRY_CODE_LEN);
cfg_set_str(mac, WNI_CFG_COUNTRY_CODE, cc, CFG_COUNTRY_CODE_LEN);
/*
* Need to let HALPHY know about the current domain so it can apply some
@ -1660,7 +1660,7 @@ QDF_STATUS csr_get_country_code(struct mac_context *mac, uint8_t *pBuf,
QDF_STATUS status;
uint32_t len;
if (pBuf && pbLen && (*pbLen >= WNI_CFG_COUNTRY_CODE_LEN)) {
if (pBuf && pbLen && (*pbLen >= CFG_COUNTRY_CODE_LEN)) {
len = *pbLen;
status = wlan_cfg_get_str(mac, WNI_CFG_COUNTRY_CODE, pBuf,
&len);
@ -2447,7 +2447,7 @@ static QDF_STATUS csr_prepare_scan_filter(struct mac_context *mac_ctx,
pFilter->mcEncryptionType.encryptionType[i]);
}
qdf_mem_copy(filter->country, pFilter->countryCode,
WNI_CFG_COUNTRY_CODE_LEN);
CFG_COUNTRY_CODE_LEN);
if (pFilter->bWPSAssociation || pFilter->bOSENAssociation)
filter->ignore_auth_enc_type = true;