summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2017-12-14 16:39:12 +0100
committerKalle Valo <kvalo@codeaurora.org>2018-01-08 19:25:51 +0200
commit53aa29b274bae1d46bda2435e736d335078ae9de (patch)
tree2458d496779cacb0feea8cb81e8e19851bf1d01e /drivers/net/wireless/mediatek/mt76/mt76x2_init.c
parent984ea50324ec6bad2a04ac7869dfc428f80b8bee (diff)
downloadtalos-op-linux-53aa29b274bae1d46bda2435e736d335078ae9de.tar.gz
talos-op-linux-53aa29b274bae1d46bda2435e736d335078ae9de.zip
mt76x2: convert between per-chain tx power and combined output
Using both chains adds max. 3 dBm. A similar worst-case calculation is being used in ath9k as well to ensure that the hardware stays within regulatory limits Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x2_init.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt76x2_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
index 0755b451829e..3e3a01b6f2ce 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c
@@ -785,6 +785,9 @@ mt76x2_init_txpower(struct mt76x2_dev *dev,
chan->max_power = mt76x2_get_max_rate_power(&t) +
target_power;
chan->max_power /= 2;
+
+ /* convert to combined output power on 2x2 devices */
+ chan->max_power += 3;
}
}
OpenPOWER on IntegriCloud