mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-24 21:02:35 +00:00
75 lines
2.6 KiB
Diff
75 lines
2.6 KiB
Diff
From 7f6fd164988049273d4313643d64baf946daf5c4 Mon Sep 17 00:00:00 2001
|
||
From: Wen Gong <quic_wgong@quicinc.com>
|
||
Date: Tue, 2 Nov 2021 13:27:26 +0530
|
||
Subject: [PATCH] ieee80211: add definition for transmit power envelope element
|
||
|
||
IEEE Std 802.11ax™-2021 makes changes to the transmit power envelope
|
||
element, adjust the code accordingly.
|
||
|
||
Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
|
||
Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
|
||
---
|
||
include/linux/ieee80211.h | 41 ++++++++++++++++++++++++++++++++++++++++-
|
||
1 file changed, 39 insertions(+), 1 deletion(-)
|
||
|
||
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
|
||
index 9cadd2c..af12b72 100644
|
||
--- a/include/linux/ieee80211.h
|
||
+++ b/include/linux/ieee80211.h
|
||
@@ -2332,6 +2332,44 @@ struct ieee80211_he_6ghz_oper {
|
||
} __packed;
|
||
|
||
/*
|
||
+ * In "9.4.2.161 Transmit Power Envelope element" of "IEEE Std 802.11ax-2021",
|
||
+ * it show four types in "Table 9-275a-Maximum Transmit Power Interpretation
|
||
+ * subfield encoding", and two 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
|
||
* after the ext ID byte. It is assumed that he_oper_ie has at least
|
||
@@ -2912,7 +2951,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.7.4
|