2017-07-19 06:54:53 +00:00
|
|
|
From: Felix Fietkau <nbd@nbd.name>
|
|
|
|
Date: Wed, 19 Jul 2017 08:49:31 +0200
|
2017-10-07 10:52:56 +00:00
|
|
|
Subject: [PATCH] ath9k: adjust tx power reduction for US regulatory
|
|
|
|
domain
|
2017-07-19 06:54:53 +00:00
|
|
|
|
2019-06-11 12:46:28 +00:00
|
|
|
FCC regulatory rules allow for up to 6 dBi antenna gain. Account for
|
2017-07-19 06:54:53 +00:00
|
|
|
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
|
2021-10-09 17:25:36 +00:00
|
|
|
@@ -2996,6 +2996,10 @@ void ath9k_hw_apply_txpower(struct ath_h
|
2017-07-19 06:54:53 +00:00
|
|
|
if (ant_gain > max_gain)
|
|
|
|
ant_reduction = ant_gain - max_gain;
|
|
|
|
|
2019-06-11 12:46:28 +00:00
|
|
|
+ /* FCC allows maximum antenna gain of 6 dBi */
|
2017-07-19 06:54:53 +00:00
|
|
|
+ if (reg->region == NL80211_DFS_FCC)
|
2019-06-11 12:46:28 +00:00
|
|
|
+ ant_reduction = max_t(int, ant_reduction - 12, 0);
|
2017-07-19 06:54:53 +00:00
|
|
|
+
|
2018-09-23 16:02:35 +00:00
|
|
|
ah->eep_ops->set_txpower(ah, chan, ctl,
|
|
|
|
ant_reduction, new_pwr, test);
|
2017-07-19 06:54:53 +00:00
|
|
|
}
|