Ver código fonte

Merge "qcacld-3.0: Change WNI_CFG_COUNTRY_CODE_LEN to CFG_COUNTRY_CODE_LEN" into wlan-cld3.driver.lnx.2.0

CNSS_WLAN Service 6 anos atrás
pai
commit
8c05acecbe

+ 4 - 4
core/hdd/src/wlan_hdd_stats.c

@@ -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;
 }

+ 2 - 2
core/hdd/src/wlan_hdd_wext.c

@@ -6723,8 +6723,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));

+ 5 - 3
core/mac/inc/sir_api.h

@@ -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 */

+ 3 - 3
core/mac/src/pe/sch/sch_message.c

@@ -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};
 

+ 1 - 1
core/sap/inc/sap_api.h

@@ -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;

+ 1 - 1
core/sap/src/sap_fsm.c

@@ -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;

+ 3 - 3
core/sme/inc/csr_api.h

@@ -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;

+ 4 - 4
core/sme/inc/csr_internal.h

@@ -457,9 +457,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 */
 
@@ -467,7 +467,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

+ 2 - 2
core/sme/src/common/sme_api.c

@@ -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);

+ 6 - 6
core/sme/src/csr/csr_api_roam.c

@@ -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] =
@@ -2871,7 +2871,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
@@ -2879,7 +2879,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 =
@@ -10349,7 +10349,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,

+ 5 - 5
core/sme/src/csr/csr_api_scan.c

@@ -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;