2018-03-01 14:20:29

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 00/52] ath: Synchronize regd mappings with qcacld-2.0 4.0.11.181

The mappings from ath was not synced with the QCA driver since 2009. Only
two minor fixes were integrated in 2011. Since then, a lot of regd changes
were integrated in the close source QCA driver which are now used but not
supported by the Open Source driver. This either prevents the use of the
OSS driver on such devices or the wrong conformance test limits (CTLs) may
be used.

To get the integrated we would first get access to the closed source QCA
driver and a special OSS-NDA with QCA. This doesn't seem to be possible at
the moment and thus other sources for the changes have to be found. One of
them is the qcacld-2.0 source repository [1] which contains the QCA
regdomain.h and regdomain_common.h which was relicensed by QCA as ISC. It
isn't the newest version from the QCA driver but at least received some
updates which are not present in ath's regd.

This repository [1] (commit 48f9ab5d5c161549be098997fa0e3602c1547213 to be
more precise) was now used to find differences and ad some missing
mappings.

The title of the mappings describe what exactly was changed. The "Add
regulatory mapping for" patches introduce new country codes/mappings and
thus don't change old mappings. The "Add regulatory mapping for" patches
are similar but for regulatory code mappings instead of country code
mappings.

More interesting might be the "Map XXXX to YYYY" patches because they
modify already existing mappings. The result are following changes to the
selected CTLs:

* CTRY_ALBANIA: 5GHz: NO_CTL -> ETSI
* CTRY_ALGERIA: 5GHz: NO_CTL -> ETSI
* CTRY_BANGLADESH: 5GHz: NO_CTL -> FCC
* CTRY_BRUNEI_DARUSSALAM: 5GHz: FCC -> ETSI
* CTRY_HONDURAS: 5GHz: NO_CTL -> FCC
* CTRY_INDONESIA: 5GHz: NO_CTL -> FCC
* CTRY_ISRAEL: 5GHz: NO_CTL -> ETSI
* CTRY_KOREA_NORTH: 2.4GHz: ETSI -> MKK
* CTRY_KOREA_ROC: 2.4GHz: ETSI -> MKK
* CTRY_KOREA_ROC3: 2.4GHz: ETSI -> MKK
* CTRY_LEBANON: 5GHz: NO_CTL -> FCC
* CTRY_MACEDONIA: 5GHz: NO_CTL -> ETSI
* CTRY_MALAYSIA: 5GHz: ETSI -> FCC
* CTRY_MEXICO: 2.4GHz: FCC-> ETSI
* CTRY_PAKISTAN: 5GHz: NO_CTL -> FCC
* CTRY_ROMANIA: 5GHz: NO_CTL -> ETSI
* CTRY_RUSSIA: 5GHz: NO_CTL -> ETSI
* CTRY_SAUDI_ARABIA: 5GHz: NO_CTL -> FCC
* CTRY_SINGAPORE: 5GHz: ETSI -> FCC
* CTRY_UKRAINE: 5GHz: NO_CTL -> ETSI
* CTRY_UAE: 5GHz: NO_CTL -> ETSI
* CTRY_VIET_NAM: 5GHz: NO_CTL -> ETSI
* CTRY_ZIMBABWE: 5GHz: NO_CTL -> ETSI


Btw. I have not removed CTRY_SERBIA_MONTENEGRO, CTRY_KOREA_ROC2 or
APL2_APLD because this might break devices which have these programmed in
the EEPROM. And I have not added APL11_FCCA, APL12_WORLD and CTRY_MALDIVES
because only the code was in the qcacld-2.0 source code but not the actual
mapping.

I am relative confident that QCA also has following extra countries:

* Afghanistan
* American Samoa
* Anguilla
* Bhutan
* Burkina Faso
* Cayman Islands
* Central Africa Republic
* Chad
* Christmas Islands
* Dominica
* Ethiopia
* French Guiana
* French Polynesia
* Ghana
* Guadeloupe
* Guyana
* Cote d'Ivoire
* Lesotho
* Malawi
* Maldives
* Marshall Islands
* Martinique
* Mauitania
* Mayotte
* Micronesia
* Moldova
* Mongolia
* Namibia
* Nigeria
* Northern Mariana Islands
* Palau
* Reunion
* St Barthelemy
* St Kitts Nevis
* St Lucia
* St Martin
* St Pierre Miquelon
* St Vincent Grenadiens
* Samoa
* Senegal
* Suriname
* Togo
* Turks Caicos
* Vanuatu
* Virgin Islands
* Wallis Futuna

+ a lot of extra regdomain codes (0x15, 0x16, 0x17, 0x18, 0x19, 0x3c, 0x4f,
0x51, 0x57, 0x59) and the corresponding mappings.

There might be even a lot more. But we will miss out on them unless QCA
somehow opensources their current:

* regdomain_common.h or at least:

- enum EnumRd
- ahCmnRegDomainPairs
- ahCmnAllCountries
- ahCmnRegDomains

* regdomain.h or at least:

- enum CountryCode

Kind regards,
Sven

[1] https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/wlan/qcacld-2.0

Sven Eckelmann (52):
ath: Add regulatory mapping for Bahamas
ath: Add regulatory mapping for Bermuda
ath: Add regulatory mapping for Japan (J56)
ath: Add regulatory mapping for Japan KDDI
ath: Add regulatory mapping for Kenya
ath: Add regulatory mapping for Mauritius
ath: Add regulatory mapping for Montenegro
ath: Add regulatory mapping for Nicaragua
ath: Add regulatory mapping for Paraguya
ath: Add regulatory mapping for Rwanda
ath: Add regulatory mapping for Serbia
ath: Add regulatory mapping for Tanzania
ath: Add regulatory mapping for Uganda
ath: Add regulatory mapping for United States for AP
ath: Add regulatory mapping for APL2_FCCA
ath: Add regulatory mapping for APL10_MKKC
ath: Add regulatory mapping for APL13_WORLD
ath: Add regulatory mapping for ETSI8_WORLD
ath: Add regulatory mapping for ETSI9_WORLD
ath: Add regulatory mapping for FCC3_ETSIC
ath: Switch APL9_WORLD to 2.4GHz MKK CTL
ath: Map Albania to ETSI1_WORLD
ath: Map Algeria to APL13_WORLD
ath: Map Australia to FCC3_WORLD
ath: Map Bangladesh to APL1_WORLD
ath: Map Brunei Darussalam to APL6_WORLD
ath: Map Bulgaria to ETSI1_WORLD
ath: Map Colombia to FCC1_FCCA
ath: Map Czech to ETSI1_WORLD
ath: Map Honduras to FCC3_WORLD
ath: Map Indonesia to APL2_WORLD
ath: Map Isreal to ETSI3_WORLD
ath: Map Japan to MKK5_MKKA2
ath: Map South Korea to APL10_MKKC
ath: Map Lebanon to APL1_WORLD
ath: Map Macedonia to ETSI1_WORLD
ath: Map Malasia to FCC1_WORLD
ath: Map Mexico to FCC1_WORLD
ath: Map New Zealand to FCC3_ETSIC
ath: Map Pakistan to APL1_WORLD
ath: Map Peru to APL1_WORLD
ath: Map Philippines to FCC3_WORLD
ath: Map Romania to ETSI1_WORLD
ath: Map Russia to ETSI8_WORLD
ath: Map Saudi Arabia to FCC2_WORLD
ath: Map Singapore to FCC3_WORLD
ath: Map Taiwan to APL7_FCCA
ath: Map Ukraine to ETSI9_WORLD
ath: Map U.A.E. to ETSI1_WORLD
ath: Map Venezuela to FCC1_WORLD
ath: Map Vietnam to ETSI3_WORLD
ath: Map Zimbabwe to ETSI1_WORLD

drivers/net/wireless/ath/regd.h | 10 ++++
drivers/net/wireless/ath/regd_common.h | 98 ++++++++++++++++++++++------------
2 files changed, 73 insertions(+), 35 deletions(-)

--
2.11.0


2018-03-01 14:20:56

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 11/52] ath: Add regulatory mapping for Serbia

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: ETSI
* 5GHz: ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd.h | 1 +
drivers/net/wireless/ath/regd_common.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index 3021ba5d7ef5..9fe4857baaae 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -164,6 +164,7 @@ enum CountryCode {
CTRY_RUSSIA = 643,
CTRY_RWANDA = 646,
CTRY_SAUDI_ARABIA = 682,
+ CTRY_SERBIA = 688,
CTRY_SERBIA_MONTENEGRO = 891,
CTRY_SINGAPORE = 702,
CTRY_SLOVAKIA = 703,
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 89a3a9104428..4c41308e39c1 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -456,6 +456,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_RUSSIA, NULL1_WORLD, "RU"},
{CTRY_RWANDA, APL1_WORLD, "RW"},
{CTRY_SAUDI_ARABIA, NULL1_WORLD, "SA"},
+ {CTRY_SERBIA, ETSI1_WORLD, "RS"},
{CTRY_SERBIA_MONTENEGRO, ETSI1_WORLD, "CS"},
{CTRY_SINGAPORE, APL6_WORLD, "SG"},
{CTRY_SLOVAKIA, ETSI1_WORLD, "SK"},
--
2.11.0

2018-03-01 14:21:26

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 23/52] ath: Map Algeria to APL13_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index bdfbdd4e8583..984039073aea 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -304,7 +304,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_DEBUG, NO_ENUMRD, "DB"},
{CTRY_DEFAULT, FCC1_FCCA, "CO"},
{CTRY_ALBANIA, ETSI1_WORLD, "AL"},
- {CTRY_ALGERIA, NULL1_WORLD, "DZ"},
+ {CTRY_ALGERIA, APL13_WORLD, "DZ"},
{CTRY_ARGENTINA, FCC3_WORLD, "AR"},
{CTRY_ARMENIA, ETSI4_WORLD, "AM"},
{CTRY_ARUBA, ETSI1_WORLD, "AW"},
--
2.11.0

2018-03-01 14:21:36

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 27/52] ath: Map Bulgaria to ETSI1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

This change itself doesn't change the selected CTL of this country and is
only required to stay in sync with the QCA mappings.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 4edd4c1d99fa..3a7fbd3794bc 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -325,7 +325,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_BOSNIA_HERZ, ETSI1_WORLD, "BA"},
{CTRY_BRAZIL, FCC3_WORLD, "BR"},
{CTRY_BRUNEI_DARUSSALAM, APL6_WORLD, "BN"},
- {CTRY_BULGARIA, ETSI6_WORLD, "BG"},
+ {CTRY_BULGARIA, ETSI1_WORLD, "BG"},
{CTRY_CAMBODIA, ETSI1_WORLD, "KH"},
{CTRY_CANADA, FCC3_FCCA, "CA"},
{CTRY_CANADA2, FCC6_FCCA, "CA"},
--
2.11.0

2018-03-01 14:22:13

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 42/52] ath: Map Philippines to FCC3_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

This change itself doesn't change the selected CTL of this country and is
only required to stay in sync with the QCA mappings.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 983572ea7048..66c4a579cb99 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -459,7 +459,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_PAPUA_NEW_GUINEA, FCC1_WORLD, "PG"},
{CTRY_PARAGUAY, FCC3_WORLD, "PY"},
{CTRY_PERU, FCC3_WORLD, "PE"},
- {CTRY_PHILIPPINES, APL1_WORLD, "PH"},
+ {CTRY_PHILIPPINES, FCC3_WORLD, "PH"},
{CTRY_POLAND, ETSI1_WORLD, "PL"},
{CTRY_PORTUGAL, ETSI1_WORLD, "PT"},
{CTRY_PUERTO_RICO, FCC1_FCCA, "PR"},
--
2.11.0

2018-03-01 14:21:53

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 34/52] ath: Map South Korea to APL10_MKKC

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

This change itself doesn't change the selected CTL of this country and is
only required to stay in sync with the QCA mappings.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 14cb25ab494d..dee9db074d84 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -429,7 +429,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_KAZAKHSTAN, NULL1_WORLD, "KZ"},
{CTRY_KENYA, APL1_WORLD, "KE"},
{CTRY_KOREA_NORTH, APL9_MKKC, "KP"},
- {CTRY_KOREA_ROC, APL9_MKKC, "KR"},
+ {CTRY_KOREA_ROC, APL10_MKKC, "KR"},
{CTRY_KOREA_ROC2, APL2_WORLD, "K2"},
{CTRY_KOREA_ROC3, APL9_MKKC, "K3"},
{CTRY_KUWAIT, ETSI3_WORLD, "KW"},
--
2.11.0

2018-03-01 14:21:51

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 33/52] ath: Map Japan to MKK5_MKKA2

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

This change itself doesn't change the selected CTL of this country and is
only required to stay in sync with the QCA mappings.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 59145decdb2b..14cb25ab494d 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -364,7 +364,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_ITALY, ETSI1_WORLD, "IT"},
{CTRY_JAMAICA, FCC3_WORLD, "JM"},

- {CTRY_JAPAN, MKK1_MKKA, "JP"},
+ {CTRY_JAPAN, MKK5_MKKA2, "JP"},
{CTRY_JAPAN1, MKK1_MKKB, "JP"},
{CTRY_JAPAN2, MKK1_FCCA, "JP"},
{CTRY_JAPAN3, MKK2_MKKA, "JP"},
--
2.11.0

2018-03-01 14:21:06

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 15/52] ath: Add regulatory mapping for APL2_FCCA

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't available and
it is still programmed in the EEPROM then it will cause an error and stop
the initialization with:

Invalid EEPROM contents

The current CTL mappings for this regdomain code are:

* 2.4GHz: FCC
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 5cbd76235248..07c966ad7a67 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -59,6 +59,7 @@ enum EnumRd {
MKK1_MKKA1 = 0x4A,
MKK1_MKKA2 = 0x4B,
MKK1_MKKC = 0x4C,
+ APL2_FCCA = 0x4D,

APL3_FCCA = 0x50,
APL1_WORLD = 0x52,
@@ -189,6 +190,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
{FCC1_FCCA, CTL_FCC, CTL_FCC},
{APL1_WORLD, CTL_FCC, CTL_ETSI},
{APL2_WORLD, CTL_FCC, CTL_ETSI},
+ {APL2_FCCA, CTL_FCC, CTL_FCC},
{APL3_WORLD, CTL_FCC, CTL_ETSI},
{APL4_WORLD, CTL_FCC, CTL_ETSI},
{APL5_WORLD, CTL_FCC, CTL_ETSI},
--
2.11.0

2018-03-01 14:22:03

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 38/52] ath: Map Mexico to FCC1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: FCC-> ETSI
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index efc363af5e41..ca1f07e55aec 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -443,7 +443,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_MALAYSIA, FCC1_WORLD, "MY"},
{CTRY_MALTA, ETSI1_WORLD, "MT"},
{CTRY_MAURITIUS, ETSI1_WORLD, "MU"},
- {CTRY_MEXICO, FCC1_FCCA, "MX"},
+ {CTRY_MEXICO, FCC1_WORLD, "MX"},
{CTRY_MONACO, ETSI4_WORLD, "MC"},
{CTRY_MONTENEGRO, ETSI1_WORLD, "ME"},
{CTRY_MOROCCO, APL4_WORLD, "MA"},
--
2.11.0

2018-03-01 14:21:16

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 19/52] ath: Add regulatory mapping for ETSI9_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't available and
it is still programmed in the EEPROM then it will cause an error and stop
the initialization with:

Invalid EEPROM contents

The current CTL mappings for this regdomain code are:

* 2.4GHz: ETSI
* 5GHz: ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 88913c67fed2..f1735ac67c52 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -45,6 +45,7 @@ enum EnumRd {
ETSI5_WORLD = 0x39,
ETSI6_WORLD = 0x34,
ETSI8_WORLD = 0x3D,
+ ETSI9_WORLD = 0x3E,
ETSI_RESERVED = 0x33,

MKK1_MKKA = 0x40,
@@ -185,6 +186,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
{ETSI5_WORLD, CTL_ETSI, CTL_ETSI},
{ETSI6_WORLD, CTL_ETSI, CTL_ETSI},
{ETSI8_WORLD, CTL_ETSI, CTL_ETSI},
+ {ETSI9_WORLD, CTL_ETSI, CTL_ETSI},

/* XXX: For ETSI3_ETSIA, Was NO_CTL meant for the 2 GHz band ? */
{ETSI3_ETSIA, CTL_ETSI, CTL_ETSI},
--
2.11.0

2018-03-01 14:21:33

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 26/52] ath: Map Brunei Darussalam to APL6_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: FCC -> ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index a5d528367082..4edd4c1d99fa 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -324,7 +324,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_BOLIVIA, APL1_ETSIC, "BO"},
{CTRY_BOSNIA_HERZ, ETSI1_WORLD, "BA"},
{CTRY_BRAZIL, FCC3_WORLD, "BR"},
- {CTRY_BRUNEI_DARUSSALAM, APL1_WORLD, "BN"},
+ {CTRY_BRUNEI_DARUSSALAM, APL6_WORLD, "BN"},
{CTRY_BULGARIA, ETSI6_WORLD, "BG"},
{CTRY_CAMBODIA, ETSI1_WORLD, "KH"},
{CTRY_CANADA, FCC3_FCCA, "CA"},
--
2.11.0

2018-03-01 14:20:46

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 07/52] ath: Add regulatory mapping for Montenegro

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: ETSI
* 5GHz: ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd.h | 1 +
drivers/net/wireless/ath/regd_common.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index f38e42703060..8575718425b6 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -141,6 +141,7 @@ enum CountryCode {
CTRY_MAURITIUS = 480,
CTRY_MEXICO = 484,
CTRY_MONACO = 492,
+ CTRY_MONTENEGRO = 499,
CTRY_MOROCCO = 504,
CTRY_NEPAL = 524,
CTRY_NETHERLANDS = 528,
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 375f9da6955b..df5db47f2930 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -433,6 +433,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_MAURITIUS, ETSI1_WORLD, "MU"},
{CTRY_MEXICO, FCC1_FCCA, "MX"},
{CTRY_MONACO, ETSI4_WORLD, "MC"},
+ {CTRY_MONTENEGRO, ETSI1_WORLD, "ME"},
{CTRY_MOROCCO, APL4_WORLD, "MA"},
{CTRY_NEPAL, APL1_WORLD, "NP"},
{CTRY_NETHERLANDS, ETSI1_WORLD, "NL"},
--
2.11.0

2018-03-01 14:21:39

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 28/52] ath: Map Colombia to FCC1_FCCA

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

This change itself doesn't change the selected CTL of this country and is
only required to stay in sync with the QCA mappings.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 3a7fbd3794bc..c28347fac774 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -331,7 +331,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_CANADA2, FCC6_FCCA, "CA"},
{CTRY_CHILE, APL6_WORLD, "CL"},
{CTRY_CHINA, APL1_WORLD, "CN"},
- {CTRY_COLOMBIA, FCC1_FCCA, "CO"},
+ {CTRY_COLOMBIA, FCC3_WORLD, "CO"},
{CTRY_COSTA_RICA, FCC1_WORLD, "CR"},
{CTRY_CROATIA, ETSI1_WORLD, "HR"},
{CTRY_CYPRUS, ETSI1_WORLD, "CY"},
--
2.11.0

2018-03-01 14:21:46

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 31/52] ath: Map Indonesia to APL2_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index cfa324592271..6a325213c163 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -357,7 +357,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_HUNGARY, ETSI1_WORLD, "HU"},
{CTRY_ICELAND, ETSI1_WORLD, "IS"},
{CTRY_INDIA, APL6_WORLD, "IN"},
- {CTRY_INDONESIA, NULL1_WORLD, "ID"},
+ {CTRY_INDONESIA, APL2_WORLD, "ID"},
{CTRY_IRAN, APL1_WORLD, "IR"},
{CTRY_IRELAND, ETSI1_WORLD, "IE"},
{CTRY_ISRAEL, NULL1_WORLD, "IL"},
--
2.11.0

2018-03-01 14:21:30

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 25/52] ath: Map Bangladesh to APL1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 173db6bd1280..a5d528367082 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -314,7 +314,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_AZERBAIJAN, ETSI4_WORLD, "AZ"},
{CTRY_BAHAMAS, FCC3_WORLD, "BS"},
{CTRY_BAHRAIN, APL6_WORLD, "BH"},
- {CTRY_BANGLADESH, NULL1_WORLD, "BD"},
+ {CTRY_BANGLADESH, APL1_WORLD, "BD"},
{CTRY_BARBADOS, FCC2_WORLD, "BB"},
{CTRY_BELARUS, ETSI1_WORLD, "BY"},
{CTRY_BELGIUM, ETSI1_WORLD, "BE"},
--
2.11.0

2018-03-01 14:21:21

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 21/52] ath: Switch APL9_WORLD to 2.4GHz MKK CTL

The regdomain code 0x5E was switched from ETSI conformance test limits
(CTL) on 2.4GHz to MKK. This only affects the different South Korea country
codes.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 447547c25093..c2074b1cd207 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -75,7 +75,7 @@ enum EnumRd {
APL6_WORLD = 0x5B,
APL7_FCCA = 0x5C,
APL8_WORLD = 0x5D,
- APL9_WORLD = 0x5E,
+ APL9_MKKC = 0x5E,
APL10_MKKC = 0x5F,

WOR0_WORLD = 0x60,
@@ -205,7 +205,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
{APL13_WORLD, CTL_ETSI, CTL_ETSI},
{APL6_WORLD, CTL_ETSI, CTL_ETSI},
{APL8_WORLD, CTL_ETSI, CTL_ETSI},
- {APL9_WORLD, CTL_ETSI, CTL_ETSI},
+ {APL9_MKKC, CTL_ETSI, CTL_MKK},

{APL10_MKKC, CTL_ETSI, CTL_MKK},
{APL3_FCCA, CTL_FCC, CTL_FCC},
@@ -428,10 +428,10 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_JORDAN, ETSI2_WORLD, "JO"},
{CTRY_KAZAKHSTAN, NULL1_WORLD, "KZ"},
{CTRY_KENYA, APL1_WORLD, "KE"},
- {CTRY_KOREA_NORTH, APL9_WORLD, "KP"},
- {CTRY_KOREA_ROC, APL9_WORLD, "KR"},
+ {CTRY_KOREA_NORTH, APL9_MKKC, "KP"},
+ {CTRY_KOREA_ROC, APL9_MKKC, "KR"},
{CTRY_KOREA_ROC2, APL2_WORLD, "K2"},
- {CTRY_KOREA_ROC3, APL9_WORLD, "K3"},
+ {CTRY_KOREA_ROC3, APL9_MKKC, "K3"},
{CTRY_KUWAIT, ETSI3_WORLD, "KW"},
{CTRY_LATVIA, ETSI1_WORLD, "LV"},
{CTRY_LEBANON, NULL1_WORLD, "LB"},
--
2.11.0

2018-03-01 14:20:41

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 05/52] ath: Add regulatory mapping for Kenya

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: ETSI
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index e430e12f90e8..bdc1ff191264 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -415,6 +415,7 @@ static struct country_code_to_enum_rd allCountries[] = {

{CTRY_JORDAN, ETSI2_WORLD, "JO"},
{CTRY_KAZAKHSTAN, NULL1_WORLD, "KZ"},
+ {CTRY_KENYA, APL1_WORLD, "KE"},
{CTRY_KOREA_NORTH, APL9_WORLD, "KP"},
{CTRY_KOREA_ROC, APL9_WORLD, "KR"},
{CTRY_KOREA_ROC2, APL2_WORLD, "K2"},
--
2.11.0

2018-03-01 14:22:33

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 50/52] ath: Map Venezuela to FCC1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

This change itself doesn't change the selected CTL of this country and is
only required to stay in sync with the QCA mappings.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index aba44cffce3d..d22eff3fe75b 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -497,7 +497,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_UNITED_STATES_FCC49, FCC4_FCCA, "PS"},
{CTRY_URUGUAY, FCC3_WORLD, "UY"},
{CTRY_UZBEKISTAN, FCC3_FCCA, "UZ"},
- {CTRY_VENEZUELA, APL2_ETSIC, "VE"},
+ {CTRY_VENEZUELA, FCC1_WORLD, "VE"},
{CTRY_VIET_NAM, NULL1_WORLD, "VN"},
{CTRY_YEMEN, NULL1_WORLD, "YE"},
{CTRY_ZIMBABWE, NULL1_WORLD, "ZW"},
--
2.11.0

2018-03-01 14:22:18

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 44/52] ath: Map Russia to ETSI8_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 0baa028ce7a2..ba5f112333b8 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -465,7 +465,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_PUERTO_RICO, FCC1_FCCA, "PR"},
{CTRY_QATAR, APL1_WORLD, "QA"},
{CTRY_ROMANIA, ETSI1_WORLD, "RO"},
- {CTRY_RUSSIA, NULL1_WORLD, "RU"},
+ {CTRY_RUSSIA, ETSI8_WORLD, "RU"},
{CTRY_RWANDA, APL1_WORLD, "RW"},
{CTRY_SAUDI_ARABIA, NULL1_WORLD, "SA"},
{CTRY_SERBIA, ETSI1_WORLD, "RS"},
--
2.11.0

2018-03-01 14:21:56

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 35/52] ath: Map Lebanon to APL1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index dee9db074d84..1b69849b4727 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -434,7 +434,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_KOREA_ROC3, APL9_MKKC, "K3"},
{CTRY_KUWAIT, ETSI3_WORLD, "KW"},
{CTRY_LATVIA, ETSI1_WORLD, "LV"},
- {CTRY_LEBANON, NULL1_WORLD, "LB"},
+ {CTRY_LEBANON, APL1_WORLD, "LB"},
{CTRY_LIECHTENSTEIN, ETSI1_WORLD, "LI"},
{CTRY_LITHUANIA, ETSI1_WORLD, "LT"},
{CTRY_LUXEMBOURG, ETSI1_WORLD, "LU"},
--
2.11.0

2018-03-01 14:20:43

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 06/52] ath: Add regulatory mapping for Mauritius

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: ETSI
* 5GHz: ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd.h | 1 +
drivers/net/wireless/ath/regd_common.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index a615a878ac40..f38e42703060 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -138,6 +138,7 @@ enum CountryCode {
CTRY_MACEDONIA = 807,
CTRY_MALAYSIA = 458,
CTRY_MALTA = 470,
+ CTRY_MAURITIUS = 480,
CTRY_MEXICO = 484,
CTRY_MONACO = 492,
CTRY_MOROCCO = 504,
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index bdc1ff191264..375f9da6955b 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -430,6 +430,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_MACEDONIA, NULL1_WORLD, "MK"},
{CTRY_MALAYSIA, APL8_WORLD, "MY"},
{CTRY_MALTA, ETSI1_WORLD, "MT"},
+ {CTRY_MAURITIUS, ETSI1_WORLD, "MU"},
{CTRY_MEXICO, FCC1_FCCA, "MX"},
{CTRY_MONACO, ETSI4_WORLD, "MC"},
{CTRY_MOROCCO, APL4_WORLD, "MA"},
--
2.11.0

2018-03-01 14:22:15

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 43/52] ath: Map Romania to ETSI1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 66c4a579cb99..0baa028ce7a2 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -464,7 +464,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_PORTUGAL, ETSI1_WORLD, "PT"},
{CTRY_PUERTO_RICO, FCC1_FCCA, "PR"},
{CTRY_QATAR, APL1_WORLD, "QA"},
- {CTRY_ROMANIA, NULL1_WORLD, "RO"},
+ {CTRY_ROMANIA, ETSI1_WORLD, "RO"},
{CTRY_RUSSIA, NULL1_WORLD, "RU"},
{CTRY_RWANDA, APL1_WORLD, "RW"},
{CTRY_SAUDI_ARABIA, NULL1_WORLD, "SA"},
--
2.11.0

2018-03-01 14:21:11

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 17/52] ath: Add regulatory mapping for APL13_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't available and
it is still programmed in the EEPROM then it will cause an error and stop
the initialization with:

Invalid EEPROM contents

The current CTL mappings for this regdomain code are:

* 2.4GHz: ETSI
* 5GHz: ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 44e3831c13b1..14332b84443b 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -68,6 +68,7 @@ enum EnumRd {
APL1_ETSIC = 0x55,
APL2_ETSIC = 0x56,
APL5_WORLD = 0x58,
+ APL13_WORLD = 0x5A,
APL6_WORLD = 0x5B,
APL7_FCCA = 0x5C,
APL8_WORLD = 0x5D,
@@ -195,6 +196,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
{APL3_WORLD, CTL_FCC, CTL_ETSI},
{APL4_WORLD, CTL_FCC, CTL_ETSI},
{APL5_WORLD, CTL_FCC, CTL_ETSI},
+ {APL13_WORLD, CTL_ETSI, CTL_ETSI},
{APL6_WORLD, CTL_ETSI, CTL_ETSI},
{APL8_WORLD, CTL_ETSI, CTL_ETSI},
{APL9_WORLD, CTL_ETSI, CTL_ETSI},
--
2.11.0

2018-03-01 14:22:21

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 45/52] ath: Map Saudi Arabia to FCC2_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index ba5f112333b8..c20ff7640061 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -467,7 +467,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_ROMANIA, ETSI1_WORLD, "RO"},
{CTRY_RUSSIA, ETSI8_WORLD, "RU"},
{CTRY_RWANDA, APL1_WORLD, "RW"},
- {CTRY_SAUDI_ARABIA, NULL1_WORLD, "SA"},
+ {CTRY_SAUDI_ARABIA, FCC2_WORLD, "SA"},
{CTRY_SERBIA, ETSI1_WORLD, "RS"},
{CTRY_SERBIA_MONTENEGRO, ETSI1_WORLD, "CS"},
{CTRY_SINGAPORE, APL6_WORLD, "SG"},
--
2.11.0

2018-03-01 14:20:33

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 02/52] ath: Add regulatory mapping for Bermuda

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: FCC
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd.h | 1 +
drivers/net/wireless/ath/regd_common.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index f296ff838d2a..e7b43901d195 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -75,6 +75,7 @@ enum CountryCode {
CTRY_BELARUS = 112,
CTRY_BELGIUM = 56,
CTRY_BELIZE = 84,
+ CTRY_BERMUDA = 60,
CTRY_BOLIVIA = 68,
CTRY_BOSNIA_HERZ = 70,
CTRY_BRAZIL = 76,
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index cde0268cbed6..a8c7f306fd7b 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -306,6 +306,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_BELGIUM, ETSI1_WORLD, "BE"},
{CTRY_BELGIUM2, ETSI4_WORLD, "BL"},
{CTRY_BELIZE, APL1_ETSIC, "BZ"},
+ {CTRY_BERMUDA, FCC3_FCCA, "BM"},
{CTRY_BOLIVIA, APL1_ETSIC, "BO"},
{CTRY_BOSNIA_HERZ, ETSI1_WORLD, "BA"},
{CTRY_BRAZIL, FCC3_WORLD, "BR"},
--
2.11.0

2018-03-01 14:20:38

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 04/52] ath: Add regulatory mapping for Japan KDDI

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: MKK
* 5GHz: MKK

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd.h | 1 +
drivers/net/wireless/ath/regd_common.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index e7b43901d195..a615a878ac40 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -246,6 +246,7 @@ enum CountryCode {
CTRY_JAPAN57 = 4057,
CTRY_JAPAN58 = 4058,
CTRY_JAPAN59 = 4059,
+ CTRY_XA = 4100,
CTRY_AUSTRALIA2 = 5000,
CTRY_CANADA2 = 5001,
CTRY_BELGIUM2 = 5002
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index bba2d156cb21..e430e12f90e8 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -411,6 +411,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_JAPAN57, MKK13_MKKB, "JP"},
{CTRY_JAPAN58, MKK14_MKKA1, "JP"},
{CTRY_JAPAN59, MKK15_MKKA1, "JP"},
+ {CTRY_XA, MKK5_MKKA2, "XA"},

{CTRY_JORDAN, ETSI2_WORLD, "JO"},
{CTRY_KAZAKHSTAN, NULL1_WORLD, "KZ"},
--
2.11.0

2018-03-01 14:22:26

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 47/52] ath: Map Taiwan to APL7_FCCA

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

This change itself doesn't change the selected CTL of this country and is
only required to stay in sync with the QCA mappings.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index f0b51858b965..a4a55663e58f 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -479,7 +479,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_SWEDEN, ETSI1_WORLD, "SE"},
{CTRY_SWITZERLAND, ETSI1_WORLD, "CH"},
{CTRY_SYRIA, NULL1_WORLD, "SY"},
- {CTRY_TAIWAN, APL3_FCCA, "TW"},
+ {CTRY_TAIWAN, APL7_FCCA, "TW"},
{CTRY_TANZANIA, APL1_WORLD, "TZ"},
{CTRY_THAILAND, FCC3_WORLD, "TH"},
{CTRY_TRINIDAD_Y_TOBAGO, FCC3_WORLD, "TT"},
--
2.11.0

2018-03-01 14:22:08

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 40/52] ath: Map Pakistan to APL1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 6824b1db6d16..1d49300451a8 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -454,7 +454,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_NICARAGUA, FCC3_FCCA, "NI"},
{CTRY_NORWAY, ETSI1_WORLD, "NO"},
{CTRY_OMAN, FCC3_WORLD, "OM"},
- {CTRY_PAKISTAN, NULL1_WORLD, "PK"},
+ {CTRY_PAKISTAN, APL1_WORLD, "PK"},
{CTRY_PANAMA, FCC1_FCCA, "PA"},
{CTRY_PAPUA_NEW_GUINEA, FCC1_WORLD, "PG"},
{CTRY_PARAGUAY, FCC3_WORLD, "PY"},
--
2.11.0

2018-03-01 14:22:01

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 37/52] ath: Map Malasia to FCC1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: ETSI -> FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index f457c9d50bd2..efc363af5e41 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -440,7 +440,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_LUXEMBOURG, ETSI1_WORLD, "LU"},
{CTRY_MACAU, FCC2_WORLD, "MO"},
{CTRY_MACEDONIA, ETSI1_WORLD, "MK"},
- {CTRY_MALAYSIA, APL8_WORLD, "MY"},
+ {CTRY_MALAYSIA, FCC1_WORLD, "MY"},
{CTRY_MALTA, ETSI1_WORLD, "MT"},
{CTRY_MAURITIUS, ETSI1_WORLD, "MU"},
{CTRY_MEXICO, FCC1_FCCA, "MX"},
--
2.11.0

2018-03-01 14:22:28

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 48/52] ath: Map Ukraine to ETSI9_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index a4a55663e58f..e41a0ce332a8 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -486,7 +486,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_TUNISIA, ETSI3_WORLD, "TN"},
{CTRY_TURKEY, ETSI3_WORLD, "TR"},
{CTRY_UGANDA, FCC3_WORLD, "UG"},
- {CTRY_UKRAINE, NULL1_WORLD, "UA"},
+ {CTRY_UKRAINE, ETSI9_WORLD, "UA"},
{CTRY_UAE, NULL1_WORLD, "AE"},
{CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"},
{CTRY_UNITED_STATES, FCC3_FCCA, "US"},
--
2.11.0

2018-03-01 14:21:48

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 32/52] ath: Map Isreal to ETSI3_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 6a325213c163..59145decdb2b 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -360,7 +360,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_INDONESIA, APL2_WORLD, "ID"},
{CTRY_IRAN, APL1_WORLD, "IR"},
{CTRY_IRELAND, ETSI1_WORLD, "IE"},
- {CTRY_ISRAEL, NULL1_WORLD, "IL"},
+ {CTRY_ISRAEL, ETSI3_WORLD, "IL"},
{CTRY_ITALY, ETSI1_WORLD, "IT"},
{CTRY_JAMAICA, FCC3_WORLD, "JM"},

--
2.11.0

2018-03-01 14:21:03

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 14/52] ath: Add regulatory mapping for United States for AP

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: FCC
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd.h | 1 +
drivers/net/wireless/ath/regd_common.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index 908163948d59..490efdcddf93 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -186,6 +186,7 @@ enum CountryCode {
CTRY_UKRAINE = 804,
CTRY_UNITED_KINGDOM = 826,
CTRY_UNITED_STATES = 840,
+ CTRY_UNITED_STATES2 = 841,
CTRY_UNITED_STATES_FCC49 = 842,
CTRY_URUGUAY = 858,
CTRY_UZBEKISTAN = 860,
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index a00be9604d21..5cbd76235248 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -478,6 +478,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_UAE, NULL1_WORLD, "AE"},
{CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"},
{CTRY_UNITED_STATES, FCC3_FCCA, "US"},
+ {CTRY_UNITED_STATES2, FCC6_FCCA, "US"},
/* This "PS" is for US public safety actually... to support this we
* would need to assign new special alpha2 to CRDA db as with the world
* regdomain and use another alpha2 */
--
2.11.0

2018-03-01 14:21:28

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 24/52] ath: Map Australia to FCC3_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

This change itself doesn't change the selected CTL of this country and is
only required to stay in sync with the QCA mappings.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 984039073aea..173db6bd1280 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -308,7 +308,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_ARGENTINA, FCC3_WORLD, "AR"},
{CTRY_ARMENIA, ETSI4_WORLD, "AM"},
{CTRY_ARUBA, ETSI1_WORLD, "AW"},
- {CTRY_AUSTRALIA, FCC2_WORLD, "AU"},
+ {CTRY_AUSTRALIA, FCC3_WORLD, "AU"},
{CTRY_AUSTRALIA2, FCC6_WORLD, "AU"},
{CTRY_AUSTRIA, ETSI1_WORLD, "AT"},
{CTRY_AZERBAIJAN, ETSI4_WORLD, "AZ"},
--
2.11.0

2018-03-01 14:21:18

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 20/52] ath: Add regulatory mapping for FCC3_ETSIC

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't available and
it is still programmed in the EEPROM then it will cause an error and stop
the initialization with:

Invalid EEPROM contents

The current CTL mappings for this regdomain code are:

* 2.4GHz: ETSI
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index f1735ac67c52..447547c25093 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -35,6 +35,7 @@ enum EnumRd {
FRANCE_RES = 0x31,
FCC3_FCCA = 0x3A,
FCC3_WORLD = 0x3B,
+ FCC3_ETSIC = 0x3F,

ETSI1_WORLD = 0x37,
ETSI3_ETSIA = 0x32,
@@ -174,6 +175,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
{FCC2_ETSIC, CTL_FCC, CTL_ETSI},
{FCC3_FCCA, CTL_FCC, CTL_FCC},
{FCC3_WORLD, CTL_FCC, CTL_ETSI},
+ {FCC3_ETSIC, CTL_FCC, CTL_ETSI},
{FCC4_FCCA, CTL_FCC, CTL_FCC},
{FCC5_FCCA, CTL_FCC, CTL_FCC},
{FCC6_FCCA, CTL_FCC, CTL_FCC},
--
2.11.0

2018-03-01 14:21:13

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 18/52] ath: Add regulatory mapping for ETSI8_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't available and
it is still programmed in the EEPROM then it will cause an error and stop
the initialization with:

Invalid EEPROM contents

The current CTL mappings for this regdomain code are:

* 2.4GHz: ETSI
* 5GHz: ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 14332b84443b..88913c67fed2 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -44,6 +44,7 @@ enum EnumRd {
ETSI4_ETSIC = 0x38,
ETSI5_WORLD = 0x39,
ETSI6_WORLD = 0x34,
+ ETSI8_WORLD = 0x3D,
ETSI_RESERVED = 0x33,

MKK1_MKKA = 0x40,
@@ -183,6 +184,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
{ETSI4_WORLD, CTL_ETSI, CTL_ETSI},
{ETSI5_WORLD, CTL_ETSI, CTL_ETSI},
{ETSI6_WORLD, CTL_ETSI, CTL_ETSI},
+ {ETSI8_WORLD, CTL_ETSI, CTL_ETSI},

/* XXX: For ETSI3_ETSIA, Was NO_CTL meant for the 2 GHz band ? */
{ETSI3_ETSIA, CTL_ETSI, CTL_ETSI},
--
2.11.0

2018-03-01 14:20:48

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 08/52] ath: Add regulatory mapping for Nicaragua

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: FCC
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index df5db47f2930..11132f4a0aad 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -439,6 +439,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_NETHERLANDS, ETSI1_WORLD, "NL"},
{CTRY_NETHERLANDS_ANTILLES, ETSI1_WORLD, "AN"},
{CTRY_NEW_ZEALAND, FCC2_ETSIC, "NZ"},
+ {CTRY_NICARAGUA, FCC3_FCCA, "NI"},
{CTRY_NORWAY, ETSI1_WORLD, "NO"},
{CTRY_OMAN, FCC3_WORLD, "OM"},
{CTRY_PAKISTAN, NULL1_WORLD, "PK"},
--
2.11.0

2018-03-01 14:20:58

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 12/52] ath: Add regulatory mapping for Tanzania

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: ETSI
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd.h | 1 +
drivers/net/wireless/ath/regd_common.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index 9fe4857baaae..191502ff043d 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -176,6 +176,7 @@ enum CountryCode {
CTRY_SWITZERLAND = 756,
CTRY_SYRIA = 760,
CTRY_TAIWAN = 158,
+ CTRY_TANZANIA = 834,
CTRY_THAILAND = 764,
CTRY_TRINIDAD_Y_TOBAGO = 780,
CTRY_TUNISIA = 788,
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 4c41308e39c1..27b1c76e912c 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -468,6 +468,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_SWITZERLAND, ETSI1_WORLD, "CH"},
{CTRY_SYRIA, NULL1_WORLD, "SY"},
{CTRY_TAIWAN, APL3_FCCA, "TW"},
+ {CTRY_TANZANIA, APL1_WORLD, "TZ"},
{CTRY_THAILAND, FCC3_WORLD, "TH"},
{CTRY_TRINIDAD_Y_TOBAGO, FCC3_WORLD, "TT"},
{CTRY_TUNISIA, ETSI3_WORLD, "TN"},
--
2.11.0

2018-03-01 14:21:23

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 22/52] ath: Map Albania to ETSI1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index c2074b1cd207..bdfbdd4e8583 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -303,7 +303,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
static struct country_code_to_enum_rd allCountries[] = {
{CTRY_DEBUG, NO_ENUMRD, "DB"},
{CTRY_DEFAULT, FCC1_FCCA, "CO"},
- {CTRY_ALBANIA, NULL1_WORLD, "AL"},
+ {CTRY_ALBANIA, ETSI1_WORLD, "AL"},
{CTRY_ALGERIA, NULL1_WORLD, "DZ"},
{CTRY_ARGENTINA, FCC3_WORLD, "AR"},
{CTRY_ARMENIA, ETSI4_WORLD, "AM"},
--
2.11.0

2018-03-01 14:21:44

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 30/52] ath: Map Honduras to FCC3_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 29021bf28b89..cfa324592271 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -352,7 +352,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_GUAM, FCC1_FCCA, "GU"},
{CTRY_GUATEMALA, FCC1_FCCA, "GT"},
{CTRY_HAITI, ETSI1_WORLD, "HT"},
- {CTRY_HONDURAS, NULL1_WORLD, "HN"},
+ {CTRY_HONDURAS, FCC3_WORLD, "HN"},
{CTRY_HONG_KONG, FCC3_WORLD, "HK"},
{CTRY_HUNGARY, ETSI1_WORLD, "HU"},
{CTRY_ICELAND, ETSI1_WORLD, "IS"},
--
2.11.0

2018-03-01 14:22:11

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 41/52] ath: Map Peru to APL1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

This change itself doesn't change the selected CTL of this country and is
only required to stay in sync with the QCA mappings.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 1d49300451a8..983572ea7048 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -458,7 +458,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_PANAMA, FCC1_FCCA, "PA"},
{CTRY_PAPUA_NEW_GUINEA, FCC1_WORLD, "PG"},
{CTRY_PARAGUAY, FCC3_WORLD, "PY"},
- {CTRY_PERU, APL1_WORLD, "PE"},
+ {CTRY_PERU, FCC3_WORLD, "PE"},
{CTRY_PHILIPPINES, APL1_WORLD, "PH"},
{CTRY_POLAND, ETSI1_WORLD, "PL"},
{CTRY_PORTUGAL, ETSI1_WORLD, "PT"},
--
2.11.0

2018-03-01 14:21:01

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 13/52] ath: Add regulatory mapping for Uganda

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: ETSI
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd.h | 1 +
drivers/net/wireless/ath/regd_common.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index 191502ff043d..908163948d59 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -182,6 +182,7 @@ enum CountryCode {
CTRY_TUNISIA = 788,
CTRY_TURKEY = 792,
CTRY_UAE = 784,
+ CTRY_UGANDA = 800,
CTRY_UKRAINE = 804,
CTRY_UNITED_KINGDOM = 826,
CTRY_UNITED_STATES = 840,
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 27b1c76e912c..a00be9604d21 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -473,6 +473,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_TRINIDAD_Y_TOBAGO, FCC3_WORLD, "TT"},
{CTRY_TUNISIA, ETSI3_WORLD, "TN"},
{CTRY_TURKEY, ETSI3_WORLD, "TR"},
+ {CTRY_UGANDA, FCC3_WORLD, "UG"},
{CTRY_UKRAINE, NULL1_WORLD, "UA"},
{CTRY_UAE, NULL1_WORLD, "AE"},
{CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"},
--
2.11.0

2018-03-01 14:20:36

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 03/52] ath: Add regulatory mapping for Japan (J56)

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: FCC
* 5GHz: MKK

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index a8c7f306fd7b..bba2d156cb21 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -99,6 +99,7 @@ enum EnumRd {
MKK5_MKKB = 0x86,
MKK5_MKKA2 = 0x87,
MKK5_MKKC = 0x88,
+ MKK5_FCCA = 0x9A,

MKK6_MKKB = 0x89,
MKK6_MKKA2 = 0x8A,
@@ -226,6 +227,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
{MKK5_MKKB, CTL_MKK, CTL_MKK},
{MKK5_MKKA2, CTL_MKK, CTL_MKK},
{MKK5_MKKC, CTL_MKK, CTL_MKK},
+ {MKK5_FCCA, CTL_MKK, CTL_FCC},

{MKK6_MKKB, CTL_MKK, CTL_MKK},
{MKK6_MKKA1, CTL_MKK, CTL_MKK},
@@ -405,6 +407,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_JAPAN52, MKK12_MKKA1, "JP"},
{CTRY_JAPAN53, MKK12_MKKC, "JP"},
{CTRY_JAPAN54, MKK12_MKKA2, "JP"},
+ {CTRY_JAPAN56, MKK5_FCCA, "JP"},
{CTRY_JAPAN57, MKK13_MKKB, "JP"},
{CTRY_JAPAN58, MKK14_MKKA1, "JP"},
{CTRY_JAPAN59, MKK15_MKKA1, "JP"},
--
2.11.0

2018-03-01 14:22:06

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 39/52] ath: Map New Zealand to FCC3_ETSIC

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

This change itself doesn't change the selected CTL of this country and is
only required to stay in sync with the QCA mappings.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index ca1f07e55aec..6824b1db6d16 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -450,7 +450,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_NEPAL, APL1_WORLD, "NP"},
{CTRY_NETHERLANDS, ETSI1_WORLD, "NL"},
{CTRY_NETHERLANDS_ANTILLES, ETSI1_WORLD, "AN"},
- {CTRY_NEW_ZEALAND, FCC2_ETSIC, "NZ"},
+ {CTRY_NEW_ZEALAND, FCC3_ETSIC, "NZ"},
{CTRY_NICARAGUA, FCC3_FCCA, "NI"},
{CTRY_NORWAY, ETSI1_WORLD, "NO"},
{CTRY_OMAN, FCC3_WORLD, "OM"},
--
2.11.0

2018-03-01 14:21:08

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 16/52] ath: Add regulatory mapping for APL10_MKKC

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't available and
it is still programmed in the EEPROM then it will cause an error and stop
the initialization with:

Invalid EEPROM contents

The current CTL mappings for this regdomain code are:

* 2.4GHz: MKK
* 5GHz: ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 07c966ad7a67..44e3831c13b1 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -72,6 +72,7 @@ enum EnumRd {
APL7_FCCA = 0x5C,
APL8_WORLD = 0x5D,
APL9_WORLD = 0x5E,
+ APL10_MKKC = 0x5F,

WOR0_WORLD = 0x60,
WOR1_WORLD = 0x61,
@@ -198,6 +199,7 @@ static struct reg_dmn_pair_mapping regDomainPairs[] = {
{APL8_WORLD, CTL_ETSI, CTL_ETSI},
{APL9_WORLD, CTL_ETSI, CTL_ETSI},

+ {APL10_MKKC, CTL_ETSI, CTL_MKK},
{APL3_FCCA, CTL_FCC, CTL_FCC},
{APL7_FCCA, CTL_FCC, CTL_FCC},
{APL1_ETSIC, CTL_FCC, CTL_ETSI},
--
2.11.0

2018-03-01 14:22:31

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 49/52] ath: Map U.A.E. to ETSI1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index e41a0ce332a8..aba44cffce3d 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -487,7 +487,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_TURKEY, ETSI3_WORLD, "TR"},
{CTRY_UGANDA, FCC3_WORLD, "UG"},
{CTRY_UKRAINE, ETSI9_WORLD, "UA"},
- {CTRY_UAE, NULL1_WORLD, "AE"},
+ {CTRY_UAE, ETSI1_WORLD, "AE"},
{CTRY_UNITED_KINGDOM, ETSI1_WORLD, "GB"},
{CTRY_UNITED_STATES, FCC3_FCCA, "US"},
{CTRY_UNITED_STATES2, FCC6_FCCA, "US"},
--
2.11.0

2018-03-01 14:22:39

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 52/52] ath: Map Zimbabwe to ETSI1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 7e06d1146e8a..cd4e47f48cc8 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -500,7 +500,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_VENEZUELA, FCC1_WORLD, "VE"},
{CTRY_VIET_NAM, ETSI3_WORLD, "VN"},
{CTRY_YEMEN, NULL1_WORLD, "YE"},
- {CTRY_ZIMBABWE, NULL1_WORLD, "ZW"},
+ {CTRY_ZIMBABWE, ETSI1_WORLD, "ZW"},
};

#endif
--
2.11.0

2018-03-01 14:20:51

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 09/52] ath: Add regulatory mapping for Paraguya

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: ETSI
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 11132f4a0aad..679c6bc9035e 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -445,6 +445,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_PAKISTAN, NULL1_WORLD, "PK"},
{CTRY_PANAMA, FCC1_FCCA, "PA"},
{CTRY_PAPUA_NEW_GUINEA, FCC1_WORLD, "PG"},
+ {CTRY_PARAGUAY, FCC3_WORLD, "PY"},
{CTRY_PERU, APL1_WORLD, "PE"},
{CTRY_PHILIPPINES, APL1_WORLD, "PH"},
{CTRY_POLAND, ETSI1_WORLD, "PL"},
--
2.11.0

2018-03-01 14:21:41

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 29/52] ath: Map Czech to ETSI1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

This change itself doesn't change the selected CTL of this country and is
only required to stay in sync with the QCA mappings.

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index c28347fac774..29021bf28b89 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -335,7 +335,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_COSTA_RICA, FCC1_WORLD, "CR"},
{CTRY_CROATIA, ETSI1_WORLD, "HR"},
{CTRY_CYPRUS, ETSI1_WORLD, "CY"},
- {CTRY_CZECH, ETSI3_WORLD, "CZ"},
+ {CTRY_CZECH, ETSI1_WORLD, "CZ"},
{CTRY_DENMARK, ETSI1_WORLD, "DK"},
{CTRY_DOMINICAN_REPUBLIC, FCC1_FCCA, "DO"},
{CTRY_ECUADOR, FCC1_WORLD, "EC"},
--
2.11.0

2018-03-01 14:22:23

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 46/52] ath: Map Singapore to FCC3_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: ETSI -> FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index c20ff7640061..f0b51858b965 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -470,7 +470,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_SAUDI_ARABIA, FCC2_WORLD, "SA"},
{CTRY_SERBIA, ETSI1_WORLD, "RS"},
{CTRY_SERBIA_MONTENEGRO, ETSI1_WORLD, "CS"},
- {CTRY_SINGAPORE, APL6_WORLD, "SG"},
+ {CTRY_SINGAPORE, FCC3_WORLD, "SG"},
{CTRY_SLOVAKIA, ETSI1_WORLD, "SK"},
{CTRY_SLOVENIA, ETSI1_WORLD, "SI"},
{CTRY_SOUTH_AFRICA, FCC3_WORLD, "ZA"},
--
2.11.0

2018-03-01 14:20:53

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 10/52] ath: Add regulatory mapping for Rwanda

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: ETSI
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd.h | 1 +
drivers/net/wireless/ath/regd_common.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index 8575718425b6..3021ba5d7ef5 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -162,6 +162,7 @@ enum CountryCode {
CTRY_QATAR = 634,
CTRY_ROMANIA = 642,
CTRY_RUSSIA = 643,
+ CTRY_RWANDA = 646,
CTRY_SAUDI_ARABIA = 682,
CTRY_SERBIA_MONTENEGRO = 891,
CTRY_SINGAPORE = 702,
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 679c6bc9035e..89a3a9104428 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -454,6 +454,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_QATAR, APL1_WORLD, "QA"},
{CTRY_ROMANIA, NULL1_WORLD, "RO"},
{CTRY_RUSSIA, NULL1_WORLD, "RU"},
+ {CTRY_RWANDA, APL1_WORLD, "RW"},
{CTRY_SAUDI_ARABIA, NULL1_WORLD, "SA"},
{CTRY_SERBIA_MONTENEGRO, ETSI1_WORLD, "CS"},
{CTRY_SINGAPORE, APL6_WORLD, "SG"},
--
2.11.0

2018-03-01 14:22:35

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 51/52] ath: Map Vietnam to ETSI3_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index d22eff3fe75b..7e06d1146e8a 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -498,7 +498,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_URUGUAY, FCC3_WORLD, "UY"},
{CTRY_UZBEKISTAN, FCC3_FCCA, "UZ"},
{CTRY_VENEZUELA, FCC1_WORLD, "VE"},
- {CTRY_VIET_NAM, NULL1_WORLD, "VN"},
+ {CTRY_VIET_NAM, ETSI3_WORLD, "VN"},
{CTRY_YEMEN, NULL1_WORLD, "YE"},
{CTRY_ZIMBABWE, NULL1_WORLD, "ZW"},
};
--
2.11.0

2018-03-01 14:21:58

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 36/52] ath: Map Macedonia to ETSI1_WORLD

The regdomain code is used to select the correct the correct conformance
test limits (CTL) for a country. If the regdomain code isn't correctly
mapped to the actual CTL entries in EEPROM then it could happen that the
device violates the regulations. But it can also happen that the device is
then not able to be used with its full txpower on all rates.

The CTL mappings for this regdomain code were now changed to:

* 2.4GHz: ETSI
* 5GHz: NO_CTL -> ETSI

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index 1b69849b4727..f457c9d50bd2 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -439,7 +439,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_LITHUANIA, ETSI1_WORLD, "LT"},
{CTRY_LUXEMBOURG, ETSI1_WORLD, "LU"},
{CTRY_MACAU, FCC2_WORLD, "MO"},
- {CTRY_MACEDONIA, NULL1_WORLD, "MK"},
+ {CTRY_MACEDONIA, ETSI1_WORLD, "MK"},
{CTRY_MALAYSIA, APL8_WORLD, "MY"},
{CTRY_MALTA, ETSI1_WORLD, "MT"},
{CTRY_MAURITIUS, ETSI1_WORLD, "MU"},
--
2.11.0

2018-03-01 14:20:31

by Sven Eckelmann

[permalink] [raw]
Subject: [PATCH 01/52] ath: Add regulatory mapping for Bahamas

The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
and to select the correct conformance test limits (CTL) for a country. If
the country isn't available and it is still programmed in the EEPROM then
it will cause an error and stop the initialization with:

Invalid EEPROM contents

The current CTL mappings for this country are:

* 2.4GHz: ETSI
* 5GHz: FCC

Signed-off-by: Sven Eckelmann <[email protected]>
---
drivers/net/wireless/ath/regd.h | 1 +
drivers/net/wireless/ath/regd_common.h | 1 +
2 files changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h
index 5d80be213fac..f296ff838d2a 100644
--- a/drivers/net/wireless/ath/regd.h
+++ b/drivers/net/wireless/ath/regd.h
@@ -68,6 +68,7 @@ enum CountryCode {
CTRY_AUSTRALIA = 36,
CTRY_AUSTRIA = 40,
CTRY_AZERBAIJAN = 31,
+ CTRY_BAHAMAS = 44,
CTRY_BAHRAIN = 48,
CTRY_BANGLADESH = 50,
CTRY_BARBADOS = 52,
diff --git a/drivers/net/wireless/ath/regd_common.h b/drivers/net/wireless/ath/regd_common.h
index bdd2b4d61f2f..cde0268cbed6 100644
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@ -298,6 +298,7 @@ static struct country_code_to_enum_rd allCountries[] = {
{CTRY_AUSTRALIA2, FCC6_WORLD, "AU"},
{CTRY_AUSTRIA, ETSI1_WORLD, "AT"},
{CTRY_AZERBAIJAN, ETSI4_WORLD, "AZ"},
+ {CTRY_BAHAMAS, FCC3_WORLD, "BS"},
{CTRY_BAHRAIN, APL6_WORLD, "BH"},
{CTRY_BANGLADESH, NULL1_WORLD, "BD"},
{CTRY_BARBADOS, FCC2_WORLD, "BB"},
--
2.11.0

2018-05-25 10:02:06

by Kalle Valo

[permalink] [raw]
Subject: Re: [01/52] ath: Add regulatory mapping for Bahamas

Sven Eckelmann <[email protected]> wrote:

> The country code is used by the ath to detect the ISO 3166-1 alpha-2 name
> and to select the correct conformance test limits (CTL) for a country. If
> the country isn't available and it is still programmed in the EEPROM then
> it will cause an error and stop the initialization with:
>
> Invalid EEPROM contents
>
> The current CTL mappings for this country are:
>
> * 2.4GHz: ETSI
> * 5GHz: FCC
>
> Signed-off-by: Sven Eckelmann <[email protected]>
> Signed-off-by: Kalle Valo <[email protected]>

35 patches applied to ath-next branch of ath.git, thanks.

699e2302c286 ath: Add regulatory mapping for Bahamas
9c790f2d234f ath: Add regulatory mapping for Bermuda
b840fa912308 ath: Add regulatory mapping for Kenya
a71c984bc4e5 ath: Add regulatory mapping for Mauritius
a0a6f2a916dc ath: Add regulatory mapping for Montenegro
a20f1338c5de ath: Add regulatory mapping for Nicaragua
67a956682472 ath: Add regulatory mapping for Paraguya
2a3169a54bb5 ath: Add regulatory mapping for Serbia
667ddac5745f ath: Add regulatory mapping for Tanzania
1ea3986ad2bc ath: Add regulatory mapping for Uganda
4f183687e3fa ath: Add regulatory mapping for APL2_FCCA
9ba8df0c52b3 ath: Add regulatory mapping for APL13_WORLD
45faf6e096da ath: Add regulatory mapping for ETSI8_WORLD
897fab6c5d90 ath: Add regulatory mapping for ETSI9_WORLD
01fb2994a98d ath: Add regulatory mapping for FCC3_ETSIC
fed8f5e83037 ath: Map Albania to ETSI1_WORLD
485daee92bde ath: Map Algeria to APL13_WORLD
8120cc0b215c ath: Map Australia to FCC3_WORLD
1507b32891c0 ath: Map Bangladesh to APL1_WORLD
37090d944705 ath: Map Brunei Darussalam to APL6_WORLD
fed60f81a2d0 ath: Map Bulgaria to ETSI1_WORLD
515e968624b2 ath: Map Colombia to FCC1_FCCA
0fa31a86998b ath: Map Czech to ETSI1_WORLD
143a9b9bd7ee ath: Map Honduras to FCC3_WORLD
62ba2b22d120 ath: Map Isreal to ETSI3_WORLD
64874ed2a73a ath: Map Macedonia to ETSI1_WORLD
823a64065adf ath: Map Malasia to FCC1_WORLD
9bfc2bb32e01 ath: Map New Zealand to FCC3_ETSIC
b5c11e474406 ath: Map Peru to APL1_WORLD
c454d4c25844 ath: Map Philippines to FCC3_WORLD
12f415566fb4 ath: Map Romania to ETSI1_WORLD
b7e015132d85 ath: Map Russia to ETSI8_WORLD
054e07788002 ath: Map Singapore to FCC3_WORLD
4e78075c4821 ath: Map Ukraine to ETSI9_WORLD
f1abff21acc5 ath: Map Zimbabwe to ETSI1_WORLD

--
https://patchwork.kernel.org/patch/10251529/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2018-05-24 14:10:06

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 00/52] ath: Synchronize regd mappings with qcacld-2.0 4.0.11.181

Sven Eckelmann <[email protected]> writes:

> The mappings from ath was not synced with the QCA driver since 2009. Only
> two minor fixes were integrated in 2011. Since then, a lot of regd changes
> were integrated in the close source QCA driver which are now used but not
> supported by the Open Source driver. This either prevents the use of the
> OSS driver on such devices or the wrong conformance test limits (CTLs) may
> be used.
>
> To get the integrated we would first get access to the closed source QCA
> driver and a special OSS-NDA with QCA. This doesn't seem to be possible at
> the moment and thus other sources for the changes have to be found. One of
> them is the qcacld-2.0 source repository [1] which contains the QCA
> regdomain.h and regdomain_common.h which was relicensed by QCA as ISC. It
> isn't the newest version from the QCA driver but at least received some
> updates which are not present in ath's regd.
>
> This repository [1] (commit 48f9ab5d5c161549be098997fa0e3602c1547213 to be
> more precise) was now used to find differences and ad some missing
> mappings.
>
> The title of the mappings describe what exactly was changed. The "Add
> regulatory mapping for" patches introduce new country codes/mappings and
> thus don't change old mappings. The "Add regulatory mapping for" patches
> are similar but for regulatory code mappings instead of country code
> mappings.
>
> More interesting might be the "Map XXXX to YYYY" patches because they
> modify already existing mappings. The result are following changes to the
> selected CTLs:
>
> * CTRY_ALBANIA: 5GHz: NO_CTL -> ETSI
> * CTRY_ALGERIA: 5GHz: NO_CTL -> ETSI
> * CTRY_BANGLADESH: 5GHz: NO_CTL -> FCC
> * CTRY_BRUNEI_DARUSSALAM: 5GHz: FCC -> ETSI
> * CTRY_HONDURAS: 5GHz: NO_CTL -> FCC
> * CTRY_INDONESIA: 5GHz: NO_CTL -> FCC
> * CTRY_ISRAEL: 5GHz: NO_CTL -> ETSI
> * CTRY_KOREA_NORTH: 2.4GHz: ETSI -> MKK
> * CTRY_KOREA_ROC: 2.4GHz: ETSI -> MKK
> * CTRY_KOREA_ROC3: 2.4GHz: ETSI -> MKK
> * CTRY_LEBANON: 5GHz: NO_CTL -> FCC
> * CTRY_MACEDONIA: 5GHz: NO_CTL -> ETSI
> * CTRY_MALAYSIA: 5GHz: ETSI -> FCC
> * CTRY_MEXICO: 2.4GHz: FCC-> ETSI
> * CTRY_PAKISTAN: 5GHz: NO_CTL -> FCC
> * CTRY_ROMANIA: 5GHz: NO_CTL -> ETSI
> * CTRY_RUSSIA: 5GHz: NO_CTL -> ETSI
> * CTRY_SAUDI_ARABIA: 5GHz: NO_CTL -> FCC
> * CTRY_SINGAPORE: 5GHz: ETSI -> FCC
> * CTRY_UKRAINE: 5GHz: NO_CTL -> ETSI
> * CTRY_UAE: 5GHz: NO_CTL -> ETSI
> * CTRY_VIET_NAM: 5GHz: NO_CTL -> ETSI
> * CTRY_ZIMBABWE: 5GHz: NO_CTL -> ETSI
>
>
> Btw. I have not removed CTRY_SERBIA_MONTENEGRO, CTRY_KOREA_ROC2 or
> APL2_APLD because this might break devices which have these programmed in
> the EEPROM. And I have not added APL11_FCCA, APL12_WORLD and CTRY_MALDIVES
> because only the code was in the qcacld-2.0 source code but not the actual
> mapping.
>
> I am relative confident that QCA also has following extra countries:
>
> * Afghanistan
> * American Samoa
> * Anguilla
> * Bhutan
> * Burkina Faso
> * Cayman Islands
> * Central Africa Republic
> * Chad
> * Christmas Islands
> * Dominica
> * Ethiopia
> * French Guiana
> * French Polynesia
> * Ghana
> * Guadeloupe
> * Guyana
> * Cote d'Ivoire
> * Lesotho
> * Malawi
> * Maldives
> * Marshall Islands
> * Martinique
> * Mauitania
> * Mayotte
> * Micronesia
> * Moldova
> * Mongolia
> * Namibia
> * Nigeria
> * Northern Mariana Islands
> * Palau
> * Reunion
> * St Barthelemy
> * St Kitts Nevis
> * St Lucia
> * St Martin
> * St Pierre Miquelon
> * St Vincent Grenadiens
> * Samoa
> * Senegal
> * Suriname
> * Togo
> * Turks Caicos
> * Vanuatu
> * Virgin Islands
> * Wallis Futuna
>
> + a lot of extra regdomain codes (0x15, 0x16, 0x17, 0x18, 0x19, 0x3c, 0x4f,
> 0x51, 0x57, 0x59) and the corresponding mappings.

I asked about this and indeed qcacld-2.0 has few old mappings. I was
told these patches are not current so I dropped them for now:

[03/52] ath: Add regulatory mapping for Japan (J56) 2018-03-01
[04/52] ath: Add regulatory mapping for Japan KDDI 2018-03-01
[10/52] ath: Add regulatory mapping for Rwanda 2018-03-01
[14/52] ath: Add regulatory mapping for United States for AP 2018-03-01
[16/52] ath: Add regulatory mapping for APL10_MKKC 2018-03-01
[21/52] ath: Switch APL9_WORLD to 2.4GHz MKK CTL 2018-03-01
[31/52] ath: Map Indonesia to APL2_WORLD 2018-03-01
[33/52] ath: Map Japan to MKK5_MKKA2 2018-03-01
[34/52] ath: Map South Korea to APL10_MKKC 2018-03-01
[35/52] ath: Map Lebanon to APL1_WORLD 2018-03-01
[38/52] ath: Map Mexico to FCC1_WORLD 2018-03-01
[40/52] ath: Map Pakistan to APL1_WORLD 2018-03-01
[45/52] ath: Map Saudi Arabia to FCC2_WORLD 2018-03-01
[47/52] ath: Map Taiwan to APL7_FCCA 2018-03-01
[49/52] ath: Map U.A.E. to ETSI1_WORLD 2018-03-01
[50/52] ath: Map Venezuela to FCC1_WORLD 2018-03-01
[51/52] ath: Map Vietnam to ETSI3_WORLD 2018-03-01

Rest of the patches are now in the pending branch and I'm hoping to
apply them soon:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/log/?h=pending

--
Kalle Valo

2018-05-24 18:43:38

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH 00/52] ath: Synchronize regd mappings with qcacld-2.0 4.0.11.181

Kalle Valo <[email protected]> writes:

> Sven Eckelmann <[email protected]> writes:
>
>> The mappings from ath was not synced with the QCA driver since 2009. Only
>> two minor fixes were integrated in 2011. Since then, a lot of regd changes
>> were integrated in the close source QCA driver which are now used but not
>> supported by the Open Source driver. This either prevents the use of the
>> OSS driver on such devices or the wrong conformance test limits (CTLs) may
>> be used.
>>
>> To get the integrated we would first get access to the closed source QCA
>> driver and a special OSS-NDA with QCA. This doesn't seem to be possible at
>> the moment and thus other sources for the changes have to be found. One of
>> them is the qcacld-2.0 source repository [1] which contains the QCA
>> regdomain.h and regdomain_common.h which was relicensed by QCA as ISC. It
>> isn't the newest version from the QCA driver but at least received some
>> updates which are not present in ath's regd.
>>
>> This repository [1] (commit 48f9ab5d5c161549be098997fa0e3602c1547213 to be
>> more precise) was now used to find differences and ad some missing
>> mappings.
>>
>> The title of the mappings describe what exactly was changed. The "Add
>> regulatory mapping for" patches introduce new country codes/mappings and
>> thus don't change old mappings. The "Add regulatory mapping for" patches
>> are similar but for regulatory code mappings instead of country code
>> mappings.
>>
>> More interesting might be the "Map XXXX to YYYY" patches because they
>> modify already existing mappings. The result are following changes to the
>> selected CTLs:
>>
>> * CTRY_ALBANIA: 5GHz: NO_CTL -> ETSI
>> * CTRY_ALGERIA: 5GHz: NO_CTL -> ETSI
>> * CTRY_BANGLADESH: 5GHz: NO_CTL -> FCC
>> * CTRY_BRUNEI_DARUSSALAM: 5GHz: FCC -> ETSI
>> * CTRY_HONDURAS: 5GHz: NO_CTL -> FCC
>> * CTRY_INDONESIA: 5GHz: NO_CTL -> FCC
>> * CTRY_ISRAEL: 5GHz: NO_CTL -> ETSI
>> * CTRY_KOREA_NORTH: 2.4GHz: ETSI -> MKK
>> * CTRY_KOREA_ROC: 2.4GHz: ETSI -> MKK
>> * CTRY_KOREA_ROC3: 2.4GHz: ETSI -> MKK
>> * CTRY_LEBANON: 5GHz: NO_CTL -> FCC
>> * CTRY_MACEDONIA: 5GHz: NO_CTL -> ETSI
>> * CTRY_MALAYSIA: 5GHz: ETSI -> FCC
>> * CTRY_MEXICO: 2.4GHz: FCC-> ETSI
>> * CTRY_PAKISTAN: 5GHz: NO_CTL -> FCC
>> * CTRY_ROMANIA: 5GHz: NO_CTL -> ETSI
>> * CTRY_RUSSIA: 5GHz: NO_CTL -> ETSI
>> * CTRY_SAUDI_ARABIA: 5GHz: NO_CTL -> FCC
>> * CTRY_SINGAPORE: 5GHz: ETSI -> FCC
>> * CTRY_UKRAINE: 5GHz: NO_CTL -> ETSI
>> * CTRY_UAE: 5GHz: NO_CTL -> ETSI
>> * CTRY_VIET_NAM: 5GHz: NO_CTL -> ETSI
>> * CTRY_ZIMBABWE: 5GHz: NO_CTL -> ETSI
>>
>>
>> Btw. I have not removed CTRY_SERBIA_MONTENEGRO, CTRY_KOREA_ROC2 or
>> APL2_APLD because this might break devices which have these programmed in
>> the EEPROM. And I have not added APL11_FCCA, APL12_WORLD and CTRY_MALDIVES
>> because only the code was in the qcacld-2.0 source code but not the actual
>> mapping.
>>
>> I am relative confident that QCA also has following extra countries:
>>
>> * Afghanistan
>> * American Samoa
>> * Anguilla
>> * Bhutan
>> * Burkina Faso
>> * Cayman Islands
>> * Central Africa Republic
>> * Chad
>> * Christmas Islands
>> * Dominica
>> * Ethiopia
>> * French Guiana
>> * French Polynesia
>> * Ghana
>> * Guadeloupe
>> * Guyana
>> * Cote d'Ivoire
>> * Lesotho
>> * Malawi
>> * Maldives
>> * Marshall Islands
>> * Martinique
>> * Mauitania
>> * Mayotte
>> * Micronesia
>> * Moldova
>> * Mongolia
>> * Namibia
>> * Nigeria
>> * Northern Mariana Islands
>> * Palau
>> * Reunion
>> * St Barthelemy
>> * St Kitts Nevis
>> * St Lucia
>> * St Martin
>> * St Pierre Miquelon
>> * St Vincent Grenadiens
>> * Samoa
>> * Senegal
>> * Suriname
>> * Togo
>> * Turks Caicos
>> * Vanuatu
>> * Virgin Islands
>> * Wallis Futuna
>>
>> + a lot of extra regdomain codes (0x15, 0x16, 0x17, 0x18, 0x19, 0x3c, 0x4f,
>> 0x51, 0x57, 0x59) and the corresponding mappings.
>
> I asked about this and indeed qcacld-2.0 has few old mappings. I was
> told these patches are not current so I dropped them for now:
>
> [03/52] ath: Add regulatory mapping for Japan (J56) 2018-03-01
> [04/52] ath: Add regulatory mapping for Japan KDDI 2018-03-01
> [10/52] ath: Add regulatory mapping for Rwanda 2018-03-01
> [14/52] ath: Add regulatory mapping for United States for AP 2018-03-01
> [16/52] ath: Add regulatory mapping for APL10_MKKC 2018-03-01
> [21/52] ath: Switch APL9_WORLD to 2.4GHz MKK CTL 2018-03-01
> [31/52] ath: Map Indonesia to APL2_WORLD 2018-03-01
> [33/52] ath: Map Japan to MKK5_MKKA2 2018-03-01
> [34/52] ath: Map South Korea to APL10_MKKC 2018-03-01
> [35/52] ath: Map Lebanon to APL1_WORLD 2018-03-01
> [38/52] ath: Map Mexico to FCC1_WORLD 2018-03-01
> [40/52] ath: Map Pakistan to APL1_WORLD 2018-03-01
> [45/52] ath: Map Saudi Arabia to FCC2_WORLD 2018-03-01
> [47/52] ath: Map Taiwan to APL7_FCCA 2018-03-01
> [49/52] ath: Map U.A.E. to ETSI1_WORLD 2018-03-01
> [50/52] ath: Map Venezuela to FCC1_WORLD 2018-03-01
> [51/52] ath: Map Vietnam to ETSI3_WORLD 2018-03-01
>
> Rest of the patches are now in the pending branch and I'm hoping to
> apply them soon:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/log/?h=pending

Forgot to mention that there was a trivial conflict due to dropping some
of the patches:

Pushing patch "ath-map-russia-to-etsi8_world" ... done (conflict)
Error: 1 merge conflict(s)
CONFLICT (content): Merge conflict in
drivers/net/wireless/ath/regd_common.h
Now at patch "ath-map-russia-to-etsi8_world"

I fixed it like this:

diff --cc drivers/net/wireless/ath/regd_common.h
index 3afce206e049,dcb4fe28e76a..000000000000
--- a/drivers/net/wireless/ath/regd_common.h
+++ b/drivers/net/wireless/ath/regd_common.h
@@@ -459,7 -465,8 +459,7 @@@ static struct country_code_to_enum_rd a
{CTRY_PUERTO_RICO, FCC1_FCCA, "PR"},
{CTRY_QATAR, APL1_WORLD, "QA"},
{CTRY_ROMANIA, ETSI1_WORLD, "RO"},
- {CTRY_RUSSIA, NULL1_WORLD, "RU"},
+ {CTRY_RUSSIA, ETSI8_WORLD, "RU"},
- {CTRY_RWANDA, APL1_WORLD, "RW"},
{CTRY_SAUDI_ARABIA, NULL1_WORLD, "SA"},
{CTRY_SERBIA, ETSI1_WORLD, "RS"},
{CTRY_SERBIA_MONTENEGRO, ETSI1_WORLD, "CS"},

--
Kalle Valo