wifi: mac80211: get tx power per link

ML interfaces can have multiple affiliated links to it and
hence there is a need to report tx power of specified link
rather deflink.

Add changes to report tx power of requested link from mac80211,
also pass link id as an argument in get_tx_power op so that supported
drivers can use it to report link's tx power.

Co-developed-by: Aaradhana Sahu <[email protected]>
Signed-off-by: Aaradhana Sahu <[email protected]>
Signed-off-by: Rameshkumar Sundaram <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
Rameshkumar Sundaram
2025-07-04 20:47:07 +02:00
committed by Felix Fietkau
parent 243e572d89
commit e41c778558
3 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1704,7 +1704,7 @@ s8 mt76_get_power_bound(struct mt76_phy *phy, s8 txpower)
EXPORT_SYMBOL_GPL(mt76_get_power_bound);
int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
int *dbm)
unsigned int link_id, int *dbm)
{
struct mt76_phy *phy = mt76_vif_phy(hw, vif);
int n_chains, delta;
+1 -1
View File
@@ -1518,7 +1518,7 @@ int mt76_get_min_avg_rssi(struct mt76_dev *dev, u8 phy_idx);
s8 mt76_get_power_bound(struct mt76_phy *phy, s8 txpower);
int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
int *dbm);
unsigned int link_id, int *dbm);
int mt76_init_sar_power(struct ieee80211_hw *hw,
const struct cfg80211_sar_specs *sar);
int mt76_get_sar_power(struct mt76_phy *phy,
+2 -1
View File
@@ -668,7 +668,8 @@ static void mt7996_configure_filter(struct ieee80211_hw *hw,
}
static int
mt7996_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int *dbm)
mt7996_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
unsigned int link_id, int *dbm)
{
struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
struct mt7996_phy *phy = mt7996_vif_link_phy(&mvif->deflink);