[source] ath9k: adjust tx power reduction for US regulatory domain
LEDE Commits
lede-commits at lists.infradead.org
Mon Jul 24 01:49:00 PDT 2017
nbd pushed a commit to source.git, branch master:
https://git.lede-project.org/9b6585b11a48c62566418b920afe14204f40f87b
commit 9b6585b11a48c62566418b920afe14204f40f87b
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 19 08:54:53 2017 +0200
ath9k: adjust tx power reduction for US regulatory domain
FCC regulatory rules allow for up to 3 dBi antenna gain. Account for
this in the EEPROM based tx power reduction code.
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
...t-tx-power-reduction-for-US-regulatory-do.patch | 23 ++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/package/kernel/mac80211/patches/330-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch b/package/kernel/mac80211/patches/330-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch
new file mode 100644
index 0000000..38b5264
--- /dev/null
+++ b/package/kernel/mac80211/patches/330-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch
@@ -0,0 +1,23 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 19 Jul 2017 08:49:31 +0200
+Subject: [PATCH] ath9k: adjust tx power reduction for US regulatory domain
+
+FCC regulatory rules allow for up to 3 dBi antenna gain. Account for
+this in the EEPROM based tx power reduction code.
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/drivers/net/wireless/ath/ath9k/hw.c
++++ b/drivers/net/wireless/ath/ath9k/hw.c
+@@ -2954,6 +2954,10 @@ void ath9k_hw_apply_txpower(struct ath_h
+ if (ant_gain > max_gain)
+ ant_reduction = ant_gain - max_gain;
+
++ /* FCC allows maximum antenna gain of 3 dBi */
++ if (reg->region == NL80211_DFS_FCC)
++ ant_reduction = min_t(int, ant_reduction - 6, 0);
++
+ ah->eep_ops->set_txpower(ah, chan, ctl, ant_reduction, new_pwr, test);
+ }
+
More information about the lede-commits
mailing list