diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-11-21 13:12:25 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-12-19 15:24:00 +0100 |
commit | 633f77b517ac704086c267b70a6dfe1924cfed0b (patch) | |
tree | 2ab7be97cb5ac05245118abc250a369c34a8bed3 /drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c | |
parent | b3cb885e56d5f64880109da9516ef2df1e9db7b9 (diff) |
mt76: mt76x02: introduce SAR support
Add SAR spec support to mt76x02 driver to allow configuring SAR power
limitations on the frequency ranges from the userland.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c index 933125b07ea3..b38bb7a2362b 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci_main.c @@ -78,8 +78,12 @@ mt76x2_config(struct ieee80211_hw *hw, u32 changed) } if (changed & IEEE80211_CONF_CHANGE_POWER) { - dev->txpower_conf = hw->conf.power_level * 2; + struct mt76_phy *mphy = &dev->mphy; + dev->txpower_conf = hw->conf.power_level * 2; + dev->txpower_conf = mt76_get_sar_power(mphy, + mphy->chandef.chan, + dev->txpower_conf); /* convert to per-chain power for 2x2 devices */ dev->txpower_conf -= 6; @@ -155,5 +159,6 @@ const struct ieee80211_ops mt76x2_ops = { .get_antenna = mt76_get_antenna, .set_rts_threshold = mt76x02_set_rts_threshold, .reconfig_complete = mt76x02_reconfig_complete, + .set_sar_specs = mt76x2_set_sar_specs, }; |