.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * IEEE 802.11 defines |
---|
3 | 4 | * |
---|
.. | .. |
---|
8 | 9 | * Copyright (c) 2006, Michael Wu <flamingice@sourmilk.net> |
---|
9 | 10 | * Copyright (c) 2013 - 2014 Intel Mobile Communications GmbH |
---|
10 | 11 | * Copyright (c) 2016 - 2017 Intel Deutschland GmbH |
---|
11 | | - * Copyright (c) 2018 Intel Corporation |
---|
12 | | - * |
---|
13 | | - * This program is free software; you can redistribute it and/or modify |
---|
14 | | - * it under the terms of the GNU General Public License version 2 as |
---|
15 | | - * published by the Free Software Foundation. |
---|
| 12 | + * Copyright (c) 2018 - 2020 Intel Corporation |
---|
16 | 13 | */ |
---|
17 | 14 | |
---|
18 | 15 | #ifndef LINUX_IEEE80211_H |
---|
.. | .. |
---|
108 | 105 | |
---|
109 | 106 | /* extension, added by 802.11ad */ |
---|
110 | 107 | #define IEEE80211_STYPE_DMG_BEACON 0x0000 |
---|
| 108 | +#define IEEE80211_STYPE_S1G_BEACON 0x0010 |
---|
| 109 | + |
---|
| 110 | +/* bits unique to S1G beacon */ |
---|
| 111 | +#define IEEE80211_S1G_BCN_NEXT_TBTT 0x100 |
---|
| 112 | + |
---|
| 113 | +/* see 802.11ah-2016 9.9 NDP CMAC frames */ |
---|
| 114 | +#define IEEE80211_S1G_1MHZ_NDP_BITS 25 |
---|
| 115 | +#define IEEE80211_S1G_1MHZ_NDP_BYTES 4 |
---|
| 116 | +#define IEEE80211_S1G_2MHZ_NDP_BITS 37 |
---|
| 117 | +#define IEEE80211_S1G_2MHZ_NDP_BYTES 5 |
---|
| 118 | + |
---|
| 119 | +#define IEEE80211_NDP_FTYPE_CTS 0 |
---|
| 120 | +#define IEEE80211_NDP_FTYPE_CF_END 0 |
---|
| 121 | +#define IEEE80211_NDP_FTYPE_PS_POLL 1 |
---|
| 122 | +#define IEEE80211_NDP_FTYPE_ACK 2 |
---|
| 123 | +#define IEEE80211_NDP_FTYPE_PS_POLL_ACK 3 |
---|
| 124 | +#define IEEE80211_NDP_FTYPE_BA 4 |
---|
| 125 | +#define IEEE80211_NDP_FTYPE_BF_REPORT_POLL 5 |
---|
| 126 | +#define IEEE80211_NDP_FTYPE_PAGING 6 |
---|
| 127 | +#define IEEE80211_NDP_FTYPE_PREQ 7 |
---|
| 128 | + |
---|
| 129 | +#define SM64(f, v) ((((u64)v) << f##_S) & f) |
---|
| 130 | + |
---|
| 131 | +/* NDP CMAC frame fields */ |
---|
| 132 | +#define IEEE80211_NDP_FTYPE 0x0000000000000007 |
---|
| 133 | +#define IEEE80211_NDP_FTYPE_S 0x0000000000000000 |
---|
| 134 | + |
---|
| 135 | +/* 1M Probe Request 11ah 9.9.3.1.1 */ |
---|
| 136 | +#define IEEE80211_NDP_1M_PREQ_ANO 0x0000000000000008 |
---|
| 137 | +#define IEEE80211_NDP_1M_PREQ_ANO_S 3 |
---|
| 138 | +#define IEEE80211_NDP_1M_PREQ_CSSID 0x00000000000FFFF0 |
---|
| 139 | +#define IEEE80211_NDP_1M_PREQ_CSSID_S 4 |
---|
| 140 | +#define IEEE80211_NDP_1M_PREQ_RTYPE 0x0000000000100000 |
---|
| 141 | +#define IEEE80211_NDP_1M_PREQ_RTYPE_S 20 |
---|
| 142 | +#define IEEE80211_NDP_1M_PREQ_RSV 0x0000000001E00000 |
---|
| 143 | +#define IEEE80211_NDP_1M_PREQ_RSV 0x0000000001E00000 |
---|
| 144 | +/* 2M Probe Request 11ah 9.9.3.1.2 */ |
---|
| 145 | +#define IEEE80211_NDP_2M_PREQ_ANO 0x0000000000000008 |
---|
| 146 | +#define IEEE80211_NDP_2M_PREQ_ANO_S 3 |
---|
| 147 | +#define IEEE80211_NDP_2M_PREQ_CSSID 0x0000000FFFFFFFF0 |
---|
| 148 | +#define IEEE80211_NDP_2M_PREQ_CSSID_S 4 |
---|
| 149 | +#define IEEE80211_NDP_2M_PREQ_RTYPE 0x0000001000000000 |
---|
| 150 | +#define IEEE80211_NDP_2M_PREQ_RTYPE_S 36 |
---|
| 151 | + |
---|
| 152 | +#define IEEE80211_ANO_NETTYPE_WILD 15 |
---|
| 153 | + |
---|
| 154 | +/* bits unique to S1G beacon */ |
---|
| 155 | +#define IEEE80211_S1G_BCN_NEXT_TBTT 0x100 |
---|
111 | 156 | |
---|
112 | 157 | /* control extension - for IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTL_EXT */ |
---|
113 | 158 | #define IEEE80211_CTL_EXT_POLL 0x2000 |
---|
.. | .. |
---|
123 | 168 | #define IEEE80211_SN_MASK ((IEEE80211_SCTL_SEQ) >> 4) |
---|
124 | 169 | #define IEEE80211_MAX_SN IEEE80211_SN_MASK |
---|
125 | 170 | #define IEEE80211_SN_MODULO (IEEE80211_MAX_SN + 1) |
---|
| 171 | + |
---|
| 172 | + |
---|
| 173 | +/* PV1 Layout 11ah 9.8.3.1 */ |
---|
| 174 | +#define IEEE80211_PV1_FCTL_VERS 0x0003 |
---|
| 175 | +#define IEEE80211_PV1_FCTL_FTYPE 0x001c |
---|
| 176 | +#define IEEE80211_PV1_FCTL_STYPE 0x00e0 |
---|
| 177 | +#define IEEE80211_PV1_FCTL_TODS 0x0100 |
---|
| 178 | +#define IEEE80211_PV1_FCTL_MOREFRAGS 0x0200 |
---|
| 179 | +#define IEEE80211_PV1_FCTL_PM 0x0400 |
---|
| 180 | +#define IEEE80211_PV1_FCTL_MOREDATA 0x0800 |
---|
| 181 | +#define IEEE80211_PV1_FCTL_PROTECTED 0x1000 |
---|
| 182 | +#define IEEE80211_PV1_FCTL_END_SP 0x2000 |
---|
| 183 | +#define IEEE80211_PV1_FCTL_RELAYED 0x4000 |
---|
| 184 | +#define IEEE80211_PV1_FCTL_ACK_POLICY 0x8000 |
---|
| 185 | +#define IEEE80211_PV1_FCTL_CTL_EXT 0x0f00 |
---|
126 | 186 | |
---|
127 | 187 | static inline bool ieee80211_sn_less(u16 sn1, u16 sn2) |
---|
128 | 188 | { |
---|
.. | .. |
---|
151 | 211 | #define IEEE80211_MAX_FRAG_THRESHOLD 2352 |
---|
152 | 212 | #define IEEE80211_MAX_RTS_THRESHOLD 2353 |
---|
153 | 213 | #define IEEE80211_MAX_AID 2007 |
---|
| 214 | +#define IEEE80211_MAX_AID_S1G 8191 |
---|
154 | 215 | #define IEEE80211_MAX_TIM_LEN 251 |
---|
155 | 216 | #define IEEE80211_MAX_MESH_PEERINGS 63 |
---|
156 | 217 | /* Maximum size for the MA-UNITDATA primitive, 802.11 standard section |
---|
.. | .. |
---|
375 | 436 | } |
---|
376 | 437 | |
---|
377 | 438 | /** |
---|
| 439 | + * ieee80211_is_ext - check if type is IEEE80211_FTYPE_EXT |
---|
| 440 | + * @fc: frame control bytes in little-endian byteorder |
---|
| 441 | + */ |
---|
| 442 | +static inline bool ieee80211_is_ext(__le16 fc) |
---|
| 443 | +{ |
---|
| 444 | + return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == |
---|
| 445 | + cpu_to_le16(IEEE80211_FTYPE_EXT); |
---|
| 446 | +} |
---|
| 447 | + |
---|
| 448 | + |
---|
| 449 | +/** |
---|
378 | 450 | * ieee80211_is_data_qos - check if type is IEEE80211_FTYPE_DATA and IEEE80211_STYPE_QOS_DATA is set |
---|
379 | 451 | * @fc: frame control bytes in little-endian byteorder |
---|
380 | 452 | */ |
---|
.. | .. |
---|
470 | 542 | { |
---|
471 | 543 | return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
---|
472 | 544 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON); |
---|
| 545 | +} |
---|
| 546 | + |
---|
| 547 | +/** |
---|
| 548 | + * ieee80211_is_s1g_beacon - check if IEEE80211_FTYPE_EXT && |
---|
| 549 | + * IEEE80211_STYPE_S1G_BEACON |
---|
| 550 | + * @fc: frame control bytes in little-endian byteorder |
---|
| 551 | + */ |
---|
| 552 | +static inline bool ieee80211_is_s1g_beacon(__le16 fc) |
---|
| 553 | +{ |
---|
| 554 | + return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | |
---|
| 555 | + IEEE80211_FCTL_STYPE)) == |
---|
| 556 | + cpu_to_le16(IEEE80211_FTYPE_EXT | IEEE80211_STYPE_S1G_BEACON); |
---|
| 557 | +} |
---|
| 558 | + |
---|
| 559 | +/** |
---|
| 560 | + * ieee80211_next_tbtt_present - check if IEEE80211_FTYPE_EXT && |
---|
| 561 | + * IEEE80211_STYPE_S1G_BEACON && IEEE80211_S1G_BCN_NEXT_TBTT |
---|
| 562 | + * @fc: frame control bytes in little-endian byteorder |
---|
| 563 | + */ |
---|
| 564 | +static inline bool ieee80211_next_tbtt_present(__le16 fc) |
---|
| 565 | +{ |
---|
| 566 | + return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == |
---|
| 567 | + cpu_to_le16(IEEE80211_FTYPE_EXT | IEEE80211_STYPE_S1G_BEACON) && |
---|
| 568 | + fc & cpu_to_le16(IEEE80211_S1G_BCN_NEXT_TBTT); |
---|
| 569 | +} |
---|
| 570 | + |
---|
| 571 | +/** |
---|
| 572 | + * ieee80211_is_s1g_short_beacon - check if next tbtt present bit is set. Only |
---|
| 573 | + * true for S1G beacons when they're short. |
---|
| 574 | + * @fc: frame control bytes in little-endian byteorder |
---|
| 575 | + */ |
---|
| 576 | +static inline bool ieee80211_is_s1g_short_beacon(__le16 fc) |
---|
| 577 | +{ |
---|
| 578 | + return ieee80211_is_s1g_beacon(fc) && ieee80211_next_tbtt_present(fc); |
---|
473 | 579 | } |
---|
474 | 580 | |
---|
475 | 581 | /** |
---|
.. | .. |
---|
719 | 825 | u8 token; |
---|
720 | 826 | u8 mode; |
---|
721 | 827 | u8 type; |
---|
722 | | - u8 request[0]; |
---|
| 828 | + u8 request[]; |
---|
723 | 829 | } __packed; |
---|
724 | 830 | |
---|
725 | 831 | /** |
---|
.. | .. |
---|
821 | 927 | IEEE80211_MESHCONF_CAPAB_POWER_SAVE_LEVEL = 0x40, |
---|
822 | 928 | }; |
---|
823 | 929 | |
---|
| 930 | +#define IEEE80211_MESHCONF_FORM_CONNECTED_TO_GATE 0x1 |
---|
| 931 | + |
---|
824 | 932 | /** |
---|
825 | 933 | * mesh channel switch parameters element's flag indicator |
---|
826 | 934 | * |
---|
.. | .. |
---|
860 | 968 | * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ: 40 MHz channel width |
---|
861 | 969 | * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ: 80 MHz channel width |
---|
862 | 970 | * @IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ: 160 MHz or 80+80 MHz channel width |
---|
| 971 | + * @IEEE80211_OPMODE_NOTIF_BW_160_80P80: 160 / 80+80 MHz indicator flag |
---|
863 | 972 | * @IEEE80211_OPMODE_NOTIF_RX_NSS_MASK: number of spatial streams mask |
---|
864 | 973 | * (the NSS value is the value of this field + 1) |
---|
865 | 974 | * @IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT: number of spatial streams shift |
---|
.. | .. |
---|
867 | 976 | * using a beamforming steering matrix |
---|
868 | 977 | */ |
---|
869 | 978 | enum ieee80211_vht_opmode_bits { |
---|
870 | | - IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK = 3, |
---|
| 979 | + IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK = 0x03, |
---|
871 | 980 | IEEE80211_OPMODE_NOTIF_CHANWIDTH_20MHZ = 0, |
---|
872 | 981 | IEEE80211_OPMODE_NOTIF_CHANWIDTH_40MHZ = 1, |
---|
873 | 982 | IEEE80211_OPMODE_NOTIF_CHANWIDTH_80MHZ = 2, |
---|
874 | 983 | IEEE80211_OPMODE_NOTIF_CHANWIDTH_160MHZ = 3, |
---|
| 984 | + IEEE80211_OPMODE_NOTIF_BW_160_80P80 = 0x04, |
---|
875 | 985 | IEEE80211_OPMODE_NOTIF_RX_NSS_MASK = 0x70, |
---|
876 | 986 | IEEE80211_OPMODE_NOTIF_RX_NSS_SHIFT = 4, |
---|
877 | 987 | IEEE80211_OPMODE_NOTIF_RX_NSS_TYPE_BF = 0x80, |
---|
| 988 | +}; |
---|
| 989 | + |
---|
| 990 | +/** |
---|
| 991 | + * enum ieee80211_s1g_chanwidth |
---|
| 992 | + * These are defined in IEEE802.11-2016ah Table 10-20 |
---|
| 993 | + * as BSS Channel Width |
---|
| 994 | + * |
---|
| 995 | + * @IEEE80211_S1G_CHANWIDTH_1MHZ: 1MHz operating channel |
---|
| 996 | + * @IEEE80211_S1G_CHANWIDTH_2MHZ: 2MHz operating channel |
---|
| 997 | + * @IEEE80211_S1G_CHANWIDTH_4MHZ: 4MHz operating channel |
---|
| 998 | + * @IEEE80211_S1G_CHANWIDTH_8MHZ: 8MHz operating channel |
---|
| 999 | + * @IEEE80211_S1G_CHANWIDTH_16MHZ: 16MHz operating channel |
---|
| 1000 | + */ |
---|
| 1001 | +enum ieee80211_s1g_chanwidth { |
---|
| 1002 | + IEEE80211_S1G_CHANWIDTH_1MHZ = 0, |
---|
| 1003 | + IEEE80211_S1G_CHANWIDTH_2MHZ = 1, |
---|
| 1004 | + IEEE80211_S1G_CHANWIDTH_4MHZ = 3, |
---|
| 1005 | + IEEE80211_S1G_CHANWIDTH_8MHZ = 7, |
---|
| 1006 | + IEEE80211_S1G_CHANWIDTH_16MHZ = 15, |
---|
878 | 1007 | }; |
---|
879 | 1008 | |
---|
880 | 1009 | #define WLAN_SA_QUERY_TR_ID_LEN 2 |
---|
.. | .. |
---|
890 | 1019 | u8 tx_power; |
---|
891 | 1020 | u8 link_margin; |
---|
892 | 1021 | } __packed; |
---|
| 1022 | + |
---|
| 1023 | +#define IEEE80211_ADDBA_EXT_FRAG_LEVEL_MASK GENMASK(2, 1) |
---|
| 1024 | +#define IEEE80211_ADDBA_EXT_FRAG_LEVEL_SHIFT 1 |
---|
| 1025 | +#define IEEE80211_ADDBA_EXT_NO_FRAG BIT(0) |
---|
| 1026 | + |
---|
| 1027 | +struct ieee80211_addba_ext_ie { |
---|
| 1028 | + u8 data; |
---|
| 1029 | +} __packed; |
---|
| 1030 | + |
---|
| 1031 | +/** |
---|
| 1032 | + * struct ieee80211_s1g_bcn_compat_ie |
---|
| 1033 | + * |
---|
| 1034 | + * S1G Beacon Compatibility element |
---|
| 1035 | + */ |
---|
| 1036 | +struct ieee80211_s1g_bcn_compat_ie { |
---|
| 1037 | + __le16 compat_info; |
---|
| 1038 | + __le16 beacon_int; |
---|
| 1039 | + __le32 tsf_completion; |
---|
| 1040 | +} __packed; |
---|
| 1041 | + |
---|
| 1042 | +/** |
---|
| 1043 | + * struct ieee80211_s1g_oper_ie |
---|
| 1044 | + * |
---|
| 1045 | + * S1G Operation element |
---|
| 1046 | + */ |
---|
| 1047 | +struct ieee80211_s1g_oper_ie { |
---|
| 1048 | + u8 ch_width; |
---|
| 1049 | + u8 oper_class; |
---|
| 1050 | + u8 primary_ch; |
---|
| 1051 | + u8 oper_ch; |
---|
| 1052 | + __le16 basic_mcs_nss; |
---|
| 1053 | +} __packed; |
---|
| 1054 | + |
---|
| 1055 | +/** |
---|
| 1056 | + * struct ieee80211_aid_response_ie |
---|
| 1057 | + * |
---|
| 1058 | + * AID Response element |
---|
| 1059 | + */ |
---|
| 1060 | +struct ieee80211_aid_response_ie { |
---|
| 1061 | + __le16 aid; |
---|
| 1062 | + u8 switch_count; |
---|
| 1063 | + __le16 response_int; |
---|
| 1064 | +} __packed; |
---|
| 1065 | + |
---|
| 1066 | +struct ieee80211_s1g_cap { |
---|
| 1067 | + u8 capab_info[10]; |
---|
| 1068 | + u8 supp_mcs_nss[5]; |
---|
| 1069 | +} __packed; |
---|
| 1070 | + |
---|
| 1071 | +struct ieee80211_ext { |
---|
| 1072 | + __le16 frame_control; |
---|
| 1073 | + __le16 duration; |
---|
| 1074 | + union { |
---|
| 1075 | + struct { |
---|
| 1076 | + u8 sa[ETH_ALEN]; |
---|
| 1077 | + __le32 timestamp; |
---|
| 1078 | + u8 change_seq; |
---|
| 1079 | + u8 variable[0]; |
---|
| 1080 | + } __packed s1g_beacon; |
---|
| 1081 | + struct { |
---|
| 1082 | + u8 sa[ETH_ALEN]; |
---|
| 1083 | + __le32 timestamp; |
---|
| 1084 | + u8 change_seq; |
---|
| 1085 | + u8 next_tbtt[3]; |
---|
| 1086 | + u8 variable[0]; |
---|
| 1087 | + } __packed s1g_short_beacon; |
---|
| 1088 | + } u; |
---|
| 1089 | +} __packed __aligned(2); |
---|
893 | 1090 | |
---|
894 | 1091 | struct ieee80211_mgmt { |
---|
895 | 1092 | __le16 frame_control; |
---|
.. | .. |
---|
922 | 1119 | /* followed by Supported rates */ |
---|
923 | 1120 | u8 variable[0]; |
---|
924 | 1121 | } __packed assoc_resp, reassoc_resp; |
---|
| 1122 | + struct { |
---|
| 1123 | + __le16 capab_info; |
---|
| 1124 | + __le16 status_code; |
---|
| 1125 | + u8 variable[0]; |
---|
| 1126 | + } __packed s1g_assoc_resp, s1g_reassoc_resp; |
---|
925 | 1127 | struct { |
---|
926 | 1128 | __le16 capab_info; |
---|
927 | 1129 | __le16 listen_interval; |
---|
.. | .. |
---|
983 | 1185 | __le16 capab; |
---|
984 | 1186 | __le16 timeout; |
---|
985 | 1187 | __le16 start_seq_num; |
---|
| 1188 | + /* followed by BA Extension */ |
---|
| 1189 | + u8 variable[0]; |
---|
986 | 1190 | } __packed addba_req; |
---|
987 | 1191 | struct{ |
---|
988 | 1192 | u8 action_code; |
---|
.. | .. |
---|
1056 | 1260 | /* Supported rates membership selectors */ |
---|
1057 | 1261 | #define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 |
---|
1058 | 1262 | #define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126 |
---|
| 1263 | +#define BSS_MEMBERSHIP_SELECTOR_HE_PHY 122 |
---|
1059 | 1264 | |
---|
1060 | 1265 | /* mgmt header + 1 byte category code */ |
---|
1061 | 1266 | #define IEEE80211_MIN_ACTION_SIZE offsetof(struct ieee80211_mgmt, u.action.u) |
---|
.. | .. |
---|
1469 | 1674 | * STA can receive. Rate expressed in units of 1 Mbps. |
---|
1470 | 1675 | * If this field is 0 this value should not be used to |
---|
1471 | 1676 | * consider the highest RX data rate supported. |
---|
1472 | | - * The top 3 bits of this field are reserved. |
---|
| 1677 | + * The top 3 bits of this field indicate the Maximum NSTS,total |
---|
| 1678 | + * (a beamformee capability.) |
---|
1473 | 1679 | * @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams |
---|
1474 | 1680 | * @tx_highest: Indicates highest long GI VHT PPDU data rate |
---|
1475 | 1681 | * STA can transmit. Rate expressed in units of 1 Mbps. |
---|
1476 | 1682 | * If this field is 0 this value should not be used to |
---|
1477 | 1683 | * consider the highest TX data rate supported. |
---|
1478 | | - * The top 3 bits of this field are reserved. |
---|
| 1684 | + * The top 2 bits of this field are reserved, the |
---|
| 1685 | + * 3rd bit from the top indiciates VHT Extended NSS BW |
---|
| 1686 | + * Capability. |
---|
1479 | 1687 | */ |
---|
1480 | 1688 | struct ieee80211_vht_mcs_info { |
---|
1481 | 1689 | __le16 rx_mcs_map; |
---|
.. | .. |
---|
1483 | 1691 | __le16 tx_mcs_map; |
---|
1484 | 1692 | __le16 tx_highest; |
---|
1485 | 1693 | } __packed; |
---|
| 1694 | + |
---|
| 1695 | +/* for rx_highest */ |
---|
| 1696 | +#define IEEE80211_VHT_MAX_NSTS_TOTAL_SHIFT 13 |
---|
| 1697 | +#define IEEE80211_VHT_MAX_NSTS_TOTAL_MASK (7 << IEEE80211_VHT_MAX_NSTS_TOTAL_SHIFT) |
---|
| 1698 | + |
---|
| 1699 | +/* for tx_highest */ |
---|
| 1700 | +#define IEEE80211_VHT_EXT_NSS_BW_CAPABLE (1 << 13) |
---|
1486 | 1701 | |
---|
1487 | 1702 | /** |
---|
1488 | 1703 | * enum ieee80211_vht_mcs_support - VHT MCS support definitions |
---|
.. | .. |
---|
1554 | 1769 | * struct ieee80211_he_cap_elem - HE capabilities element |
---|
1555 | 1770 | * |
---|
1556 | 1771 | * This structure is the "HE capabilities element" fixed fields as |
---|
1557 | | - * described in P802.11ax_D2.0 section 9.4.2.237.2 and 9.4.2.237.3 |
---|
| 1772 | + * described in P802.11ax_D4.0 section 9.4.2.242.2 and 9.4.2.242.3 |
---|
1558 | 1773 | */ |
---|
1559 | 1774 | struct ieee80211_he_cap_elem { |
---|
1560 | | - u8 mac_cap_info[5]; |
---|
1561 | | - u8 phy_cap_info[9]; |
---|
| 1775 | + u8 mac_cap_info[6]; |
---|
| 1776 | + u8 phy_cap_info[11]; |
---|
1562 | 1777 | } __packed; |
---|
1563 | 1778 | |
---|
1564 | 1779 | #define IEEE80211_TX_RX_MCS_NSS_DESC_MAX_LEN 5 |
---|
.. | .. |
---|
1616 | 1831 | * struct ieee80211_he_operation - HE capabilities element |
---|
1617 | 1832 | * |
---|
1618 | 1833 | * This structure is the "HE operation element" fields as |
---|
1619 | | - * described in P802.11ax_D2.0 section 9.4.2.238 |
---|
| 1834 | + * described in P802.11ax_D4.0 section 9.4.2.243 |
---|
1620 | 1835 | */ |
---|
1621 | 1836 | struct ieee80211_he_operation { |
---|
1622 | 1837 | __le32 he_oper_params; |
---|
1623 | 1838 | __le16 he_mcs_nss_set; |
---|
1624 | | - /* Optional 0,1,3 or 4 bytes: depends on @he_oper_params */ |
---|
1625 | | - u8 optional[0]; |
---|
| 1839 | + /* Optional 0,1,3,4,5,7 or 8 bytes: depends on @he_oper_params */ |
---|
| 1840 | + u8 optional[]; |
---|
| 1841 | +} __packed; |
---|
| 1842 | + |
---|
| 1843 | +/** |
---|
| 1844 | + * struct ieee80211_he_spr - HE spatial reuse element |
---|
| 1845 | + * |
---|
| 1846 | + * This structure is the "HE spatial reuse element" element as |
---|
| 1847 | + * described in P802.11ax_D4.0 section 9.4.2.241 |
---|
| 1848 | + */ |
---|
| 1849 | +struct ieee80211_he_spr { |
---|
| 1850 | + u8 he_sr_control; |
---|
| 1851 | + /* Optional 0 to 19 bytes: depends on @he_sr_control */ |
---|
| 1852 | + u8 optional[]; |
---|
1626 | 1853 | } __packed; |
---|
1627 | 1854 | |
---|
1628 | 1855 | /** |
---|
1629 | 1856 | * struct ieee80211_he_mu_edca_param_ac_rec - MU AC Parameter Record field |
---|
1630 | 1857 | * |
---|
1631 | 1858 | * This structure is the "MU AC Parameter Record" fields as |
---|
1632 | | - * described in P802.11ax_D2.0 section 9.4.2.240 |
---|
| 1859 | + * described in P802.11ax_D4.0 section 9.4.2.245 |
---|
1633 | 1860 | */ |
---|
1634 | 1861 | struct ieee80211_he_mu_edca_param_ac_rec { |
---|
1635 | 1862 | u8 aifsn; |
---|
.. | .. |
---|
1641 | 1868 | * struct ieee80211_mu_edca_param_set - MU EDCA Parameter Set element |
---|
1642 | 1869 | * |
---|
1643 | 1870 | * This structure is the "MU EDCA Parameter Set element" fields as |
---|
1644 | | - * described in P802.11ax_D2.0 section 9.4.2.240 |
---|
| 1871 | + * described in P802.11ax_D4.0 section 9.4.2.245 |
---|
1645 | 1872 | */ |
---|
1646 | 1873 | struct ieee80211_mu_edca_param_set { |
---|
1647 | 1874 | u8 mu_qos_info; |
---|
.. | .. |
---|
1659 | 1886 | #define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ 0x00000004 |
---|
1660 | 1887 | #define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ 0x00000008 |
---|
1661 | 1888 | #define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK 0x0000000C |
---|
| 1889 | +#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_SHIFT 2 |
---|
1662 | 1890 | #define IEEE80211_VHT_CAP_RXLDPC 0x00000010 |
---|
1663 | 1891 | #define IEEE80211_VHT_CAP_SHORT_GI_80 0x00000020 |
---|
1664 | 1892 | #define IEEE80211_VHT_CAP_SHORT_GI_160 0x00000040 |
---|
.. | .. |
---|
1668 | 1896 | #define IEEE80211_VHT_CAP_RXSTBC_3 0x00000300 |
---|
1669 | 1897 | #define IEEE80211_VHT_CAP_RXSTBC_4 0x00000400 |
---|
1670 | 1898 | #define IEEE80211_VHT_CAP_RXSTBC_MASK 0x00000700 |
---|
| 1899 | +#define IEEE80211_VHT_CAP_RXSTBC_SHIFT 8 |
---|
1671 | 1900 | #define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800 |
---|
1672 | 1901 | #define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000 |
---|
1673 | 1902 | #define IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT 13 |
---|
.. | .. |
---|
1687 | 1916 | #define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB 0x0c000000 |
---|
1688 | 1917 | #define IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN 0x10000000 |
---|
1689 | 1918 | #define IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN 0x20000000 |
---|
| 1919 | +#define IEEE80211_VHT_CAP_EXT_NSS_BW_SHIFT 30 |
---|
| 1920 | +#define IEEE80211_VHT_CAP_EXT_NSS_BW_MASK 0xc0000000 |
---|
| 1921 | + |
---|
| 1922 | +/** |
---|
| 1923 | + * ieee80211_get_vht_max_nss - return max NSS for a given bandwidth/MCS |
---|
| 1924 | + * @cap: VHT capabilities of the peer |
---|
| 1925 | + * @bw: bandwidth to use |
---|
| 1926 | + * @mcs: MCS index to use |
---|
| 1927 | + * @ext_nss_bw_capable: indicates whether or not the local transmitter |
---|
| 1928 | + * (rate scaling algorithm) can deal with the new logic |
---|
| 1929 | + * (dot11VHTExtendedNSSBWCapable) |
---|
| 1930 | + * @max_vht_nss: current maximum NSS as advertised by the STA in |
---|
| 1931 | + * operating mode notification, can be 0 in which case the |
---|
| 1932 | + * capability data will be used to derive this (from MCS support) |
---|
| 1933 | + * |
---|
| 1934 | + * Due to the VHT Extended NSS Bandwidth Support, the maximum NSS can |
---|
| 1935 | + * vary for a given BW/MCS. This function parses the data. |
---|
| 1936 | + * |
---|
| 1937 | + * Note: This function is exported by cfg80211. |
---|
| 1938 | + */ |
---|
| 1939 | +int ieee80211_get_vht_max_nss(struct ieee80211_vht_cap *cap, |
---|
| 1940 | + enum ieee80211_vht_chanwidth bw, |
---|
| 1941 | + int mcs, bool ext_nss_bw_capable, |
---|
| 1942 | + unsigned int max_vht_nss); |
---|
1690 | 1943 | |
---|
1691 | 1944 | /* 802.11ax HE MAC capabilities */ |
---|
1692 | 1945 | #define IEEE80211_HE_MAC_CAP0_HTC_HE 0x01 |
---|
.. | .. |
---|
1716 | 1969 | #define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_8US 0x04 |
---|
1717 | 1970 | #define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_16US 0x08 |
---|
1718 | 1971 | #define IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK 0x0c |
---|
1719 | | -#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_QOS_1 0x00 |
---|
1720 | | -#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_QOS_2 0x10 |
---|
1721 | | -#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_QOS_3 0x20 |
---|
1722 | | -#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_QOS_4 0x30 |
---|
1723 | | -#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_QOS_5 0x40 |
---|
1724 | | -#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_QOS_6 0x50 |
---|
1725 | | -#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_QOS_7 0x60 |
---|
1726 | | -#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_QOS_8 0x70 |
---|
1727 | | -#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_QOS_MASK 0x70 |
---|
| 1972 | +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_1 0x00 |
---|
| 1973 | +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_2 0x10 |
---|
| 1974 | +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_3 0x20 |
---|
| 1975 | +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_4 0x30 |
---|
| 1976 | +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_5 0x40 |
---|
| 1977 | +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_6 0x50 |
---|
| 1978 | +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_7 0x60 |
---|
| 1979 | +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_8 0x70 |
---|
| 1980 | +#define IEEE80211_HE_MAC_CAP1_MULTI_TID_AGG_RX_QOS_MASK 0x70 |
---|
1728 | 1981 | |
---|
1729 | 1982 | /* Link adaptation is split between byte HE_MAC_CAP1 and |
---|
1730 | 1983 | * HE_MAC_CAP2. It should be set only if IEEE80211_HE_MAC_CAP0_HTC_HE |
---|
.. | .. |
---|
1738 | 1991 | |
---|
1739 | 1992 | #define IEEE80211_HE_MAC_CAP2_LINK_ADAPTATION 0x01 |
---|
1740 | 1993 | #define IEEE80211_HE_MAC_CAP2_ALL_ACK 0x02 |
---|
1741 | | -#define IEEE80211_HE_MAC_CAP2_UL_MU_RESP_SCHED 0x04 |
---|
| 1994 | +#define IEEE80211_HE_MAC_CAP2_TRS 0x04 |
---|
1742 | 1995 | #define IEEE80211_HE_MAC_CAP2_BSR 0x08 |
---|
1743 | 1996 | #define IEEE80211_HE_MAC_CAP2_BCAST_TWT 0x10 |
---|
1744 | 1997 | #define IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP 0x20 |
---|
1745 | 1998 | #define IEEE80211_HE_MAC_CAP2_MU_CASCADING 0x40 |
---|
1746 | 1999 | #define IEEE80211_HE_MAC_CAP2_ACK_EN 0x80 |
---|
1747 | 2000 | |
---|
1748 | | -#define IEEE80211_HE_MAC_CAP3_GRP_ADDR_MULTI_STA_BA_DL_MU 0x01 |
---|
1749 | 2001 | #define IEEE80211_HE_MAC_CAP3_OMI_CONTROL 0x02 |
---|
1750 | 2002 | #define IEEE80211_HE_MAC_CAP3_OFDMA_RA 0x04 |
---|
1751 | 2003 | |
---|
.. | .. |
---|
1753 | 2005 | * A-MDPU Length Exponent field in the HT capabilities, VHT capabilities and the |
---|
1754 | 2006 | * same field in the HE capabilities. |
---|
1755 | 2007 | */ |
---|
1756 | | -#define IEEE80211_HE_MAC_CAP3_MAX_A_AMPDU_LEN_EXP_USE_VHT 0x00 |
---|
1757 | | -#define IEEE80211_HE_MAC_CAP3_MAX_A_AMPDU_LEN_EXP_VHT_1 0x08 |
---|
1758 | | -#define IEEE80211_HE_MAC_CAP3_MAX_A_AMPDU_LEN_EXP_VHT_2 0x10 |
---|
1759 | | -#define IEEE80211_HE_MAC_CAP3_MAX_A_AMPDU_LEN_EXP_RESERVED 0x18 |
---|
1760 | | -#define IEEE80211_HE_MAC_CAP3_MAX_A_AMPDU_LEN_EXP_MASK 0x18 |
---|
1761 | | -#define IEEE80211_HE_MAC_CAP3_A_AMSDU_FRAG 0x20 |
---|
| 2008 | +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_USE_VHT 0x00 |
---|
| 2009 | +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_1 0x08 |
---|
| 2010 | +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_VHT_2 0x10 |
---|
| 2011 | +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_RESERVED 0x18 |
---|
| 2012 | +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK 0x18 |
---|
| 2013 | +#define IEEE80211_HE_MAC_CAP3_AMSDU_FRAG 0x20 |
---|
1762 | 2014 | #define IEEE80211_HE_MAC_CAP3_FLEX_TWT_SCHED 0x40 |
---|
1763 | 2015 | #define IEEE80211_HE_MAC_CAP3_RX_CTRL_FRAME_TO_MULTIBSS 0x80 |
---|
| 2016 | + |
---|
| 2017 | +#define IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_SHIFT 3 |
---|
1764 | 2018 | |
---|
1765 | 2019 | #define IEEE80211_HE_MAC_CAP4_BSRP_BQRP_A_MPDU_AGG 0x01 |
---|
1766 | 2020 | #define IEEE80211_HE_MAC_CAP4_QTP 0x02 |
---|
1767 | 2021 | #define IEEE80211_HE_MAC_CAP4_BQR 0x04 |
---|
1768 | | -#define IEEE80211_HE_MAC_CAP4_SR_RESP 0x08 |
---|
| 2022 | +#define IEEE80211_HE_MAC_CAP4_SRP_RESP 0x08 |
---|
1769 | 2023 | #define IEEE80211_HE_MAC_CAP4_NDP_FB_REP 0x10 |
---|
1770 | 2024 | #define IEEE80211_HE_MAC_CAP4_OPS 0x20 |
---|
1771 | 2025 | #define IEEE80211_HE_MAC_CAP4_AMDSU_IN_AMPDU 0x40 |
---|
| 2026 | +/* Multi TID agg TX is split between byte #4 and #5 |
---|
| 2027 | + * The value is a combination of B39,B40,B41 |
---|
| 2028 | + */ |
---|
| 2029 | +#define IEEE80211_HE_MAC_CAP4_MULTI_TID_AGG_TX_QOS_B39 0x80 |
---|
| 2030 | + |
---|
| 2031 | +#define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B40 0x01 |
---|
| 2032 | +#define IEEE80211_HE_MAC_CAP5_MULTI_TID_AGG_TX_QOS_B41 0x02 |
---|
| 2033 | +#define IEEE80211_HE_MAC_CAP5_SUBCHAN_SELECVITE_TRANSMISSION 0x04 |
---|
| 2034 | +#define IEEE80211_HE_MAC_CAP5_UL_2x996_TONE_RU 0x08 |
---|
| 2035 | +#define IEEE80211_HE_MAC_CAP5_OM_CTRL_UL_MU_DATA_DIS_RX 0x10 |
---|
| 2036 | +#define IEEE80211_HE_MAC_CAP5_HE_DYNAMIC_SM_PS 0x20 |
---|
| 2037 | +#define IEEE80211_HE_MAC_CAP5_PUNCTURED_SOUNDING 0x40 |
---|
| 2038 | +#define IEEE80211_HE_MAC_CAP5_HT_VHT_TRIG_FRAME_RX 0x80 |
---|
| 2039 | + |
---|
| 2040 | +#define IEEE80211_HE_VHT_MAX_AMPDU_FACTOR 20 |
---|
| 2041 | +#define IEEE80211_HE_HT_MAX_AMPDU_FACTOR 16 |
---|
1772 | 2042 | |
---|
1773 | 2043 | /* 802.11ax HE PHY capabilities */ |
---|
1774 | | -#define IEEE80211_HE_PHY_CAP0_DUAL_BAND 0x01 |
---|
1775 | 2044 | #define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_IN_2G 0x02 |
---|
1776 | 2045 | #define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_40MHZ_80MHZ_IN_5G 0x04 |
---|
1777 | 2046 | #define IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G 0x08 |
---|
.. | .. |
---|
1788 | 2057 | #define IEEE80211_HE_PHY_CAP1_DEVICE_CLASS_A 0x10 |
---|
1789 | 2058 | #define IEEE80211_HE_PHY_CAP1_LDPC_CODING_IN_PAYLOAD 0x20 |
---|
1790 | 2059 | #define IEEE80211_HE_PHY_CAP1_HE_LTF_AND_GI_FOR_HE_PPDUS_0_8US 0x40 |
---|
1791 | | -/* Midamble RX Max NSTS is split between byte #2 and byte #3 */ |
---|
1792 | | -#define IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_MAX_NSTS 0x80 |
---|
| 2060 | +/* Midamble RX/TX Max NSTS is split between byte #2 and byte #3 */ |
---|
| 2061 | +#define IEEE80211_HE_PHY_CAP1_MIDAMBLE_RX_TX_MAX_NSTS 0x80 |
---|
1793 | 2062 | |
---|
1794 | | -#define IEEE80211_HE_PHY_CAP2_MIDAMBLE_RX_MAX_NSTS 0x01 |
---|
| 2063 | +#define IEEE80211_HE_PHY_CAP2_MIDAMBLE_RX_TX_MAX_NSTS 0x01 |
---|
1795 | 2064 | #define IEEE80211_HE_PHY_CAP2_NDP_4x_LTF_AND_3_2US 0x02 |
---|
1796 | 2065 | #define IEEE80211_HE_PHY_CAP2_STBC_TX_UNDER_80MHZ 0x04 |
---|
1797 | 2066 | #define IEEE80211_HE_PHY_CAP2_STBC_RX_UNDER_80MHZ 0x08 |
---|
.. | .. |
---|
1892 | 2161 | #define IEEE80211_HE_PHY_CAP8_20MHZ_IN_160MHZ_HE_PPDU 0x04 |
---|
1893 | 2162 | #define IEEE80211_HE_PHY_CAP8_80MHZ_IN_160MHZ_HE_PPDU 0x08 |
---|
1894 | 2163 | #define IEEE80211_HE_PHY_CAP8_HE_ER_SU_1XLTF_AND_08_US_GI 0x10 |
---|
1895 | | -#define IEEE80211_HE_PHY_CAP8_MIDAMBLE_RX_2X_AND_1XLTF 0x20 |
---|
| 2164 | +#define IEEE80211_HE_PHY_CAP8_MIDAMBLE_RX_TX_2X_AND_1XLTF 0x20 |
---|
| 2165 | +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_242 0x00 |
---|
| 2166 | +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_484 0x40 |
---|
| 2167 | +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_996 0x80 |
---|
| 2168 | +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_2x996 0xc0 |
---|
| 2169 | +#define IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_MASK 0xc0 |
---|
| 2170 | + |
---|
| 2171 | +#define IEEE80211_HE_PHY_CAP9_LONGER_THAN_16_SIGB_OFDM_SYM 0x01 |
---|
| 2172 | +#define IEEE80211_HE_PHY_CAP9_NON_TRIGGERED_CQI_FEEDBACK 0x02 |
---|
| 2173 | +#define IEEE80211_HE_PHY_CAP9_TX_1024_QAM_LESS_THAN_242_TONE_RU 0x04 |
---|
| 2174 | +#define IEEE80211_HE_PHY_CAP9_RX_1024_QAM_LESS_THAN_242_TONE_RU 0x08 |
---|
| 2175 | +#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_COMP_SIGB 0x10 |
---|
| 2176 | +#define IEEE80211_HE_PHY_CAP9_RX_FULL_BW_SU_USING_MU_WITH_NON_COMP_SIGB 0x20 |
---|
| 2177 | +#define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_0US 0x00 |
---|
| 2178 | +#define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_8US 0x40 |
---|
| 2179 | +#define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_16US 0x80 |
---|
| 2180 | +#define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_RESERVED 0xc0 |
---|
| 2181 | +#define IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_MASK 0xc0 |
---|
1896 | 2182 | |
---|
1897 | 2183 | /* 802.11ax HE TX/RX MCS NSS Support */ |
---|
1898 | 2184 | #define IEEE80211_TX_RX_MCS_NSS_SUPP_HIGHEST_MCS_POS (3) |
---|
.. | .. |
---|
1966 | 2252 | } |
---|
1967 | 2253 | |
---|
1968 | 2254 | /* HE Operation defines */ |
---|
1969 | | -#define IEEE80211_HE_OPERATION_BSS_COLOR_MASK 0x0000003f |
---|
1970 | | -#define IEEE80211_HE_OPERATION_DFLT_PE_DURATION_MASK 0x000001c0 |
---|
1971 | | -#define IEEE80211_HE_OPERATION_DFLT_PE_DURATION_OFFSET 6 |
---|
1972 | | -#define IEEE80211_HE_OPERATION_TWT_REQUIRED 0x00000200 |
---|
1973 | | -#define IEEE80211_HE_OPERATION_RTS_THRESHOLD_MASK 0x000ffc00 |
---|
1974 | | -#define IEEE80211_HE_OPERATION_RTS_THRESHOLD_OFFSET 10 |
---|
1975 | | -#define IEEE80211_HE_OPERATION_PARTIAL_BSS_COLOR 0x000100000 |
---|
1976 | | -#define IEEE80211_HE_OPERATION_VHT_OPER_INFO 0x000200000 |
---|
1977 | | -#define IEEE80211_HE_OPERATION_MULTI_BSSID_AP 0x10000000 |
---|
1978 | | -#define IEEE80211_HE_OPERATION_TX_BSSID_INDICATOR 0x20000000 |
---|
1979 | | -#define IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED 0x40000000 |
---|
| 2255 | +#define IEEE80211_HE_OPERATION_DFLT_PE_DURATION_MASK 0x00000007 |
---|
| 2256 | +#define IEEE80211_HE_OPERATION_TWT_REQUIRED 0x00000008 |
---|
| 2257 | +#define IEEE80211_HE_OPERATION_RTS_THRESHOLD_MASK 0x00003ff0 |
---|
| 2258 | +#define IEEE80211_HE_OPERATION_RTS_THRESHOLD_OFFSET 4 |
---|
| 2259 | +#define IEEE80211_HE_OPERATION_VHT_OPER_INFO 0x00004000 |
---|
| 2260 | +#define IEEE80211_HE_OPERATION_CO_HOSTED_BSS 0x00008000 |
---|
| 2261 | +#define IEEE80211_HE_OPERATION_ER_SU_DISABLE 0x00010000 |
---|
| 2262 | +#define IEEE80211_HE_OPERATION_6GHZ_OP_INFO 0x00020000 |
---|
| 2263 | +#define IEEE80211_HE_OPERATION_BSS_COLOR_MASK 0x3f000000 |
---|
| 2264 | +#define IEEE80211_HE_OPERATION_BSS_COLOR_OFFSET 24 |
---|
| 2265 | +#define IEEE80211_HE_OPERATION_PARTIAL_BSS_COLOR 0x40000000 |
---|
| 2266 | +#define IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED 0x80000000 |
---|
| 2267 | + |
---|
| 2268 | +/** |
---|
| 2269 | + * ieee80211_he_6ghz_oper - HE 6 GHz operation Information field |
---|
| 2270 | + * @primary: primary channel |
---|
| 2271 | + * @control: control flags |
---|
| 2272 | + * @ccfs0: channel center frequency segment 0 |
---|
| 2273 | + * @ccfs1: channel center frequency segment 1 |
---|
| 2274 | + * @minrate: minimum rate (in 1 Mbps units) |
---|
| 2275 | + */ |
---|
| 2276 | +struct ieee80211_he_6ghz_oper { |
---|
| 2277 | + u8 primary; |
---|
| 2278 | +#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH 0x3 |
---|
| 2279 | +#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_20MHZ 0 |
---|
| 2280 | +#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_40MHZ 1 |
---|
| 2281 | +#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_80MHZ 2 |
---|
| 2282 | +#define IEEE80211_HE_6GHZ_OPER_CTRL_CHANWIDTH_160MHZ 3 |
---|
| 2283 | +#define IEEE80211_HE_6GHZ_OPER_CTRL_DUP_BEACON 0x4 |
---|
| 2284 | + u8 control; |
---|
| 2285 | + u8 ccfs0; |
---|
| 2286 | + u8 ccfs1; |
---|
| 2287 | + u8 minrate; |
---|
| 2288 | +} __packed; |
---|
1980 | 2289 | |
---|
1981 | 2290 | /* |
---|
1982 | 2291 | * ieee80211_he_oper_size - calculate 802.11ax HE Operations IE size |
---|
1983 | | - * @he_oper_ie: byte data of the He Operations IE, stating from the the byte |
---|
| 2292 | + * @he_oper_ie: byte data of the He Operations IE, stating from the byte |
---|
1984 | 2293 | * after the ext ID byte. It is assumed that he_oper_ie has at least |
---|
1985 | | - * sizeof(struct ieee80211_he_operation) bytes, checked already in |
---|
1986 | | - * ieee802_11_parse_elems_crc() |
---|
| 2294 | + * sizeof(struct ieee80211_he_operation) bytes, the caller must have |
---|
| 2295 | + * validated this. |
---|
1987 | 2296 | * @return the actual size of the IE data (not including header), or 0 on error |
---|
1988 | 2297 | */ |
---|
1989 | 2298 | static inline u8 |
---|
.. | .. |
---|
2001 | 2310 | he_oper_params = le32_to_cpu(he_oper->he_oper_params); |
---|
2002 | 2311 | if (he_oper_params & IEEE80211_HE_OPERATION_VHT_OPER_INFO) |
---|
2003 | 2312 | oper_len += 3; |
---|
2004 | | - if (he_oper_params & IEEE80211_HE_OPERATION_MULTI_BSSID_AP) |
---|
| 2313 | + if (he_oper_params & IEEE80211_HE_OPERATION_CO_HOSTED_BSS) |
---|
2005 | 2314 | oper_len++; |
---|
| 2315 | + if (he_oper_params & IEEE80211_HE_OPERATION_6GHZ_OP_INFO) |
---|
| 2316 | + oper_len += sizeof(struct ieee80211_he_6ghz_oper); |
---|
2006 | 2317 | |
---|
2007 | 2318 | /* Add the first byte (extension ID) to the total length */ |
---|
2008 | 2319 | oper_len++; |
---|
2009 | 2320 | |
---|
2010 | 2321 | return oper_len; |
---|
2011 | 2322 | } |
---|
| 2323 | + |
---|
| 2324 | +/** |
---|
| 2325 | + * ieee80211_he_6ghz_oper - obtain 6 GHz operation field |
---|
| 2326 | + * @he_oper: HE operation element (must be pre-validated for size) |
---|
| 2327 | + * but may be %NULL |
---|
| 2328 | + * |
---|
| 2329 | + * Return: a pointer to the 6 GHz operation field, or %NULL |
---|
| 2330 | + */ |
---|
| 2331 | +static inline const struct ieee80211_he_6ghz_oper * |
---|
| 2332 | +ieee80211_he_6ghz_oper(const struct ieee80211_he_operation *he_oper) |
---|
| 2333 | +{ |
---|
| 2334 | + const u8 *ret = (void *)&he_oper->optional; |
---|
| 2335 | + u32 he_oper_params; |
---|
| 2336 | + |
---|
| 2337 | + if (!he_oper) |
---|
| 2338 | + return NULL; |
---|
| 2339 | + |
---|
| 2340 | + he_oper_params = le32_to_cpu(he_oper->he_oper_params); |
---|
| 2341 | + |
---|
| 2342 | + if (!(he_oper_params & IEEE80211_HE_OPERATION_6GHZ_OP_INFO)) |
---|
| 2343 | + return NULL; |
---|
| 2344 | + if (he_oper_params & IEEE80211_HE_OPERATION_VHT_OPER_INFO) |
---|
| 2345 | + ret += 3; |
---|
| 2346 | + if (he_oper_params & IEEE80211_HE_OPERATION_CO_HOSTED_BSS) |
---|
| 2347 | + ret++; |
---|
| 2348 | + |
---|
| 2349 | + return (void *)ret; |
---|
| 2350 | +} |
---|
| 2351 | + |
---|
| 2352 | +/* HE Spatial Reuse defines */ |
---|
| 2353 | +#define IEEE80211_HE_SPR_PSR_DISALLOWED BIT(0) |
---|
| 2354 | +#define IEEE80211_HE_SPR_NON_SRG_OBSS_PD_SR_DISALLOWED BIT(1) |
---|
| 2355 | +#define IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT BIT(2) |
---|
| 2356 | +#define IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT BIT(3) |
---|
| 2357 | +#define IEEE80211_HE_SPR_HESIGA_SR_VAL15_ALLOWED BIT(4) |
---|
| 2358 | + |
---|
| 2359 | +/* |
---|
| 2360 | + * ieee80211_he_spr_size - calculate 802.11ax HE Spatial Reuse IE size |
---|
| 2361 | + * @he_spr_ie: byte data of the He Spatial Reuse IE, stating from the byte |
---|
| 2362 | + * after the ext ID byte. It is assumed that he_spr_ie has at least |
---|
| 2363 | + * sizeof(struct ieee80211_he_spr) bytes, the caller must have validated |
---|
| 2364 | + * this |
---|
| 2365 | + * @return the actual size of the IE data (not including header), or 0 on error |
---|
| 2366 | + */ |
---|
| 2367 | +static inline u8 |
---|
| 2368 | +ieee80211_he_spr_size(const u8 *he_spr_ie) |
---|
| 2369 | +{ |
---|
| 2370 | + struct ieee80211_he_spr *he_spr = (void *)he_spr_ie; |
---|
| 2371 | + u8 spr_len = sizeof(struct ieee80211_he_spr); |
---|
| 2372 | + u8 he_spr_params; |
---|
| 2373 | + |
---|
| 2374 | + /* Make sure the input is not NULL */ |
---|
| 2375 | + if (!he_spr_ie) |
---|
| 2376 | + return 0; |
---|
| 2377 | + |
---|
| 2378 | + /* Calc required length */ |
---|
| 2379 | + he_spr_params = he_spr->he_sr_control; |
---|
| 2380 | + if (he_spr_params & IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT) |
---|
| 2381 | + spr_len++; |
---|
| 2382 | + if (he_spr_params & IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT) |
---|
| 2383 | + spr_len += 18; |
---|
| 2384 | + |
---|
| 2385 | + /* Add the first byte (extension ID) to the total length */ |
---|
| 2386 | + spr_len++; |
---|
| 2387 | + |
---|
| 2388 | + return spr_len; |
---|
| 2389 | +} |
---|
| 2390 | + |
---|
| 2391 | +/* S1G Capabilities Information field */ |
---|
| 2392 | +#define IEEE80211_S1G_CAPABILITY_LEN 15 |
---|
| 2393 | + |
---|
| 2394 | +#define S1G_CAP0_S1G_LONG BIT(0) |
---|
| 2395 | +#define S1G_CAP0_SGI_1MHZ BIT(1) |
---|
| 2396 | +#define S1G_CAP0_SGI_2MHZ BIT(2) |
---|
| 2397 | +#define S1G_CAP0_SGI_4MHZ BIT(3) |
---|
| 2398 | +#define S1G_CAP0_SGI_8MHZ BIT(4) |
---|
| 2399 | +#define S1G_CAP0_SGI_16MHZ BIT(5) |
---|
| 2400 | +#define S1G_CAP0_SUPP_CH_WIDTH GENMASK(7, 6) |
---|
| 2401 | + |
---|
| 2402 | +#define S1G_SUPP_CH_WIDTH_2 0 |
---|
| 2403 | +#define S1G_SUPP_CH_WIDTH_4 1 |
---|
| 2404 | +#define S1G_SUPP_CH_WIDTH_8 2 |
---|
| 2405 | +#define S1G_SUPP_CH_WIDTH_16 3 |
---|
| 2406 | +#define S1G_SUPP_CH_WIDTH_MAX(cap) ((1 << FIELD_GET(S1G_CAP0_SUPP_CH_WIDTH, \ |
---|
| 2407 | + cap[0])) << 1) |
---|
| 2408 | + |
---|
| 2409 | +#define S1G_CAP1_RX_LDPC BIT(0) |
---|
| 2410 | +#define S1G_CAP1_TX_STBC BIT(1) |
---|
| 2411 | +#define S1G_CAP1_RX_STBC BIT(2) |
---|
| 2412 | +#define S1G_CAP1_SU_BFER BIT(3) |
---|
| 2413 | +#define S1G_CAP1_SU_BFEE BIT(4) |
---|
| 2414 | +#define S1G_CAP1_BFEE_STS GENMASK(7, 5) |
---|
| 2415 | + |
---|
| 2416 | +#define S1G_CAP2_SOUNDING_DIMENSIONS GENMASK(2, 0) |
---|
| 2417 | +#define S1G_CAP2_MU_BFER BIT(3) |
---|
| 2418 | +#define S1G_CAP2_MU_BFEE BIT(4) |
---|
| 2419 | +#define S1G_CAP2_PLUS_HTC_VHT BIT(5) |
---|
| 2420 | +#define S1G_CAP2_TRAVELING_PILOT GENMASK(7, 6) |
---|
| 2421 | + |
---|
| 2422 | +#define S1G_CAP3_RD_RESPONDER BIT(0) |
---|
| 2423 | +#define S1G_CAP3_HT_DELAYED_BA BIT(1) |
---|
| 2424 | +#define S1G_CAP3_MAX_MPDU_LEN BIT(2) |
---|
| 2425 | +#define S1G_CAP3_MAX_AMPDU_LEN_EXP GENMASK(4, 3) |
---|
| 2426 | +#define S1G_CAP3_MIN_MPDU_START GENMASK(7, 5) |
---|
| 2427 | + |
---|
| 2428 | +#define S1G_CAP4_UPLINK_SYNC BIT(0) |
---|
| 2429 | +#define S1G_CAP4_DYNAMIC_AID BIT(1) |
---|
| 2430 | +#define S1G_CAP4_BAT BIT(2) |
---|
| 2431 | +#define S1G_CAP4_TIME_ADE BIT(3) |
---|
| 2432 | +#define S1G_CAP4_NON_TIM BIT(4) |
---|
| 2433 | +#define S1G_CAP4_GROUP_AID BIT(5) |
---|
| 2434 | +#define S1G_CAP4_STA_TYPE GENMASK(7, 6) |
---|
| 2435 | + |
---|
| 2436 | +#define S1G_CAP5_CENT_AUTH_CONTROL BIT(0) |
---|
| 2437 | +#define S1G_CAP5_DIST_AUTH_CONTROL BIT(1) |
---|
| 2438 | +#define S1G_CAP5_AMSDU BIT(2) |
---|
| 2439 | +#define S1G_CAP5_AMPDU BIT(3) |
---|
| 2440 | +#define S1G_CAP5_ASYMMETRIC_BA BIT(4) |
---|
| 2441 | +#define S1G_CAP5_FLOW_CONTROL BIT(5) |
---|
| 2442 | +#define S1G_CAP5_SECTORIZED_BEAM GENMASK(7, 6) |
---|
| 2443 | + |
---|
| 2444 | +#define S1G_CAP6_OBSS_MITIGATION BIT(0) |
---|
| 2445 | +#define S1G_CAP6_FRAGMENT_BA BIT(1) |
---|
| 2446 | +#define S1G_CAP6_NDP_PS_POLL BIT(2) |
---|
| 2447 | +#define S1G_CAP6_RAW_OPERATION BIT(3) |
---|
| 2448 | +#define S1G_CAP6_PAGE_SLICING BIT(4) |
---|
| 2449 | +#define S1G_CAP6_TXOP_SHARING_IMP_ACK BIT(5) |
---|
| 2450 | +#define S1G_CAP6_VHT_LINK_ADAPT GENMASK(7, 6) |
---|
| 2451 | + |
---|
| 2452 | +#define S1G_CAP7_TACK_AS_PS_POLL BIT(0) |
---|
| 2453 | +#define S1G_CAP7_DUP_1MHZ BIT(1) |
---|
| 2454 | +#define S1G_CAP7_MCS_NEGOTIATION BIT(2) |
---|
| 2455 | +#define S1G_CAP7_1MHZ_CTL_RESPONSE_PREAMBLE BIT(3) |
---|
| 2456 | +#define S1G_CAP7_NDP_BFING_REPORT_POLL BIT(4) |
---|
| 2457 | +#define S1G_CAP7_UNSOLICITED_DYN_AID BIT(5) |
---|
| 2458 | +#define S1G_CAP7_SECTOR_TRAINING_OPERATION BIT(6) |
---|
| 2459 | +#define S1G_CAP7_TEMP_PS_MODE_SWITCH BIT(7) |
---|
| 2460 | + |
---|
| 2461 | +#define S1G_CAP8_TWT_GROUPING BIT(0) |
---|
| 2462 | +#define S1G_CAP8_BDT BIT(1) |
---|
| 2463 | +#define S1G_CAP8_COLOR GENMASK(4, 2) |
---|
| 2464 | +#define S1G_CAP8_TWT_REQUEST BIT(5) |
---|
| 2465 | +#define S1G_CAP8_TWT_RESPOND BIT(6) |
---|
| 2466 | +#define S1G_CAP8_PV1_FRAME BIT(7) |
---|
| 2467 | + |
---|
| 2468 | +#define S1G_CAP9_LINK_ADAPT_PER_CONTROL_RESPONSE BIT(0) |
---|
| 2469 | + |
---|
| 2470 | +#define S1G_OPER_CH_WIDTH_PRIMARY_1MHZ BIT(0) |
---|
| 2471 | +#define S1G_OPER_CH_WIDTH_OPER GENMASK(4, 1) |
---|
| 2472 | + |
---|
| 2473 | + |
---|
| 2474 | +#define LISTEN_INT_USF GENMASK(15, 14) |
---|
| 2475 | +#define LISTEN_INT_UI GENMASK(13, 0) |
---|
| 2476 | + |
---|
| 2477 | +#define IEEE80211_MAX_USF FIELD_MAX(LISTEN_INT_USF) |
---|
| 2478 | +#define IEEE80211_MAX_UI FIELD_MAX(LISTEN_INT_UI) |
---|
2012 | 2479 | |
---|
2013 | 2480 | /* Authentication algorithms */ |
---|
2014 | 2481 | #define WLAN_AUTH_OPEN 0 |
---|
.. | .. |
---|
2073 | 2540 | #define IEEE80211_SPCT_MSR_RPRT_TYPE_BASIC 0 |
---|
2074 | 2541 | #define IEEE80211_SPCT_MSR_RPRT_TYPE_CCA 1 |
---|
2075 | 2542 | #define IEEE80211_SPCT_MSR_RPRT_TYPE_RPI 2 |
---|
| 2543 | +#define IEEE80211_SPCT_MSR_RPRT_TYPE_LCI 8 |
---|
| 2544 | +#define IEEE80211_SPCT_MSR_RPRT_TYPE_CIVIC 11 |
---|
2076 | 2545 | |
---|
2077 | 2546 | /* 802.11g ERP information element */ |
---|
2078 | 2547 | #define WLAN_ERP_NON_ERP_PRESENT (1<<0) |
---|
.. | .. |
---|
2160 | 2629 | /* 802.11ai */ |
---|
2161 | 2630 | WLAN_STATUS_FILS_AUTHENTICATION_FAILURE = 108, |
---|
2162 | 2631 | WLAN_STATUS_UNKNOWN_AUTHENTICATION_SERVER = 109, |
---|
| 2632 | + WLAN_STATUS_SAE_HASH_TO_ELEMENT = 126, |
---|
| 2633 | + WLAN_STATUS_SAE_PK = 127, |
---|
2163 | 2634 | }; |
---|
2164 | 2635 | |
---|
2165 | 2636 | |
---|
.. | .. |
---|
2403 | 2874 | WLAN_EID_QUIET_CHANNEL = 198, |
---|
2404 | 2875 | WLAN_EID_OPMODE_NOTIF = 199, |
---|
2405 | 2876 | |
---|
| 2877 | + WLAN_EID_REDUCED_NEIGHBOR_REPORT = 201, |
---|
| 2878 | + |
---|
| 2879 | + WLAN_EID_AID_REQUEST = 210, |
---|
| 2880 | + WLAN_EID_AID_RESPONSE = 211, |
---|
| 2881 | + WLAN_EID_S1G_BCN_COMPAT = 213, |
---|
| 2882 | + WLAN_EID_S1G_SHORT_BCN_INTERVAL = 214, |
---|
| 2883 | + WLAN_EID_S1G_CAPABILITIES = 217, |
---|
2406 | 2884 | WLAN_EID_VENDOR_SPECIFIC = 221, |
---|
2407 | 2885 | WLAN_EID_QOS_PARAMETER = 222, |
---|
| 2886 | + WLAN_EID_S1G_OPERATION = 232, |
---|
2408 | 2887 | WLAN_EID_CAG_NUMBER = 237, |
---|
2409 | 2888 | WLAN_EID_AP_CSN = 239, |
---|
2410 | 2889 | WLAN_EID_FILS_INDICATION = 240, |
---|
2411 | 2890 | WLAN_EID_DILS = 241, |
---|
2412 | 2891 | WLAN_EID_FRAGMENT = 242, |
---|
| 2892 | + WLAN_EID_RSNX = 244, |
---|
2413 | 2893 | WLAN_EID_EXTENSION = 255 |
---|
2414 | 2894 | }; |
---|
2415 | 2895 | |
---|
.. | .. |
---|
2430 | 2910 | WLAN_EID_EXT_HE_OPERATION = 36, |
---|
2431 | 2911 | WLAN_EID_EXT_UORA = 37, |
---|
2432 | 2912 | WLAN_EID_EXT_HE_MU_EDCA = 38, |
---|
| 2913 | + WLAN_EID_EXT_HE_SPR = 39, |
---|
| 2914 | + WLAN_EID_EXT_NDP_FEEDBACK_REPORT_PARAMSET = 41, |
---|
| 2915 | + WLAN_EID_EXT_BSS_COLOR_CHG_ANN = 42, |
---|
| 2916 | + WLAN_EID_EXT_QUIET_TIME_PERIOD_SETUP = 43, |
---|
| 2917 | + WLAN_EID_EXT_ESS_REPORT = 45, |
---|
| 2918 | + WLAN_EID_EXT_OPS = 46, |
---|
| 2919 | + WLAN_EID_EXT_HE_BSS_LOAD = 47, |
---|
| 2920 | + WLAN_EID_EXT_MAX_CHANNEL_SWITCH_TIME = 52, |
---|
| 2921 | + WLAN_EID_EXT_MULTIPLE_BSSID_CONFIGURATION = 55, |
---|
| 2922 | + WLAN_EID_EXT_NON_INHERITANCE = 56, |
---|
| 2923 | + WLAN_EID_EXT_KNOWN_BSSID = 57, |
---|
| 2924 | + WLAN_EID_EXT_SHORT_SSID_LIST = 58, |
---|
| 2925 | + WLAN_EID_EXT_HE_6GHZ_CAPA = 59, |
---|
| 2926 | + WLAN_EID_EXT_UL_MU_POWER_CAPA = 60, |
---|
2433 | 2927 | }; |
---|
2434 | 2928 | |
---|
2435 | 2929 | /* Action category code */ |
---|
.. | .. |
---|
2551 | 3045 | #define FILS_ERP_MAX_RRK_LEN 64 |
---|
2552 | 3046 | |
---|
2553 | 3047 | #define PMK_MAX_LEN 64 |
---|
| 3048 | +#define SAE_PASSWORD_MAX_LEN 128 |
---|
2554 | 3049 | |
---|
2555 | 3050 | /* Public action codes (IEEE Std 802.11-2016, 9.6.8.1, Table 9-307) */ |
---|
2556 | 3051 | enum ieee80211_pub_actioncode { |
---|
.. | .. |
---|
2611 | 3106 | */ |
---|
2612 | 3107 | #define WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING BIT(2) |
---|
2613 | 3108 | |
---|
2614 | | -/* TDLS capabilities in the the 4th byte of @WLAN_EID_EXT_CAPABILITY */ |
---|
| 3109 | +/* Multiple BSSID capability is set in the 6th bit of 3rd byte of the |
---|
| 3110 | + * @WLAN_EID_EXT_CAPABILITY information element |
---|
| 3111 | + */ |
---|
| 3112 | +#define WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT BIT(6) |
---|
| 3113 | + |
---|
| 3114 | +/* TDLS capabilities in the 4th byte of @WLAN_EID_EXT_CAPABILITY */ |
---|
2615 | 3115 | #define WLAN_EXT_CAPA4_TDLS_BUFFER_STA BIT(4) |
---|
2616 | 3116 | #define WLAN_EXT_CAPA4_TDLS_PEER_PSM BIT(5) |
---|
2617 | 3117 | #define WLAN_EXT_CAPA4_TDLS_CHAN_SWITCH BIT(6) |
---|
.. | .. |
---|
2641 | 3141 | * information element |
---|
2642 | 3142 | */ |
---|
2643 | 3143 | #define WLAN_EXT_CAPA9_FTM_INITIATOR BIT(7) |
---|
| 3144 | + |
---|
| 3145 | +/* Defines support for TWT Requester and TWT Responder */ |
---|
| 3146 | +#define WLAN_EXT_CAPA10_TWT_REQUESTER_SUPPORT BIT(5) |
---|
| 3147 | +#define WLAN_EXT_CAPA10_TWT_RESPONDER_SUPPORT BIT(6) |
---|
| 3148 | + |
---|
| 3149 | +/* |
---|
| 3150 | + * When set, indicates that the AP is able to tolerate 26-tone RU UL |
---|
| 3151 | + * OFDMA transmissions using HE TB PPDU from OBSS (not falsely classify the |
---|
| 3152 | + * 26-tone RU UL OFDMA transmissions as radar pulses). |
---|
| 3153 | + */ |
---|
| 3154 | +#define WLAN_EXT_CAPA10_OBSS_NARROW_BW_RU_TOLERANCE_SUPPORT BIT(7) |
---|
| 3155 | + |
---|
| 3156 | +/* Defines support for enhanced multi-bssid advertisement*/ |
---|
| 3157 | +#define WLAN_EXT_CAPA11_EMA_SUPPORT BIT(3) |
---|
2644 | 3158 | |
---|
2645 | 3159 | /* TDLS specific payload type in the LLC/SNAP header */ |
---|
2646 | 3160 | #define WLAN_TDLS_SNAP_RFTYPE 0x2 |
---|
.. | .. |
---|
2833 | 3347 | WLAN_ACTION_SA_QUERY_RESPONSE = 1, |
---|
2834 | 3348 | }; |
---|
2835 | 3349 | |
---|
| 3350 | +/** |
---|
| 3351 | + * struct ieee80211_bssid_index |
---|
| 3352 | + * |
---|
| 3353 | + * This structure refers to "Multiple BSSID-index element" |
---|
| 3354 | + * |
---|
| 3355 | + * @bssid_index: BSSID index |
---|
| 3356 | + * @dtim_period: optional, overrides transmitted BSS dtim period |
---|
| 3357 | + * @dtim_count: optional, overrides transmitted BSS dtim count |
---|
| 3358 | + */ |
---|
| 3359 | +struct ieee80211_bssid_index { |
---|
| 3360 | + u8 bssid_index; |
---|
| 3361 | + u8 dtim_period; |
---|
| 3362 | + u8 dtim_count; |
---|
| 3363 | +}; |
---|
| 3364 | + |
---|
| 3365 | +/** |
---|
| 3366 | + * struct ieee80211_multiple_bssid_configuration |
---|
| 3367 | + * |
---|
| 3368 | + * This structure refers to "Multiple BSSID Configuration element" |
---|
| 3369 | + * |
---|
| 3370 | + * @bssid_count: total number of active BSSIDs in the set |
---|
| 3371 | + * @profile_periodicity: the least number of beacon frames need to be received |
---|
| 3372 | + * in order to discover all the nontransmitted BSSIDs in the set. |
---|
| 3373 | + */ |
---|
| 3374 | +struct ieee80211_multiple_bssid_configuration { |
---|
| 3375 | + u8 bssid_count; |
---|
| 3376 | + u8 profile_periodicity; |
---|
| 3377 | +}; |
---|
2836 | 3378 | |
---|
2837 | 3379 | #define SUITE(oui, id) (((oui) << 8) | (id)) |
---|
2838 | 3380 | |
---|
.. | .. |
---|
2863 | 3405 | #define WLAN_AKM_SUITE_TDLS SUITE(0x000FAC, 7) |
---|
2864 | 3406 | #define WLAN_AKM_SUITE_SAE SUITE(0x000FAC, 8) |
---|
2865 | 3407 | #define WLAN_AKM_SUITE_FT_OVER_SAE SUITE(0x000FAC, 9) |
---|
| 3408 | +#define WLAN_AKM_SUITE_AP_PEER_KEY SUITE(0x000FAC, 10) |
---|
2866 | 3409 | #define WLAN_AKM_SUITE_8021X_SUITE_B SUITE(0x000FAC, 11) |
---|
2867 | 3410 | #define WLAN_AKM_SUITE_8021X_SUITE_B_192 SUITE(0x000FAC, 12) |
---|
| 3411 | +#define WLAN_AKM_SUITE_FT_8021X_SHA384 SUITE(0x000FAC, 13) |
---|
2868 | 3412 | #define WLAN_AKM_SUITE_FILS_SHA256 SUITE(0x000FAC, 14) |
---|
2869 | 3413 | #define WLAN_AKM_SUITE_FILS_SHA384 SUITE(0x000FAC, 15) |
---|
2870 | 3414 | #define WLAN_AKM_SUITE_FT_FILS_SHA256 SUITE(0x000FAC, 16) |
---|
2871 | 3415 | #define WLAN_AKM_SUITE_FT_FILS_SHA384 SUITE(0x000FAC, 17) |
---|
| 3416 | +#define WLAN_AKM_SUITE_OWE SUITE(0x000FAC, 18) |
---|
| 3417 | +#define WLAN_AKM_SUITE_FT_PSK_SHA384 SUITE(0x000FAC, 19) |
---|
| 3418 | +#define WLAN_AKM_SUITE_PSK_SHA384 SUITE(0x000FAC, 20) |
---|
2872 | 3419 | |
---|
2873 | 3420 | #define WLAN_MAX_KEY_LEN 32 |
---|
2874 | 3421 | |
---|
.. | .. |
---|
2922 | 3469 | __le16 sba; |
---|
2923 | 3470 | __le16 medium_time; |
---|
2924 | 3471 | } __packed; |
---|
| 3472 | + |
---|
| 3473 | +struct ieee80211_he_6ghz_capa { |
---|
| 3474 | + /* uses IEEE80211_HE_6GHZ_CAP_* below */ |
---|
| 3475 | + __le16 capa; |
---|
| 3476 | +} __packed; |
---|
| 3477 | + |
---|
| 3478 | +/* HE 6 GHz band capabilities */ |
---|
| 3479 | +/* uses enum ieee80211_min_mpdu_spacing values */ |
---|
| 3480 | +#define IEEE80211_HE_6GHZ_CAP_MIN_MPDU_START 0x0007 |
---|
| 3481 | +/* uses enum ieee80211_vht_max_ampdu_length_exp values */ |
---|
| 3482 | +#define IEEE80211_HE_6GHZ_CAP_MAX_AMPDU_LEN_EXP 0x0038 |
---|
| 3483 | +/* uses IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_* values */ |
---|
| 3484 | +#define IEEE80211_HE_6GHZ_CAP_MAX_MPDU_LEN 0x00c0 |
---|
| 3485 | +/* WLAN_HT_CAP_SM_PS_* values */ |
---|
| 3486 | +#define IEEE80211_HE_6GHZ_CAP_SM_PS 0x0600 |
---|
| 3487 | +#define IEEE80211_HE_6GHZ_CAP_RD_RESPONDER 0x0800 |
---|
| 3488 | +#define IEEE80211_HE_6GHZ_CAP_RX_ANTPAT_CONS 0x1000 |
---|
| 3489 | +#define IEEE80211_HE_6GHZ_CAP_TX_ANTPAT_CONS 0x2000 |
---|
2925 | 3490 | |
---|
2926 | 3491 | /** |
---|
2927 | 3492 | * ieee80211_get_qos_ctl - get pointer to qos control bytes |
---|
.. | .. |
---|
3147 | 3712 | #define TU_TO_JIFFIES(x) (usecs_to_jiffies((x) * 1024)) |
---|
3148 | 3713 | #define TU_TO_EXP_TIME(x) (jiffies + TU_TO_JIFFIES(x)) |
---|
3149 | 3714 | |
---|
| 3715 | +/* convert frequencies */ |
---|
| 3716 | +#define MHZ_TO_KHZ(freq) ((freq) * 1000) |
---|
| 3717 | +#define KHZ_TO_MHZ(freq) ((freq) / 1000) |
---|
| 3718 | +#define PR_KHZ(f) KHZ_TO_MHZ(f), f % 1000 |
---|
| 3719 | +#define KHZ_F "%d.%03d" |
---|
| 3720 | + |
---|
| 3721 | +/* convert powers */ |
---|
| 3722 | +#define DBI_TO_MBI(gain) ((gain) * 100) |
---|
| 3723 | +#define MBI_TO_DBI(gain) ((gain) / 100) |
---|
| 3724 | +#define DBM_TO_MBM(gain) ((gain) * 100) |
---|
| 3725 | +#define MBM_TO_DBM(gain) ((gain) / 100) |
---|
| 3726 | + |
---|
3150 | 3727 | /** |
---|
3151 | 3728 | * ieee80211_action_contains_tpc - checks if the frame contains TPC element |
---|
3152 | 3729 | * @skb: the skb containing the frame, length will be checked |
---|
.. | .. |
---|
3213 | 3790 | for_each_element(element, data, datalen) \ |
---|
3214 | 3791 | if (element->id == (_id)) |
---|
3215 | 3792 | |
---|
3216 | | -#define for_each_element_extid(element, extid, data, datalen) \ |
---|
3217 | | - for_each_element(element, data, datalen) \ |
---|
| 3793 | +#define for_each_element_extid(element, extid, _data, _datalen) \ |
---|
| 3794 | + for_each_element(element, _data, _datalen) \ |
---|
3218 | 3795 | if (element->id == WLAN_EID_EXTENSION && \ |
---|
3219 | 3796 | element->datalen > 0 && \ |
---|
3220 | 3797 | element->data[0] == (extid)) |
---|
.. | .. |
---|
3247 | 3824 | return (const u8 *)element == (const u8 *)data + datalen; |
---|
3248 | 3825 | } |
---|
3249 | 3826 | |
---|
| 3827 | +/** |
---|
| 3828 | + * RSNX Capabilities: |
---|
| 3829 | + * bits 0-3: Field length (n-1) |
---|
| 3830 | + */ |
---|
| 3831 | +#define WLAN_RSNX_CAPA_PROTECTED_TWT BIT(4) |
---|
| 3832 | +#define WLAN_RSNX_CAPA_SAE_H2E BIT(5) |
---|
| 3833 | + |
---|
| 3834 | +/* |
---|
| 3835 | + * reduced neighbor report, based on Draft P802.11ax_D5.0, |
---|
| 3836 | + * section 9.4.2.170 |
---|
| 3837 | + */ |
---|
| 3838 | +#define IEEE80211_AP_INFO_TBTT_HDR_TYPE 0x03 |
---|
| 3839 | +#define IEEE80211_AP_INFO_TBTT_HDR_FILTERED 0x04 |
---|
| 3840 | +#define IEEE80211_AP_INFO_TBTT_HDR_COLOC 0x08 |
---|
| 3841 | +#define IEEE80211_AP_INFO_TBTT_HDR_COUNT 0xF0 |
---|
| 3842 | +#define IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM 8 |
---|
| 3843 | +#define IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM 12 |
---|
| 3844 | + |
---|
| 3845 | +#define IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED 0x01 |
---|
| 3846 | +#define IEEE80211_RNR_TBTT_PARAMS_SAME_SSID 0x02 |
---|
| 3847 | +#define IEEE80211_RNR_TBTT_PARAMS_MULTI_BSSID 0x04 |
---|
| 3848 | +#define IEEE80211_RNR_TBTT_PARAMS_TRANSMITTED_BSSID 0x08 |
---|
| 3849 | +#define IEEE80211_RNR_TBTT_PARAMS_COLOC_ESS 0x10 |
---|
| 3850 | +#define IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE 0x20 |
---|
| 3851 | +#define IEEE80211_RNR_TBTT_PARAMS_COLOC_AP 0x40 |
---|
| 3852 | + |
---|
| 3853 | +struct ieee80211_neighbor_ap_info { |
---|
| 3854 | + u8 tbtt_info_hdr; |
---|
| 3855 | + u8 tbtt_info_len; |
---|
| 3856 | + u8 op_class; |
---|
| 3857 | + u8 channel; |
---|
| 3858 | +} __packed; |
---|
| 3859 | + |
---|
3250 | 3860 | #endif /* LINUX_IEEE80211_H */ |
---|