linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wen Gong <wgong@codeaurora.org>
To: johannes@sipsolutions.net, ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org, wgong@codeaurora.org
Subject: [PATCH v3 6/9] ieee80211: add definition for transmit power envelope element
Date: Fri,  3 Sep 2021 07:48:18 -0400	[thread overview]
Message-ID: <20210903114821.23346-7-wgong@codeaurora.org> (raw)
In-Reply-To: <20210903114821.23346-1-wgong@codeaurora.org>

IEEE Std 802.11ax™-2021 have some change for transmit power envelope
element. Add the definition of it.

Signed-off-by: Wen Gong <wgong@codeaurora.org>
---
 include/linux/ieee80211.h | 42 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index bed510b7bb6b..b35cdfae0625 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -2324,6 +2324,46 @@ struct ieee80211_he_6ghz_oper {
 	u8 minrate;
 } __packed;
 
+/*
+ * In "9.4.2.161 Transmit Power Envelope element" of
+ * "IEEE Std 802.11ax-2021", it show 4 types in "Table
+ * 9-275a-Maximum Transmit Power Interpretation subfield encoding".
+ * And it has 2 category for each type in "Table E-12-Regulatory
+ * Info subfield encoding in the United States".
+ * So it it totally max 8 Transmit Power Envelope element.
+ */
+#define IEEE80211_TPE_MAX_IE_COUNT	8
+
+/*
+ * In "Table 9-277 Meaning of Maximum Transmit Power Count subfield"
+ * of "IEEE Std 802.11ax-2021", the max power level is 8.
+ */
+#define IEEE80211_MAX_NUM_PWR_LEVEL	8
+
+#define IEEE80211_TPE_MAX_POWER_COUNT	8
+
+/* transmit power interpretation type of transmit power envelope element*/
+enum ieee80211_tx_power_intrpt_type {
+	IEEE80211_TPE_LOCAL_EIRP,
+	IEEE80211_TPE_LOCAL_EIRP_PSD,
+	IEEE80211_TPE_REG_CLIENT_EIRP,
+	IEEE80211_TPE_REG_CLIENT_EIRP_PSD,
+};
+
+/*
+ * struct ieee80211_tx_pwr_env
+ *
+ * This structure represents the "Transmit Power Envelope element"
+ */
+struct ieee80211_tx_pwr_env {
+	u8 tx_power_info;
+	s8 tx_power[IEEE80211_TPE_MAX_POWER_COUNT];
+} __packed;
+
+#define IEEE80211_TX_PWR_ENV_INFO_COUNT 0x7
+#define IEEE80211_TX_PWR_ENV_INFO_INTERPRET 0x38
+#define IEEE80211_TX_PWR_ENV_INFO_CATEGORY 0xC0
+
 /*
  * ieee80211_he_oper_size - calculate 802.11ax HE Operations IE size
  * @he_oper_ie: byte data of the He Operations IE, stating from the byte
@@ -2905,7 +2945,7 @@ enum ieee80211_eid {
 	WLAN_EID_VHT_OPERATION = 192,
 	WLAN_EID_EXTENDED_BSS_LOAD = 193,
 	WLAN_EID_WIDE_BW_CHANNEL_SWITCH = 194,
-	WLAN_EID_VHT_TX_POWER_ENVELOPE = 195,
+	WLAN_EID_TX_POWER_ENVELOPE = 195,
 	WLAN_EID_CHANNEL_SWITCH_WRAPPER = 196,
 	WLAN_EID_AID = 197,
 	WLAN_EID_QUIET_CHANNEL = 198,
-- 
2.31.1


  parent reply	other threads:[~2021-09-03 11:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-03 11:48 [PATCH v3 0/9] cfg80211/mac80211: Add support for 6GHZ STA for various modes : LPI, SP and VLP Wen Gong
2021-09-03 11:48 ` [PATCH v3 1/9] mac80211: add power type definition for 6 GHz Wen Gong
2021-09-03 11:48 ` [PATCH v3 2/9] ieee80211: add definition of regulatory info in 6 GHz operation information Wen Gong
2021-09-03 11:48 ` [PATCH v3 3/9] mac80211: add parse " Wen Gong
2021-09-03 11:48 ` [PATCH v3 4/9] cfg80211: add definition for 6 GHz power spectral density(psd) Wen Gong
2021-09-03 11:48 ` [PATCH v3 5/9] cfg80211: save power spectral density(psd) of regulatory rule Wen Gong
2021-09-03 11:48 ` Wen Gong [this message]
2021-09-03 11:48 ` [PATCH v3 7/9] mac80211: add parse transmit power envelope element Wen Gong
2021-09-03 11:48 ` [PATCH v3 8/9] mac80211: use ieee802_11_parse_elems() to find ies instead of ieee80211_bss_get_ie() Wen Gong
2021-09-23  8:25   ` Wen Gong
2021-09-03 11:48 ` [PATCH v3 9/9] mac80211: save transmit power envelope element and power constraint Wen Gong

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=20210903114821.23346-7-wgong@codeaurora.org \
    --to=wgong@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).