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 2/4] mac80211: add tx-power annotation in control path
Date: Mon, 29 Aug 2022 16:41:45 +0200 [thread overview]
Message-ID: <20220829144147.484787-3-jelonek.jonas@gmail.com> (raw)
In-Reply-To: <20220829144147.484787-1-jelonek.jonas@gmail.com>
This patch adds members to ieee80211_tx_info and ieee80211_sta_rates
structures to allow tx-power annotation per packet/per mrr stage.
The added members are always tx-power indices referring to the tx-power
set described by ieee80211_hw->txpower_ranges.
The annotation in ieee80211_tx_info is for probing and compatibility
reasons only, e.g. drivers that only support RC/TPC per packet and do
not yet use ieee80211_sta_rates.
Signed-off-by: Thomas Huehn <thomas.huehn@hs-nordhausen.de>
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
---
include/net/mac80211.h | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9612714d715f..659662f8b5dd 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1072,6 +1072,8 @@ ieee80211_rate_get_vht_nss(const struct ieee80211_tx_rate *rate)
* @control.use_cts_prot: use RTS/CTS
* @control.short_preamble: use short preamble (CCK only)
* @control.skip_table: skip externally configured rate table
+ * @control.txpower_idx: Tx-power level index for whole packet,
+ * referring to an idx described by ieee80211_hw->txpower_ranges
* @control.jiffies: timestamp for expiry on powersave clients
* @control.vif: virtual interface (may be NULL)
* @control.hw_key: key to encrypt with (may be NULL)
@@ -1120,7 +1122,8 @@ struct ieee80211_tx_info {
u8 use_cts_prot:1;
u8 short_preamble:1;
u8 skip_table:1;
- /* 2 bytes free */
+ u8 txpower_idx;
+ /* 1 byte free */
};
/* only needed before rate control */
unsigned long jiffies;
@@ -1181,9 +1184,10 @@ ieee80211_info_get_tx_time_est(struct ieee80211_tx_info *info)
*
* @rate_idx The actual used rate.
* @try_count How often the rate was tried.
- * @tx_power_idx An idx into the ieee80211_hw->tx_power_levels list of the
- * corresponding wifi hardware. The idx shall point to the power level
- * that was used when sending the packet.
+ * @tx_power_idx An idx into the the tx-power set described by
+ * ieee80211_hw->txpower_ranges for the corresponding wifi hardware.
+ * The idx shall point to the tx-power level that was used when sending
+ * the packet.
*/
struct ieee80211_rate_status {
struct rate_info rate_idx;
@@ -2097,6 +2101,8 @@ enum ieee80211_sta_rx_bandwidth {
* @rcu_head: RCU head used for freeing the table on update
* @rate: transmit rates/flags to be used by default.
* Overriding entries per-packet is possible by using cb tx control.
+ * @rate.txpower_idx: An idx pointing to a tx-power level described by
+ * ieee80211_hw->txpower_ranges that should be used for the mrr stage.
*/
struct ieee80211_sta_rates {
struct rcu_head rcu_head;
@@ -2106,6 +2112,7 @@ struct ieee80211_sta_rates {
u8 count_cts;
u8 count_rts;
u16 flags;
+ u8 txpower_idx;
} rate[IEEE80211_TX_RATE_TABLE_SIZE];
};
--
2.30.2
next prev parent reply other threads:[~2022-08-29 14:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 14:41 [RFC 0/4] mac80211: add TPC support in control path Jonas Jelonek
2022-08-29 14:41 ` [RFC 1/4] mac80211: modify tx-power level annotation Jonas Jelonek
2022-08-29 14:41 ` Jonas Jelonek [this message]
2022-08-29 14:41 ` [RFC 3/4] mac80211: add hardware flags for TPC support Jonas Jelonek
2022-08-29 14:41 ` [RFC 4/4] mac80211: add utility function for tx_rate - rate_info conversion Jonas Jelonek
2022-08-29 14:45 ` [RFC 0/4] mac80211: add TPC support in control path Johannes Berg
2022-08-29 14:51 ` Thomas Hühn
2022-08-29 14:52 ` Johannes Berg
2022-08-29 14:52 ` Johannes Berg
2022-08-29 15:19 ` Jonas Jelonek
2022-08-29 20:31 ` Thomas Hühn
2022-08-29 15:15 ` Jonas Jelonek
2022-08-29 14:46 ` Johannes Berg
2022-08-29 15:06 ` Jonas Jelonek
2022-08-31 13:59 ` Jonas Jelonek
2022-08-31 14:22 ` Johannes Berg
2022-08-31 15:39 ` Jonas Jelonek
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=20220829144147.484787-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox