mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: support power delta calculation for 5 TX paths
One variant of MT7992 has 5 TX paths, so extend the power delta function to support it. Also, rename nss_delta to path_delta since the value is based on the number of TX paths rather tha the number of spatial streams. (path delta [0.5 dBm] = 10 * log(path number) [dBm] * 2) Co-developed-by: StanleyYP Wang <[email protected]> Signed-off-by: StanleyYP Wang <[email protected]> Signed-off-by: Shayne Chen <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
36e0b90e47
commit
da2c23bec4
+2
-2
@@ -1697,7 +1697,7 @@ s8 mt76_get_power_bound(struct mt76_phy *phy, s8 txpower)
|
||||
int n_chains = hweight16(phy->chainmask);
|
||||
|
||||
txpower = mt76_get_sar_power(phy, phy->chandef.chan, txpower * 2);
|
||||
txpower -= mt76_tx_power_nss_delta(n_chains);
|
||||
txpower -= mt76_tx_power_path_delta(n_chains);
|
||||
|
||||
return txpower;
|
||||
}
|
||||
@@ -1713,7 +1713,7 @@ int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
return -EINVAL;
|
||||
|
||||
n_chains = hweight16(phy->chainmask);
|
||||
delta = mt76_tx_power_nss_delta(n_chains);
|
||||
delta = mt76_tx_power_path_delta(n_chains);
|
||||
*dbm = DIV_ROUND_UP(phy->txpower_cur + delta, 2);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user