This patch adds two hardware flags for drivers to indicate their transmit power control (TPC) capabilities: TPC per packet or TPC per mrr stage of each data packet. The driver has to register with its TPC capabilities when it is registering at the mac80211. Signed-off-by: Thomas Huehn <thomas.huehn@xxxxxxxxxxxxxxxx> Signed-off-by: Jonas Jelonek <jelonek.jonas@xxxxxxxxx> --- include/net/mac80211.h | 9 +++++++++ net/mac80211/debugfs.c | 2 ++ 2 files changed, 11 insertions(+) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 67d9087e031f..c4b55c7273ed 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2610,6 +2610,13 @@ struct ieee80211_txq { * @IEEE80211_HW_MLO_MCAST_MULTI_LINK_TX: Hardware/driver handles transmitting * multicast frames on all links, mac80211 should not do that. * + * @IEEE80211_HW_SUPPORTS_TPC_PER_PACKET: The hardware/driver supports transmit + * power control (TPC) with one power level per data packet. + * + * @IEEE80211_HW_SUPPORTS_TPC_PER_MRR: The hardware/driver supports transmit + * power control (TPC) with individual power levels for each + * multi-rate-retry (mrr) stage per packet. + * * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays */ enum ieee80211_hw_flags { @@ -2667,6 +2674,8 @@ enum ieee80211_hw_flags { IEEE80211_HW_SUPPORTS_CONC_MON_RX_DECAP, IEEE80211_HW_DETECTS_COLOR_COLLISION, IEEE80211_HW_MLO_MCAST_MULTI_LINK_TX, + IEEE80211_HW_SUPPORTS_TPC_PER_PACKET, + IEEE80211_HW_SUPPORTS_TPC_PER_MRR, /* keep last, obviously */ NUM_IEEE80211_HW_FLAGS diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 78c7d60e8667..daeef1e04cb5 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c @@ -496,6 +496,8 @@ static const char *hw_flag_names[] = { FLAG(SUPPORTS_CONC_MON_RX_DECAP), FLAG(DETECTS_COLOR_COLLISION), FLAG(MLO_MCAST_MULTI_LINK_TX), + FLAG(SUPPORTS_TPC_PER_PACKET), + FLAG(SUPPORTS_TPC_PER_MRR), #undef FLAG }; -- 2.30.2