All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Jelonek <jelonek.jonas@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, nbd@nbd.name,
	Jonas Jelonek <jelonek.jonas@gmail.com>,
	Thomas Huehn <thomas.huehn@hs-nordhausen.de>
Subject: [RFC v2 3/6] mac80211: add hardware flags for TPC support
Date: Tue, 20 Sep 2022 12:40:29 +0200	[thread overview]
Message-ID: <20220920104032.496697-4-jelonek.jonas@gmail.com> (raw)
In-Reply-To: <20220920104032.496697-1-jelonek.jonas@gmail.com>

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@hs-nordhausen.de>
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
---
 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


  parent reply	other threads:[~2022-09-20 10:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20 10:40 [RFC v2 0/6] mac80211: add TPC support in control path Jonas Jelonek
2022-09-20 10:40 ` [RFC v2 1/6] mac80211: modify tx-power level annotation Jonas Jelonek
2022-09-21 14:54   ` Jeff Johnson
2023-01-12 10:24   ` Johannes Berg
2022-09-20 10:40 ` [RFC v2 2/6] mac80211: add tx-power annotation in control path Jonas Jelonek
2023-01-12 10:31   ` Johannes Berg
2022-09-20 10:40 ` Jonas Jelonek [this message]
2022-09-20 10:40 ` [RFC v2 4/6] mac80211: add utility function for tx_rate - rate_info conversion Jonas Jelonek
2023-01-12 10:26   ` Johannes Berg
2023-01-19 11:31     ` Jonas Jelonek
2023-01-19 11:35       ` Johannes Berg
2023-01-19 14:34         ` Jonas Jelonek
2022-09-20 10:40 ` [RFC v2 5/6] mac80211_hwsim: add TPC per packet support Jonas Jelonek
2022-09-26  7:47   ` [mac80211_hwsim] 14f322748f: WARNING:at_include/net/mac80211.h:#mac80211_hwsim_monitor_rx[mac80211_hwsim] kernel test robot
2022-09-26  7:47     ` kernel test robot
2023-01-12 10:31   ` [RFC v2 5/6] mac80211_hwsim: add TPC per packet support Johannes Berg
2023-01-19 14:32     ` Jonas Jelonek
2023-01-19 15:09       ` Johannes Berg
2023-01-26 16:52         ` Jonas Jelonek
     [not found]         ` <195E1629-BC72-4968-8E61-860C80F58D8B@gmail.com>
     [not found]           ` <386f10e09c17b871df1c86ebc0c2af52938c6fb6.camel@sipsolutions.net>
2023-03-03  7:42             ` Jonas Jelonek
2023-01-26 16:53     ` Jonas Jelonek
2023-02-28 17:44       ` Johannes Berg
2023-03-03  7:46         ` Jonas Jelonek
2022-09-20 10:40 ` [RFC v2 6/6] mac80211: minstrel_ht - add debugfs entry per sta for fixed tx-power Jonas Jelonek
2023-01-12 10:32   ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220920104032.496697-4-jelonek.jonas@gmail.com \
    --to=jelonek.jonas@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=thomas.huehn@hs-nordhausen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.