Lines Matching +full:ps +full:- +full:seq +full:- +full:id

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
5 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting
7 * Copyright (c) 2020-2025 The FreeBSD Foundation
135 /* 802.11-2020 Table 9-1-Valid type and subtype combinations */
154 /* 0000-0001 Reserved 0x00-0x10 */
155 #define IEEE80211_FC0_SUBTYPE_TRIGGER 0x20 /* Trigger, 80211ax-2021 */
158 #define IEEE80211_FC0_SUBTYPE_VHT_HE_NDP 0x50 /* VHT/HE NDP Announcement, 80211ac/ax-2013/2021 */
163 #define IEEE80211_FC0_SUBTYPE_PS_POLL 0xa0 /* PS-Poll */
167 #define IEEE80211_FC0_SUBTYPE_CF_END 0xe0 /* CF-End */
168 #define IEEE80211_FC0_SUBTYPE_CF_END_ACK 0xf0 /* 1111 Reserved - what was CF_END_ACK? */
171 /* 0001-0011 Reserved 0x10-0x30 */ /* Were: CF_ACK, CF_POLL, CF_ACPL */
173 /* 0101-0111 Reserved 0x50-0x70 */ /* Were: CFACK, CFPOLL, CF_ACK_CF_ACK */
174 #define IEEE80211_FC0_SUBTYPE_QOS_MASK_ANY 0x80 /* QoS mask - matching any subtypes 8..15 */
176 #define IEEE80211_FC0_SUBTYPE_QOS_DATA_CFACK 0x90 /* QoS Data +CF-Ack */
177 #define IEEE80211_FC0_SUBTYPE_QOS_DATA_CFPOLL 0xa0 /* QoS Data +CF-Poll */
178 #define IEEE80211_FC0_SUBTYPE_QOS_DATA_CFACKPOLL 0xb0 /* QoS Data +CF-Ack +CF-Poll */
181 #define IEEE80211_FC0_SUBTYPE_QOS_CFPOLL 0xe0 /* QoS CF-Poll */
182 #define IEEE80211_FC0_SUBTYPE_QOS_CFACKPOLL 0xf0 /* QoS CF-Ack +CF-Poll */
186 /* 0010-1111 Reserved 0x20-0xff */
188 /* 802.11-2020 Table 9-2-Control Frame Extension */
190 #define IEEE80211_CTL_EXT_SECTOR_ACK 0x00 /* Sector Ack, 80211ay-2021 */
191 #define IEEE80211_CTL_EXT_BA_SCHED 0x01 /* Block Ack Schedule, 80211ay-2021 */
199 #define IEEE80211_CTL_EXT_SSW_FBACK 0x09 /* SSW-Feedback */
200 #define IEEE80211_CTL_EXT_SSW_ACK 0x0a /* SSW-Ack */
201 #define IEEE80211_CTL_EXT_TDD_BF 0x0b /* TDD Beamforming, 80211ay-2021 */
202 /* 1100-1111 Reserved 0xc-0xf */
206 (((wh)->i_fc[0] & IEEE80211_FC0_VERSION_MASK) == (v))
210 (((((wh)->i_fc[0] & IEEE80211_FC0_VERSION_MASK) == (v))) && \
211 (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == (t)))
215 (((((wh)->i_fc[0] & IEEE80211_FC0_VERSION_MASK) == (v))) && \
216 (((wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == (t)) && \
217 (((wh)->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) == (st)))
276 ((wh)->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS_MASK_ANY))
298 #define IEEE80211_FC1_DIR_NODS 0x00 /* STA->STA */
299 #define IEEE80211_FC1_DIR_TODS 0x01 /* STA->AP */
300 #define IEEE80211_FC1_DIR_FROMDS 0x02 /* AP ->STA */
301 #define IEEE80211_FC1_DIR_DSTODS 0x03 /* AP ->AP */
304 (((wh)->i_fc[1] & IEEE80211_FC1_DIR_MASK) == IEEE80211_FC1_DIR_DSTODS)
314 ((wh)->i_fc[1] & IEEE80211_FC1_PROTECTED)
327 #define IEEE80211_SEQ_ADD(seq, incr) \ argument
328 (((seq) + (incr)) & (IEEE80211_SEQ_RANGE-1))
329 #define IEEE80211_SEQ_INC(seq) IEEE80211_SEQ_ADD(seq,1) argument
331 (((a) + IEEE80211_SEQ_RANGE - (b)) & (IEEE80211_SEQ_RANGE-1))
335 (IEEE80211_SEQ_SUB(b, a+1) < IEEE80211_SEQ_BA_RANGE-1)
363 (((wh)->i_fc[0] & \
460 * WME U-APSD qos info field defines
476 ((1 << (3 - (_ac))) & ( \
502 /* 80211-2020 Table 9-51-Category values */
518 #define IEEE80211_ACTION_CAT_SELF_PROT 15 /* 9.6.15 Self-protected */
520 /* Reserved 17 (R)Wi-Fi Alliance */
533 #define IEEE80211_ACTION_CAT_HE 30 /* 9.6.31 HE, 80211ax-2021 */
534 #define IEEE80211_ACTION_CAT_PROTECTED_HE 31 /* 9.6.32 Protected HE, 80211ax-2021 */
535 /* Reserved 32-125 */
536 #define IEEE80211_ACTION_CAT_VENDOR_SPECIFIC_PROTECTED 126 /* 9.6.5 Vendor-specific Protected */
537 #define IEEE80211_ACTION_CAT_VENDOR 127 /* 9.6.5 Vendor-specific */
538 /* Error 128-255 */
541 /* 80211-2020 Table 9-346-Spectrum Management Action field values */
548 /* Reserved = 5-255 */
551 /* 80211-2020 Table 9-363-Radio Measurement Action field values */
559 /* Reserved = 6-255 */
565 /* HT - recommended transmission channel width */
574 /* HT - MIMO Power Save (NB: D2.04) */
580 #define IEEE80211_A_HT_MIMOPWRSAVE_ENA 0x01 /* PS enabled */
585 /* bits 2-7 reserved */
599 #define IEEE80211_BAPS_AMSDU 0x0001 /* A-MSDU permitted */
617 /* BA - ADDBA request */
626 /* BA - ADDBA response */
635 /* BA - DELBA */
646 #define IEEE80211_BAR_MTID 0x0002 /* Multi-TID */
647 #define IEEE80211_BAR_NOACK 0x0001 /* No-Ack policy */
699 struct ieee80211_frame_cfend { /* NB: also CF-End+CF-Ack */
748 /* bits 14-15 are reserved */
779 uint8_t hc_id; /* element ID */
804 #define IEEE80211_HTCAP_RXSTBC_2STREAM 0x0200 /* 1-2 spatial streams*/
805 #define IEEE80211_HTCAP_RXSTBC_3STREAM 0x0300 /* 1-3 spatial streams*/
807 #define IEEE80211_HTCAP_MAXAMSDU 0x0800 /* max A-MSDU length */
813 #define IEEE80211_HTCAP_LSIGTXOPPROT 0x8000 /* L-SIG TXOP prot */
821 #define IEEE80211_HTCAP_MAXRXAMPDU 0x03 /* max rx A-MPDU factor */
845 /* bits 3-7 reserved */
853 /* bits 12-15 reserved */
859 uint8_t hi_id; /* element ID */
895 #define IEEE80211_HTINFO_NONGF_PRESENT 0x04 /* non-GF sta's present */
897 #define IEEE80211_HTINFO_NONHT_PRESENT 0x10 /* non-HT sta's present */
898 /* bits 5-15 reserved */
912 * 802.11ac definitions - 802.11ac-2013 .
916 * Maximum length of A-MPDU that the STA can RX in VHT.
917 * Length = 2 ^ (13 + max_ampdu_length_exp) - 1 (octets)
932 * + rx_mcs_map/tx_mcs_map: bitmap of per-stream supported MCS;
936 /* 802.11ac-2013, 8.4.2.160.3 Supported VHT-MCS and NSS Set field */
938 IEEE80211_VHT_MCS_SUPPORT_0_7 = 0, /* MCS0-7 */
939 IEEE80211_VHT_MCS_SUPPORT_0_8 = 1, /* MCS0-8 */
940 IEEE80211_VHT_MCS_SUPPORT_0_9 = 2, /* MCS0-9 */
944 /* 802.11ac-2013, 8.4.2.160.3 Supported VHT-MCS and NSS Set field */
952 /* 802.11ac-2013, 8.4.2.160.1 VHT Capabilities element structure */
959 * 802.11ac-2013, Table 8-183x-VHT Operation Information subfields.
960 * 802.11-2020, Table 9-274-VHT Operation Information subfields (for deprecations)
972 /* 802.11ac-2013 8.4.2.161 VHT Operation element */
975 uint8_t center_freq_seq0_idx; /* 20/40/80/160 - VHT chan1 */
976 uint8_t center_freq_seq1_idx; /* 80+80 - VHT chan2 */
977 uint16_t basic_mcs_set; /* Basic VHT-MCS and NSS Set */
1061 /* 802.11-2016, 9.4.2.158.2 VHT Capabilities Information field. */
1074 * VHT Transmit Power Envelope element - 802.11ac-2013 8.4.2.164
1081 * 0 - 20 MHz
1082 * 1 - 20+40 MHz
1083 * 2 - 20+40+80 MHz
1084 * 3 - 20+40+80+(160, 80+80) MHz
1117 * 802.11ax-2021, 9.4.2.248.2 HE MAC Capabilities Information field.
1170 * 802.11ax-2021, 9.4.2.248.3 HE PHY Capabilities Information field.
1288 * 802.11ax-2021,
1297 /* 802.11ax-2021, 9.4.2.248.4 Supported HE-MCS And NSS Set field. */
1299 IEEE80211_HE_MCS_SUPPORT_0_7 = 0, /* HE-MCS 0-7 for n NSS */
1300 IEEE80211_HE_MCS_SUPPORT_0_9 = 1, /* HE-MCS 0-9 for n NSS */
1301 IEEE80211_HE_MCS_SUPPORT_0_11 = 2, /* HE-MCS 0-11 for n NSS */
1324 /* 802.11ax-2021, 9.4.2.249 HE Operation element. */
1335 /* 802.11ax-2021, 9.4.2.251 MU EDCA Parameter Set element. */
1355 /* 802.11ax-2021, 9.4.2.252 Spatial Reuse Parameter Set element */
1356 /* Figure 9-788r-SR Control field format */
1362 /* 802.11ax-2021, 9.4.2.263 HE 6 GHz Band Capabilities element */
1363 /* Figure 9-788aj-Capabilities Information field format */
1379 * 802.11-2020 Table 9-92 (Element IDs).
1380 * 802.11ax-2021
1402 /* 17-31 reserved for challenge text extension */
1489 * but they defined a new with id 117 called PEER_MGMT.
1501 /* 121-124 MMCAOP not implemented yet */
1506 /* 128-129 reserved */
1510 /* 133-136 reserved */
1525 /* 149-150 reserved. */
1531 /* 155-156 reserved. */
1554 /* 178-180 reserved. */
1592 /* 218-219 reserved. */
1618 /* 245-254 reserved. */
1670 /* 48-51 reserved. */
1680 /* 61-87 reserved. */
1687 /* 94-255 reserved. */
1696 uint8_t tim_bitmap[1]; /* variable-length bitmap */
1712 (sizeof(struct ieee80211_country_ie) + 3*(IEEE80211_COUNTRY_MAX_BANDS-1))
1758 #define IEEE80211_EXTCAP_TLDS_BUF_STA_SUPP (1ULL << 28) /* TDLS peer U-APSP buffer STA support */
1778 #define IEEE80211_EXTCAP_SSID (1ULL << 48) /* UTF-8 SSID */
1779 /* bits 49-n are reserved */
1838 #define BCM_OUI_HTCAP 51 /* pre-draft HTCAP ie */
1839 #define BCM_OUI_HTINFO 52 /* pre-draft HTINFO ie */
1848 #define WPA_CSE_CCMP 0x04 /* CCMP 128-bit */
1857 /* 802.11-2016 Table 9-131 - Cipher Suite Selectors */
1865 #define RSN_CSE_WRAP 3 /* Reserved in the 802.11-2016 */
1869 /* 7 - "Group addressed traffic not allowed" */
1877 /* 802.11-2016 Table 9-133 - AKM suite selectors */
1882 #define RSN_ASE_FT_8021X 3 /* SHA-256 */
1883 #define RSN_ASE_FT_PSK 4 /* SHA-256 */
1886 #define RSN_ASE_8021X_TDLS 7 /* SHA-256 */
1887 #define RSN_ASE_SAE_UNSPEC 8 /* SHA-256 */
1888 #define RSN_ASE_FT_SAE 9 /* SHA-256 */
1889 #define RSN_ASE_AP_PEERKEY 10 /* SHA-256 */
1894 /* 802.11-2016 Figure 9-257 - RSN Capabilities (2 byte field) */
1908 /* 802.11-2016 Table 9-134 PTKSA/GTKSA/STKSA replay counters usage */
1930 * octet seq[2]
1932 * octet chal.id
1934 * octet chal.text[253] NB: 1-253 bytes
2047 #define IEEE80211_WEP_CRCLEN 4 /* CRC-32 */
2054 * 802.11i defines an extended IV for use with non-WEP ciphers.
2055 * When the EXTIV bit is set in the key id byte an additional
2058 * CCMP header rather than IV+extended-IV.
2068 * IEEE80211_MAX_LEN - WEP overhead - CRC -
2069 * QoS overhead - RSN/WPA overhead
2071 * mtu is Ethernet-compatible; it's set by ether_ifattach.
2089 * (see _ieee80211.h for implementation-specific settings).
2097 * the 802.11 spec as 512; we treat it as implementation-dependent
2106 * default as implementation-dependent so define it elsewhere.
2113 * As above, we treat default as implementation-dependent so