From 7b101406f863813be63db20f892ad51415abdabf Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Thu, 4 Apr 2019 11:36:53 +0800 Subject: [PATCH] wireless:custom fix tx power to 30dbm and dfs for ath/qca --- .../600-custom-fix-txpower-and-dfs.patch | 42 +++++++++++++++++++ .../patches/ath/408-ath_phy_regd.patch | 13 ++++++ 2 files changed, 55 insertions(+) create mode 100644 package/firmware/wireless-regdb/patches/600-custom-fix-txpower-and-dfs.patch create mode 100644 package/kernel/mac80211/patches/ath/408-ath_phy_regd.patch diff --git a/package/firmware/wireless-regdb/patches/600-custom-fix-txpower-and-dfs.patch b/package/firmware/wireless-regdb/patches/600-custom-fix-txpower-and-dfs.patch new file mode 100644 index 000000000..b1c912444 --- /dev/null +++ b/package/firmware/wireless-regdb/patches/600-custom-fix-txpower-and-dfs.patch @@ -0,0 +1,42 @@ +From 7eb6313910023f1be6015a8cd9e1b380ae01af64 Mon Sep 17 00:00:00 2001 +From: Chen Minqiang +Date: Sun, 7 Jan 2018 14:38:36 +0800 +Subject: [PATCH] custom fix txpower and dfs + +--- + db.txt | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/db.txt b/db.txt +index 75dc0a3..24989ad 100644 +--- a/db.txt ++++ b/db.txt +@@ -277,9 +277,9 @@ country CL: DFS-JP + (5735 - 5835 @ 80), (20) + + country CN: DFS-FCC +- (2402 - 2482 @ 40), (20) +- (5170 - 5250 @ 80), (23), AUTO-BW +- (5250 - 5330 @ 80), (23), DFS, AUTO-BW ++ (2402 - 2482 @ 40), (30) ++ (5170 - 5250 @ 80), (30), AUTO-BW ++ (5250 - 5330 @ 80), (30), AUTO-BW + (5735 - 5835 @ 80), (30) + # 60 GHz band channels 1,4: 28dBm, channels 2,3: 44dBm + # ref: http://www.miit.gov.cn/n11293472/n11505629/n11506593/n11960250/n11960606/n11960700/n12330791.files/n12330790.pdf +@@ -1238,9 +1238,9 @@ country UG: DFS-FCC + country US: DFS-FCC + (2402 - 2472 @ 40), (30) + # 5.15 ~ 5.25 GHz: 30 dBm for master mode, 23 dBm for clients +- (5170 - 5250 @ 80), (23), AUTO-BW +- (5250 - 5330 @ 80), (23), DFS, AUTO-BW +- (5490 - 5730 @ 160), (23), DFS ++ (5170 - 5250 @ 80), (30), AUTO-BW ++ (5250 - 5330 @ 80), (30), AUTO-BW ++ (5490 - 5730 @ 160), (30) + (5735 - 5835 @ 80), (30) + # 60g band + # reference: http://cfr.regstoday.com/47cfr15.aspx#47_CFR_15p255 +-- +2.7.4 + diff --git a/package/kernel/mac80211/patches/ath/408-ath_phy_regd.patch b/package/kernel/mac80211/patches/ath/408-ath_phy_regd.patch new file mode 100644 index 000000000..6d1dabf8a --- /dev/null +++ b/package/kernel/mac80211/patches/ath/408-ath_phy_regd.patch @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/regd.c ++++ b/drivers/net/wireless/ath/regd.c +@@ -511,6 +511,10 @@ static int __ath_reg_dyn_country(struct + + ath_reg_apply_world_flags(wiphy, request->initiator, reg); + ++ // apply regulatory to phy devices ++ if (regulatory_hint(wiphy, reg->alpha2)) ++ printk(KERN_DEBUG "ath: regulatory_hint error!\n"); ++ + return 0; + } +