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:
Shayne Chen
2025-05-21 14:44:30 +02:00
committed by Felix Fietkau
parent 36e0b90e47
commit da2c23bec4
7 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -1403,12 +1403,12 @@ static inline bool mt76_is_skb_pktid(u8 pktid)
return pktid >= MT_PACKET_ID_FIRST;
}
static inline u8 mt76_tx_power_nss_delta(u8 nss)
static inline u8 mt76_tx_power_path_delta(u8 path)
{
static const u8 nss_delta[4] = { 0, 6, 9, 12 };
u8 idx = nss - 1;
static const u8 path_delta[5] = { 0, 6, 9, 12, 14 };
u8 idx = path - 1;
return (idx < ARRAY_SIZE(nss_delta)) ? nss_delta[idx] : 0;
return (idx < ARRAY_SIZE(path_delta)) ? path_delta[idx] : 0;
}
static inline bool mt76_testmode_enabled(struct mt76_phy *phy)