From e41c7785589f8482ab81f1604932b69c5e53c983 Mon Sep 17 00:00:00 2001 From: Rameshkumar Sundaram Date: Mon, 25 Nov 2024 14:02:17 +0530 Subject: [PATCH] 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 Signed-off-by: Aaradhana Sahu Signed-off-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20241125083217.216095-3-quic_ramess@quicinc.com Signed-off-by: Johannes Berg --- mac80211.c | 2 +- mt76.h | 2 +- mt7996/main.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mac80211.c b/mac80211.c index 7faadf62..bd5f5625 100644 --- a/mac80211.c +++ b/mac80211.c @@ -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; diff --git a/mt76.h b/mt76.h index 879fd6eb..540f52f6 100644 --- a/mt76.h +++ b/mt76.h @@ -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, diff --git a/mt7996/main.c b/mt7996/main.c index 73955fbc..020fffdc 100644 --- a/mt7996/main.c +++ b/mt7996/main.c @@ -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);