summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2021-01-15 12:04:11 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2021-01-15 13:28:56 +0100
commit24fb81762ed1aeee57064deaeedee03f5d57da06 (patch)
tree5237a1a5e246d928ecfc80dade3e62fd32897d66
parent4e0c3ac8bde4a84bc6a2c680394b2bfe4c96c5b6 (diff)
downloadenea-kernel-cache-24fb81762ed1aeee57064deaeedee03f5d57da06.tar.gz
patches: drivers: net: ath EEPROM reg domain
QCA6174 EEPROM might contain broken regulatory domain information, which leads to `iw reg set <country code>` not being honoured. Instead, when trying to create a wireless access point, the world (0x00) regulatory domain is used, not allowing any emissions in 5GHz bands, hence breaking 802.11a support. Change-Id: I1c65ee6b3f077116d73e777dad1ff5a3aff52a6d Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-rw-r--r--patches/drivers/net/0001-ath-add-support-for-special-0x0-regulatory-domain.patch52
-rw-r--r--patches/drivers/net/ath-eeprom-regulatory-domain.scc2
2 files changed, 54 insertions, 0 deletions
diff --git a/patches/drivers/net/0001-ath-add-support-for-special-0x0-regulatory-domain.patch b/patches/drivers/net/0001-ath-add-support-for-special-0x0-regulatory-domain.patch
new file mode 100644
index 0000000..edd2e43
--- /dev/null
+++ b/patches/drivers/net/0001-ath-add-support-for-special-0x0-regulatory-domain.patch
@@ -0,0 +1,52 @@
1From 2dc016599cfa9672a147528ca26d70c3654a5423 Mon Sep 17 00:00:00 2001
2From: Wen Gong <wgong@codeaurora.org>
3Date: Fri, 29 Nov 2019 07:34:09 +0000
4Subject: [PATCH] ath: add support for special 0x0 regulatory domain
5
6Some sdio chips of rome QCA6174's regulatory domain code of EEPROM is
7empty, then ath_is_world_regd will return false for this case, and
8it will lead function __ath_reg_dyn_country not work, thus the regdomain
9will not update for NL80211_REGDOM_SET_BY_COUNTRY_IE type, it result
10ath10k set the same regdomain/reg_5ghz_ctl/reg_2ghz_ctl to firmware,
11then the tx power will not changed with different regdomain's AP. The
12regulatory domain code of EEPROM of some QCA6174 PCIE chip is 0x6c, it
13means world wide regdomain, for this chip, it does not have the issue.
14
15For empty reulatory domain code chip, set it to world regulatory domain
16in functio ath_regd_sanitize, then it will fix the issue.
17
18Tested with QCA6174 SDIO with firmware
19WLAN.RMH.4.4.1-00029.
20
21Upstream-Status: Backport [2dc016599cfa9672a147528ca26d70c3654a5423]
22
23Signed-off-by: Wen Gong <wgong@codeaurora.org>
24Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
25---
26 drivers/net/wireless/ath/regd.c | 10 +++++-----
27 1 file changed, 5 insertions(+), 5 deletions(-)
28
29diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
30index 20f4f8ea9f894..bee9110b91f38 100644
31--- a/drivers/net/wireless/ath/regd.c
32+++ b/drivers/net/wireless/ath/regd.c
33@@ -666,14 +666,14 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
34
35 /*
36 * Some users have reported their EEPROM programmed with
37- * 0x8000 set, this is not a supported regulatory domain
38- * but since we have more than one user with it we need
39- * a solution for them. We default to 0x64, which is the
40- * default Atheros world regulatory domain.
41+ * 0x8000 or 0x0 set, this is not a supported regulatory
42+ * domain but since we have more than one user with it we
43+ * need a solution for them. We default to 0x64, which is
44+ * the default Atheros world regulatory domain.
45 */
46 static void ath_regd_sanitize(struct ath_regulatory *reg)
47 {
48- if (reg->current_rd != COUNTRY_ERD_FLAG)
49+ if (reg->current_rd != COUNTRY_ERD_FLAG && reg->current_rd != 0)
50 return;
51 printk(KERN_DEBUG "ath: EEPROM regdomain sanitized\n");
52 reg->current_rd = 0x64;
diff --git a/patches/drivers/net/ath-eeprom-regulatory-domain.scc b/patches/drivers/net/ath-eeprom-regulatory-domain.scc
new file mode 100644
index 0000000..6b02932
--- /dev/null
+++ b/patches/drivers/net/ath-eeprom-regulatory-domain.scc
@@ -0,0 +1,2 @@
1# Upstream in kernel v5.6-rc1 and newer
2patch 0001-ath-add-support-for-special-0x0-regulatory-domain.patch