diff options
author | Felix Fietkau <nbd@nbd.name> | 2017-10-07 12:52:56 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2017-10-13 11:45:57 +0200 |
commit | 609208597b6d18b0c1730f34685db73c859aa492 (patch) | |
tree | e18dd39c7c691c8cacedd589a33fcd7a034dab03 /package/kernel/mac80211/patches/315-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch | |
parent | efbd4e721d0bc6aa99614ef9d893f9cfe2264907 (diff) | |
download | mtk-20170518-609208597b6d18b0c1730f34685db73c859aa492.zip mtk-20170518-609208597b6d18b0c1730f34685db73c859aa492.tar.gz mtk-20170518-609208597b6d18b0c1730f34685db73c859aa492.tar.bz2 |
mac80211: update to wireless-testing 2017-10-06
Rework the code to get rid of some extra kernel module dependencies
introduced in the last update.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/315-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch')
-rw-r--r-- | package/kernel/mac80211/patches/315-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/315-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch b/package/kernel/mac80211/patches/315-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch new file mode 100644 index 0000000..59e4dde --- /dev/null +++ b/package/kernel/mac80211/patches/315-ath9k-adjust-tx-power-reduction-for-US-regulatory-do.patch @@ -0,0 +1,24 @@ +From: Felix Fietkau <nbd@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@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); + } + |