Date: Wed, 11 Jun 2025 09:14:36 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 8925b9c8d375 - stable/14 - net80211: LinuxKPI: migrate HE defines to net80211, put correct values Message-ID: <202506110914.55B9EaGu062657@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8925b9c8d375bbc7d89fa9d604dc0236d9751637 commit 8925b9c8d375bbc7d89fa9d604dc0236d9751637 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-06-03 12:35:33 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2025-06-10 23:41:24 +0000 net80211: LinuxKPI: migrate HE defines to net80211, put correct values Migrate most LinuxKPI 802.11 definitions for HE IEs to net80211. During that process also properly define them as most of them only had dummy values. Some of the definitions are sparse; that is, only the bits used by drivers so far were listed and annotated with the standards section. There seems to be little point to mangle the names and have two copies of all these bit field definitions. We can add "_S" (shift/mask) variants to those we need in net80211 (if we do). Sponsored by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D50677 (cherry picked from commit 2ab7cbdc346e2a174a7bee4ce44c4f78b1ca093b) --- .../linuxkpi/common/include/linux/ieee80211.h | 4 - sys/compat/linuxkpi/common/include/net/cfg80211.h | 172 +---------------- sys/net80211/ieee80211.h | 209 ++++++++++++++++++++- 3 files changed, 209 insertions(+), 176 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index fe2055f05969..3644ef80861b 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -495,10 +495,6 @@ enum ieee80211_category { WLAN_CATEGORY_SA_QUERY = 8, /* net80211::IEEE80211_ACTION_CAT_SA_QUERY */ }; -struct ieee80211_he_6ghz_capa { - uint16_t capa; -}; - /* 80211-2020 9.3.3.2 Format of Management frames */ struct ieee80211_mgmt { __le16 frame_control; diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index c806afb971e6..18b34f0e90ec 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -44,6 +44,8 @@ #include <linux/workqueue.h> #include <net/regulatory.h> +#include <net80211/ieee80211.h> + /* linux_80211.c */ extern int linuxkpi_debug_80211; #ifndef D80211_TODO @@ -640,176 +642,6 @@ struct linuxkpi_ieee80211_regdomain { struct ieee80211_reg_rule reg_rules[]; }; -/* XXX-BZ this are insensible values probably ... */ -#define IEEE80211_HE_MAC_CAP0_HTC_HE 0x1 -#define IEEE80211_HE_MAC_CAP0_TWT_REQ 0x2 -#define IEEE80211_HE_MAC_CAP0_TWT_RES 0x4 - -#define IEEE80211_HE_MAC_CAP1_LINK_ADAPTATION 0x1 -#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8 0x2 -#define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US 0x4 -#define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK 0x8 - -#define IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP 0x1 -#define IEEE80211_HE_MAC_CAP2_ACK_EN 0x2 -#define IEEE80211_HE_MAC_CAP2_BSR 0x4 -#define IEEE80211_HE_MAC_CAP2_LINK_ADAPTATION 0x8 -#define IEEE80211_HE_MAC_CAP2_BCAST_TWT 0x10 -#define IEEE80211_HE_MAC_CAP2_ALL_ACK 0x20 -#define IEEE80211_HE_MAC_CAP2_MU_CASCADING 0x40 -#define IEEE80211_HE_MAC_CAP2_TRS 0x80 - -#define IEEE80211_HE_MAC_CAP3_OMI_CONTROL 0x02 -#define IEEE80211_HE_MAC_CAP3_OFDMA_RA 0x04 -#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1 0x08 -#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2 0x10 -#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3 0x18 -#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK 0x18 -#define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED 0x40 -#define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS 0x80 - -#define IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU 0x1 -#define IEEE80211_HE_MAC_CAP4_BQR 0x2 -#define IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39 0x4 -#define IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU 0x8 -#define IEEE80211_HE_MAC_CAP4_OPS 0x10 -#define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG 0x20 - -#define IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS 0x1 -#define IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX 0x2 -#define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40 0x4 -#define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B41 0x8 -#define IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU 0x10 -#define IEEE80211_HE_MAC_CAP5_OM_CTRL_UL_MU_DATA_DIS_RX 0x20 -#define IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING 0x40 -#define IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION 0x80 - -#define IEEE80211_HE_MCS_NOT_SUPPORTED 0x0 -#define IEEE80211_HE_MCS_SUPPORT_0_7 0x1 -#define IEEE80211_HE_MCS_SUPPORT_0_9 0x2 -#define IEEE80211_HE_MCS_SUPPORT_0_11 0x4 - -#define IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS 0x01 -#define IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS 0x02 -#define IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START 0x04 -#define IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN 0x08 -#define IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP 0x10 -#define IEEE80211_HE_6GHZ_CAP_SM_PS 0x20 - -#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G 0x1 -#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G 0x2 -#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G 0x4 -#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G 0x8 -#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_RU_MAPPING_IN_2G 0x10 -#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_RU_MAPPING_IN_5G 0x20 -#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_MASK 0x40 -#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_MASK_ALL 0xff - -#define IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A 0x1 -#define IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD 0x2 -#define IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS 0x4 -#define IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK 0x8 -#define IEEE80211_HE_PHY_CAP1_HE_LTF_AND_GI_FOR_HE_PPDUS_0_8US 0x10 - -#define IEEE80211_HE_PHY_CAP2_MIDAMBLE_RX_TX_MAX_NSTS 0x1 -#define IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US 0x2 -#define IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ 0x4 -#define IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ 0x8 -#define IEEE80211_HE_PHY_CAP2_DOPPLER_TX 0x10 -#define IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO 0x20 -#define IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO 0x40 - -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK 0x1 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_NO_DCM 0x2 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_NO_DCM 0x4 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 0x8 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_1 0x10 -#define IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER 0x20 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM 0x40 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_16_QAM 0x80 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_2 0x10 -#define IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU 0x20 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_BPSK 0x40 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_BPSK 0x80 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK 0x80 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_QPSK 0x80 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_QPSK 0x80 -#define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_2 0x80 - -#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8 0x1 -#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8 0x2 -#define IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE 0x4 -#define IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER 0x8 -#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 0x10 -#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4 0x20 -#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_MASK 0x40 -#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_MASK 0x80 -#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_5 0x80 -#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_5 0x80 - -#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2 0x1 -#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2 0x2 -#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK 0x4 -#define IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK 0x8 -#define IEEE80211_HE_PHY_CAP5_NG16_SU_FEEDBACK 0x10 -#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_MASK 0x20 - -#define IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT 0x1 -#define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMER_FB 0x2 -#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMER_FB 0x4 -#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB 0x8 -#define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB 0x20 -#define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU 0x40 -#define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU 0x80 -#define IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE 0x80 -#define IEEE80211_HE_PHY_CAP6_TRIG_CQI_FB 0x80 -#define IEEE80211_HE_PHY_CAP6_PARTIAL_BANDWIDTH_DL_MUMIMO 0x80 - -#define IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI 0x1 -#define IEEE80211_HE_PHY_CAP7_MAX_NC_1 0x2 -#define IEEE80211_HE_PHY_CAP7_MAX_NC_2 0x4 -#define IEEE80211_HE_PHY_CAP7_MAX_NC_MASK 0x6 -#define IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_AR 0x8 -#define IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP 0x10 -#define IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ 0x20 -#define IEEE80211_HE_PHY_CAP7_STBC_TX_ABOVE_80MHZ 0x40 -#define IEEE80211_HE_PHY_CAP7_PSR_BASED_SR 0x80 - -#define IEEE80211_HE_PHY_CAP8_20MHZ_IN_160MHZ_HE_PPDU 0x1 -#define IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G 0x2 -#define IEEE80211_HE_PHY_CAP8_80MHZ_IN_160MHZ_HE_PPDU 0x4 -#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_242 0x8 -#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_484 0x10 -#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_996 0x18 -#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_2x996 0x20 -#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_MASK 0x28 -#define IEEE80211_HE_PHY_CAP8_HE_ER_SU_PPDU_4XLTF_AND_08_US_GI 0x40 -#define IEEE80211_HE_PHY_CAP8_HE_ER_SU_1XLTF_AND_08_US_GI 0x80 - -#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_0US 0x1 -#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US 0x2 -#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_8US 0x4 -#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK 0x8 -#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_RESERVED 0x10 -#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_POS 0x0 -#define IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK 0x20 -#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB 0x4 -#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB 0x8 -#define IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU 0x10 -#define IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU 0x20 -#define IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM 0x40 - -#define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF 0x1 - -#define IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED 0x1 -#define IEEE80211_HE_OPERATION_BSS_COLOR_OFFSET 0x2 -#define IEEE80211_HE_OPERATION_ER_SU_DISABLE 0x4 - -#define IEEE80211_HE_SPR_HESIGA_SR_VAL15_ALLOWED 0x01 -#define IEEE80211_HE_SPR_NON_SRG_OBSS_PD_SR_DISALLOWED 0x02 -#define IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT 0x04 -#define IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT 0x08 - #define IEEE80211_EHT_MAC_CAP0_EPCS_PRIO_ACCESS 0x01 #define IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_11454 0x02 #define IEEE80211_EHT_MAC_CAP0_MAX_MPDU_LEN_MASK 0x03 diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h index 439a9a25dc8d..46f7de0663ee 100644 --- a/sys/net80211/ieee80211.h +++ b/sys/net80211/ieee80211.h @@ -4,6 +4,10 @@ * Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * All rights reserved. + * Copyright (c) 2020-2025 The FreeBSD Foundation + * + * Portions of this software were developed by Björn Zeeb + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1034,6 +1038,177 @@ struct ieee80211_ie_vht_txpwrenv { * HE */ +/* + * 802.11ax-2021, 9.4.2.248.2 HE MAC Capabilities Information field. + */ +/* B0..B7 */ +#define IEEE80211_HE_MAC_CAP0_HTC_HE (1<<0) +#define IEEE80211_HE_MAC_CAP0_TWT_REQ (1<<1) +#define IEEE80211_HE_MAC_CAP0_TWT_RES (1<<2) + +/* B8..B15 */ +#define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US (1<<3) +#define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK (1<<3 | 1<<2) +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8 (1<<6 | 1<<5 | 1<<4) +#define IEEE80211_HE_MAC_CAP1_LINK_ADAPTATION (1<<7) +/* Note: B15|B16 are split between octets %!$@??? */ + +/* B16..B23 */ +#define IEEE80211_HE_MAC_CAP2_LINK_ADAPTATION (1<<0) +#define IEEE80211_HE_MAC_CAP2_ALL_ACK (1<<1) +#define IEEE80211_HE_MAC_CAP2_TRS (1<<2) +#define IEEE80211_HE_MAC_CAP2_BSR (1<<3) +#define IEEE80211_HE_MAC_CAP2_BCAST_TWT (1<<4) +#define IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP (1<<5) +#define IEEE80211_HE_MAC_CAP2_MU_CASCADING (1<<6) +#define IEEE80211_HE_MAC_CAP2_ACK_EN (1<<7) + +/* B24..B31 */ +#define IEEE80211_HE_MAC_CAP3_OMI_CONTROL (1<<1) +#define IEEE80211_HE_MAC_CAP3_OFDMA_RA (1<<2) +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_1 (1<<3) +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_2 (1<<4) +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_EXT_3 (1<<4 | 1<<3) +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK (1<<4 | 1<<3) +#define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED (1<<6) +#define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS (1<<7) + +/* B32..B39 */ +#define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG (1<<0) +#define IEEE80211_HE_MAC_CAP4_BQR (1<<2) +#define IEEE80211_HE_MAC_CAP4_OPS (1<<5) +#define IEEE80211_HE_MAC_CAP4_AMSDU_IN_AMPDU (1<<6) +#define IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39 (1<<7) +/* Note: B39|B40|B41 are split between octets %!$@??? */ + +/* B40..B47 */ +#define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40 (1<<0) +#define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B41 (1<<1) +#define IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECTIVE_TRANSMISSION (1<<2) +#define IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU (1<<3) +#define IEEE80211_HE_MAC_CAP5_OM_CTRL_UL_MU_DATA_DIS_RX (1<<4) +#define IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS (1<<5) +#define IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING (1<<6) +#define IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX (1<<7) + +/* + * 802.11ax-2021, 9.4.2.248.3 HE PHY Capabilities Information field. + */ +/* B0..B7 */ +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G (1<<1) +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G (1<<2) +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G (1<<3) +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G (1<<4) +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_MASK_ALL (1<<4 | 1<<3 | 1<<2 | 1<<1) +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_RU_MAPPING_IN_2G (1<<5) +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_RU_MAPPING_IN_5G (1<<6) +#define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_MASK (1<<6 | 1<<5 | 1<<4 | 1<<3 | 1<<2 | 1<<1) + +/* B8..B15 */ +#define IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK (1<<3 | 1<<2 | 1<<1 | 1<<0) +#define IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A (1<<4) +#define IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD (1<<5) +#define IEEE80211_HE_PHY_CAP1_HE_LTF_AND_GI_FOR_HE_PPDUS_0_8US (1<<6) +#define IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS (1<<7) +/* Note: B15|B16 are split between octets %!$@??? */ + +/* B16..B23 */ +#define IEEE80211_HE_PHY_CAP2_MIDAMBLE_RX_TX_MAX_NSTS (1<<0) +#define IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US (1<<1) +#define IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ (1<<2) +#define IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ (1<<3) +#define IEEE80211_HE_PHY_CAP2_DOPPLER_TX (1<<4) +#define IEEE80211_HE_PHY_CAP2_DOPPLER_RX (1<<5) +#define IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO (1<<6) +#define IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO (1<<7) + +/* B24..B31 */ +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_NO_DCM 0x00 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_BPSK (1<<0) +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_QPSK (1<<1) +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_16_QAM (1<<1 | 1<<0) +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK (1<<1 | 1<<0) +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_1 0x00 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_TX_NSS_2 (1<<2) +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_NO_DCM 0x00 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_BPSK (1<<3) +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_QPSK (1<<4) +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_16_QAM (1<<4 | 1<<3) +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK (1<<4 | 1<<3) +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_1 0x00 +#define IEEE80211_HE_PHY_CAP3_DCM_MAX_RX_NSS_2 (1<<5) +#define IEEE80211_HE_PHY_CAP3_RX_PARTIAL_BW_SU_IN_20MHZ_MU (1<<6) +#define IEEE80211_HE_PHY_CAP3_SU_BEAMFORMER (1<<7) + +/* B32..B39 */ +#define IEEE80211_HE_PHY_CAP4_SU_BEAMFORMEE (1<<0) +#define IEEE80211_HE_PHY_CAP4_MU_BEAMFORMER (1<<1) +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_4 (1<<3 | 1<<2) +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_5 (1<<4) +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_8 (1<<4 | 1<<3 | 1<<2) +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_UNDER_80MHZ_MASK (1<<4 | 1<<3 | 1<<2) +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_4 (1<<6 | 1<<5) +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_5 (1<<7) +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_8 (1<<7 | 1<<6 | 1<<5) +#define IEEE80211_HE_PHY_CAP4_BEAMFORMEE_MAX_STS_ABOVE_80MHZ_MASK (1<<7 | 1<<6 | 1<<5) + +/* B40..B47 */ +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_2 (1<<0) +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK (1<<2 | 1<<1 | 1<<0) +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_2 (1<<3) +#define IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_ABOVE_80MHZ_MASK (1<<5 | 1<<4 | 1<<3) +#define IEEE80211_HE_PHY_CAP5_NG16_SU_FEEDBACK (1<<6) +#define IEEE80211_HE_PHY_CAP5_NG16_MU_FEEDBACK (1<<7) + +/* B48..B55 */ +#define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_42_SU (1<<0) +#define IEEE80211_HE_PHY_CAP6_CODEBOOK_SIZE_75_MU (1<<1) +#define IEEE80211_HE_PHY_CAP6_TRIG_SU_BEAMFORMING_FB (1<<2) +#define IEEE80211_HE_PHY_CAP6_TRIG_MU_BEAMFORMING_PARTIAL_BW_FB (1<<3) +#define IEEE80211_HE_PHY_CAP6_TRIG_CQI_FB (1<<4) +#define IEEE80211_HE_PHY_CAP6_PARTIAL_BW_EXT_RANGE (1<<5) +#define IEEE80211_HE_PHY_CAP6_PARTIAL_BANDWIDTH_DL_MUMIMO (1<<6) +#define IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT (1<<7) + +/* B56..B63 */ +#define IEEE80211_HE_PHY_CAP7_PSR_BASED_SR (1<<0) +#define IEEE80211_HE_PHY_CAP7_POWER_BOOST_FACTOR_SUPP (1<<1) +#define IEEE80211_HE_PHY_CAP7_HE_SU_MU_PPDU_4XLTF_AND_08_US_GI (1<<2) +#define IEEE80211_HE_PHY_CAP7_MAX_NC_1 (1<<3) +#define IEEE80211_HE_PHY_CAP7_MAX_NC_2 (1<<4) +#define IEEE80211_HE_PHY_CAP7_MAX_NC_MASK (1<<5 | 1<<4 | 1<<3) +#define IEEE80211_HE_PHY_CAP7_STBC_TX_ABOVE_80MHZ (1<<6) +#define IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ (1<<7) + +/* B64..B71 */ +#define IEEE80211_HE_PHY_CAP8_HE_ER_SU_PPDU_4XLTF_AND_08_US_GI (1<<0) +#define IEEE80211_HE_PHY_CAP8_20MHZ_IN_40MHZ_HE_PPDU_IN_2G (1<<1) +#define IEEE80211_HE_PHY_CAP8_20MHZ_IN_160MHZ_HE_PPDU (1<<2) +#define IEEE80211_HE_PHY_CAP8_80MHZ_IN_160MHZ_HE_PPDU (1<<3) +#define IEEE80211_HE_PHY_CAP8_HE_ER_SU_1XLTF_AND_08_US_GI (1<<4) +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_242 0x00 +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_484 (1<<6) +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_996 (1<<7) +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_2x996 (1<<7 | 1<<6) +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_MASK (1<<7 | 1<<6) + +/* B72..B79 */ +#define IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM (1<<0) +#define IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK (1<<1) +#define IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU (1<<2) +#define IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU (1<<3) +#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB (1<<4) +#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB (1<<5) +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_0US 0x00 +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_8US 1 +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_16US 2 +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_RESERVED 3 +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_POS 6 +#define IEEE80211_HE_PHY_CAP9_NOMINAL_PKT_PADDING_MASK (1<<7 | 1<<6) + +/* B80..B87 */ +#define IEEE80211_HE_PHY_CAP10_HE_MU_M1RU_MAX_LTF (1<<0) + /* * 802.11ax-2021, * 9.4.2.248.2 HE MAC Capabilities Information field. @@ -1045,6 +1220,13 @@ struct ieee80211_he_cap_elem { } __packed; /* 802.11ax-2021, 9.4.2.248.4 Supported HE-MCS And NSS Set field. */ +enum ieee80211_he_mcs_support { + IEEE80211_HE_MCS_SUPPORT_0_7 = 0, /* HE-MCS 0-7 for n NSS */ + IEEE80211_HE_MCS_SUPPORT_0_9 = 1, /* HE-MCS 0-9 for n NSS */ + IEEE80211_HE_MCS_SUPPORT_0_11 = 2, /* HE-MCS 0-11 for n NSS */ + IEEE80211_HE_MCS_NOT_SUPPORTED = 3 /* n NSS not supported. */ +}; + struct ieee80211_he_mcs_nss_supp { uint16_t rx_mcs_80; uint16_t tx_mcs_80; @@ -1065,8 +1247,12 @@ struct net80211_he_cap { }; /* 802.11ax-2021, 9.4.2.249 HE Operation element. */ +#define IEEE80211_HE_OPERATION_ER_SU_DISABLE (1<<16) +#define IEEE80211_HE_OPERATION_BSS_COLOR_OFFSET 24 +#define IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED (1<<31) + struct ieee80211_he_operation { - uint32_t he_oper_params; + uint32_t he_oper_params; /* (3) params | (1) bss color info */ uint16_t he_mcs_nss_set; uint8_t optional[0]; } __packed; @@ -1090,8 +1276,27 @@ struct ieee80211_mu_edca_param_set { struct ieee80211_he_mu_edca_param_ac_rec param_ac_recs[4]; }; } __packed; -#endif /* _KERNEL || WANT_NET80211 */ +/* 802.11ax-2021, 9.4.2.252 Spatial Reuse Parameter Set element */ +/* Figure 9-788r-SR Control field format */ +#define IEEE80211_HE_SPR_NON_SRG_OBSS_PD_SR_DISALLOWED (1<<1) +#define IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT (1<<2) +#define IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT (1<<3) +#define IEEE80211_HE_SPR_HESIGA_SR_VAL15_ALLOWED (1<<4) + +/* 802.11ax-2021, 9.4.2.263 HE 6 GHz Band Capabilities element */ +/* Figure 9-788aj-Capabilities Information field format */ +#define IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START (1<<2 | 1<<1 | 1<<0) +#define IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP (1<<5 | 1<<4 | 1<<3) +#define IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN (1<<7 | 1<<6) +#define IEEE80211_HE_6GHZ_CAP_SM_PS (1<<10 | 1<<9) +#define IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS (1<<12) +#define IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS (1<<13) + +struct ieee80211_he_6ghz_capa { + uint16_t capa; +}; +#endif /* _KERNEL || WANT_NET80211 */ /* * Management information element payloads.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202506110914.55B9EaGu062657>