Skip to content

Commit ad31393

Browse files
Wen Gongjmberg-intel
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent a1ef618 commit ad31393

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

include/linux/ieee80211.h

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2338,6 +2338,44 @@ struct ieee80211_he_6ghz_oper {
23382338
u8 minrate;
23392339
} __packed;
23402340

2341+
/*
2342+
* In "9.4.2.161 Transmit Power Envelope element" of "IEEE Std 802.11ax-2021",
2343+
* it show four types in "Table 9-275a-Maximum Transmit Power Interpretation
2344+
* subfield encoding", and two category for each type in "Table E-12-Regulatory
2345+
* Info subfield encoding in the United States".
2346+
* So it it totally max 8 Transmit Power Envelope element.
2347+
*/
2348+
#define IEEE80211_TPE_MAX_IE_COUNT 8
2349+
/*
2350+
* In "Table 9-277—Meaning of Maximum Transmit Power Count subfield"
2351+
* of "IEEE Std 802.11ax™‐2021", the max power level is 8.
2352+
*/
2353+
#define IEEE80211_MAX_NUM_PWR_LEVEL 8
2354+
2355+
#define IEEE80211_TPE_MAX_POWER_COUNT 8
2356+
2357+
/* transmit power interpretation type of transmit power envelope element */
2358+
enum ieee80211_tx_power_intrpt_type {
2359+
IEEE80211_TPE_LOCAL_EIRP,
2360+
IEEE80211_TPE_LOCAL_EIRP_PSD,
2361+
IEEE80211_TPE_REG_CLIENT_EIRP,
2362+
IEEE80211_TPE_REG_CLIENT_EIRP_PSD,
2363+
};
2364+
2365+
/**
2366+
* struct ieee80211_tx_pwr_env
2367+
*
2368+
* This structure represents the "Transmit Power Envelope element"
2369+
*/
2370+
struct ieee80211_tx_pwr_env {
2371+
u8 tx_power_info;
2372+
s8 tx_power[IEEE80211_TPE_MAX_POWER_COUNT];
2373+
} __packed;
2374+
2375+
#define IEEE80211_TX_PWR_ENV_INFO_COUNT 0x7
2376+
#define IEEE80211_TX_PWR_ENV_INFO_INTERPRET 0x38
2377+
#define IEEE80211_TX_PWR_ENV_INFO_CATEGORY 0xC0
2378+
23412379
/*
23422380
* ieee80211_he_oper_size - calculate 802.11ax HE Operations IE size
23432381
* @he_oper_ie: byte data of the He Operations IE, stating from the byte
@@ -2919,7 +2957,7 @@ enum ieee80211_eid {
29192957
WLAN_EID_VHT_OPERATION = 192,
29202958
WLAN_EID_EXTENDED_BSS_LOAD = 193,
29212959
WLAN_EID_WIDE_BW_CHANNEL_SWITCH = 194,
2922-
WLAN_EID_VHT_TX_POWER_ENVELOPE = 195,
2960+
WLAN_EID_TX_POWER_ENVELOPE = 195,
29232961
WLAN_EID_CHANNEL_SWITCH_WRAPPER = 196,
29242962
WLAN_EID_AID = 197,
29252963
WLAN_EID_QUIET_CHANNEL = 198,

0 commit comments

Comments
 (0)