1 /* 2 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /** 21 * DOC: contains commnon ieee80211 definitions 22 */ 23 24 #ifndef _WLAN_CMN_IEEE80211_H_ 25 #define _WLAN_CMN_IEEE80211_H_ 26 #include <qdf_types.h> 27 #include <osdep.h> 28 29 /* Subfields in Frame Control field (except Type and Subtype) */ 30 #define WLAN_FC0_PVER 0x0003 31 #define WLAN_FC1_DIR_MASK 0x03 32 #define WLAN_FC1_TODS 0x01 33 #define WLAN_FC1_FROMDS 0x02 34 #define WLAN_FC1_DSTODS 0x03 35 #define WLAN_FC1_MOREFRAG 0x04 36 #define WLAN_FC1_RETRY 0x08 37 #define WLAN_FC1_PWRMGT 0x10 38 #define WLAN_FC1_MOREDATA 0x20 39 #define WLAN_FC1_ISWEP 0x40 40 #define WLAN_FC1_ORDER 0x80 41 42 /* Definitions for Type subfield in Frame Control field */ 43 #define WLAN_FC0_TYPE_MGMT 0 44 #define WLAN_FC0_TYPE_CTRL 1 45 #define WLAN_FC0_TYPE_DATA 2 46 47 /* Definitions for management frame subtypes in Frame Control field */ 48 #define WLAN_FC0_STYPE_ASSOC_REQ 0 49 #define WLAN_FC0_STYPE_ASSOC_RESP 1 50 #define WLAN_FC0_STYPE_REASSOC_REQ 2 51 #define WLAN_FC0_STYPE_REASSOC_RESP 3 52 #define WLAN_FC0_STYPE_PROBE_REQ 4 53 #define WLAN_FC0_STYPE_PROBE_RESP 5 54 #define WLAN_FC0_STYPE_BEACON 8 55 #define WLAN_FC0_STYPE_ATIM 9 56 #define WLAN_FC0_STYPE_DISASSOC 10 57 #define WLAN_FC0_STYPE_AUTH 11 58 #define WLAN_FC0_STYPE_DEAUTH 12 59 #define WLAN_FC0_STYPE_ACTION 13 60 61 /* Definitions for control frame subtypes in Frame Control field */ 62 #define WLAN_FC0_STYPE_PSPOLL 10 63 #define WLAN_FC0_STYPE_RTS 11 64 #define WLAN_FC0_STYPE_CTS 12 65 #define WLAN_FC0_STYPE_ACK 13 66 #define WLAN_FC0_STYPE_CFEND 14 67 #define WLAN_FC0_STYPE_CFENDACK 15 68 69 /* Definitions for data frame subtypes in Frame Control field */ 70 #define WLAN_FC0_STYPE_DATA 0 71 #define WLAN_FC0_STYPE_DATA_CFACK 1 72 #define WLAN_FC0_STYPE_DATA_CFPOLL 2 73 #define WLAN_FC0_STYPE_DATA_CFACKPOLL 3 74 #define WLAN_FC0_STYPE_NULLFUNC 4 75 #define WLAN_FC0_STYPE_CFACK 5 76 #define WLAN_FC0_STYPE_CFPOLL 6 77 #define WLAN_FC0_STYPE_CFACKPOLL 7 78 #define WLAN_FC0_STYPE_QOS_DATA 8 79 #define WLAN_FC0_STYPE_QOS_DATA_CFACK 9 80 #define WLAN_FC0_STYPE_QOS_DATA_CFPOLL 10 81 #define WLAN_FC0_STYPE_QOS_DATA_CFACKPOLL 11 82 #define WLAN_FC0_STYPE_QOS_NULL 12 83 #define WLAN_FC0_STYPE_QOS_CFPOLL 14 84 #define WLAN_FC0_STYPE_QOS_CFACKPOLL 15 85 86 /* Get Type/Subtype subfields in Frame Control field */ 87 #define WLAN_FC0_GET_TYPE(fc) (((fc) & 0x0c) >> 2) 88 #define WLAN_FC0_GET_STYPE(fc) (((fc) & 0xf0) >> 4) 89 90 /* Definitions related to sequence number processing, TID, etc. */ 91 #define WLAN_INVALID_MGMT_SEQ 0xffff 92 #define WLAN_SEQ_MASK 0x0fff 93 #define WLAN_GET_SEQ_FRAG(seq) ((seq) & (BIT(3) | BIT(2) | BIT(1) | BIT(0))) 94 #define WLAN_GET_SEQ_SEQ(seq) \ 95 (((seq) & (~(BIT(3) | BIT(2) | BIT(1) | BIT(0)))) >> 4) 96 #define WLAN_QOS_TID_MASK 0x0f 97 #define WLAN_TID_SIZE 17 98 #define WLAN_NONQOS_SEQ 16 99 100 /* Length of Timestamp field */ 101 #define WLAN_TIMESTAMP_LEN 8 102 103 /* Length of Beacon Interval field */ 104 #define WLAN_BEACONINTERVAL_LEN 2 105 106 /* Length of Capability Information field */ 107 #define WLAN_CAPABILITYINFO_LEN 2 108 109 /* Length of Listen Interval field */ 110 #define WLAN_LISTENINTERVAL_LEN 2 111 112 /* Length of Status code field */ 113 #define WLAN_STATUSCODE_LEN 2 114 115 /* Length of AID field */ 116 #define WLAN_AID_LEN 2 117 118 /* Assoc resp IE offset Capability(2) + Status Code(2) + AID(2) */ 119 #define WLAN_ASSOC_RSP_IES_OFFSET \ 120 (WLAN_CAPABILITYINFO_LEN + WLAN_STATUSCODE_LEN + WLAN_AID_LEN) 121 122 /* Assoc req IE offset - Capability(2) + LI(2) */ 123 #define WLAN_ASSOC_REQ_IES_OFFSET \ 124 (WLAN_CAPABILITYINFO_LEN + WLAN_LISTENINTERVAL_LEN) 125 126 /* Reassoc req IE offset - Capability(2) + LI(2) + current AP address(6) */ 127 #define WLAN_REASSOC_REQ_IES_OFFSET \ 128 (WLAN_CAPABILITYINFO_LEN + WLAN_LISTENINTERVAL_LEN + QDF_MAC_ADDR_SIZE) 129 130 /* Probe response IE offset - timestamp(8) + Beacon Int(2) + Cap info(2) */ 131 #define WLAN_PROBE_RESP_IES_OFFSET \ 132 (WLAN_TIMESTAMP_LEN + WLAN_BEACONINTERVAL_LEN + WLAN_CAPABILITYINFO_LEN) 133 134 /* Beacon IE offset - timestamp(8) + Beacon Int(2) + Cap info(2) */ 135 #define WLAN_BEACON_IES_OFFSET \ 136 (WLAN_TIMESTAMP_LEN + WLAN_BEACONINTERVAL_LEN + WLAN_CAPABILITYINFO_LEN) 137 138 /* Length (in bytes) of MAC header in 3 address format */ 139 #define WLAN_MAC_HDR_LEN_3A 24 140 141 #define IEEE80211_CCMP_HEADERLEN 8 142 #define IEEE80211_HT_CTRL_LEN 4 143 #define IEEE80211_CCMP_MICLEN 8 144 #define WLAN_IEEE80211_GCMP_HEADERLEN 8 145 #define WLAN_IEEE80211_GCMP_MICLEN 16 146 147 #define IEEE80211_FC1_RETRY 0x08 148 #define IEEE80211_FC1_WEP 0x40 149 #define IEEE80211_FC1_ORDER 0x80 150 151 #define WLAN_HDR_IV_LEN 3 152 #define WLAN_HDR_EXT_IV_BIT 0x20 153 #define WLAN_HDR_EXT_IV_LEN 4 154 155 #define WLAN_SEQ_SEQ_SHIFT 4 156 157 #define P2P_WFA_OUI {0x50, 0x6f, 0x9a} 158 #define P2P_WFA_VER 0x09 159 160 #define WSC_OUI 0x0050f204 161 #define MBO_OCE_OUI 0x506f9a16 162 #define MBO_OCE_OUI_SIZE 4 163 #define REDUCED_WAN_METRICS_ATTR 103 164 #define OCE_DISALLOW_ASSOC_ATTR 0x4 165 #define AP_TX_PWR_ATTR 107 166 #define OCE_SUBNET_ID_ATTR 108 167 #define OCE_SUBNET_ID_LEN 6 168 #define OSEN_OUI 0x506f9a12 169 170 /* WCN IE */ 171 /* Microsoft OUI */ 172 #define WCN_OUI 0xf25000 173 /* WCN */ 174 #define WCN_OUI_TYPE 0x04 175 #define WME_OUI 0xf25000 176 #define WME_OUI_TYPE 0x02 177 #define WME_PARAM_OUI_SUBTYPE 0x01 178 #define WME_INFO_OUI_SUBTYPE 0x00 179 /* Atheros OUI */ 180 #define ATH_OUI 0x7f0300 181 #define ATH_OUI_TYPE 0x01 182 /* Atheros Extended Cap Type */ 183 #define ATH_OUI_EXTCAP_TYPE 0x04 184 /* QCA Bandwidth NSS Mapping Type */ 185 #define ATH_OUI_BW_NSS_MAP_TYPE 0x05 186 #define SFA_OUI 0x964000 187 #define SFA_OUI_TYPE 0x14 188 /* QCA OUI (in little endian) */ 189 #define QCA_OUI 0xf0fd8c 190 #define QCN_OUI_TYPE_CMN 0x01 191 #define QCA_OUI_WHC_TYPE 0x00 192 #define QCA_OUI_WHC_REPT_TYPE 0x01 193 194 /* QCN IE attribute types */ 195 enum qcn_attribute_id { 196 QCN_ATTRIB_VERSION = 0x01, 197 QCN_ATTRIB_VHT_MCS10_11_SUPP = 0X02, 198 QCN_ATTRIB_HE_400NS_SGI_SUPP = 0X03, 199 QCN_ATTRIB_HE_2XLTF_160_80P80_SUPP = 0X04, 200 QCN_ATTRIB_HE_DL_OFDMA_SUPP = 0X05, 201 QCN_ATTRIB_TRANSITION_REASON = 0x06, 202 QCN_ATTRIB_TRANSITION_REJECTION = 0x07, 203 QCN_ATTRIB_HE_DL_MUMIMO_SUPP = 0X08, 204 QCN_ATTRIB_HE_MCS12_13_SUPP = 0X09, 205 QCN_ATTRIB_REPEATER_INFO = 0X0A, 206 QCN_ATTRIB_HE_240_MHZ_SUPP = 0X0B, 207 QCN_ATTRIB_MAX = 0x0C 208 }; 209 210 /* Extender vendor specific IE */ 211 #define QCA_OUI_EXTENDER_TYPE 0x03 212 213 #define ADAPTIVE_11R_OUI 0x964000 214 #define ADAPTIVE_11R_OUI_TYPE 0x2C 215 216 #define OUI_LENGTH 4 217 #define OUI_TYPE_BITS 24 218 #define MAX_ADAPTIVE_11R_IE_LEN 8 219 220 /* Minimum length of Non-Inheritance element (inclusive of the IE header) */ 221 #define MIN_NONINHERITANCEELEM_LEN 5 222 223 /* 224 * sae single pmk vendor specific IE details 225 * Category Data 226 * Type 0xDD 227 * Length 0x05 228 * OUI 0x00 40 96 229 * Type 0x03 230 * Data Don’t care (EX, 0x05) 231 */ 232 #define SAE_SINGLE_PMK_OUI 0x964000 233 #define SAE_SINGLE_PMK_TYPE 0x03 234 #define MAX_SAE_SINGLE_PMK_IE_LEN 8 235 236 /* Temporary vendor specific IE for 11n pre-standard interoperability */ 237 #define VENDOR_HT_OUI 0x00904c 238 #define VENDOR_HT_CAP_ID 51 239 #define VENDOR_HT_INFO_ID 52 240 241 #define VHT_INTEROP_OUI 0x00904c 242 #define VHT_INTEROP_TYPE 0x04 243 #define VHT_INTEROP_OUI_SUBTYPE 0x08 244 #define VHT_INTEROP_OUI_SUBTYPE_VENDORSPEC 0x18 245 246 /* ATH HE OUI ( in little endian) */ 247 #define ATH_HE_OUI 0x741300 248 #define ATH_HE_CAP_SUBTYPE 0x01 249 #define ATH_HE_OP_SUBTYPE 0x02 250 251 /* EPR information element flags */ 252 #define ERP_NON_ERP_PRESENT 0x01 253 #define ERP_USE_PROTECTION 0x02 254 #define ERP_LONG_PREAMBLE 0x04 255 256 #define QCA_OUI_WHC_AP_INFO_SUBTYPE 0x00 257 258 #define WLAN_MAX_IE_LEN 255 259 #define WLAN_RSN_IE_LEN 22 260 261 /* Individual element IEs length checks */ 262 263 /* Maximum supported basic/mandatory rates are 12 */ 264 #define WLAN_SUPPORTED_RATES_IE_MAX_LEN 12 265 #define WLAN_FH_PARAM_IE_MAX_LEN 5 266 #define WLAN_DS_PARAM_IE_MAX_LEN 1 267 #define WLAN_CF_PARAM_IE_MAX_LEN 6 268 #define WLAN_COUNTRY_IE_MIN_LEN 3 269 #define WLAN_QUIET_IE_MAX_LEN 6 270 #define WLAN_CSA_IE_MAX_LEN 3 271 #define WLAN_XCSA_IE_MAX_LEN 4 272 #define WLAN_SECCHANOFF_IE_MAX_LEN 1 273 #define WLAN_EXT_SUPPORTED_RATES_IE_MAX_LEN 12 274 275 #define WLAN_EXTCAP_IE_MAX_LEN 15 276 #define WLAN_FILS_INDICATION_IE_MIN_LEN 2 277 #define WLAN_MOBILITY_DOMAIN_IE_MAX_LEN 3 278 #define WLAN_OPMODE_IE_MAX_LEN 1 279 #define WLAN_IBSSDFS_IE_MIN_LEN 7 280 #define WLAN_IBSS_IE_MAX_LEN 2 281 #define WLAN_REQUEST_IE_MAX_LEN 255 282 #define WLAN_RM_CAPABILITY_IE_MAX_LEN 5 283 #define WLAN_RNR_IE_MIN_LEN 5 284 #define WLAN_RNR_TBTT_OFFSET_INVALID 255 285 #define WLAN_TPE_IE_MIN_LEN 2 286 #define WLAN_MAX_NUM_TPE_IE 8 287 288 /* Wide band channel switch IE length */ 289 #define WLAN_WIDE_BW_CHAN_SWITCH_IE_LEN 3 290 291 /* Number of max TX power elements supported plus size of Transmit Power 292 * Information element. 293 */ 294 #define WLAN_TPE_IE_MAX_LEN 9 295 296 /* Max channel switch time IE length */ 297 #define WLAN_MAX_CHAN_SWITCH_TIME_IE_LEN 4 298 299 #define WLAN_MAX_SRP_IE_LEN 21 300 #define WLAN_MAX_MUEDCA_IE_LEN 14 301 #define WLAN_MAX_HE_6G_CAP_IE_LEN 3 302 #define WLAN_MAX_HEOP_IE_LEN 16 303 #define WLAN_HEOP_OUI_TYPE "\x24" 304 #define WLAN_HEOP_OUI_SIZE 1 305 306 /* HT capability flags */ 307 #define WLAN_HTCAP_C_ADVCODING 0x0001 308 #define WLAN_HTCAP_C_CHWIDTH40 0x0002 309 /* Capable of SM Power Save (Static) */ 310 #define WLAN_HTCAP_C_SMPOWERSAVE_STATIC 0x0000 311 /* Capable of SM Power Save (Dynamic) */ 312 #define WLAN_HTCAP_C_SMPOWERSAVE_DYNAMIC 0x0004 313 /* Reserved */ 314 #define WLAN_HTCAP_C_SM_RESERVED 0x0008 315 /* SM enabled, no SM Power Save */ 316 #define WLAN_HTCAP_C_SMPOWERSAVE_DISABLED 0x000c 317 #define WLAN_HTCAP_C_GREENFIELD 0x0010 318 #define WLAN_HTCAP_C_SHORTGI20 0x0020 319 #define WLAN_HTCAP_C_SHORTGI40 0x0040 320 #define WLAN_HTCAP_C_TXSTBC 0x0080 321 #define WLAN_HTCAP_C_TXSTBC_S 7 322 /* 2 bits */ 323 #define WLAN_HTCAP_C_RXSTBC 0x0300 324 #define WLAN_HTCAP_C_RXSTBC_S 8 325 #define WLAN_HTCAP_C_DELAYEDBLKACK 0x0400 326 /* 1 = 8K, 0 = 3839B */ 327 #define WLAN_HTCAP_C_MAXAMSDUSIZE 0x0800 328 #define WLAN_HTCAP_C_DSSSCCK40 0x1000 329 #define WLAN_HTCAP_C_PSMP 0x2000 330 #define WLAN_HTCAP_C_INTOLERANT40 0x4000 331 #define WLAN_HTCAP_C_LSIGTXOPPROT 0x8000 332 /* Spatial Multiplexing (SM) capabitlity bitmask */ 333 #define WLAN_HTCAP_C_SM_MASK 0x000c 334 335 /* VHT Operation */ 336 /* 20/40 MHz Operating Channel */ 337 #define WLAN_VHTOP_CHWIDTH_2040 0 338 /* 80 MHz Operating Channel */ 339 #define WLAN_VHTOP_CHWIDTH_80 1 340 /* 160 MHz Operating Channel */ 341 #define WLAN_VHTOP_CHWIDTH_160 2 342 /* 80 + 80 MHz Operating Channel */ 343 #define WLAN_VHTOP_CHWIDTH_80_80 3 344 /* 160 MHz Operating Channel (revised signalling) */ 345 #define WLAN_VHTOP_CHWIDTH_REVSIG_160 1 346 /* 80 + 80 MHz Operating Channel (revised signalling) */ 347 #define WLAN_VHTOP_CHWIDTH_REVSIG_80_80 1 348 349 #define WLAN_HEOP_FIXED_PARAM_LENGTH 7 350 #define WLAN_HEOP_VHTOP_LENGTH 3 351 #define WLAN_HEOP_CO_LOCATED_BSS_LENGTH 1 352 353 #define WLAN_HEOP_VHTOP_PRESENT_MASK 0x00004000 /* B14 */ 354 #define WLAN_HEOP_CO_LOCATED_BSS_MASK 0x00008000 /* B15 */ 355 #define WLAN_HEOP_6GHZ_INFO_PRESENT_MASK 0X00020000 /* B17 */ 356 357 #define WLAN_HE_6GHZ_CHWIDTH_20 0 /* 20MHz Oper Ch width */ 358 #define WLAN_HE_6GHZ_CHWIDTH_40 1 /* 40MHz Oper Ch width */ 359 #define WLAN_HE_6GHZ_CHWIDTH_80 2 /* 80MHz Oper Ch width */ 360 #define WLAN_HE_6GHZ_CHWIDTH_160_80_80 3 /* 160/80+80 MHz Oper Ch width */ 361 362 #define WLAN_HE_NON_SRG_PD_SR_DISALLOWED 0x02 363 #define WLAN_HE_NON_SRG_OFFSET_PRESENT 0x04 364 #define WLAN_HE_SIGA_SR_VAL15_ALLOWED 0x10 365 366 #ifdef WLAN_FEATURE_11BE 367 #define WLAN_EHT_CHWIDTH_20 0 /* 20MHz Oper Ch width */ 368 #define WLAN_EHT_CHWIDTH_40 1 /* 40MHz Oper Ch width */ 369 #define WLAN_EHT_CHWIDTH_80 2 /* 80MHz Oper Ch width */ 370 #define WLAN_EHT_CHWIDTH_160 3 /* 160MHz Oper Ch width */ 371 #define WLAN_EHT_CHWIDTH_320 4 /* 320MHz Oper Ch width */ 372 #endif 373 374 /* Max length of 802.11 subelement */ 375 #define WLAN_MAX_SUBELEM_LEN 255 376 377 #define WLAN_RATE_VAL 0x7f 378 #define WLAN_BASIC_RATE_MASK 0x80 379 380 #define WLAN_RV(v) ((v) & WLAN_RATE_VAL) 381 382 #define WLAN_BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 383 #define WLAN_BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126 384 #define WLAN_BSS_MEMBERSHIP_SELECTOR_GLK 125 385 #define WLAN_BSS_MEMBERSHIP_SELECTOR_EPD 124 386 #define WLAN_BSS_MEMBERSHIP_SELECTOR_SAE_H2E 123 387 #define WLAN_BSS_MEMBERSHIP_SELECTOR_HE_PHY 122 388 389 /* EXT cap bit definitions based on IEEE 802.11az D4.0 - 9.4.2.26 */ 390 #define WLAN_EXT_CAPA11_NTB_RANGING_RESPONDER BIT(2) 391 #define WLAN_EXT_CAPA11_TB_RANGING_RESPONDER BIT(3) 392 #define WLAN_EXT_CAPA11_PASSIVE_TB_RANGING_RESPONDER BIT(4) 393 #define WLAN_EXT_CAPA11_PASSIVE_TB_RANGING_INITIATOR BIT(5) 394 395 #define WLAN_CHAN_IS_5GHZ(chanidx) \ 396 ((chanidx > 30) ? true : false) 397 #define WLAN_CHAN_IS_2GHZ(chanidx) \ 398 (((chanidx > 0) && (chanidx < 15)) ? true : false) 399 400 /* Check if revised signalling is being used for VHT160 in vhtop */ 401 #define WLAN_IS_REVSIG_VHT160(vhtop) (((vhtop)->vht_op_chwidth == \ 402 WLAN_VHTOP_CHWIDTH_REVSIG_160) && \ 403 ((vhtop)->vht_op_ch_freq_seg2 != 0) && \ 404 (abs((vhtop)->vht_op_ch_freq_seg2 - (vhtop)->vht_op_ch_freq_seg1) == 8)) 405 406 /* Check if revised signalling is being used for VHT80p80 in vhtop */ 407 #define WLAN_IS_REVSIG_VHT80_80(vhtop) (((vhtop)->vht_op_chwidth == \ 408 WLAN_VHTOP_CHWIDTH_REVSIG_80_80) && \ 409 ((vhtop)->vht_op_ch_freq_seg2 != 0) && \ 410 (abs((vhtop)->vht_op_ch_freq_seg2 - (vhtop)->vht_op_ch_freq_seg1) > 8)) 411 412 /* Check if channel width is HE160 in HE 6ghz params */ 413 #define WLAN_IS_HE160(he_6g_param) (((he_6g_param)->width == \ 414 WLAN_HE_6GHZ_CHWIDTH_160_80_80) && \ 415 ((he_6g_param)->chan_freq_seg1 != 0) && \ 416 (abs((he_6g_param)->chan_freq_seg1 - \ 417 (he_6g_param)->chan_freq_seg0) == 8)) 418 419 /* Check if channel width is HE80p80 in HE 6ghz params */ 420 #define WLAN_IS_HE80_80(he_6g_param) (((he_6g_param)->width == \ 421 WLAN_HE_6GHZ_CHWIDTH_160_80_80) && \ 422 ((he_6g_param)->chan_freq_seg1 != 0) && \ 423 (abs((he_6g_param)->chan_freq_seg1 - \ 424 (he_6g_param)->chan_freq_seg0) > 8)) 425 426 #define LE_READ_2(p) \ 427 ((uint16_t)\ 428 ((((const uint8_t *)(p))[0]) |\ 429 (((const uint8_t *)(p))[1] << 8))) 430 431 #define LE_READ_4(p) \ 432 ((uint32_t)\ 433 ((((const uint8_t *)(p))[0]) |\ 434 (((const uint8_t *)(p))[1] << 8) | \ 435 (((const uint8_t *)(p))[2] << 16) |\ 436 (((const uint8_t *)(p))[3] << 24))) 437 438 #define BE_READ_4(p) \ 439 ((uint32_t)\ 440 ((((const uint8_t *)(p))[0] << 24) |\ 441 (((const uint8_t *)(p))[1] << 16) |\ 442 (((const uint8_t *)(p))[2] << 8) |\ 443 (((const uint8_t *)(p))[3]))) 444 445 /** 446 * enum ext_chan_offset: extension channel offset 447 * @WLAN_HTINFO_EXTOFFSET_NA: no extension channel is present 448 * @WLAN_HTINFO_EXTOFFSET_ABOVE: above control channel 449 * @WLAN_HTINFO_EXTOFFSET_UNDEF: undefined 450 * @WLAN_HTINFO_EXTOFFSET_BELOW: below control channel 451 */ 452 enum ext_chan_offset { 453 WLAN_HTINFO_EXTOFFSET_NA = 0, 454 WLAN_HTINFO_EXTOFFSET_ABOVE = 1, 455 WLAN_HTINFO_EXTOFFSET_UNDEF = 2, 456 WLAN_HTINFO_EXTOFFSET_BELOW = 3 457 }; 458 459 /** 460 * enum element_ie :- Management information element 461 * @WLAN_ELEMID_SSID: ssid IE 462 * @WLAN_ELEMID_RATES: Rates IE 463 * @WLAN_ELEMID_FHPARMS: FH param IE 464 * @WLAN_ELEMID_DSPARMS: DS Param IE 465 * @WLAN_ELEMID_CFPARMS : CF Param IE 466 * @WLAN_ELEMID_TIM: TIM IE 467 * @WLAN_ELEMID_IBSSPARMS: Ibss params IE 468 * @WLAN_ELEMID_COUNTRY: Country code IE 469 * @WLAN_ELEMID_REQINFO: Req Info IE 470 * @WLAN_ELEMID_QBSS_LOAD: Qbss load IE 471 * @WLAN_ELEMID_TCLAS: TCLAS IE 472 * @WLAN_ELEMID_CHALLENGE: Challenge IE 473 * @WLAN_ELEMID_PWRCNSTR: Power cn IE 474 * @WLAN_ELEMID_PWRCAP: power cap IE 475 * @WLAN_ELEMID_TPCREQ: TPC req IE 476 * @WLAN_ELEMID_TPCREP: TPC rsp IE 477 * @WLAN_ELEMID_SUPPCHAN: Supported channel IE 478 * @WLAN_ELEMID_CHANSWITCHANN: Channel switch IE 479 * @WLAN_ELEMID_MEASREQ: Measurement request IE 480 * @WLAN_ELEMID_MEASREP: Measurement Resp IE 481 * @WLAN_ELEMID_QUIET: Quiet IE 482 * @WLAN_ELEMID_IBSSDFS: IBSS DFS IE 483 * @WLAN_ELEMID_ERP: ERP IE 484 * @WLAN_ELEMID_TCLAS_PROCESS: TCLAS process IE 485 * @WLAN_ELEMID_HTCAP_ANA: HTT Capability IE 486 * @WLAN_ELEMID_RSN: RSN IE 487 * @WLAN_ELEMID_XRATES: Extended rate IE 488 * @WLAN_ELEMID_HTCAP_VENDOR: HT cap vendor IE 489 * @WLAN_ELEMID_HTINFO_VENDOR: HT info vendor IE 490 * @WLAN_ELEMID_MOBILITY_DOMAIN: MD IE 491 * @WLAN_ELEMID_FT: FT IE 492 * @WLAN_ELEMID_TIMEOUT_INTERVAL: Timeout interval IE 493 * @WLAN_ELEMID_SUPP_OP_CLASS: OP class IE 494 * @WLAN_ELEMID_EXTCHANSWITCHANN: Extended Channel switch IE 495 * @WLAN_ELEMID_HTINFO_ANA: HT info IE 496 * @WLAN_ELEMID_SECCHANOFFSET: Sec channel Offset IE 497 * @WLAN_ELEMID_WAPI: WAPI IE 498 * @WLAN_ELEMID_TIME_ADVERTISEMENT: Time IE 499 * @WLAN_ELEMID_RRM: Radio resource measurement IE 500 * @WLAN_ELEMID_MULTIPLE_BSSID: Multiple BSSID IE 501 * @WLAN_ELEMID_2040_COEXT: 20-40 COext ext IE 502 * @WLAN_ELEMID_2040_INTOL:20-40 INT OL IE 503 * @WLAN_ELEMID_OBSS_SCAN: OBSS scan IE 504 * @WLAN_ELEMID_MMIE: 802.11w Management MIC IE 505 * @WLAN_ELEMID_NONTX_BSSID_CAP: Nontransmitted BSSID Capability IE 506 * @WLAN_ELEMID_MULTI_BSSID_IDX: Multiple BSSID index 507 * @WLAN_ELEMID_FMS_DESCRIPTOR: 802.11v FMS descriptor IE 508 * @WLAN_ELEMID_FMS_REQUEST: 802.11v FMS request IE 509 * @WLAN_ELEMID_FMS_RESPONSE: 802.11v FMS response IE 510 * @WLAN_ELEMID_BSSMAX_IDLE_PERIOD = 90: BSS MAX IDLE PERIOD 511 * @WLAN_ELEMID_TFS_REQUEST: TFS req IE 512 * @WLAN_ELEMID_TFS_RESPONSE: TFS resp IE 513 * @WLAN_ELEMID_TIM_BCAST_REQUEST: TIM bcast req IE 514 * @WLAN_ELEMID_TIM_BCAST_RESPONSE: TIM bcast resp IE 515 * @WLAN_ELEMID_INTERWORKING: Interworking IE 516 * @WLAN_ELEMID_QOS_MAP: QOS MAP IE 517 * @WLAN_ELEMID_XCAPS: Extended capability IE 518 * @WLAN_ELEMID_TPC: TPC IE 519 * @WLAN_ELEMID_CCKM: CCKM IE 520 * @WLAN_ELEMID_VHTCAP: VHT Capabilities 521 * @WLAN_ELEMID_VHTOP: VHT Operation 522 * @WLAN_ELEMID_EXT_BSS_LOAD: Extended BSS Load 523 * @WLAN_ELEMID_WIDE_BAND_CHAN_SWITCH: Wide Band Channel Switch 524 * @WLAN_ELEMID_VHT_TX_PWR_ENVLP: VHT Transmit Power Envelope 525 * @WLAN_ELEMID_CHAN_SWITCH_WRAP: Channel Switch Wrapper 526 * @WLAN_ELEMID_AID: AID 527 * @WLAN_ELEMID_QUIET_CHANNEL: Quiet Channel 528 * @WLAN_ELEMID_OP_MODE_NOTIFY: Operating Mode Notification 529 * @WLAN_ELEMID_TWT: Target wake time IE 530 * @WLAN_ELEMID_VENDOR: vendor private 531 * @WLAN_ELEMID_FRAGMENT: Fragment 532 * @WLAN_ELEMID_EXTN_ELEM: extended IE 533 */ 534 enum element_ie { 535 WLAN_ELEMID_SSID = 0, 536 WLAN_ELEMID_RATES = 1, 537 WLAN_ELEMID_FHPARMS = 2, 538 WLAN_ELEMID_DSPARMS = 3, 539 WLAN_ELEMID_CFPARMS = 4, 540 WLAN_ELEMID_TIM = 5, 541 WLAN_ELEMID_IBSSPARMS = 6, 542 WLAN_ELEMID_COUNTRY = 7, 543 /* 8-9 reserved */ 544 WLAN_ELEMID_REQINFO = 10, 545 WLAN_ELEMID_QBSS_LOAD = 11, 546 WLAN_ELEMID_EDCAPARMS = 12, 547 WLAN_ELEMID_TCLAS = 14, 548 WLAN_ELEMID_CHALLENGE = 16, 549 /* 17-31 reserved for challenge text extension */ 550 WLAN_ELEMID_PWRCNSTR = 32, 551 WLAN_ELEMID_PWRCAP = 33, 552 WLAN_ELEMID_TPCREQ = 34, 553 WLAN_ELEMID_TPCREP = 35, 554 WLAN_ELEMID_SUPPCHAN = 36, 555 WLAN_ELEMID_CHANSWITCHANN = 37, 556 WLAN_ELEMID_MEASREQ = 38, 557 WLAN_ELEMID_MEASREP = 39, 558 WLAN_ELEMID_QUIET = 40, 559 WLAN_ELEMID_IBSSDFS = 41, 560 WLAN_ELEMID_ERP = 42, 561 WLAN_ELEMID_TCLAS_PROCESS = 44, 562 WLAN_ELEMID_HTCAP_ANA = 45, 563 WLAN_ELEMID_QOS_CAPABILITY = 46, 564 WLAN_ELEMID_RSN = 48, 565 WLAN_ELEMID_XRATES = 50, 566 WLAN_ELEMID_HTCAP_VENDOR = 51, 567 WLAN_ELEMID_HTINFO_VENDOR = 52, 568 WLAN_ELEMID_MOBILITY_DOMAIN = 54, 569 WLAN_ELEMID_FT = 55, 570 WLAN_ELEMID_TIMEOUT_INTERVAL = 56, 571 WLAN_ELEMID_SUPP_OP_CLASS = 59, 572 WLAN_ELEMID_EXTCHANSWITCHANN = 60, 573 WLAN_ELEMID_HTINFO_ANA = 61, 574 WLAN_ELEMID_SECCHANOFFSET = 62, 575 WLAN_ELEMID_WAPI = 68, 576 WLAN_ELEMID_TIME_ADVERTISEMENT = 69, 577 WLAN_ELEMID_RRM = 70, 578 WLAN_ELEMID_MULTIPLE_BSSID = 71, 579 WLAN_ELEMID_2040_COEXT = 72, 580 WLAN_ELEMID_2040_INTOL = 73, 581 WLAN_ELEMID_OBSS_SCAN = 74, 582 WLAN_ELEMID_MMIE = 76, 583 WLAN_ELEMID_NONTX_BSSID_CAP = 83, 584 WLAN_ELEMID_MULTI_BSSID_IDX = 85, 585 WLAN_ELEMID_FMS_DESCRIPTOR = 86, 586 WLAN_ELEMID_FMS_REQUEST = 87, 587 WLAN_ELEMID_FMS_RESPONSE = 88, 588 WLAN_ELEMID_BSSMAX_IDLE_PERIOD = 90, 589 WLAN_ELEMID_TFS_REQUEST = 91, 590 WLAN_ELEMID_TFS_RESPONSE = 92, 591 WLAN_ELEMID_TIM_BCAST_REQUEST = 94, 592 WLAN_ELEMID_TIM_BCAST_RESPONSE = 95, 593 WLAN_ELEMID_INTERWORKING = 107, 594 WLAN_ELEMID_QOS_MAP = 110, 595 WLAN_ELEMID_XCAPS = 127, 596 WLAN_ELEMID_TPC = 150, 597 WLAN_ELEMID_CCKM = 156, 598 WLAN_ELEMID_VHTCAP = 191, 599 WLAN_ELEMID_VHTOP = 192, 600 WLAN_ELEMID_EXT_BSS_LOAD = 193, 601 WLAN_ELEMID_WIDE_BAND_CHAN_SWITCH = 194, 602 WLAN_ELEMID_VHT_TX_PWR_ENVLP = 195, 603 WLAN_ELEMID_CHAN_SWITCH_WRAP = 196, 604 WLAN_ELEMID_AID = 197, 605 WLAN_ELEMID_QUIET_CHANNEL = 198, 606 WLAN_ELEMID_OP_MODE_NOTIFY = 199, 607 WLAN_ELEMID_REDUCED_NEIGHBOR_REPORT = 201, 608 WLAN_ELEMID_TWT = 216, 609 WLAN_ELEMID_VENDOR = 221, 610 WLAN_ELEMID_FILS_INDICATION = 240, 611 WLAN_ELEMID_FRAGMENT = 242, 612 WLAN_ELEMID_RSNXE = 244, 613 WLAN_ELEMID_EXTN_ELEM = 255, 614 }; 615 616 /** 617 * enum extn_element_ie :- extended management information element 618 * @WLAN_EXTN_ELEMID_HECAP: HE capabilities IE 619 * @WLAN_EXTN_ELEMID_HEOP: HE Operation IE 620 * @WLAN_EXTN_ELEMID_UORA: UL OFDMA-based random access Parameter Set element 621 * @WLAN_EXTN_ELEMID_MUEDCA: MU-EDCA IE 622 * @WLAN_EXTN_ELEMID_HE_6G_CAP: HE 6GHz Band Capabilities IE 623 * @WLAN_EXTN_ELEMID_SRP: spatial reuse parameter IE 624 * @WLAN_EXTN_ELEMID_BSS_COLOR_CHANGE_ANNOUNCE: BSS Color Change Announcement IE 625 * @WLAN_EXTN_ELEMID_MAX_CHAN_SWITCH_TIME: Maximum Channel Switch Time IE 626 * @WLAN_EXTN_ELEMID_NONINHERITANCE: Non inheritance IE 627 * @WLAN_EXTN_ELEMID_EHTOP: EHT Operation IE 628 * @WLAN_EXTN_ELEMID_MULTI_LINK: Multi-Link IE 629 * @WLAN_EXTN_ELEMID_EHTCAP: EHT Capabilities IE 630 * @WLAN_EXTN_ELEMID_T2LM: TID-to-link mapping IE 631 * @WLAN_EXTN_ELEMID_MULTI_LINK_TRAFFIC_IND: Multi-link Traffic Indication IE 632 */ 633 enum extn_element_ie { 634 WLAN_EXTN_ELEMID_HECAP = 35, 635 WLAN_EXTN_ELEMID_HEOP = 36, 636 WLAN_EXTN_ELEMID_UORA = 37, 637 WLAN_EXTN_ELEMID_MUEDCA = 38, 638 WLAN_EXTN_ELEMID_SRP = 39, 639 WLAN_EXTN_ELEMID_BSS_COLOR_CHANGE_ANNOUNCE = 42, 640 WLAN_EXTN_ELEMID_MAX_CHAN_SWITCH_TIME = 52, 641 WLAN_EXTN_ELEMID_NONINHERITANCE = 56, 642 WLAN_EXTN_ELEMID_HE_6G_CAP = 59, 643 WLAN_EXTN_ELEMID_ESP = 11, 644 #ifdef WLAN_FEATURE_11BE 645 WLAN_EXTN_ELEMID_EHTOP = 106, 646 #endif 647 #ifdef WLAN_FEATURE_11BE_MLO 648 WLAN_EXTN_ELEMID_MULTI_LINK = 107, 649 #endif 650 #ifdef WLAN_FEATURE_11BE 651 WLAN_EXTN_ELEMID_EHTCAP = 108, 652 #endif 653 WLAN_EXTN_ELEMID_T2LM = 109, 654 WLAN_EXTN_ELEMID_MULTI_LINK_TRAFFIC_IND = 110, 655 }; 656 657 /** 658 * enum wlan_reason_code - wlan reason codes Reason codes 659 * (IEEE Std 802.11-2016, 9.4.1.7, Table 9-45) 660 * @REASON_UNSPEC_FAILURE: Unspecified reason 661 * @REASON_PREV_AUTH_NOT_VALID: Previous authentication no longer valid 662 * @REASON_DEAUTH_NETWORK_LEAVING: Deauthenticated because sending station 663 * is leaving (or has left) IBSS or ESS 664 * @REASON_DISASSOC_DUE_TO_INACTIVITY: Disassociated due to inactivity 665 * @REASON_DISASSOC_AP_BUSY: Disassociated because AP is unable 666 * to handle all currently associated STAs 667 * @REASON_CLASS2_FRAME_FROM_NON_AUTH_STA: Class 2 frame received from 668 * nonauthenticated station 669 * @REASON_CLASS3_FRAME_FROM_NON_ASSOC_STA: Class 3 frame received from 670 * nonassociated station 671 * @REASON_DISASSOC_NETWORK_LEAVING: Disassociated because sending station 672 * is leaving (or has left) BSS 673 * @REASON_STA_NOT_AUTHENTICATED: Station requesting (re)association 674 * is not authenticated with responding station 675 * @REASON_BAD_PWR_CAPABILITY: Disassociated because the 676 * information in the Power Capability element is unacceptable 677 * @REASON_BAD_SUPPORTED_CHANNELS: Disassociated because the 678 * information in the Supported Channels element is unacceptable 679 * @REASON_DISASSOC_BSS_TRANSITION: Disassociated due to BSS transition 680 * management 681 * @REASON_INVALID_IE: Invalid element, i.e., an element defined in this 682 * standard for which the content does not meet the specifications in Clause 9 683 * @REASON_MIC_FAILURE: Message integrity code (MIC) failure 684 * @REASON_4WAY_HANDSHAKE_TIMEOUT: 4-Way Handshake timeout 685 * @REASON_GROUP_KEY_UPDATE_TIMEOUT: Group Key Handshake timeout 686 * @REASON_IN_4WAY_DIFFERS: Information element in 4-Way Handshake 687 * different from (Re)Association Request/Probe Response/Beacon frame 688 * @REASON_INVALID_GROUP_CIPHER: Invalid group cipher 689 * @REASON_INVALID_PAIRWISE_CIPHER: Invalid pairwise cipher 690 * @REASON_INVALID_AKMP: Invalid AKMP 691 * @REASON_UNSUPPORTED_RSNE_VER: Unsupported RSNE version 692 * @REASON_INVALID_RSNE_CAPABILITIES: Invalid RSNE capabilities 693 * @REASON_1X_AUTH_FAILURE: IEEE 802.1X authentication failed 694 * @REASON_CIPHER_SUITE_REJECTED: Cipher suite rejected because of the 695 * security policy 696 * @REASON_TDLS_PEER_UNREACHABLE: TDLS direct-link teardown due to TDLS 697 * peer STA unreachable via the TDLS direct link 698 * @REASON_TDLS_UNSPEC: TDLS direct-link teardown for unspecified 699 * reason 700 * @REASON_DISASSOC_SSP_REQUESTED: Disassociated because session terminated 701 * by SSP request 702 * @REASON_NO_SSP_ROAMING_AGREEMENT: Disassociated because of lack of SSP 703 * roaming agreement 704 * REASON_BAD_CIPHER_OR_AKM: Requested service rejected because of SSP 705 * cipher suite or AKM requirement 706 * @REASON_LOCATION_NOT_AUTHORIZED: Requested service not authorized in 707 * this location 708 * @REASON_SERVICE_CHANGE_PRECLUDES_TS: TS deleted because QoS AP 709 * lacks sufficient bandwidth for this QoS STA due to a change in BSS service 710 * characteristics or operational mode (e.g., an HT BSS change from 40 MHz 711 * channel to 20 MHz channel) 712 * @REASON_QOS_UNSPECIFIED: Disassociated for unspecified, QoS-related 713 * reason 714 * @REASON_NO_BANDWIDTH: Disassociated because QoS AP lacks sufficient 715 * bandwidth for this QoS STA 716 * @REASON_XS_UNACKED_FRAMES: Disassociated because excessive number of 717 * frames need to be acknowledged, but are not acknowledged due to AP 718 * transmissions and/or poor channel conditions 719 * @REASON_EXCEEDED_TXOP: Disassociated because STA is transmitting outside 720 * the limits of its TXOPs 721 * @REASON_STA_LEAVING: Requested from peer STA as the STA is leaving the 722 * BSS (or resetting) 723 * @REASON_END_TS_BA_DLS: Requesting STA is no longer using the stream 724 * or session 725 * @REASON_UNKNOWN_TS_BA: Requesting STA received frames using a 726 * mechanism for which setup has not been completed 727 * @REASON_TIMEDOUT: Requested from peer STA due to timeout 728 * @REASON_PEERKEY_MISMATCH: Peer STA does not support the requested 729 * cipher suite 730 * @REASON_AUTHORIZED_ACCESS_LIMIT_REACHED: Disassociated because 731 * authorized access limit reached 732 * @REASON_EXTERNAL_SERVICE_REQUIREMENTS: Disassociated due to external 733 * service requirements 734 * @REASON_INVALID_FT_ACTION_FRAME_COUNT: Invalid FT Action frame count 735 * @REASON_INVALID_PMKID: Invalid pairwise master key identifier (PMKID) 736 * @REASON_INVALID_MDE: Invalid MDE 737 * @REASON_INVALID_FTE: Invalid FTE 738 * @REASON_MESH_PEERING_CANCELLED: Mesh peering canceled for unknown 739 * reasons 740 * @REASON_MESH_MAX_PEERS: The mesh STA has reached the supported maximum 741 * number of peer mesh STAs 742 * @REASON_MESH_CONFIG_POLICY_VIOLATION: The received information violates 743 * the Mesh Configuration policy configured in the mesh STA profile 744 * @REASON_MESH_CLOSE_RCVD: The mesh STA has received a Mesh Peering Close 745 * frame requesting to close the mesh peering 746 * @REASON_MESH_MAX_RETRIES: The mesh STA has resent dot11MeshMaxRetries 747 * Mesh Peering Open frames, without receiving a Mesh Peering Confirm frame 748 * @REASON_MESH_CONFIRM_TIMEOUT: The confirmTimer for the mesh peering 749 * instance times out. 750 * @REASON_MESH_INVALID_GTK: The mesh STA fails to unwrap the GTK or 751 * the values in the wrapped contents do not match 752 * @REASON_MESH_INCONSISTENT_PARAMS: The mesh STA receives inconsistent 753 * information about the mesh parameters between mesh peering Management frames 754 * @REASON_MESH_INVALID_SECURITY_CAP: The mesh STA fails the authenticated 755 * mesh peering exchange because due to failure in selecting either the pairwise 756 * ciphersuite or group ciphersuite 757 * @REASON_MESH_PATH_ERROR_NO_PROXY_INFO: The mesh STA does not have proxy 758 * information for this external destination. 759 * @REASON_MESH_PATH_ERROR_NO_FORWARDING_INFO: The mesh STA does not have 760 * forwarding information for this destination. 761 * @REASON_MESH_PATH_ERROR_DEST_UNREACHABLE: The mesh STA determines that 762 * the link to the next hop of an active path in its forwarding information is 763 * no longer usable. 764 * @REASON_MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS: The Deauthentication frame 765 * was sent because the MAC address of the STA already exists in the mesh BSS 766 * @REASON_MESH_CHANNEL_SWITCH_REGULATORY_REQ: The mesh STA performs 767 * channel switch to meet regulatory requirements. 768 * @REASON_MESH_CHANNEL_SWITCH_UNSPECIFIED: The mesh STA performs channel 769 * switching with unspecified reason. 770 * @REASON_POOR_RSSI_CONDITIONS: Disassociated due to poor RSSI conditions 771 * 772 * 773 * Internal reason codes: Add any internal reason code just after 774 * REASON_PROP_START and decrease the value of REASON_PROP_START 775 * accordingly. 776 * 777 * @REASON_PROP_START: Start of prop reason code 778 * @REASON_OCI_MISMATCH: Reason OCI Mismatch happens 779 * @REASON_HOST_TRIGGERED_ROAM_FAILURE: Reason host triggered roam failed 780 * @REASON_FW_TRIGGERED_ROAM_FAILURE: Firmware triggered roam failed 781 * @REASON_GATEWAY_REACHABILITY_FAILURE: Due to NUD failure 782 * @REASON_UNSUPPORTED_CHANNEL_CSA: due to unsuppoerted channel in CSA 783 * @REASON_OPER_CHANNEL_DISABLED_INDOOR: as channel is disabled in indoor 784 * @REASON_OPER_CHANNEL_USER_DISABLED: due to channel disabled by user 785 * @REASON_DEVICE_RECOVERY: due to SSR 786 * @REASON_KEY_TIMEOUT: due to key Timeout 787 * @REASON_OPER_CHANNEL_BAND_CHANGE: due to change in BAND 788 * @REASON_IFACE_DOWN: as interface is going down 789 * @REASON_PEER_XRETRY_FAIL: due to sta kickout with reason no ACK 790 * @REASON_PEER_INACTIVITY: due to sta kickout with reason inactivity 791 * @REASON_SA_QUERY_TIMEOUT: due to sta kickout due to SA query timeout 792 * @REASON_CHANNEL_SWITCH_FAILED: as channel switch failed 793 * @REASON_BEACON_MISSED: due to beacon miss 794 * @REASON_USER_TRIGGERED_ROAM_FAILURE: Reason user triggered roam failed 795 * @REASON_HOST_TRIGGERED_SILENT_DEAUTH: deauth without sending deauth frame 796 */ 797 enum wlan_reason_code { 798 REASON_UNSPEC_FAILURE = 1, 799 REASON_PREV_AUTH_NOT_VALID = 2, 800 REASON_DEAUTH_NETWORK_LEAVING = 3, 801 REASON_DISASSOC_DUE_TO_INACTIVITY = 4, 802 REASON_DISASSOC_AP_BUSY = 5, 803 REASON_CLASS2_FRAME_FROM_NON_AUTH_STA = 6, 804 REASON_CLASS3_FRAME_FROM_NON_ASSOC_STA = 7, 805 REASON_DISASSOC_NETWORK_LEAVING = 8, 806 REASON_STA_NOT_AUTHENTICATED = 9, 807 REASON_BAD_PWR_CAPABILITY = 10, 808 REASON_BAD_SUPPORTED_CHANNELS = 11, 809 REASON_DISASSOC_BSS_TRANSITION = 12, 810 REASON_INVALID_IE = 13, 811 REASON_MIC_FAILURE = 14, 812 REASON_4WAY_HANDSHAKE_TIMEOUT = 15, 813 REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, 814 REASON_IN_4WAY_DIFFERS = 17, 815 REASON_INVALID_GROUP_CIPHER = 18, 816 REASON_INVALID_PAIRWISE_CIPHER = 19, 817 REASON_INVALID_AKMP = 20, 818 REASON_UNSUPPORTED_RSNE_VER = 21, 819 REASON_INVALID_RSNE_CAPABILITIES = 22, 820 REASON_1X_AUTH_FAILURE = 23, 821 REASON_CIPHER_SUITE_REJECTED = 24, 822 REASON_TDLS_PEER_UNREACHABLE = 25, 823 REASON_TDLS_UNSPEC = 26, 824 REASON_DISASSOC_SSP_REQUESTED = 27, 825 REASON_NO_SSP_ROAMING_AGREEMENT = 28, 826 REASON_BAD_CIPHER_OR_AKM = 29, 827 REASON_LOCATION_NOT_AUTHORIZED = 30, 828 REASON_SERVICE_CHANGE_PRECLUDES_TS = 31, 829 REASON_QOS_UNSPECIFIED = 32, 830 REASON_NO_BANDWIDTH = 33, 831 REASON_XS_UNACKED_FRAMES = 34, 832 REASON_EXCEEDED_TXOP = 35, 833 REASON_STA_LEAVING = 36, 834 REASON_END_TS_BA_DLS = 37, 835 REASON_UNKNOWN_TS_BA = 38, 836 REASON_TIMEDOUT = 39, 837 REASON_PEERKEY_MISMATCH = 45, 838 REASON_AUTHORIZED_ACCESS_LIMIT_REACHED = 46, 839 REASON_EXTERNAL_SERVICE_REQUIREMENTS = 47, 840 REASON_INVALID_FT_ACTION_FRAME_COUNT = 48, 841 REASON_INVALID_PMKID = 49, 842 REASON_INVALID_MDE = 50, 843 REASON_INVALID_FTE = 51, 844 REASON_MESH_PEERING_CANCELLED = 52, 845 REASON_MESH_MAX_PEERS = 53, 846 REASON_MESH_CONFIG_POLICY_VIOLATION = 54, 847 REASON_MESH_CLOSE_RCVD = 55, 848 REASON_MESH_MAX_RETRIES = 56, 849 REASON_MESH_CONFIRM_TIMEOUT = 57, 850 REASON_MESH_INVALID_GTK = 58, 851 REASON_MESH_INCONSISTENT_PARAMS = 59, 852 REASON_MESH_INVALID_SECURITY_CAP = 60, 853 REASON_MESH_PATH_ERROR_NO_PROXY_INFO = 61, 854 REASON_MESH_PATH_ERROR_NO_FORWARDING_INFO = 62, 855 REASON_MESH_PATH_ERROR_DEST_UNREACHABLE = 63, 856 REASON_MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS = 64, 857 REASON_MESH_CHANNEL_SWITCH_REGULATORY_REQ = 65, 858 REASON_MESH_CHANNEL_SWITCH_UNSPECIFIED = 66, 859 REASON_POOR_RSSI_CONDITIONS = 71, 860 /* 72–65535 reserved */ 861 862 /* Internal reason codes */ 863 864 /* 865 * Internal reason codes: Add any internal reason code just after 866 * REASON_PROP_START and decrease the value of REASON_PROP_START 867 * accordingly. 868 */ 869 REASON_PROP_START = 65517, 870 REASON_OCI_MISMATCH = 65518, 871 REASON_HOST_TRIGGERED_ROAM_FAILURE = 65519, 872 REASON_FW_TRIGGERED_ROAM_FAILURE = 65520, 873 REASON_GATEWAY_REACHABILITY_FAILURE = 65521, 874 REASON_UNSUPPORTED_CHANNEL_CSA = 65522, 875 REASON_OPER_CHANNEL_DISABLED_INDOOR = 65523, 876 REASON_OPER_CHANNEL_USER_DISABLED = 65524, 877 REASON_DEVICE_RECOVERY = 65525, 878 REASON_KEY_TIMEOUT = 65526, 879 REASON_OPER_CHANNEL_BAND_CHANGE = 65527, 880 REASON_IFACE_DOWN = 65528, 881 REASON_PEER_XRETRY_FAIL = 65529, 882 REASON_PEER_INACTIVITY = 65530, 883 REASON_SA_QUERY_TIMEOUT = 65531, 884 REASON_CHANNEL_SWITCH_FAILED = 65532, 885 REASON_BEACON_MISSED = 65533, 886 REASON_USER_TRIGGERED_ROAM_FAILURE = 65534, 887 REASON_HOST_TRIGGERED_SILENT_DEAUTH = 65535, 888 }; 889 890 /** 891 * enum wlan_status_code - wlan status codes 892 * (IEEE Std 802.11-2016, 9.4.1.9, Table 9-46) 893 * @STATUS_SUCCESS: Success full 894 * @STATUS_UNSPECIFIED_FAILURE: Unspecified failure. 895 * @STATUS_TDLS_WAKEUP_REJECT: TDLS wakeup schedule rejected but alternative 896 * schedule provided. 897 * @STATUS_SECURITY_DISABLED: Security disabled. 898 * @STATUS_UNACCEPTABLE_LIFETIME: Unacceptable lifetime. 899 * @STATUS_NOT_IN_SAME_BSS: Not in same BSS. 900 * @STATUS_CAPS_UNSUPPORTED: Cannot support all requested capabilities in the 901 * Capability Information field. 902 * @STATUS_REASSOC_NO_ASSOC: Reassociation denied due to inability to confirm 903 * that association exists. 904 * @STATUS_ASSOC_DENIED_UNSPEC: Association denied due to reason outside the 905 * scope of this standard. 906 * @STATUS_NOT_SUPPORTED_AUTH_ALG: Responding STA does not support the specified 907 * authentication algorithm. 908 * @STATUS_UNKNOWN_AUTH_TRANSACTION: Received an Authentication frame with 909 * authentication transaction sequence number out of expected sequence. 910 * @STATUS_CHALLENGE_FAIL: Authentication rejected because of challenge failure. 911 * @STATUS_AUTH_TIMEOUT: Authentication rejected due to timeout waiting for next 912 * frame in sequence. 913 * @STATUS_AP_UNABLE_TO_HANDLE_NEW_STA: Association denied because AP is unable 914 * to handle additional associated STAs. 915 * @STATUS_ASSOC_DENIED_RATES: Association denied due to requesting STA not 916 * supporting all of the data rates in the BSSBasicRateSet parameter, 917 * the Basic HT-MCS Set field of the HT Operation parameter, or the Basic 918 * VHT-MCS and NSS Set field in the VHT Operation parameter. 919 * @STATUS_ASSOC_DENIED_NOSHORT: Association denied due to requesting 920 * STA not supporting the short preamble option. 921 * @STATUS_SPEC_MGMT_REQUIRED: Association request rejected because Spectrum 922 * Management capability is required. 923 * @STATUS_PWR_CAPABILITY_NOT_VALID: Association request rejected because the 924 * information in the Power Capability element is unacceptable. 925 * @STATUS_SUPPORTED_CHANNEL_NOT_VALID: Association request rejected because 926 * the information in the Supported Channels element is unacceptable. 927 * @STATUS_ASSOC_DENIED_NO_SHORT_SLOT_TIME: Association denied due to requesting 928 * STA not supporting the Short Slot Time option. 929 * @STATUS_ASSOC_DENIED_NO_HT: Association denied because the requesting STA 930 * does not support HT features. 931 * @STATUS_R0KH_UNREACHABLE: R0KH unreachable. 932 * @STATUS_ASSOC_DENIED_NO_PCO: Association denied because the requesting STA 933 * does not support the phased coexistence operation (PCO) transition time 934 * required by the AP. 935 * @STATUS_ASSOC_REJECTED_TEMPORARILY: Association request rejected temporarily, 936 * try again later. 937 * @STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION: Robust management frame policy 938 * violation. 939 * @STATUS_UNSPECIFIED_QOS_FAILURE: Unspecified, QoS-related failure. 940 * @STATUS_DENIED_INSUFFICIENT_BANDWIDTH: Association denied because QoS AP or 941 * PCP has insufficient bandwidth to handle another QoS STA. 942 * @STATUS_DENIED_POOR_CHANNEL_CONDITIONS: Association denied due to excessive 943 * frame loss rates and/or poor conditions on current operating channel. 944 * @STATUS_DENIED_QOS_NOT_SUPPORTED: Association (with QoS BSS) denied because 945 * the requesting STA does not support the QoS facility. 946 * @STATUS_REQUEST_DECLINED: The request has been declined. 947 * @STATUS_INVALID_PARAMETERS: The request has not been successful as one 948 * or more parameters have invalid values. 949 * @STATUS_REJECTED_WITH_SUGGESTED_CHANGES: The allocation or TS has not been 950 * created because the request cannot be honored; however, a suggested TSPEC/DMG 951 * TSPEC is provided so that the initiating STA can attempt to set another 952 * allocation or TS with the suggested changes to the TSPEC/DMG TSPEC 953 * @STATUS_INVALID_IE: Invalid element, i.e., an element defined in this 954 * standard for which the content does not meet the specifications in Clause 9. 955 * @STATUS_GROUP_CIPHER_NOT_VALID: Invalid group cipher. 956 * @STATUS_PAIRWISE_CIPHER_NOT_VALID: Invalid pairwise cipher. 957 * @STATUS_AKMP_NOT_VALID: Invalid AKMP. 958 * @STATUS_UNSUPPORTED_RSN_IE_VERSION: Unsupported RSNE version. 959 * @STATUS_INVALID_RSN_IE_CAPAB: Invalid RSNE capabilities. 960 * @STATUS_CIPHER_REJECTED_PER_POLICY: Cipher suite rejected because of security 961 * policy. 962 * @STATUS_TS_NOT_CREATED: The TS or allocation has not been created; however, 963 * the HC or PCP might be capable of creating a TS or allocation, in response to 964 * a request, after the time indicated in the TS Delay element. 965 * @STATUS_DIRECT_LINK_NOT_ALLOWED: Direct link is not allowed in the BSS by 966 * policy. 967 * @STATUS_DEST_STA_NOT_PRESENT: The Destination STA is not present within this 968 * BSS. 969 * @STATUS_DEST_STA_NOT_QOS_STA: The Destination STA is not a QoS STA. 970 * @STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE: Association denied because the 971 * listen interval is too large. 972 * @STATUS_INVALID_FT_ACTION_FRAME_COUNT: Invalid FT Action frame count. 973 * @STATUS_INVALID_PMKID: Invalid pairwise master key identifier (PMKID). 974 * 975 * Internal status codes: Add any internal status code just after 976 * STATUS_PROP_START and decrease the value of STATUS_PROP_START 977 * accordingly. 978 * 979 * @STATUS_PROP_START: Start of prop status codes. 980 * @STATUS_NO_NETWORK_FOUND: No network found 981 * @STATUS_AUTH_TX_FAIL: Failed to sent AUTH on air 982 * @STATUS_AUTH_NO_ACK_RECEIVED: No ack received for Auth tx 983 * @STATUS_AUTH_NO_RESP_RECEIVED: No Auth response for Auth tx 984 * @STATUS_ASSOC_TX_FAIL: Failed to sent Assoc on air 985 * @STATUS_ASSOC_NO_ACK_RECEIVED: No ack received for Assoc tx 986 * @STATUS_ASSOC_NO_RESP_RECEIVED: No Assoc response for Assoc tx 987 */ 988 enum wlan_status_code { 989 STATUS_SUCCESS = 0, 990 STATUS_UNSPECIFIED_FAILURE = 1, 991 STATUS_TDLS_WAKEUP_REJECT = 3, 992 STATUS_SECURITY_DISABLED = 5, 993 STATUS_UNACCEPTABLE_LIFETIME = 6, 994 STATUS_NOT_IN_SAME_BSS = 7, 995 STATUS_CAPS_UNSUPPORTED = 10, 996 STATUS_REASSOC_NO_ASSOC = 11, 997 STATUS_ASSOC_DENIED_UNSPEC = 12, 998 STATUS_NOT_SUPPORTED_AUTH_ALG = 13, 999 STATUS_UNKNOWN_AUTH_TRANSACTION = 14, 1000 STATUS_CHALLENGE_FAIL = 15, 1001 STATUS_AUTH_TIMEOUT = 16, 1002 STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17, 1003 STATUS_ASSOC_DENIED_RATES = 18, 1004 STATUS_ASSOC_DENIED_NOSHORT = 19, 1005 STATUS_SPEC_MGMT_REQUIRED = 22, 1006 STATUS_PWR_CAPABILITY_NOT_VALID = 23, 1007 STATUS_SUPPORTED_CHANNEL_NOT_VALID = 24, 1008 STATUS_ASSOC_DENIED_NO_SHORT_SLOT_TIME = 25, 1009 STATUS_ASSOC_DENIED_NO_HT = 27, 1010 STATUS_R0KH_UNREACHABLE = 28, 1011 STATUS_ASSOC_DENIED_NO_PCO = 29, 1012 STATUS_ASSOC_REJECTED_TEMPORARILY = 30, 1013 STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION = 31, 1014 STATUS_UNSPECIFIED_QOS_FAILURE = 32, 1015 STATUS_DENIED_INSUFFICIENT_BANDWIDTH = 33, 1016 STATUS_DENIED_POOR_CHANNEL_CONDITIONS = 34, 1017 STATUS_DENIED_QOS_NOT_SUPPORTED = 35, 1018 STATUS_REQUEST_DECLINED = 37, 1019 STATUS_INVALID_PARAMETERS = 38, 1020 STATUS_REJECTED_WITH_SUGGESTED_CHANGES = 39, 1021 STATUS_INVALID_IE = 40, 1022 STATUS_GROUP_CIPHER_NOT_VALID = 41, 1023 STATUS_PAIRWISE_CIPHER_NOT_VALID = 42, 1024 STATUS_AKMP_NOT_VALID = 43, 1025 STATUS_UNSUPPORTED_RSN_IE_VERSION = 44, 1026 STATUS_INVALID_RSN_IE_CAPAB = 45, 1027 STATUS_CIPHER_REJECTED_PER_POLICY = 46, 1028 STATUS_TS_NOT_CREATED = 47, 1029 STATUS_DIRECT_LINK_NOT_ALLOWED = 48, 1030 STATUS_DEST_STA_NOT_PRESENT = 49, 1031 STATUS_DEST_STA_NOT_QOS_STA = 50, 1032 STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE = 51, 1033 STATUS_INVALID_FT_ACTION_FRAME_COUNT = 52, 1034 STATUS_INVALID_PMKID = 53, 1035 1036 /* Error STATUS code for intenal usage*/ 1037 STATUS_PROP_START = 65528, 1038 STATUS_NO_NETWORK_FOUND = 65528, 1039 STATUS_AUTH_TX_FAIL = 65529, 1040 STATUS_AUTH_NO_ACK_RECEIVED = 65530, 1041 STATUS_AUTH_NO_RESP_RECEIVED = 65531, 1042 STATUS_ASSOC_TX_FAIL = 65532, 1043 STATUS_ASSOC_NO_ACK_RECEIVED = 65533, 1044 STATUS_ASSOC_NO_RESP_RECEIVED = 65534, 1045 }; 1046 1047 #define WLAN_OUI_SIZE 4 1048 #define WLAN_MAX_CIPHER 6 1049 #define WLAN_RSN_SELECTOR_LEN 4 1050 #define WLAN_WPA_SELECTOR_LEN 4 1051 #define PMKID_LEN 16 1052 #define MAX_PMK_LEN 64 1053 #define MAX_PMKID 4 1054 #define MAX_KEK_LENGTH 64 1055 #define MAX_KCK_LEN 32 1056 #define REPLAY_CTR_LEN 8 1057 #define KCK_KEY_LEN 16 1058 #define KEK_KEY_LEN 16 1059 #define KCK_192BIT_KEY_LEN 24 1060 #define KEK_256BIT_KEY_LEN 32 1061 1062 #define WLAN_MAX_SECURE_LTF_KEYSEED_LEN 48 1063 #define WLAN_MIN_SECURE_LTF_KEYSEED_LEN 32 1064 1065 #define WLAN_WPA_OUI 0xf25000 1066 #define WLAN_WPA_OUI_TYPE 0x01 1067 #define WPA_VERSION 1 1068 #define WLAN_WPA_SEL(x) (((x) << 24) | WLAN_WPA_OUI) 1069 1070 #define WLAN_RSN_OUI 0xac0f00 1071 #define WLAN_CCKM_OUI 0x964000 1072 #define WLAN_CCKM_ASE_UNSPEC 0 1073 #define WLAN_WPA_CCKM_AKM 0x00964000 1074 #define WLAN_RSN_CCKM_AKM 0x00964000 1075 #define WLAN_RSN_DPP_AKM 0x029A6F50 1076 #define WLAN_RSN_OSEN_AKM 0x019A6F50 1077 1078 #define RSN_VERSION 1 1079 #define WLAN_RSN_SEL(x) (((x) << 24) | WLAN_RSN_OUI) 1080 #define WLAN_CCKM_SEL(x) (((x) << 24) | WLAN_CCKM_OUI) 1081 1082 #define WLAN_CSE_NONE 0x00 1083 #define WLAN_CSE_WEP40 0x01 1084 #define WLAN_CSE_TKIP 0x02 1085 #define WLAN_CSE_RESERVED 0x03 1086 #define WLAN_CSE_CCMP 0x04 1087 #define WLAN_CSE_WEP104 0x05 1088 #define WLAN_CSE_AES_CMAC 0x06 1089 #define WLAN_CSE_GCMP_128 0x08 1090 #define WLAN_CSE_GCMP_256 0x09 1091 #define WLAN_CSE_CCMP_256 0x0A 1092 #define WLAN_CSE_BIP_GMAC_128 0x0B 1093 #define WLAN_CSE_BIP_GMAC_256 0x0C 1094 #define WLAN_CSE_BIP_CMAC_256 0x0D 1095 1096 #define WLAN_AKM_IEEE8021X 0x01 1097 #define WLAN_AKM_PSK 0x02 1098 #define WLAN_AKM_FT_IEEE8021X 0x03 1099 #define WLAN_AKM_FT_PSK 0x04 1100 #define WLAN_AKM_SHA256_IEEE8021X 0x05 1101 #define WLAN_AKM_SHA256_PSK 0x06 1102 #define WLAN_AKM_SAE 0x08 1103 #define WLAN_AKM_FT_SAE 0x09 1104 #define WLAN_AKM_SUITEB_EAP_SHA256 0x0B 1105 #define WLAN_AKM_SUITEB_EAP_SHA384 0x0C 1106 #define WLAN_AKM_FT_SUITEB_EAP_SHA384 0x0D 1107 #define WLAN_AKM_FILS_SHA256 0x0E 1108 #define WLAN_AKM_FILS_SHA384 0x0F 1109 #define WLAN_AKM_FILS_FT_SHA256 0x10 1110 #define WLAN_AKM_FILS_FT_SHA384 0x11 1111 #define WLAN_AKM_OWE 0x12 1112 1113 #define WLAN_ASE_NONE 0x00 1114 #define WLAN_ASE_8021X_UNSPEC 0x01 1115 #define WLAN_ASE_8021X_PSK 0x02 1116 #define WLAN_ASE_FT_IEEE8021X 0x20 1117 #define WLAN_ASE_FT_PSK 0x40 1118 #define WLAN_ASE_SHA256_IEEE8021X 0x80 1119 #define WLAN_ASE_SHA256_PSK 0x100 1120 #define WLAN_ASE_WPS 0x200 1121 1122 #define RSN_CAP_MFP_CAPABLE 0x80 1123 #define RSN_CAP_MFP_REQUIRED 0x40 1124 1125 /* FILS Discovery */ 1126 #define WLAN_ACTION_FILS_DISCOVERY 34 1127 #define WLAN_FD_FRAMECNTL_CAP 0x0020 1128 #define WLAN_FD_FRAMECNTL_SHORTSSID 0x0040 1129 #define WLAN_FD_FRAMECNTL_CH_CENTERFREQ 0x0200 1130 #define WLAN_FD_FRAMECNTL_LEN_PRES 0x1000 1131 #define WLAN_FD_FRAMECNTL_SHORTSSID_LEN 0x0003 1132 1133 #define WLAN_FD_SSID_LEN_PRES(_v) ((_v) & 0x1F) 1134 #define WLAN_FD_IS_CAP_PRESENT(_v) ((_v) & WLAN_FD_FRAMECNTL_CAP) 1135 #define WLAN_FD_IS_LEN_PRESENT(_v) ((_v) & WLAN_FD_FRAMECNTL_LEN_PRES) 1136 #define WLAN_FD_IS_FRAMECNTL_CH_CENTERFREQ(_v)\ 1137 ((_v) & WLAN_FD_FRAMECNTL_CH_CENTERFREQ) 1138 1139 #define WLAN_FD_CAP_LEN 2 1140 #define WLAN_FD_CAP_ESS_S 0 1141 #define WLAN_FD_CAP_PRIVACY_S 1 1142 #define WLAN_FD_CAP_BSS_CHWIDTH_S 2 1143 #define WLAN_FD_CAP_NSS_S 5 1144 #define WLAN_FD_CAP_PHY_INDEX_S 2 1145 #define WLAN_FD_CAP_MIN_RATE_S 5 1146 1147 #define WLAN_FD_CHWIDTH_20 0 1148 #define WLAN_FD_CHWIDTH_40 1 1149 #define WLAN_FD_CHWIDTH_80 2 1150 #define WLAN_FD_CHWIDTH_160_80_80 3 1151 #define WLAN_FD_CHWIDTH_320 4 1152 1153 #define WLAN_FD_CAP_NSS_GTE_5 4 1154 #define WLAN_FD_CAP_NSS_MODE_1 1 1155 #define WLAN_FD_CAP_NSS_MODE_2 2 1156 #define WLAN_FD_CAP_NSS_MODE_3 3 1157 #define WLAN_FD_CAP_NSS_MODE_4 4 1158 #define WLAN_FD_CAP_NSS_MODE_5 5 1159 #define WLAN_FD_CAP_NSS_MODE_6 6 1160 #define WLAN_FD_CAP_NSS_MODE_7 7 1161 #define WLAN_FD_CAP_NSS_MODE_8 8 1162 1163 #define WLAN_FD_CAP_ESS_ENABLE 1 1164 1165 #define WLAN_FD_CAP_PHY_INDEX_NON_HT_OFDM 1 1166 #define WLAN_FD_CAP_PHY_INDEX_HT 2 1167 #define WLAN_FD_CAP_PHY_INDEX_VHT 3 1168 #define WLAN_FD_CAP_PHY_INDEX_HE 4 1169 #ifdef WLAN_FEATURE_11BE 1170 #define WLAN_FD_CAP_PHY_INDEX_EHT 5 1171 #endif /* WLAN_FEATURE_11BE */ 1172 1173 #define WLAN_FD_CAP_MIN_RATE 0 1174 1175 /** 1176 * struct element_info - defines length of a memory block and memory block 1177 * @len: length of memory block 1178 * @ptr: memory block pointer 1179 */ 1180 struct element_info { 1181 uint32_t len; 1182 uint8_t *ptr; 1183 }; 1184 1185 /** 1186 * struct wlan_rsn_ie_hdr: rsn ie header 1187 * @elem_id: RSN element id WLAN_ELEMID_RSN. 1188 * @len: rsn ie length 1189 * @version: RSN ver 1190 */ 1191 struct wlan_rsn_ie_hdr { 1192 u8 elem_id; 1193 u8 len; 1194 u8 version[2]; 1195 }; 1196 1197 #define WLAN_RSN_IE_MIN_LEN 2 1198 #define WLAN_WAPI_IE_MIN_LEN 20 1199 1200 /** 1201 * struct wlan_wpa_ie_hdr: wpa ie header 1202 * @elem_id: Wpa element id, vendor specific. 1203 * @len: wpa ie length 1204 * @oui: 24-bit OUI followed by 8-bit OUI type 1205 * @version: wpa ver 1206 */ 1207 struct wlan_wpa_ie_hdr { 1208 u8 elem_id; 1209 u8 len; 1210 u8 oui[4]; 1211 u8 version[2]; 1212 }; 1213 1214 #define WAPI_VERSION 1 1215 #define WLAN_WAPI_OUI 0x721400 1216 1217 #define WLAN_WAPI_SEL(x) (((x) << 24) | WLAN_WAPI_OUI) 1218 1219 #define WLAN_WAI_CERT_OR_SMS4 0x01 1220 #define WLAN_WAI_PSK 0x02 1221 1222 /** 1223 * struct wlan_frame_hdr: generic IEEE 802.11 frames 1224 * @i_fc: frame control 1225 * @i_dur: duration field 1226 * @i_addr1: mac address 1 1227 * @i_addr2: mac address 2 1228 * @i_addr3: mac address 3 1229 * @i_seq: seq info 1230 */ 1231 struct wlan_frame_hdr { 1232 uint8_t i_fc[2]; 1233 uint8_t i_dur[2]; 1234 union { 1235 struct { 1236 uint8_t i_addr1[QDF_MAC_ADDR_SIZE]; 1237 uint8_t i_addr2[QDF_MAC_ADDR_SIZE]; 1238 uint8_t i_addr3[QDF_MAC_ADDR_SIZE]; 1239 }; 1240 uint8_t i_addr_all[3 * QDF_MAC_ADDR_SIZE]; 1241 }; 1242 uint8_t i_seq[2]; 1243 } qdf_packed; 1244 1245 struct wlan_frame_hdr_qos { 1246 uint8_t i_fc[2]; 1247 uint8_t i_dur[2]; 1248 union { 1249 struct { 1250 uint8_t i_addr1[QDF_MAC_ADDR_SIZE]; 1251 uint8_t i_addr2[QDF_MAC_ADDR_SIZE]; 1252 uint8_t i_addr3[QDF_MAC_ADDR_SIZE]; 1253 }; 1254 uint8_t i_addr_all[3 * QDF_MAC_ADDR_SIZE]; 1255 }; 1256 uint8_t i_seq[2]; 1257 uint8_t i_qos[2]; 1258 } qdf_packed; 1259 1260 struct wlan_frame_hdr_qos_addr4 { 1261 uint8_t i_fc[2]; 1262 uint8_t i_dur[2]; 1263 union { 1264 struct { 1265 uint8_t i_addr1[QDF_MAC_ADDR_SIZE]; 1266 uint8_t i_addr2[QDF_MAC_ADDR_SIZE]; 1267 uint8_t i_addr3[QDF_MAC_ADDR_SIZE]; 1268 }; 1269 uint8_t i_addr_all[3 * QDF_MAC_ADDR_SIZE]; 1270 }; 1271 uint8_t i_seq[2]; 1272 uint8_t i_addr4[QDF_MAC_ADDR_SIZE]; 1273 uint8_t i_qos[2]; 1274 } qdf_packed; 1275 1276 /* sequence number offset base on begin of mac header */ 1277 #define WLAN_SEQ_CTL_OFFSET 22 1278 #define WLAN_LOW_SEQ_NUM_MASK 0x000F 1279 #define WLAN_HIGH_SEQ_NUM_MASK 0x0FF0 1280 #define WLAN_HIGH_SEQ_NUM_OFFSET 4 1281 1282 /** 1283 * struct wlan_seq_ctl: sequence number control 1284 * @frag_num: frag number 1285 * @seq_num_lo: sequence number low byte 1286 * @seq_num_hi: sequence number high byte 1287 */ 1288 struct wlan_seq_ctl { 1289 uint8_t frag_num:4; 1290 uint8_t seq_num_lo:4; 1291 uint8_t seq_num_hi:8; 1292 } qdf_packed; 1293 1294 /** 1295 * union wlan_capability : wlan_capability info 1296 * @value: capability value 1297 */ 1298 union wlan_capability { 1299 struct caps { 1300 uint16_t ess:1; 1301 uint16_t ibss:1; 1302 uint16_t cf_pollable:1; 1303 uint16_t cf_poll_request:1; 1304 uint16_t privacy:1; 1305 uint16_t short_preamble:1; 1306 uint16_t pbcc:1; 1307 uint16_t channel_agility:1; 1308 uint16_t spectrum_management:1; 1309 uint16_t qos:1; 1310 uint16_t short_slot_time:1; 1311 uint16_t apsd:1; 1312 uint16_t reserved2:1; 1313 uint16_t dsss_ofdm:1; 1314 uint16_t del_block_ack:1; 1315 uint16_t immed_block_ack:1; 1316 } wlan_caps; 1317 uint16_t value; 1318 } qdf_packed; 1319 1320 /** 1321 * struct ie_header : IE header 1322 * @ie_id: Element Id 1323 * @ie_len: IE Length 1324 */ 1325 struct ie_header { 1326 uint8_t ie_id; 1327 uint8_t ie_len; 1328 } qdf_packed; 1329 1330 /** 1331 * struct extn_ie_header : Extension IE header 1332 * @ie_id: Element Id 1333 * @ie_len: IE Length 1334 * @ie_extn_id: extension id 1335 */ 1336 struct extn_ie_header { 1337 uint8_t ie_id; 1338 uint8_t ie_len; 1339 uint8_t ie_extn_id; 1340 } qdf_packed; 1341 1342 1343 /** 1344 * struct ie_ssid : ssid IE 1345 * @ssid_id: SSID Element Id 1346 * @ssid_len: SSID IE Length 1347 * @ssid: ssid value 1348 */ 1349 struct ie_ssid { 1350 uint8_t ssid_id; 1351 uint8_t ssid_len; 1352 uint8_t ssid[WLAN_SSID_MAX_LEN]; 1353 } qdf_packed; 1354 1355 /** 1356 * struct ds_ie : ds IE 1357 * @ie: DS Element Id 1358 * @len: DS IE Length 1359 * @cur_chan: channel info 1360 */ 1361 struct ds_ie { 1362 uint8_t ie; 1363 uint8_t len; 1364 uint8_t cur_chan; 1365 } qdf_packed; 1366 1367 /** 1368 * struct erp_ie: ERP IE 1369 * @ie: ERP Element Id 1370 * @len: ERP IE Length 1371 * @value: EP Info 1372 */ 1373 struct erp_ie { 1374 uint8_t ie; 1375 uint8_t len; 1376 uint8_t value; 1377 } qdf_packed; 1378 1379 /** 1380 * struct htcap_cmn_ie: HT common IE info 1381 * @hc_cap: HT capabilities 1382 * @ampdu_param: ampdu params 1383 * @mcsset: supported MCS set 1384 * @extcap: extended HT capabilities 1385 * @txbf_cap: txbf capabilities 1386 * @antenna: antenna capabilities 1387 */ 1388 struct htcap_cmn_ie { 1389 uint16_t hc_cap; 1390 uint8_t ampdu_param; 1391 uint8_t mcsset[16]; 1392 uint16_t extcap; 1393 uint32_t txbf_cap; 1394 uint8_t antenna; 1395 } qdf_packed; 1396 1397 /** 1398 * struct htcap_ie: HT Capability IE 1399 * @id: HT IE 1400 * @len: HT IE LEN 1401 * @ie: HT cap info 1402 */ 1403 struct htcap_ie { 1404 uint8_t id; 1405 uint8_t len; 1406 struct htcap_cmn_ie ie; 1407 } qdf_packed; 1408 1409 /** 1410 * struct fils_indication_ie: FILS indication IE element 1411 * @id: id 1412 * @len: len 1413 * @public_key_identifiers_cnt: public key identifiers count 1414 * @realm_identifiers_cnt: realm identifiers count 1415 * @is_ip_config_supported: whether ip config is supported in AP 1416 * @is_cache_id_present: whether cache identifier is present 1417 * @is_hessid_present: whether hessid is present 1418 * @is_fils_sk_auth_supported: FILS shared key authentication is supported 1419 * @is_fils_sk_auth_pfs_supported: FILS shared key auth with PFS is supported 1420 * @is_pk_auth_supported: FILS public key authentication is supported 1421 * @reserved: reserved 1422 * @variable_data: pointer to data depends on initial variables 1423 */ 1424 struct fils_indication_ie { 1425 uint8_t id; 1426 uint8_t len; 1427 uint16_t public_key_identifiers_cnt:3; 1428 uint16_t realm_identifiers_cnt:3; 1429 uint16_t is_ip_config_supported:1; 1430 uint16_t is_cache_id_present:1; 1431 uint16_t is_hessid_present:1; 1432 uint16_t is_fils_sk_auth_supported:1; 1433 uint16_t is_fils_sk_auth_pfs_supported:1; 1434 uint16_t is_pk_auth_supported:1; 1435 uint16_t reserved:4; 1436 uint8_t variable_data[253]; 1437 } qdf_packed; 1438 1439 #define WLAN_VENDOR_HT_IE_OFFSET_LEN 4 1440 1441 /** 1442 * struct wlan_vendor_ie_htcap: vendor private HT Capability IE 1443 * @id: HT IE 1444 * @hlen: HT IE len 1445 * @oui: vendor OUI 1446 * @oui_type: Oui type 1447 * @ie: HT cap info 1448 */ 1449 struct wlan_vendor_ie_htcap { 1450 uint8_t id; 1451 uint8_t hlen; 1452 uint8_t oui[3]; 1453 uint8_t oui_type; 1454 struct htcap_cmn_ie ie; 1455 } qdf_packed; 1456 1457 /** 1458 * struct wlan_ie_htinfo_cmn: ht info command 1459 * @hi_ctrlchannel: control channel 1460 * @hi_extchoff: B0-1 extension channel offset 1461 * @hi_txchwidth: B2 recommended xmiss width set 1462 * @hi_rifsmode: rifs mode 1463 * @hi_ctrlaccess: controlled access only 1464 * @hi_serviceinterval: B5-7 svc interval granularity 1465 * @uhi_opmode: B0-1 operating mode 1466 * @hi_nongfpresent: B2 non greenfield devices present 1467 * @hi_txburstlimit: B3 transmit burst limit 1468 * @hi_obssnonhtpresent: B4 OBSS non-HT STA present 1469 * @hi_reserved0: B5-15 reserved 1470 * @hi_reserved2: B0-5 reserved 1471 * @hi_dualbeacon: B6 dual beacon 1472 * @hi_dualctsprot: B7 dual CTS protection 1473 * @hi_stbcbeacon: B8 STBC beacon 1474 * @hi_lsigtxopprot: B9 l-sig txop protection full support 1475 * @hi_pcoactive: B10 pco active 1476 * @hi_pcophase: B11 pco phase 1477 * @hi_reserved1: B12-15 reserved 1478 * @hi_basicmcsset[16]: basic MCS set 1479 */ 1480 struct wlan_ie_htinfo_cmn { 1481 uint8_t hi_ctrlchannel; 1482 uint8_t hi_extchoff:2, 1483 hi_txchwidth:1, 1484 hi_rifsmode:1, 1485 hi_ctrlaccess:1, 1486 hi_serviceinterval:3; 1487 uint16_t hi_opmode:2, 1488 hi_nongfpresent:1, 1489 hi_txburstlimit:1, 1490 hi_obssnonhtpresent:1, 1491 hi_reserved0:11; 1492 uint16_t hi_reserved2:6, 1493 hi_dualbeacon:1, 1494 hi_dualctsprot:1, 1495 hi_stbcbeacon:1, 1496 hi_lsigtxopprot:1, 1497 hi_pcoactive:1, 1498 hi_pcophase:1, 1499 hi_reserved1:4; 1500 uint8_t hi_basicmcsset[16]; 1501 } qdf_packed; 1502 1503 /** 1504 * struct wlan_ie_htinfo: HT info IE 1505 * @hi_id: HT info IE 1506 * @hi_len: HT info IE len 1507 * @hi_ie: HT info info 1508 */ 1509 struct wlan_ie_htinfo { 1510 uint8_t hi_id; 1511 uint8_t hi_len; 1512 struct wlan_ie_htinfo_cmn hi_ie; 1513 } qdf_packed; 1514 1515 /** 1516 * struct wlan_ie_htinfo: vendor private HT info IE 1517 * @hi_id: HT info IE 1518 * @hi_len: HT info IE len 1519 * @hi_oui: vendor OUI 1520 * @hi_ouitype: Oui type 1521 * @hi_ie: HT info info 1522 */ 1523 struct wlan_vendor_ie_htinfo { 1524 uint8_t hi_id; 1525 uint8_t hi_len; 1526 uint8_t hi_oui[3]; 1527 uint8_t hi_ouitype; 1528 struct wlan_ie_htinfo_cmn hi_ie; 1529 } qdf_packed; 1530 1531 #define WLAN_VENDOR_VHTCAP_IE_OFFSET 7 1532 #define WLAN_VENDOR_VHTOP_IE_OFFSET 21 1533 1534 /** 1535 * struct wlan_ie_vhtcaps - VHT capabilities 1536 * @elem_id: VHT caps IE 1537 * @elem_len: VHT caps IE len 1538 * @max_mpdu_len: MPDU length 1539 * @supported_channel_widthset: channel width set 1540 * @ldpc_coding: LDPC coding capability 1541 * @shortgi80: short GI 80 support 1542 * @shortgi160and80plus80: short Gi 160 & 80+80 support 1543 * @tx_stbc; Tx STBC cap 1544 * @tx_stbc: Rx STBC cap 1545 * @su_beam_former: SU beam former cap 1546 * @su_beam_formee: SU beam formee cap 1547 * @csnof_beamformer_antSup: Antenna support for beamforming 1548 * @num_soundingdim: Sound dimensions 1549 * @mu_beam_former: MU beam former cap 1550 * @mu_beam_formee: MU beam formee cap 1551 * @vht_txops: TXOP power save 1552 * @htc_vhtcap: HTC VHT capability 1553 * @max_ampdu_lenexp: AMPDU length 1554 * @vht_link_adapt: VHT link adapatation capable 1555 * @rx_antpattern: Rx Antenna pattern 1556 * @tx_antpattern: Tx Antenna pattern 1557 * @rx_mcs_map: RX MCS map 1558 * @rx_high_sup_data_rate : highest RX supported data rate 1559 * @tx_mcs_map: TX MCS map 1560 * @tx_sup_data_rate: highest TX supported data rate 1561 */ 1562 struct wlan_ie_vhtcaps { 1563 uint8_t elem_id; 1564 uint8_t elem_len; 1565 uint32_t max_mpdu_len:2; 1566 uint32_t supported_channel_widthset:2; 1567 uint32_t ldpc_coding:1; 1568 uint32_t shortgi80:1; 1569 uint32_t shortgi160and80plus80:1; 1570 uint32_t tx_stbc:1; 1571 uint32_t rx_stbc:3; 1572 uint32_t su_beam_former:1; 1573 uint32_t su_beam_formee:1; 1574 uint32_t csnof_beamformer_antSup:3; 1575 uint32_t num_soundingdim:3; 1576 uint32_t mu_beam_former:1; 1577 uint32_t mu_beam_formee:1; 1578 uint32_t vht_txops:1; 1579 uint32_t htc_vhtcap:1; 1580 uint32_t max_ampdu_lenexp:3; 1581 uint32_t vht_link_adapt:2; 1582 uint32_t rx_antpattern:1; 1583 uint32_t tx_antpattern:1; 1584 uint32_t unused:2; 1585 uint16_t rx_mcs_map; 1586 uint16_t rx_high_sup_data_rate:13; 1587 uint16_t reserved2:3; 1588 uint16_t tx_mcs_map; 1589 uint16_t tx_sup_data_rate:13; 1590 uint16_t reserved3:3; 1591 } qdf_packed; 1592 1593 /** 1594 * struct wlan_ie_vhtop: VHT op IE 1595 * @elem_id: VHT op IE 1596 * @elem_len: VHT op IE len 1597 * @vht_op_chwidth: BSS Operational Channel width 1598 * @vht_op_ch_freq_seg1: Channel Center frequency 1599 * @vht_op_ch_freq_seg2: Channel Center frequency for 80+80MHz 1600 * @vhtop_basic_mcs_set: Basic MCS set 1601 */ 1602 struct wlan_ie_vhtop { 1603 uint8_t elem_id; 1604 uint8_t elem_len; 1605 uint8_t vht_op_chwidth; 1606 uint8_t vht_op_ch_freq_seg1; 1607 uint8_t vht_op_ch_freq_seg2; 1608 uint16_t vhtop_basic_mcs_set; 1609 } qdf_packed; 1610 1611 #define WLAN_HE_PHYCAP_160_SUPPORT BIT(2) 1612 #define WLAN_HE_PHYCAP_80_80_SUPPORT BIT(3) 1613 #define WLAN_HE_MACCAP_LEN 6 1614 #define WLAN_HE_PHYCAP_LEN 11 1615 #define WLAN_HE_MAX_MCS_MAPS 3 1616 /** 1617 * struct wlan_ie_hecaps - HT capabilities 1618 * @elem_id: HE caps IE 1619 * @elem_len: HE caps IE len 1620 * @elem_id_extn: HE caps extension id 1621 * @he_mac_cap: HE mac capabilities 1622 * @he_phy_cap: HE phy capabilities 1623 * @phy_cap_bytes: HT phy capability bytes 1624 * @supported_ch_width_set: Supported channel width set 1625 * @mcs_bw_map: MCS NSS map per bandwidth 1626 * @rx_mcs_map: RX MCS map 1627 * @tx_mcs_map: TX MCS map 1628 */ 1629 struct wlan_ie_hecaps { 1630 uint8_t elem_id; 1631 uint8_t elem_len; 1632 uint8_t elem_id_extn; 1633 uint8_t he_mac_cap[WLAN_HE_MACCAP_LEN]; 1634 union { 1635 uint8_t phy_cap_bytes[WLAN_HE_PHYCAP_LEN]; 1636 struct { 1637 uint32_t reserved:1; 1638 uint32_t supported_ch_width_set:7; 1639 } qdf_packed; 1640 } qdf_packed he_phy_cap; 1641 struct { 1642 uint16_t rx_mcs_map; 1643 uint16_t tx_mcs_map; 1644 } qdf_packed mcs_bw_map[WLAN_HE_MAX_MCS_MAPS]; 1645 } qdf_packed; 1646 1647 /** 1648 * struct subelem_header: Subelement header 1649 * @subelem_id: Subelement ID 1650 * @subelem_len: Subelement length 1651 */ 1652 struct subelem_header { 1653 uint8_t subelem_id; 1654 uint8_t subelem_len; 1655 } qdf_packed; 1656 1657 #ifdef WLAN_FEATURE_11BE 1658 #define WLAN_EHT_MACCAP_LEN 2 1659 #define WLAN_EHT_PHYCAP_LEN 9 1660 1661 #define WLAN_EHT_MAX_MCS_MAPS 3 1662 1663 #define EHTCAP_MAC_EPCSPRIACCESS_IDX 0 1664 #define EHTCAP_MAC_EPCSPRIACCESS_BITS 1 1665 #define EHTCAP_MAC_EHTOMCTRL_IDX 1 1666 #define EHTCAP_MAC_EHTOMCTRL_BITS 1 1667 #define EHTCAP_MAC_TRIGGERED_TXOP_MODE1_IDX 2 1668 #define EHTCAP_MAC_TRIGGERED_TXOP_MODE1_BITS 1 1669 #define EHTCAP_MAC_TRIGGERED_TXOP_MODE2_IDX 3 1670 #define EHTCAP_MAC_TRIGGERED_TXOP_MODE2_BITS 1 1671 #define EHTCAP_MAC_RESTRICTED_TWT_IDX 4 1672 #define EHTCAP_MAC_RESTRICTED_TWT_BITS 1 1673 #define EHTCAP_MAC_SCS_TRAFFIC_DESC_IDX 5 1674 #define EHTCAP_MAC_SCS_TRAFFIC_DESC_BITS 1 1675 #define EHTCAP_MAC_MAX_MPDU_LEN_IDX 6 1676 #define EHTCAP_MAC_MAX_MPDU_LEN_BITS 2 1677 #define EHTCAP_MAC_MAX_A_MPDU_LEN_IDX 8 1678 #define EHTCAP_MAC_MAX_A_MPDU_LEN_BITS 1 1679 #define EHTCAP_MAC_TRS_SUPPORT_IDX 9 1680 #define EHTCAP_MAC_TRS_SUPPORT_BITS 1 1681 #define EHTCAP_MAC_TXOP_RET_SUPPP_IN_SHARING_MODE2_IDX 10 1682 #define EHTCAP_MAC_TXOP_RET_SUPPP_IN_SHARING_MODE2_BITS 1 1683 1684 #define EHTCAP_PHY_320MHZIN6GHZ_IDX 1 1685 #define EHTCAP_PHY_320MHZIN6GHZ_BITS 1 1686 #define EHTCAP_PHY_242TONERUBWLT20MHZ_IDX 2 1687 #define EHTCAP_PHY_242TONERUBWLT20MHZ_BITS 1 1688 #define EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_IDX 3 1689 #define EHTCAP_PHY_NDP4XEHTLTFAND320NSGI_BITS 1 1690 #define EHTCAP_PHY_PARTIALBWULMU_IDX 4 1691 #define EHTCAP_PHY_PARTIALBWULMU_BITS 1 1692 #define EHTCAP_PHY_SUBFMR_IDX 5 1693 #define EHTCAP_PHY_SUBFMR_BITS 1 1694 #define EHTCAP_PHY_SUBFME_IDX 6 1695 #define EHTCAP_PHY_SUBFME_BITS 1 1696 #define EHTCAP_PHY_BFMESSLT80MHZ_IDX 7 1697 #define EHTCAP_PHY_BFMESSLT80MHZ_BITS 3 1698 #define EHTCAP_PHY_BFMESS160MHZ_IDX 10 1699 #define EHTCAP_PHY_BFMESS160MHZ_BITS 3 1700 #define EHTCAP_PHY_BFMESS320MHZ_IDX 13 1701 #define EHTCAP_PHY_BFMESS320MHZ_BITS 3 1702 #define EHTCAP_PHY_NUMSOUNDLT80MHZ_IDX 16 1703 #define EHTCAP_PHY_NUMSOUNDLT80MHZ_BITS 3 1704 #define EHTCAP_PHY_NUMSOUND160MHZ_IDX 19 1705 #define EHTCAP_PHY_NUMSOUND160MHZ_BITS 3 1706 #define EHTCAP_PHY_NUMSOUND320MHZ_IDX 22 1707 #define EHTCAP_PHY_NUMSOUND320MHZ_BITS 3 1708 #define EHTCAP_PHY_NG16SUFB_IDX 25 1709 #define EHTCAP_PHY_NG16SUFB_BITS 1 1710 #define EHTCAP_PHY_NG16MUFB_IDX 26 1711 #define EHTCAP_PHY_NG16MUFB_BITS 1 1712 #define EHTCAP_PHY_CODBK42SUFB_IDX 27 1713 #define EHTCAP_PHY_CODBK42SUFB_BITS 1 1714 #define EHTCAP_PHY_CODBK75MUFB_IDX 28 1715 #define EHTCAP_PHY_CODBK75MUFB_BITS 1 1716 #define EHTCAP_PHY_TRIGSUBFFB_IDX 29 1717 #define EHTCAP_PHY_TRIGSUBFFB_BITS 1 1718 #define EHTCAP_PHY_TRIGMUBFPARTBWFB_IDX 30 1719 #define EHTCAP_PHY_TRIGMUBFPARTBWFB_BITS 1 1720 #define EHTCAP_PHY_TRIGCQIFB_IDX 31 1721 #define EHTCAP_PHY_TRIGCQIFB_BITS 1 1722 1723 #define EHTCAP_PHY_PARTBWDLMUMIMO_IDX 32 1724 #define EHTCAP_PHY_PARTBWDLMUMIMO_BITS 1 1725 #define EHTCAP_PHY_PSRSR_IDX 33 1726 #define EHTCAP_PHY_PSRSR_BITS 1 1727 #define EHTCAP_PHY_PWRBSTFACTOR_IDX 34 1728 #define EHTCAP_PHY_PWRBSTFACTOR_BITS 1 1729 #define EHTCAP_PHY_4XEHTLTFAND800NSGI_IDX 35 1730 #define EHTCAP_PHY_4XEHTLTFAND800NSGI_BITS 1 1731 #define EHTCAP_PHY_MAXNC_IDX 36 1732 #define EHTCAP_PHY_MAXNC_BITS 4 1733 #define EHTCAP_PHY_NONTRIGCQIFB_IDX 40 1734 #define EHTCAP_PHY_NONTRIGCQIFB_BITS 1 1735 #define EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_IDX 41 1736 #define EHTCAP_PHY_TX1024AND4096QAMLS242TONERU_BITS 1 1737 #define EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_IDX 42 1738 #define EHTCAP_PHY_RX1024AND4096QAMLS242TONERU_BITS 1 1739 #define EHTCAP_PHY_PPETHRESPRESENT_IDX 43 1740 #define EHTCAP_PHY_PPETHRESPRESENT_BITS 1 1741 #define EHTCAP_PHY_CMNNOMPKTPAD_IDX 44 1742 #define EHTCAP_PHY_CMNNOMPKTPAD_BITS 2 1743 #define EHTCAP_PHY_MAXNUMEHTLTF_IDX 46 1744 #define EHTCAP_PHY_MAXNUMEHTLTF_BITS 5 1745 #define EHTCAP_PHY_SUPMCS15_IDX 51 1746 #define EHTCAP_PHY_SUPMCS15_BITS 4 1747 #define EHTCAP_PHY_EHTDUPIN6GHZ_IDX 55 1748 #define EHTCAP_PHY_EHTDUPIN6GHZ_BITS 1 1749 #define EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_IDX 56 1750 #define EHTCAP_PHY_20MHZOPSTARXNDPWIDERBW_BITS 1 1751 #define EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_IDX 57 1752 #define EHTCAP_PHY_NONOFDMAULMUMIMOLT80MHZ_BITS 1 1753 #define EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_IDX 58 1754 #define EHTCAP_PHY_NONOFDMAULMUMIMO160MHZ_BITS 1 1755 #define EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_IDX 59 1756 #define EHTCAP_PHY_NONOFDMAULMUMIMO320MHZ_BITS 1 1757 #define EHTCAP_PHY_MUBFMRLT80MHZ_IDX 60 1758 #define EHTCAP_PHY_MUBFMRLT80MHZ_BITS 1 1759 #define EHTCAP_PHY_MUBFMR160MHZ_IDX 61 1760 #define EHTCAP_PHY_MUBFMR160MHZ_BITS 1 1761 #define EHTCAP_PHY_MUBFMR320MHZ_IDX 62 1762 #define EHTCAP_PHY_MUBFMR320MHZ_BITS 1 1763 #define EHTCAP_PHY_TB_SOUNDING_FEEDBACK_RL_IDX 63 1764 #define EHTCAP_PHY_TB_SOUNDING_FEEDBACK_RL_BITS 1 1765 #define EHTCAP_PHY_RX_1K_QAM_IN_WIDER_BW_DL_OFDMA_IDX 64 1766 #define EHTCAP_PHY_RX_1K_QAM_IN_WIDER_BW_DL_OFDMA_BITS 1 1767 #define EHTCAP_PHY_RX_4K_QAM_IN_WIDER_BW_DL_OFDMA_IDX 65 1768 #define EHTCAP_PHY_RX_4K_QAM_IN_WIDER_BW_DL_OFDMA_BITS 1 1769 1770 #define EHTCAP_RX_MCS_NSS_MAP_IDX 0 1771 #define EHTCAP_RX_MCS_NSS_MAP_BITS 4 1772 #define EHTCAP_TX_MCS_NSS_MAP_IDX 4 1773 #define EHTCAP_TX_MCS_NSS_MAP_BITS 4 1774 1775 #define EHTCAP_PPET_NSS_IDX 0 1776 #define EHTCAP_PPET_NSS_BITS 4 1777 #define EHTCAP_PPET_RU_INDEX_BITMASK_IDX 4 1778 #define EHTCAP_PPET_RU_INDEX_BITMASK_BITS 5 1779 1780 #define EHTOP_INFO_PRESENT_IDX 0 1781 #define EHTOP_INFO_PRESENT_BITS 1 1782 #define EHTOP_PARAM_DISABLED_SC_BITMAP_PRESENT_IDX 1 1783 #define EHTOP_PARAM_DISABLED_SC_BITMAP_PRESENT_BITS 1 1784 #define EHTOP_DEFAULT_PE_DURATION_IDX 2 1785 #define EHTOP_DEFAULT_PE_DURATION_BITS 1 1786 #define EHTOP_GRP_ADDRESSED_BU_IND_LIMIT_IDX 3 1787 #define EHTOP_GRP_ADDRESSED_BU_IND_LIMIT_BITS 1 1788 #define EHTOP_GRP_ADDRESSED_BU_IND_EXPONENT_IDX 4 1789 #define EHTOP_GRP_ADDRESSED_BU_IND_EXPONENT_BITS 2 1790 1791 #define EHTOP_INFO_CHAN_WIDTH_IDX 0 1792 #define EHTOP_INFO_CHAN_WIDTH_BITS 3 1793 1794 #define EHTOP_RX_MCS_NSS_MAP_IDX 0 1795 #define EHTOP_RX_MCS_NSS_MAP_BITS 4 1796 #define EHTOP_TX_MCS_NSS_MAP_IDX 4 1797 #define EHTOP_TX_MCS_NSS_MAP_BITS 4 1798 1799 #define MAX_EHT_MCS_NSS_MAP_LEN 9 1800 1801 /** 1802 * struct eht_basic_mcs_nss_set - EHT Basic mcs nss set 1803 * @max_nss_mcs_0_7: Rx, Tx Max Nss That Supports EHT-MCS 0-7 1804 * @max_nss_mcs_8_9: Rx, Tx Max Nss That Supports EHT-MCS 8-9 1805 * @max_nss_mcs_10_11: Rx, Tx Max Nss That Supports EHT-MCS 10-11 1806 * @max_nss_mcs_12_13: Rx, Tx Max Nss That Supports EHT-MCS 12-13 1807 */ 1808 struct eht_basic_mcs_nss_set { 1809 uint8_t max_nss_mcs_0_7; 1810 uint8_t max_nss_mcs_8_9; 1811 uint8_t max_nss_mcs_10_11; 1812 uint8_t max_nss_mcs_12_13; 1813 } qdf_packed; 1814 1815 /** 1816 * struct wlan_ie_ehtcaps - EHT capabilities 1817 * @elem_id: EHT caps IE 1818 * @elem_len: EHT caps IE len 1819 * @elem_id_extn: EHT caps extension id 1820 * @eht_mac_cap: EHT mac capabilities 1821 * @eht_phy_cap: EHT phy capabilities 1822 * @phy_cap_bytes: EHT phy capability bytes 1823 * @supported_ch_width_set: Supported channel width set 1824 * @mcs_bw_map: MCS NSS map per bandwidth 1825 * @rx_mcs_map: RX MCS map 1826 * @tx_mcs_map: TX MCS map 1827 */ 1828 struct wlan_ie_ehtcaps { 1829 uint8_t elem_id; 1830 uint8_t elem_len; 1831 uint8_t elem_id_extn; 1832 uint8_t eht_mac_cap[WLAN_EHT_MACCAP_LEN]; 1833 union { 1834 uint8_t phy_cap_bytes[WLAN_EHT_PHYCAP_LEN]; 1835 struct { 1836 uint32_t reserved:1; 1837 uint32_t supported_ch_width_set:7; 1838 } qdf_packed; 1839 } qdf_packed eht_phy_cap; 1840 union { 1841 struct { 1842 uint8_t max_nss_mcs_0_9; 1843 uint8_t max_nss_mcs_10_11; 1844 uint8_t max_nss_mcs_12_13; 1845 } qdf_packed mcs_bw_map[WLAN_EHT_MAX_MCS_MAPS]; 1846 struct eht_basic_mcs_nss_set mcs_bw_map_20_sta; 1847 uint8_t mcs_nss_map_bytes[MAX_EHT_MCS_NSS_MAP_LEN]; 1848 } qdf_packed; 1849 } qdf_packed; 1850 1851 /** 1852 * struct wlan_ie_ehtops - EHT operation element 1853 * @elem_id: EHT caps IE 1854 * @elem_len: EHT caps IE len 1855 * @elem_id_extn: EHT caps extension id 1856 * @ehtop_param: EHT Operation Parameters 1857 * @basic_mcs_nss_set: EHT basic mcs nss set 1858 * @control: Control field in EHT Operation Information 1859 * @ccfs0: EHT Channel Centre Frequency Segment0 information 1860 * @ccfs1: EHT Channel Centre Frequency Segment1 information 1861 * @disabled_sub_chan_bitmap: Bitmap to indicate 20MHz subchannel is punctured 1862 * or not 1863 */ 1864 struct wlan_ie_ehtops { 1865 uint8_t elem_id; 1866 uint8_t elem_len; 1867 uint8_t elem_id_extn; 1868 uint8_t ehtop_param; 1869 struct eht_basic_mcs_nss_set basic_mcs_nss_set; 1870 uint8_t control; 1871 uint8_t ccfs0; 1872 uint8_t ccfs1; 1873 uint8_t disabled_sub_chan_bitmap[2]; 1874 } qdf_packed; 1875 1876 #ifdef WLAN_FEATURE_11BE_MLO 1877 #define WLAN_MLO_MAX_VDEVS 2 1878 1879 /* Size in octets of the BSS Parameters Change Count (sub)field */ 1880 #define WLAN_ML_BSSPARAMCHNGCNT_SIZE 1 1881 1882 /** 1883 * struct wlan_ie_multilink - Fixed fields in Multi-Link IE 1884 * @elem_id: Element ID 1885 * @elem_len: Element length 1886 * @elem_id_ext: Element ID extension 1887 * @mlcontrol: Multi-Link element Control field 1888 */ 1889 struct wlan_ie_multilink { 1890 uint8_t elem_id; 1891 uint8_t elem_len; 1892 uint8_t elem_id_ext; 1893 uint16_t mlcontrol; 1894 } qdf_packed; 1895 1896 /** 1897 * struct wlan_sta_profile - Per STA profile IE 1898 * @sub_elem_id: Sub element ID 1899 * @per_sta_len: Per STA profile length 1900 * @sta_control: STA control field 1901 * @num_data: Number of valid data bytes 1902 * @data: Per STA profile IE elements 1903 */ 1904 struct wlan_sta_profile { 1905 uint8_t sub_elem_id; 1906 uint8_t per_sta_len; 1907 uint16_t sta_control; 1908 uint8_t num_data; 1909 uint8_t *data; 1910 } qdf_packed; 1911 1912 /** 1913 * struct wlan_ml_probe_req - Multi-Link Probe req IE 1914 * @ml_ie_ff: Multi Link IE fixed field 1915 * @common_info_len: Common info length 1916 * @mld_id: MLD ID 1917 * @sta_profile: STA profile IE 1918 */ 1919 struct wlan_ml_probe_req { 1920 struct wlan_ie_multilink ml_ie_ff; 1921 uint8_t common_info_len; 1922 uint8_t mld_id; 1923 struct wlan_sta_profile sta_profile[WLAN_MLO_MAX_VDEVS]; 1924 } qdf_packed; 1925 /* The above fixed fields may be followed by: 1926 * Common Info (variable size) 1927 * Link Info (variable size) 1928 */ 1929 1930 /* Definitions related to Multi-Link element Control field applicable across 1931 * variants. 1932 */ 1933 1934 /* The below fields and subfields have been transitioned to D1.5, and the rest 1935 * will be checked and transitioned to D1.5 separately: 1936 * 1. Presence bitmap subfield in the Multi-Link Control field. 1937 * 2. Common Info Length subfield of Common Info field. 1938 * 3. STA Control field in Per-STA Profile subelement in Basic variant 1939 * Multi-Link element Link Info field. 1940 * 4. STA Info Length subfield in STA Info field in Per-STA Profile subelement 1941 * in Basic variant Multi-Link element Link Info field. 1942 * 5. EML Capabilities subfield of Common Info field. 1943 * 6. MLD Capabilities subfield of Common Info field. 1944 */ 1945 1946 /* Size in octets of Multi-Link element Control field */ 1947 #define WLAN_ML_CTRL_SIZE 2 1948 1949 /* Definitions for subfields in Multi-Link element Control field. Any unused 1950 * bits are reserved. 1951 */ 1952 /* Type */ 1953 #define WLAN_ML_CTRL_TYPE_IDX 0 1954 #define WLAN_ML_CTRL_TYPE_BITS 3 1955 /* Presence Bitmap */ 1956 #define WLAN_ML_CTRL_PBM_IDX 4 1957 #define WLAN_ML_CTRL_PBM_BITS 12 1958 1959 /** 1960 * enum wlan_ml_variant - Encoding for Type subfield in Multi-Link element 1961 * Control field, which provides the Multi-Link element variant. 1962 * Note: In case of holes in the enumeration, scheme for invalid value 1963 * determination should be changed. 1964 * @WLAN_ML_VARIANT_BASIC: Basic variant 1965 * @WLAN_ML_VARIANT_PROBEREQ: Probe Request variant 1966 * @WLAN_ML_VARIANT_RECONFIG: Reconfiguration variant 1967 * @WLAN_ML_VARIANT_TDLS: TDLS variant 1968 * @WLAN_ML_VARIANT_PRIORITYACCESS: Priority Access variant 1969 * @WLAN_ML_VARIANT_INVALIDSTART: Start of invalid value range 1970 */ 1971 enum wlan_ml_variant { 1972 WLAN_ML_VARIANT_BASIC = 0, 1973 WLAN_ML_VARIANT_PROBEREQ = 1, 1974 WLAN_ML_VARIANT_RECONFIG = 2, 1975 WLAN_ML_VARIANT_TDLS = 3, 1976 WLAN_ML_VARIANT_PRIORITYACCESS = 4, 1977 WLAN_ML_VARIANT_INVALIDSTART, 1978 }; 1979 1980 /** 1981 * enum wlan_ml_linfo_subelementid - IDs for subelements in Multi-Link element 1982 * Link Info field. 1983 * @WLAN_ML_LINFO_SUBELEMID_PERSTAPROFILE: Per-STA Profile 1984 * @WLAN_ML_LINFO_SUBELEMID_VENDOR: Vendor specific 1985 * @WLAN_ML_LINFO_SUBELEMID_FRAGMENT: Fragment 1986 */ 1987 enum wlan_ml_linfo_subelementid { 1988 WLAN_ML_LINFO_SUBELEMID_PERSTAPROFILE = 0, 1989 WLAN_ML_LINFO_SUBELEMID_VENDOR = 221, 1990 WLAN_ML_LINFO_SUBELEMID_FRAGMENT = 254, 1991 }; 1992 1993 /* End of definitions related to Multi-Link element Control field applicable 1994 * across variants. 1995 */ 1996 1997 /* Definitions related to Basic variant Multi-Link element. */ 1998 1999 /* Definitions for bits in the Presence Bitmap subfield in Basic variant 2000 * Multi-Link element Control field. Any unused bits are reserved. 2001 */ 2002 /* Link ID Info Present */ 2003 #define WLAN_ML_BV_CTRL_PBM_LINKIDINFO_P ((uint16_t)BIT(0)) 2004 /* BSS Parameters Change Count Present */ 2005 #define WLAN_ML_BV_CTRL_PBM_BSSPARAMCHANGECNT_P ((uint16_t)BIT(1)) 2006 /* Medium Synchronization Delay Information Present */ 2007 #define WLAN_ML_BV_CTRL_PBM_MEDIUMSYNCDELAYINFO_P ((uint16_t)BIT(2)) 2008 /* EML Capabilities Present */ 2009 #define WLAN_ML_BV_CTRL_PBM_EMLCAP_P ((uint16_t)BIT(3)) 2010 /* MLD Capabilities and operation Present */ 2011 #define WLAN_ML_BV_CTRL_PBM_MLDCAPANDOP_P ((uint16_t)BIT(4)) 2012 /* MLD ID Present */ 2013 #define WLAN_ML_BV_CTRL_PBM_MLDID_P ((uint16_t)BIT(5)) 2014 2015 /* Definitions related to Basic variant Multi-Link element Common Info field */ 2016 2017 /* Size in octets of Common Info Length subfield of Common Info field in 2018 * Basic variant Multi-Link element. 2019 */ 2020 /* Common Info Length */ 2021 #define WLAN_ML_BV_CINFO_LENGTH_SIZE 1 2022 2023 /* Size in octets of Link ID Info subfield in Basic variant Multi-Link element 2024 * Common Info field. 2025 */ 2026 #define WLAN_ML_BV_CINFO_LINKIDINFO_SIZE 1 2027 2028 /* Definitions for sub-sub fields in Link ID Info subfield in Basic variant 2029 * Multi-Link element Common Info field. Any unused bits are reserved. 2030 */ 2031 /* Link ID */ 2032 #define WLAN_ML_BV_CINFO_LINKIDINFO_LINKID_IDX 0 2033 #define WLAN_ML_BV_CINFO_LINKIDINFO_LINKID_BITS 4 2034 2035 /* Size in octets of Medium Synchronization Delay Information subfield in Basic 2036 * variant Multi-Link element Common Info field. 2037 */ 2038 #define WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_SIZE 2 2039 2040 /* Definitions for sub-sub fields in Medium Synchronization Delay Information 2041 * subfield in Basic variant Multi-Link element Common Info field. 2042 */ 2043 /* Medium Synchronization Duration */ 2044 #define WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_DURATION_IDX 0 2045 #define WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_DURATION_BITS 8 2046 /* Medium Synchronization OFDM ED Threshold */ 2047 #define WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_OFDMEDTHRESH_IDX 8 2048 #define WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_OFDMEDTHRESH_BITS 4 2049 /* Medium Synchronization Maximum Number Of TXOPs */ 2050 #define WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_MAXTXOPS_IDX 12 2051 #define WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_MAXTXOPS_BITS 4 2052 2053 /* Size in octets of EML Capabilities subfield in Basic variant Multi-Link 2054 * element Common Info field. 2055 */ 2056 #define WLAN_ML_BV_CINFO_EMLCAP_SIZE 2 2057 2058 /* Definitions for sub-sub fields in EML Capabilities subfield in Basic variant 2059 * Multi-Link element Common Info field as per IEEE P802.11be/D1.5. 2060 * Any unused bits are reserved. 2061 */ 2062 /* EMLSR Support */ 2063 #define WLAN_ML_BV_CINFO_EMLCAP_EMLSRSUPPORT_IDX 0 2064 #define WLAN_ML_BV_CINFO_EMLCAP_EMLSRSUPPORT_BITS 1 2065 /* EMLSR Delay */ 2066 #define WLAN_ML_BV_CINFO_EMLCAP_EMLSR_PADDINGDELAY_IDX 1 2067 #define WLAN_ML_BV_CINFO_EMLCAP_EMLSR_PADDINGDELAY_BITS 3 2068 /* EMLSR Transition Delay */ 2069 #define WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_IDX 4 2070 #define WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_BITS 3 2071 /* EMLMR Support */ 2072 #define WLAN_ML_BV_CINFO_EMLCAP_EMLMRSUPPORT_IDX 7 2073 #define WLAN_ML_BV_CINFO_EMLCAP_EMLMRSUPPORT_BITS 1 2074 /* EMLMR Delay */ 2075 #define WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_IDX 8 2076 #define WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_BITS 3 2077 /* Transition Timeout */ 2078 #define WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_IDX 11 2079 #define WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_BITS 4 2080 2081 /** 2082 * wlan_ml_bv_cinfo_emlcap_emlsr_padding_delay - Encoding for EMLSR Padding 2083 * Delay sub field in EML Capabilities subfield in Basic variant Multi-Link 2084 * element Common Info field. 2085 * Note: In case of holes in the enumeration, scheme for invalid value 2086 * determination should be changed. 2087 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_0US: EMLSR delay of 0 us 2088 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_32US: EMLSR delay of 32 us 2089 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_64US: EMLSR delay of 64 us 2090 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_128US: EMLSR delay of 128 us 2091 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_256US: EMLSR delay of 256 us 2092 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_INVALIDSTART: Start of invalid value 2093 * range 2094 */ 2095 enum wlan_ml_bv_cinfo_emlcap_emlsr_padding_delay { 2096 WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_0US = 0, 2097 WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_32US = 1, 2098 WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_64US = 2, 2099 WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_128US = 3, 2100 WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_256US = 4, 2101 WLAN_ML_BV_CINFO_EMLCAP_EMLSRDELAY_INVALIDSTART, 2102 }; 2103 2104 /** 2105 * wlan_ml_bv_cinfo_emlsr_transition_delay - Encoding for EMLSR 2106 * Transition delay in EML Capabilities subfield in Basic variant 2107 * Multi-Link element Common Info field. 2108 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_0US: EMLSR transition delay of 0 us 2109 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_16US: EMLSR transition delay of 2110 * 16 us 2111 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_32US: EMLSR transition delay of 2112 * 32 us 2113 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_64US: EMLSR transition delay of 2114 * 64 us 2115 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_128US: EMLSR transition delay of 2116 * 128 us 2117 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_256US: EMLSR transition delay of 2118 * 256 us 2119 * @WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_INVALIDSTART: Start of invalid 2120 * value range 2121 */ 2122 enum wlan_ml_bv_cinfo_emlsr_transition_delay { 2123 WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_0US = 0, 2124 WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_16US = 1, 2125 WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_32US = 2, 2126 WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_64US = 3, 2127 WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_128US = 4, 2128 WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_256US = 5, 2129 WLAN_ML_BV_CINFO_EMLCAP_EMLSRTRANSDELAY_INVALIDSTART, 2130 }; 2131 2132 /** 2133 * wlan_ml_bv_cinfo_emlcap_emlmrdelay - Encoding for EMLMR Delay sub-sub field 2134 * in EML Capabilities subfield in Basic variant Multi-Link element Common Info 2135 * field. 2136 * Note: In case of holes in the enumeration, scheme for invalid value 2137 * determination should be changed. 2138 * @WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_0US: EMLMR delay of 0 us 2139 * @WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_32US: EMLMR delay of 32 us 2140 * @WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_64US: EMLMR delay of 64 us 2141 * @WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_128US: EMLMR delay of 128 us 2142 * @WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_256US: EMLMR delay of 256 us 2143 * @WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_INVALIDSTART: Start of invalid 2144 * value range 2145 */ 2146 enum wlan_ml_bv_cinfo_emlcap_emlmrdelay { 2147 WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_0US = 0, 2148 WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_32US = 1, 2149 WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_64US = 2, 2150 WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_128US = 3, 2151 WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_256US = 4, 2152 WLAN_ML_BV_CINFO_EMLCAP_EMLMRDELAY_INVALIDSTART, 2153 }; 2154 2155 /** 2156 * wlan_ml_bv_cinfo_emlcap_transtimeout - Encoding for Transition Timeout 2157 * sub-sub field in EML Capabilities subfield in Basic variant Multi-Link 2158 * element Common Info field. 2159 * Note: a) In case of holes in the enumeration, scheme for invalid value 2160 * determination should be changed. b) A mathematical formula could have been 2161 * used instead of an enumeration. However, the standard explicitly lists out 2162 * values instead of using a formula, and we reflect this accordingly using an 2163 * enumeration. 2164 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_0TU: Transition Timeout value of 0 TUs 2165 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_128MU: Transition Timeout value of 128μs 2166 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_256MU: Transition Timeout value of 256μs 2167 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_512MU: Transition Timeout value of 512μs 2168 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_1TU: Transition Timeout value of 1 TU 2169 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_2TU: Transition Timeout value of 2 TUs 2170 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_4TU: Transition Timeout value of 4 TUs 2171 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_8TU: Transition Timeout value of 8 TUs 2172 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_16TU: Transition Timeout value of 16 2173 * TUs 2174 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_32TU: Transition Timeout value of 32 2175 * TUs 2176 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_64TU: Transition Timeout value of 64 2177 * TUs 2178 * WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_128TU: Transition Timeout value of 128 2179 * TUs 2180 * @WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_INVALIDSTART: Start of invalid value 2181 * range 2182 */ 2183 enum wlan_ml_bv_cinfo_emlcap_transtimeout { 2184 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_0TU = 0, 2185 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_128MU = 1, 2186 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_256MU = 2, 2187 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_512MU = 3, 2188 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_1TU = 4, 2189 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_2TU = 5, 2190 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_4TU = 6, 2191 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_8TU = 7, 2192 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_16TU = 8, 2193 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_32TU = 9, 2194 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_64TU = 10, 2195 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_128TU = 11, 2196 WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_INVALIDSTART, 2197 }; 2198 2199 /* Size in octets of MLD Capabilities and operation subfield in Basic variant 2200 * Multi-Link element Common Info field as per IEEE P802.11be/D1.5. 2201 */ 2202 #define WLAN_ML_BV_CINFO_MLDCAPANDOP_SIZE 2 2203 2204 /* Definitions for sub-sub fields in MLD Capabilities subfield in Basic variant 2205 * Multi-Link element Common Info field. Any unused bits are reserved. 2206 */ 2207 /* Maximum Number Of Simultaneous Links */ 2208 #define WLAN_ML_BV_CINFO_MLDCAPANDOP_MAXSIMULLINKS_IDX 0 2209 #define WLAN_ML_BV_CINFO_MLDCAPANDOP_MAXSIMULLINKS_BITS 4 2210 /* SRS Support */ 2211 #define WLAN_ML_BV_CINFO_MLDCAPANDOP_SRSSUPPORT_IDX 4 2212 #define WLAN_ML_BV_CINFO_MLDCAPANDOP_SRSSUPPORT_BITS 1 2213 /* TID-To-Link Mapping Negotiation Supported */ 2214 #define WLAN_ML_BV_CINFO_MLDCAPANDOP_TIDTOLINKMAPNEGSUPPORT_IDX 5 2215 #define WLAN_ML_BV_CINFO_MLDCAPANDOP_TIDTOLINKMAPNEGSUPPORT_BITS 2 2216 /* Frequency Separation For STR */ 2217 #define WLAN_ML_BV_CINFO_MLDCAPANDOP_STRFREQSEPARATION_IDX 7 2218 #define WLAN_ML_BV_CINFO_MLDCAPANDOP_STRFREQSEPARATION_BITS 5 2219 /* AAR Support */ 2220 #define WLAN_ML_BV_CINFO_MLDCAPANDOP_AARSUPPORT_IDX 12 2221 #define WLAN_ML_BV_CINFO_MLDCAPANDOP_AARSUPPORT_BITS 1 2222 2223 /* Size in octets of MLD ID subfield in Basic variant Multi-Link 2224 * element Common Info field. 2225 */ 2226 #define WLAN_ML_BV_CINFO_MLDID_SIZE 1 2227 2228 /* Max value in octets of Common Info Length subfield of Common Info field in 2229 * Basic variant Multi-Link element 2230 */ 2231 #define WLAN_ML_BV_CINFO_LENGTH_MAX \ 2232 (WLAN_ML_BV_CINFO_LENGTH_SIZE + \ 2233 QDF_MAC_ADDR_SIZE + \ 2234 WLAN_ML_BV_CINFO_LINKIDINFO_SIZE + \ 2235 WLAN_ML_BSSPARAMCHNGCNT_SIZE + \ 2236 WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_SIZE + \ 2237 WLAN_ML_BV_CINFO_EMLCAP_SIZE + \ 2238 WLAN_ML_BV_CINFO_MLDCAPANDOP_SIZE + \ 2239 WLAN_ML_BV_CINFO_MLDID_SIZE) 2240 2241 /* End of definitions related to Basic variant Multi-Link element Common Info 2242 * field. 2243 */ 2244 2245 /* Definitions related to Basic variant Multi-Link element Link Info field */ 2246 2247 /* Basic variant Multi-Link element Link Info field contains zero or more 2248 * subelements. 2249 */ 2250 2251 /** 2252 * struct wlan_ml_bv_linfo_perstaprof - Fixed fields of Per-STA Profile 2253 * subelement in Basic variant Multi-Link element Link Info field 2254 * @subelem_id: Subelement ID 2255 * @subelem_len: Subelement length 2256 * @stacontrol: STA Control 2257 */ 2258 struct wlan_ml_bv_linfo_perstaprof { 2259 uint8_t subelem_id; 2260 uint8_t subelem_len; 2261 uint16_t stacontrol; 2262 } qdf_packed; 2263 2264 /* The above fixed fields may be followed by: 2265 * STA Info (variable size) 2266 * STA Profile (variable size) 2267 */ 2268 2269 /* Size in octets of STA Control field of Per-STA Profile subelement in Basic 2270 * variant Multi-Link element Link Info field. 2271 */ 2272 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_SIZE 2 2273 2274 /* Definitions for subfields in STA Control field of Per-STA Profile subelement 2275 * in Basic variant Multi-Link element Link Info field. Any unused bits are 2276 * reserved. 2277 */ 2278 /* Link ID */ 2279 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_LINKID_IDX 0 2280 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_LINKID_BITS 4 2281 /* Complete Profile */ 2282 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_CMPLTPROF_IDX 4 2283 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_CMPLTPROF_BITS 1 2284 /* MAC Address Present */ 2285 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_MACADDRP_IDX 5 2286 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_MACADDRP_BITS 1 2287 /* Beacon Interval Present */ 2288 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_BCNINTP_IDX 6 2289 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_BCNINTP_BITS 1 2290 /* TSF Offset Present */ 2291 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_TSFOFFSETP_IDX 7 2292 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_TSFOFFSETP_BITS 1 2293 /* DTIM Info Present */ 2294 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_DTIMINFOP_IDX 8 2295 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_DTIMINFOP_BITS 1 2296 /* NSTR Link Pair Present */ 2297 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRLINKPRP_IDX 9 2298 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRLINKPRP_BITS 1 2299 /* NSTR Bitmap Size */ 2300 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRBMSZ_IDX 10 2301 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRBMSZ_BITS 1 2302 /* BSS Parameters Change Count Present */ 2303 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_BSSPARAMCHNGCNTP_IDX 11 2304 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_BSSPARAMCHNGCNTP_BITS 1 2305 2306 /* Definitions for subfields in STA Info field of Per-STA Profile subelement 2307 * in Basic variant Multi-Link element Link Info field. 2308 */ 2309 /* STA Info Length */ 2310 #define WLAN_ML_BV_LINFO_PERSTAPROF_STAINFO_LENGTH_SIZE 1 2311 2312 /* Size in octets of the TSF Offset in STA info field of Per-STA Profile 2313 * subelement in Basic variant Multi-Link element Link Info field. 2314 */ 2315 #define WLAN_ML_TSF_OFFSET_SIZE 8 2316 2317 /** 2318 * wlan_ml_bv_linfo_perstaprof_stactrl_nstrbmsz - Encoding for NSTR Bitmap Size 2319 * in STA Control field of Per-STA Profile subelement in Basic variant 2320 * Multi-Link element Link Info field. 2321 * Note: In case of holes in the enumeration, scheme for invalid value 2322 * determination should be changed. 2323 * @WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRBMSZ_1_OCTET: NSTR Indication 2324 * Bitmap size of 1 octet 2325 * @WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRBMSZ_2_OCTETS: NSTR Indication 2326 * Bitmap size of 2 octets 2327 * @WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRBMSZ_INVALIDSTART: Start of invalid 2328 * value range 2329 */ 2330 enum wlan_ml_bv_linfo_perstaprof_stactrl_nstrbmsz { 2331 WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRBMSZ_1_OCTET = 0, 2332 WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRBMSZ_2_OCTETS = 1, 2333 WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRBMSZ_INVALIDSTART, 2334 }; 2335 2336 /* Max size in octets of the NSTR Bitmap in STA Control field of Per-STA Profile 2337 * subelement in Basic variant Multi-Link element Link Info field. 2338 */ 2339 #define WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRBMSZ_MAX 2 2340 2341 /** 2342 * struct wlan_ml_bv_linfo_perstaprof_stainfo_dtiminfo - DTIM info in STA info 2343 * in Per-STA Profile subelement in Basic variant Multi-Link element Link Info 2344 * field. 2345 * @dtimcount: DTIM Count 2346 * @dtimperiod: DTIM Period 2347 */ 2348 struct wlan_ml_bv_linfo_perstaprof_stainfo_dtiminfo { 2349 uint8_t dtimcount; 2350 uint8_t dtimperiod; 2351 } qdf_packed; 2352 2353 /* Max value in octets of STA Info Length in STA Info field of Per-STA Profile 2354 * subelement in Basic variant Multi-Link element Link Info field. 2355 */ 2356 #define WLAN_ML_BV_LINFO_PERSTAPROF_STAINFO_LENGTH_MAX \ 2357 (WLAN_ML_BV_LINFO_PERSTAPROF_STAINFO_LENGTH_SIZE + \ 2358 QDF_MAC_ADDR_SIZE + \ 2359 WLAN_BEACONINTERVAL_LEN + \ 2360 WLAN_ML_TSF_OFFSET_SIZE + \ 2361 sizeof(struct wlan_ml_bv_linfo_perstaprof_stainfo_dtiminfo) + \ 2362 WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_NSTRBMSZ_MAX + \ 2363 WLAN_ML_BSSPARAMCHNGCNT_SIZE) 2364 2365 /* End of definitions related to Basic variant Multi-Link element Link Info 2366 * field. 2367 */ 2368 2369 /* End of definitions related to Basic variant Multi-Link element. */ 2370 2371 /* Definitions related to Probe Req Multi-Link element Link Info field */ 2372 2373 /* Probe Req variant Multi-Link element Link Info field contains zero or more 2374 * subelements. 2375 */ 2376 2377 /** 2378 * struct wlan_ml_prv_linfo_perstaprof - Fixed fields of Per-STA Profile 2379 * subelement in Probe Request variant Multi-Link element Link Info field 2380 * @subelem_id: Subelement ID 2381 * @subelem_len: Subelement length 2382 * @stacontrol: STA Control 2383 */ 2384 struct wlan_ml_prv_linfo_perstaprof { 2385 uint8_t subelem_id; 2386 uint8_t subelem_len; 2387 uint16_t stacontrol; 2388 } qdf_packed; 2389 2390 /* The above fixed fields may be followed by: 2391 * STA Profile (variable size) 2392 */ 2393 2394 /* Size in octets of STA Control field of Per-STA Profile subelement in Basic 2395 * variant Multi-Link element Link Info field. 2396 */ 2397 #define WLAN_ML_PRV_LINFO_PERSTAPROF_STACTRL_SIZE 2 2398 2399 /* Definitions for subfields in STA Control field of Per-STA Profile subelement 2400 * in Probe Req variant Multi-Link element Link Info field. Any unused bits are 2401 * reserved. 2402 */ 2403 /* Link ID */ 2404 #define WLAN_ML_PRV_LINFO_PERSTAPROF_STACTRL_LINKID_IDX 0 2405 #define WLAN_ML_PRV_LINFO_PERSTAPROF_STACTRL_LINKID_BITS 4 2406 /* Complete Profile */ 2407 #define WLAN_ML_PRV_LINFO_PERSTAPROF_STACTRL_CMPLTPROF_IDX 4 2408 #define WLAN_ML_PRV_LINFO_PERSTAPROF_STACTRL_CMPLTPROF_BITS 1 2409 2410 /* Definitions for bits in the Presence Bitmap subfield in Probe Req variant 2411 * Multi-Link element Control field. Any unused bits are reserved. 2412 */ 2413 /* MLD ID Present */ 2414 #define WLAN_ML_PRV_CTRL_PBM_MLDID_P ((uint16_t)BIT(0)) 2415 /* Size in octets of Common Info Length subfield of Common Info field in 2416 * Probe Req variant Multi-Link element. 2417 */ 2418 /* Common Info Length */ 2419 #define WLAN_ML_PRV_CINFO_LENGTH_SIZE 1 2420 2421 /* Size in octets of MLD ID subfield in Probe Req variant Multi-Link 2422 * element Common Info field. 2423 */ 2424 #define WLAN_ML_PRV_CINFO_MLDID_SIZE 1 2425 2426 /* Max value in octets of Common Info Length subfield of Common Info field in 2427 * Probe Req variant Multi-Link element 2428 */ 2429 #define WLAN_ML_PRV_CINFO_LENGTH_MAX \ 2430 (WLAN_ML_PRV_CINFO_LENGTH_SIZE + \ 2431 WLAN_ML_PRV_CINFO_MLDID_SIZE) 2432 2433 /* End of definitions related to Probe Request variant Multi-Link element. */ 2434 2435 /* Definitions related to Reconfiguration variant Multi-Link element (per 2436 * IEEE802.11be D2.1.1) 2437 */ 2438 2439 /* Definitions for bits in the Presence Bitmap subfield in Reconfiguration 2440 * variant Multi-Link element Control field. Any unused bits are reserved. 2441 */ 2442 /* MLD MAC Address Present */ 2443 #define WLAN_ML_RV_CTRL_PBM_MLDMACADDR_P ((uint16_t)BIT(0)) 2444 2445 /* Definitions related to Reconfiguration variant Multi-Link element Common Info 2446 * field. 2447 */ 2448 2449 /* Size in octets of Common Info Length subfield of Common Info field in 2450 * Reconfiguration variant Multi-Link element. 2451 */ 2452 #define WLAN_ML_RV_CINFO_LENGTH_SIZE 1 2453 2454 /* End of definitions related to Reconfiguration variant Multi-Link element 2455 * Common Info field. 2456 */ 2457 2458 /* Definitions related to Reconfiguration variant Multi-Link element Link Info 2459 * field 2460 */ 2461 2462 /** 2463 * struct wlan_ml_rv_linfo_perstaprof - Fixed fields of Per-STA Profile 2464 * subelement in Reconfiguration variant Multi-Link element Link Info field 2465 * @subelem_id: Subelement ID 2466 * @subelem_len: Subelement length 2467 * @stacontrol: STA Control 2468 */ 2469 struct wlan_ml_rv_linfo_perstaprof { 2470 uint8_t subelem_id; 2471 uint8_t subelem_len; 2472 uint16_t stacontrol; 2473 } qdf_packed; 2474 2475 /* The above fixed fields may be followed by: 2476 * STA Info (variable size) 2477 */ 2478 2479 /* Size in octets of STA Control field of Per-STA Profile subelement in 2480 * Reconfiguration variant Multi-Link element Link Info field. 2481 */ 2482 #define WLAN_ML_RV_LINFO_PERSTAPROF_STACTRL_SIZE 2 2483 2484 /* Definitions for subfields in STA Control field of Per-STA Profile subelement 2485 * in Reconfiguration variant Multi-Link element Link Info field. Any unused 2486 * bits are reserved. 2487 */ 2488 /* Link ID */ 2489 #define WLAN_ML_RV_LINFO_PERSTAPROF_STACTRL_LINKID_IDX 0 2490 #define WLAN_ML_RV_LINFO_PERSTAPROF_STACTRL_LINKID_BITS 4 2491 /* Complete Profile */ 2492 #define WLAN_ML_RV_LINFO_PERSTAPROF_STACTRL_CMPLTPROF_IDX 4 2493 #define WLAN_ML_RV_LINFO_PERSTAPROF_STACTRL_CMPLTPROF_BITS 1 2494 /* MAC Address Present */ 2495 #define WLAN_ML_RV_LINFO_PERSTAPROF_STACTRL_MACADDRP_IDX 5 2496 #define WLAN_ML_RV_LINFO_PERSTAPROF_STACTRL_MACADDRP_BITS 1 2497 /* Delete Timer Present */ 2498 #define WLAN_ML_RV_LINFO_PERSTAPROF_STACTRL_DELTIMERP_IDX 6 2499 #define WLAN_ML_RV_LINFO_PERSTAPROF_STACTRL_DELTIMERP_BITS 1 2500 2501 /* Definitions for subfields in STA Info field of Per-STA Profile subelement 2502 * in Reconfiguration variant Multi-Link element Link Info field. 2503 */ 2504 2505 /* STA Info Length */ 2506 #define WLAN_ML_RV_LINFO_PERSTAPROF_STAINFO_LENGTH_SIZE 1 2507 2508 /* Size in octets of the Delete Timer subfield in STA info field of Per-STA 2509 * Profile subelement in Reconfiguration variant Multi-Link element Link Info 2510 * field. 2511 */ 2512 #define WLAN_ML_RV_LINFO_PERSTAPROF_STAINFO_DELTIMER_SIZE 2 2513 2514 /* Max value in octets of STA Info Length in STA Info field of Per-STA Profile 2515 * subelement in Reconfiguration variant Multi-Link element Link Info field. 2516 */ 2517 #define WLAN_ML_RV_LINFO_PERSTAPROF_STAINFO_LENGTH_MAX \ 2518 (WLAN_ML_RV_LINFO_PERSTAPROF_STAINFO_LENGTH_SIZE + \ 2519 QDF_MAC_ADDR_SIZE + \ 2520 WLAN_ML_RV_LINFO_PERSTAPROF_STAINFO_DELTIMER_SIZE) 2521 2522 /* End of definitions related to Reconfiguration variant Multi-Link element Link 2523 * Info field. 2524 */ 2525 2526 /* End of definitions related to Reconfiguration variant Multi-Link element. */ 2527 2528 /* 2529 * Definitions related to MLO specific aspects of Reduced Neighbor Report 2530 * element. 2531 */ 2532 2533 /* 2534 * Definitions for MLD Parameters subfield in TBTT Information field present as 2535 * part of TBTT Information Set in Neighbor AP Information field of Reduced 2536 * Neighbor Report element. 2537 */ 2538 /* MLD ID */ 2539 #define WLAN_RNR_NBRAPINFO_TBTTINFO_MLDPARAMS_MLDID_IDX 0 2540 #define WLAN_RNR_NBRAPINFO_TBTTINFO_MLDPARAMS_MLDID_BITS 8 2541 /* Link ID */ 2542 #define WLAN_RNR_NBRAPINFO_TBTTINFO_MLDPARAMS_LINKID_IDX 8 2543 #define WLAN_RNR_NBRAPINFO_TBTTINFO_MLDPARAMS_LINKID_BITS 4 2544 /* BSS Parameters Change Count */ 2545 #define WLAN_RNR_NBRAPINFO_TBTTINFO_MLDPARAMS_BSSPARAMCHANGECNT_IDX 12 2546 #define WLAN_RNR_NBRAPINFO_TBTTINFO_MLDPARAMS_BSSPARAMCHANGECNT_BITS 8 2547 /* All Updates Included */ 2548 #define WLAN_RNR_NBRAPINFO_TBTTINFO_MLDPARAMS_ALLUPDATESINC_IDX 20 2549 #define WLAN_RNR_NBRAPINFO_TBTTINFO_MLDPARAMS_ALLUPDATESINC_BITS 1 2550 2551 /* 2552 * End of definitions related to MLO specific aspects of Reduced Neighbor Report 2553 * element. 2554 */ 2555 #endif /* WLAN_FEATURE_11BE_MLO */ 2556 #endif /* WLAN_FEATURE_11BE */ 2557 2558 #ifdef WLAN_FEATURE_11BE 2559 /** 2560 * struct wlan_ie_tid_to_link_mapping - TID-to-link mapping IE 2561 * @elem_id: T2LM IE 2562 * @elem_len: T2LM IE len 2563 * @elem_id_extn: T2LM extension id 2564 * @data: Variable length data described below 2565 */ 2566 struct wlan_ie_tid_to_link_mapping { 2567 uint8_t elem_id; 2568 uint8_t elem_len; 2569 uint8_t elem_id_extn; 2570 uint8_t data[]; 2571 } qdf_packed; 2572 2573 /* Size in octets of Tid to Link mapping control */ 2574 #define WLAN_T2LM_CTRL_SIZE 2 2575 /* Size in octets of Mapping switch time size */ 2576 #define WLAN_T2LM_MAPPING_SWITCH_TIME_SIZE 2 2577 /* Size in octets of Expected duration size */ 2578 #define WLAN_T2LM_EXPECTED_DURATION_SIZE 3 2579 /* Size in octets of Link mapping of TID 0-7 size */ 2580 #define WLAN_T2LM_LINK_MAPPING_SIZE 2 2581 2582 /* The variable length data in wlan_ie_tid_to_link_mapping structure has the 2583 * following fields. 2584 * - TID-to-link mapping control (2 octet) 2585 * - Mapping switch time (0 or 2 octet) 2586 * - Expected duration (0 or 3 octet) 2587 * - Link mapping presence indicator (0 or 1 octet) 2588 * - Link mapping of TID 0(optional) to TID 7(optional). Each field has 0 or 2 2589 * octets. 2590 */ 2591 2592 /* Definitions related TID-to-link mapping control*/ 2593 /* Direction */ 2594 #define WLAN_T2LM_CONTROL_DIRECTION_IDX 0 2595 #define WLAN_T2LM_CONTROL_DIRECTION_BITS 2 2596 /* Default link mapping */ 2597 #define WLAN_T2LM_CONTROL_DEFAULT_LINK_MAPPING_IDX 2 2598 #define WLAN_T2LM_CONTROL_DEFAULT_LINK_MAPPING_BITS 1 2599 /* Mapping switch time present bit */ 2600 #define WLAN_T2LM_CONTROL_MAPPING_SWITCH_TIME_PRESENT_IDX 3 2601 #define WLAN_T2LM_CONTROL_MAPPING_SWITCH_TIME_PRESENT_BITS 1 2602 /* Expected duration present bit */ 2603 #define WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_IDX 4 2604 #define WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_BITS 1 2605 /* Bits 5-7 are reserved */ 2606 /* Link mapping presence indicator */ 2607 #define WLAN_T2LM_CONTROL_LINK_MAPPING_PRESENCE_INDICATOR_IDX 8 2608 #define WLAN_T2LM_CONTROL_LINK_MAPPING_PRESENCE_INDICATOR_BITS 8 2609 2610 /** 2611 * struct wlan_ie_multi_link_traffic_indication - Multi-link traffic indication 2612 * element 2613 * @elem_id: Multi-link traffic indication IE 2614 * @elem_len: Multi-link traffic indication IE length 2615 * @elem_id_extn: Multi-link traffic indication extension ID 2616 * @ml_traffic_ind_control: Multi-link traffic indication control 2617 * @per_link_traffic_ind_list: Indicates the per-link traffic indication. Each 2618 * bit in the per_link_traffic_ind_list corresponds 2619 * to a link of the MLD. 2620 */ 2621 struct wlan_ie_multi_link_traffic_indication { 2622 uint8_t elem_id; 2623 uint8_t elem_len; 2624 uint8_t elem_id_extn; 2625 uint16_t ml_traffic_ind_control; 2626 uint16_t per_link_traffic_ind_list[]; 2627 } qdf_packed; 2628 #endif /* WLAN_FEATURE_11BE */ 2629 2630 /** 2631 * struct he_oper_6g_param: 6 Ghz params for HE 2632 * @primary_channel: HE 6GHz Primary channel number 2633 * @width: HE 6GHz BSS Channel Width 2634 * @duplicate_beacon: HE 6GHz Duplicate beacon field 2635 * @reserved: Reserved bits 2636 * @chan_freq_seg0: HE 6GHz Channel Centre Frequency Segment 0 2637 * @chan_freq_seg1: HE 6GHz Channel Centre Frequency Segment 1 2638 * @minimum_rate: HE 6GHz Minimum Rate 2639 */ 2640 struct he_oper_6g_param { 2641 uint8_t primary_channel; 2642 uint8_t width:2, 2643 duplicate_beacon:1, 2644 reserved:5; 2645 uint8_t chan_freq_seg0; 2646 uint8_t chan_freq_seg1; 2647 uint8_t minimum_rate; 2648 } qdf_packed; 2649 2650 /** 2651 * struct wlan_country_ie: country IE 2652 * @ie: country IE 2653 * @len: IE len 2654 * @cc: country code 2655 */ 2656 struct wlan_country_ie { 2657 uint8_t ie; 2658 uint8_t len; 2659 uint8_t cc[3]; 2660 } qdf_packed; 2661 2662 /** 2663 * struct wlan_country_ie: country IE 2664 * @ie: QBSS IE 2665 * @len: IE len 2666 * @station_count: number of station associated 2667 * @qbss_chan_load: qbss channel load 2668 * @qbss_load_avail: qbss_load_avail 2669 */ 2670 struct qbss_load_ie { 2671 uint8_t ie; 2672 uint8_t len; 2673 uint16_t station_count; 2674 uint8_t qbss_chan_load; 2675 uint16_t qbss_load_avail; 2676 } qdf_packed; 2677 2678 /** 2679 * struct wlan_bcn_frame: beacon frame fixed params 2680 * @timestamp: the value of sender's TSFTIMER 2681 * @beacon_interval: beacon interval 2682 * @capability: capability 2683 * @ie: variable IE 2684 */ 2685 struct wlan_bcn_frame { 2686 uint8_t timestamp[8]; 2687 uint16_t beacon_interval; 2688 union wlan_capability capability; 2689 struct ie_header ie; 2690 } qdf_packed; 2691 2692 #define WLAN_TIM_IE_MIN_LENGTH 4 2693 2694 /** 2695 * struct wlan_tim_ie: tim IE 2696 * @tim_ie: Time IE 2697 * @tim_len: TIM IE len 2698 * @tim_count: dtim count 2699 * @tim_period: dtim period 2700 * @tim_bitctl: bitmap control 2701 * @tim_bitmap: variable length bitmap 2702 */ 2703 struct wlan_tim_ie { 2704 uint8_t tim_ie; /* WLAN_ELEMID_TIM */ 2705 uint8_t tim_len; 2706 uint8_t tim_count; /* DTIM count */ 2707 uint8_t tim_period; /* DTIM period */ 2708 uint8_t tim_bitctl; /* bitmap control */ 2709 uint8_t tim_bitmap[251]; /* variable-length bitmap */ 2710 } qdf_packed; 2711 2712 /** 2713 * struct rsn_mdie: mobility domain IE 2714 * @rsn_id: RSN IE id 2715 * @rsn_len: RSN IE len 2716 * @mobility_domain: mobility domain info 2717 * @ft_capab: ft capability 2718 * 2719 * Reference 9.4.2.47 Mobility Domain element (MDE) of 802.11-2016 2720 */ 2721 struct rsn_mdie { 2722 uint8_t rsn_id; 2723 uint8_t rsn_len; 2724 uint8_t mobility_domain[2]; 2725 uint8_t ft_capab; 2726 } qdf_packed; 2727 2728 /** 2729 * struct srp_ie: Spatial reuse parameter IE 2730 * @srp_id: SRP IE id 2731 * @srp_len: SRP IE len 2732 * @srp_id_extn: SRP Extension ID 2733 * @sr_control: sr control 2734 * @non_srg_obsspd_max_offset: non srg obsspd max offset 2735 * @srg_obss_pd_min_offset: srg obss pd min offset 2736 * @srg_obss_pd_max_offset: srg obss pd max offset 2737 * @srg_bss_color_bitmap: srg bss color bitmap 2738 * @srg_partial_bssid_bitmap: srg partial bssid bitmap 2739 */ 2740 struct wlan_srp_ie { 2741 uint8_t srp_id; 2742 uint8_t srp_len; 2743 uint8_t srp_id_extn; 2744 uint8_t sr_control; 2745 union { 2746 struct { 2747 uint8_t non_srg_obsspd_max_offset; 2748 uint8_t srg_obss_pd_min_offset; 2749 uint8_t srg_obss_pd_max_offset; 2750 uint8_t srg_bss_color_bitmap[8]; 2751 uint8_t srg_partial_bssid_bitmap[8]; 2752 } qdf_packed nonsrg_srg_info; 2753 struct { 2754 uint8_t non_srg_obsspd_max_offset; 2755 } qdf_packed nonsrg_info; 2756 struct { 2757 uint8_t srg_obss_pd_min_offset; 2758 uint8_t srg_obss_pd_max_offset; 2759 uint8_t srg_bss_color_bitmap[8]; 2760 uint8_t srg_partial_bssid_bitmap[8]; 2761 } qdf_packed srg_info; 2762 }; 2763 } qdf_packed; 2764 2765 #define ESP_INFORMATION_LIST_LENGTH 3 2766 #define MAX_ESP_INFORMATION_FIELD 4 2767 /* 2768 * enum access_category: tells about access category in ESP paramameter 2769 * @ESP_AC_BK: ESP access category for background 2770 * @ESP_AC_BE: ESP access category for best effort 2771 * @ESP_AC_VI: ESP access category for video 2772 * @ESP_AC_VO: ESP access category for Voice 2773 */ 2774 enum access_category { 2775 ESP_AC_BK, 2776 ESP_AC_BE, 2777 ESP_AC_VI, 2778 ESP_AC_VO, 2779 2780 }; 2781 /* 2782 * struct wlan_esp_info: structure for Esp information parameter 2783 * @access_category: access category info 2784 * @reserved: reserved 2785 * @data_format: two bits in length and tells about data format 2786 * i.e. 0 = No aggregation is expected to be performed for MSDUs or MPDUs with 2787 * the Type subfield equal to Data for the corresponding AC 2788 * 1 = A-MSDU aggregation is expected to be performed for MSDUs for the 2789 * corresponding AC, but A-MPDU aggregation is not expected to be performed 2790 * for MPDUs with the Type subfield equal to Data for the corresponding AC 2791 * 2 = A-MPDU aggregation is expected to be performed for MPDUs with the Type 2792 * subfield equal to Data for the corresponding AC, but A-MSDU aggregation is 2793 * not expected to be performed for MSDUs for the corresponding AC 2794 * 3 = A-MSDU aggregation is expected to be performed for MSDUs for the 2795 * corresponding AC and A-MPDU aggregation is expected to be performed for 2796 * MPDUs with the Type subfield equal to Data for the corresponding AC 2797 * @ba_window_size: BA Window Size subfield is three bits in length and 2798 * indicates the size of the Block Ack window that is 2799 * expected for the corresponding access category 2800 * @estimated_air_fraction: Estimated Air Time Fraction subfield is 8 bits in 2801 * length and contains an unsigned integer that represents 2802 * the predicted percentage of time, linearly scaled with 255 representing 2803 * 100%, that a new STA joining the 2804 * BSS will be allocated for PPDUs that contain only 2805 * MPDUs with the Type 2806 * subfield equal to Data of the 2807 * corresponding access category for that STA. 2808 * @ppdu_duration: Data PPDU Duration Target field 2809 * is 8 bits in length and is 2810 * an unsigned integer that indicates the 2811 * expected target duration of PPDUs that contain only MPDUs with the Type 2812 * subfield equal to Data for the 2813 * corresponding access category in units of 50 μs 2814 */ 2815 struct wlan_esp_info { 2816 uint8_t access_category:2; 2817 uint8_t reserved:1; 2818 uint8_t data_format:2; 2819 uint8_t ba_window_size:3; 2820 uint8_t estimated_air_fraction; 2821 uint8_t ppdu_duration; 2822 }; 2823 2824 /** 2825 * struct wlan_esp_ie: struct for ESP information 2826 * @esp_id: ESP IE id 2827 * @esp_len: ESP IE len 2828 * @esp_id_extn: ESP Extension ID 2829 * @esp_info_AC_BK: ESP information related to BK category 2830 * @esp_info_AC_BE: ESP information related to BE category 2831 * @esp_info_AC_VI: ESP information related to VI category 2832 * @esp_info_AC_VO: ESP information related to VO category 2833 */ 2834 struct wlan_esp_ie { 2835 uint8_t esp_id; 2836 uint8_t esp_len; 2837 uint8_t esp_id_extn; 2838 struct wlan_esp_info esp_info_AC_BK; 2839 struct wlan_esp_info esp_info_AC_BE; 2840 struct wlan_esp_info esp_info_AC_VI; 2841 struct wlan_esp_info esp_info_AC_VO; 2842 } qdf_packed; 2843 2844 /** 2845 * struct wlan_ext_cap_ie - struct for extended capabilities information 2846 * @ext_cap_id: Extended capabilities id 2847 * @ext_cap_len: Extended capabilities IE len 2848 * @ext_caps: Variable length extended capabilities information 2849 */ 2850 struct wlan_ext_cap_ie { 2851 uint8_t ext_cap_id; 2852 uint8_t ext_cap_len; 2853 uint8_t ext_caps[]; 2854 } qdf_packed; 2855 2856 /* EHT caps fixed field = 2 bytes (EHT mac caps) + 9 bytes (EHT phy caps) */ 2857 #define EHT_CAP_FIXED_FIELDS 11 2858 #define EHT_CAP_320M_MCS_MAP_LEN 3 2859 #define EHT_CAP_160M_MCS_MAP_LEN 3 2860 #define EHT_CAP_80M_MCS_MAP_LEN 3 2861 #define EHT_CAP_20M_MCS_MAP_LEN 4 2862 #define EHT_CAP_OUI_LEN 3 2863 2864 /** 2865 * struct wlan_eht_cap_info - struct for eht capabilities information 2866 * @EPCS_pri_access: EPCS priority access support 2867 * @eht_om_ctl: EHT OM control support 2868 * @triggered_txop_sharing_mode1: Triggered TXOP sharing support mode 1 support 2869 * @triggered_txop_sharing_mode2: Triggered TXOP sharing mode 2 support 2870 * @restricted_twt: Restricted TWT support 2871 * @scs_traffic_desc: SCS traffic description support 2872 * @max_mpdu_len: Maximum MPDU length 2873 * @max_a_mpdu_len_exponent_ext: Maximum A-MPDU Length Exponent Extension 2874 * @eht_trs_support: EHT TRS SUPPORT 2875 * @txop_return_support_txop_share_m2: TXOP Return Support in TXOP Share Mode 2 2876 * @reserved3: reserved bits 2877 * @reserved2: reserved bits 2878 * @support_320mhz_6ghz: support 320mhz in 6gz 2879 * @ru_242tone_wt_20mhz: Support For 242-tone RU In BW Wider Than 20 MHz 2880 * @ndp_4x_eht_ltf_3dot2_us_gi: NDP With 4 EHT-LTF And 3.2 μs GI 2881 * @partial_bw_mu_mimo: Partial Bandwidth UL MU-MIMO 2882 * @su_beamformer: SU Beamformer 2883 * @su_beamformee: SU Beamformer 2884 * @bfee_ss_le_80mhz: Beamformee SS (≤ 80 MHz) 2885 * @bfee_ss_160mhz: Beamformee SS (= 160 MHz) 2886 * @bfee_ss_320mhz: Beamformee SS (= 320 MHz) 2887 * @num_sounding_dim_le_80mhz: Number Of Sounding Dimensions (≤ 80 MHz) 2888 * @num_sounding_dim_160mhz: Number Of Sounding Dimensions (= 160 MHz) 2889 * @num_sounding_dim_320mhz: Number Of Sounding Dimensions (= 320 MHz) 2890 * @ng_16_su_feedback: Ng = 16 SU Feedback 2891 * @ng_16_mu_feedback: Ng = 16 MU Feedback 2892 * @cb_sz_4_2_su_feedback: Codebook Size SU Feedback 2893 * @cb_sz_7_5_su_feedback: Codebook Size SU Feedback 2894 * @trig_su_bforming_feedback: Triggered SU Beamforming Feedback 2895 * @trig_mu_bforming_partial_bw_feedback: Triggered MU Partial 2896 Beamforming Feedback 2897 * @triggered_cqi_feedback: Triggered SU Beamforming Feedback 2898 * @partial_bw_dl_mu_mimo: Partial Bandwidth DL MU-MIMO 2899 * @psr_based_sr: PSR-based SR Support 2900 * @power_boost_factor: Power Boost Factor Support 2901 * @eht_mu_ppdu_4x_ltf_0_8_us_gi: EHT MU PPDU With 4 EHT-LTF And 0.8 μs GI 2902 * @max_nc: Max Nc 2903 * @non_trig_cqi_feedback: Non-Triggered CQI Feedback 2904 * @tx_1024_4096_qam_lt_242_tone_ru: Tx 1024-QAM And 4096-QAM < 242-tone 2905 RU Support 2906 * @rx_1024_4096_qam_lt_242_tone_ru: Rx 1024-QAM And 4096-QAM < 242-tone 2907 RU Support 2908 * @ppet_present: PPE Thresholds Present 2909 * @common_nominal_pkt_padding: Common Nominal Packet Padding 2910 * @max_num_eht_ltf: Maximum Number Of Supported EHT-LTFs 2911 * @mcs_15: Support Of MCS 15 2912 * @eht_dup_6ghz: Support Of EHT DUP In 6 GHz 2913 * @op_sta_rx_ndp_wider_bw_20mhz: Support For 20 MHz Operating STA 2914 Receiving NDP With Wider Bandwidth 2915 * @non_ofdma_ul_mu_mimo_le_80mhz: Non-OFDMA UL MU-MIMO (BW ≤ 80 MHz) 2916 * @non_ofdma_ul_mu_mimo_160mhz: Non-OFDMA UL MU-MIMO (BW ≤ 160 MHz) 2917 * @non_ofdma_ul_mu_mimo_320mhz: Non-OFDMA UL MU-MIMO (BW ≤ 320 MHz) 2918 * @mu_bformer_le_80mhz: MU Beamformer (BW ≤ 80 MHz) 2919 * @mu_bformer_160mhz: MU Beamformer (BW ≤ 160 MHz) 2920 * @mu_bformer_320mhz: MU Beamformer (BW ≤ 320 MHz) 2921 * @tb_sounding_feedback_rl: TB sounding feedback rate limit 2922 * @rx_1k_qam_in_wider_bw_dl_ofdma: Rx 1024-QAM in wider bandwidth DL 2923 * OFDMA support 2924 * @rx_4k_qam_in_wider_bw_dl_ofdma: Rx 4096-QAM in wider bandwidth DL 2925 * OFDMA support 2926 * @reserved3: reserved bits 2927 * @bw_20_rx_max_nss_for_mcs_0_to_7: Max Rx NSS for MCS 0 to 7 (BW = 20MHz) 2928 * @bw_20_tx_max_nss_for_mcs_0_to_7: Max Tx NSS for MCS 0 to 7 (BW = 20MHz) 2929 * @bw_20_rx_max_nss_for_mcs_8_and_9: Max Rx NSS for MCS 8 and 9 (BW = 20MHz) 2930 * @bw_20_tx_max_nss_for_mcs_8_and_9: Max Tx NSS for MCS 8 and 9 (BW = 20MHz) 2931 * @bw_20_rx_max_nss_for_mcs_10_and_11: Max Rx NSS for MCS 10 and 11 2932 * (BW = 20MHz) 2933 * @bw_20_tx_max_nss_for_mcs_10_and_11: Max Tx NSS for MCS 10 and 11 2934 * (BW = 20MHz) 2935 * @bw_20_rx_max_nss_for_mcs_12_and_13: Max Rx NSS for MCS 12 and 13 2936 * (BW = 20MHz) 2937 * @bw_20_tx_max_nss_for_mcs_12_and_13: Max Tx NSS for MCS 12 and 13 2938 * (BW = 20MHz) 2939 * @bw_le_80_rx_max_nss_for_mcs_0_to_9: Max Rx NSS for MCS 0 to 9 (BW <= 80MHz) 2940 * @bw_le_80_tx_max_nss_for_mcs_0_to_9: Max Tx NSS for MCS 0 to 9 (BW <= 80MHz) 2941 * @bw_le_80_rx_max_nss_for_mcs_10_and_11: Max Rx NSS for MCS 10 and 11 2942 * (BW <= 80MHz) 2943 * @bw_le_80_tx_max_nss_for_mcs_10_and_11: Max Tx NSS for MCS 10 and 11 2944 * (BW <= 80MHz) 2945 * @bw_le_80_rx_max_nss_for_mcs_12_and_13: Max Rx NSS for MCS 12 and 13 2946 * (BW <= 80MHz) 2947 * @bw_le_80_tx_max_nss_for_mcs_12_and_13: Max Tx NSS for MCS 12 and 13 2948 * (BW <= 80MHz) 2949 * @bw_160_rx_max_nss_for_mcs_0_to_9: Max Rx NSS for MCS 0 to 9 (BW = 160MHz) 2950 * @bw_160_tx_max_nss_for_mcs_0_to_9: Max Tx NSS for MCS 0 to 9 (BW = 160MHz) 2951 * @bw_160_rx_max_nss_for_mcs_10_and_11: Max Rx NSS for MCS 10 and 11 2952 * (BW = 160MHz) 2953 * @bw_160_tx_max_nss_for_mcs_10_and_11: Max Tx NSS for MCS 10 and 11 2954 * (BW = 160MHz) 2955 * @bw_160_rx_max_nss_for_mcs_12_and_13: Max Rx NSS for MCS 12 and 13 2956 * (BW = 160MHz) 2957 * @bw_160_tx_max_nss_for_mcs_12_and_13: Max Tx NSS for MCS 12 and 13 2958 * (BW = 160MHz) 2959 * @bw_320_rx_max_nss_for_mcs_0_to_9: Max Rx NSS for MCS 0 to 9 (BW = 320MHz) 2960 * @bw_320_tx_max_nss_for_mcs_0_to_9: Max Tx NSS for MCS 0 to 9 (BW = 320MHz) 2961 * @bw_320_rx_max_nss_for_mcs_10_and_11: Max Rx NSS for MCS 10 and 11 2962 * (BW = 320MHz) 2963 * @bw_320_tx_max_nss_for_mcs_10_and_11: Max Tx NSS for MCS 10 and 11 2964 * (BW = 320MHz) 2965 * @bw_320_rx_max_nss_for_mcs_12_and_13: Max Rx NSS for MCS 12 and 13 2966 * (BW = 320MHz) 2967 * @bw_320_tx_max_nss_for_mcs_12_and_13: Max Tx NSS for MCS 12 and 13 2968 * (BW = 320MHz) 2969 */ 2970 struct wlan_eht_cap_info { 2971 #ifndef ANI_LITTLE_BIT_ENDIAN 2972 uint16_t reserved:5; 2973 uint16_t txop_return_support_txop_share_m2:1; 2974 uint16_t eht_trs_support:1; 2975 uint16_t max_a_mpdu_len_exponent_ext:1; 2976 uint16_t max_mpdu_len:2; 2977 uint16_t scs_traffic_desc:1; 2978 uint16_t restricted_twt:1; 2979 uint16_t triggered_txop_sharing_mode2:1; 2980 uint16_t triggered_txop_sharing_mode1:1; 2981 uint16_t eht_om_ctl:1; 2982 uint16_t epcs_pri_access:1; 2983 2984 uint32_t triggered_cqi_feedback:1; 2985 uint32_t trig_mu_bforming_partial_bw_feedback:1; 2986 uint32_t trig_su_bforming_feedback:1; 2987 uint32_t cb_sz_7_5_su_feedback:1; 2988 uint32_t cb_sz_4_2_su_feedback:1; 2989 uint32_t ng_16_mu_feedback:1; 2990 uint32_t ng_16_su_feedback:1; 2991 uint32_t num_sounding_dim_320mhz:3; 2992 uint32_t num_sounding_dim_160mhz:3; 2993 uint32_t num_sounding_dim_le_80mhz:3; 2994 uint32_t bfee_ss_320mhz:3; 2995 uint32_t bfee_ss_160mhz:3; 2996 uint32_t bfee_ss_le_80mhz:3; 2997 uint32_t su_beamformee:1; 2998 uint32_t su_beamformer:1; 2999 uint32_t partial_bw_mu_mimo:1; 3000 uint32_t ndp_4x_eht_ltf_3dot2_us_gi:1; 3001 uint32_t ru_242tone_wt_20mhz:1; 3002 uint32_t support_320mhz_6ghz:1; 3003 uint32_t reserved2:1; 3004 3005 uint32_t tb_sounding_feedback_rl:1; 3006 uint32_t mu_bformer_320mhz:1; 3007 uint32_t mu_bformer_160mhz:1; 3008 uint32_t mu_bformer_le_80mhz:1; 3009 uint32_t non_ofdma_ul_mu_mimo_320mhz:1; 3010 uint32_t non_ofdma_ul_mu_mimo_160mhz:1; 3011 uint32_t non_ofdma_ul_mu_mimo_le_80mhz:1; 3012 uint32_t op_sta_rx_ndp_wider_bw_20mhz:1; 3013 uint32_t eht_dup_6ghz:1; 3014 uint32_t mcs_15:4; 3015 uint32_t max_num_eht_ltf:5; 3016 uint32_t common_nominal_pkt_padding:2; 3017 uint32_t ppet_present:1; 3018 uint32_t rx_1024_4096_qam_lt_242_tone_ru:1; 3019 uint32_t tx_1024_4096_qam_lt_242_tone_ru:1; 3020 uint32_t non_trig_cqi_feedback:1; 3021 uint32_t max_nc:4; 3022 uint32_t eht_mu_ppdu_4x_ltf_0_8_us_gi:1; 3023 uint32_t power_boost_factor:1; 3024 uint32_t psr_based_sr:1; 3025 uint32_t partial_bw_dl_mu_mimo:1; 3026 3027 uint8_t reserved3:6; 3028 uint8_t rx_4k_qam_in_wider_bw_dl_ofdma:1; 3029 uint8_t rx_1k_qam_in_wider_bw_dl_ofdma:1; 3030 3031 uint32_t bw_20_rx_max_nss_for_mcs_12_and_13:4; 3032 uint32_t bw_20_tx_max_nss_for_mcs_12_and_13:4; 3033 uint32_t bw_20_rx_max_nss_for_mcs_10_and_11:4; 3034 uint32_t bw_20_tx_max_nss_for_mcs_10_and_11:4; 3035 uint32_t bw_20_rx_max_nss_for_mcs_8_and_9:4; 3036 uint32_t bw_20_tx_max_nss_for_mcs_8_and_9:4; 3037 uint32_t bw_20_rx_max_nss_for_mcs_0_to_7:4; 3038 uint32_t bw_20_tx_max_nss_for_mcs_0_to_7:4; 3039 3040 uint32_t bw_le_80_rx_max_nss_for_mcs_12_and_13:4; 3041 uint32_t bw_le_80_tx_max_nss_for_mcs_12_and_13:4; 3042 uint32_t bw_le_80_rx_max_nss_for_mcs_10_and_11:4; 3043 uint32_t bw_le_80_tx_max_nss_for_mcs_10_and_11:4; 3044 uint32_t bw_le_80_rx_max_nss_for_mcs_0_to_9:4; 3045 uint32_t bw_le_80_tx_max_nss_for_mcs_0_to_9:4; 3046 uint32_t bw_160_rx_max_nss_for_mcs_12_and_13:4; 3047 uint32_t bw_160_tx_max_nss_for_mcs_12_and_13:4; 3048 3049 uint32_t bw_160_rx_max_nss_for_mcs_10_and_11:4; 3050 uint32_t bw_160_tx_max_nss_for_mcs_10_and_11:4; 3051 uint32_t bw_160_rx_max_nss_for_mcs_0_to_9:4; 3052 uint32_t bw_160_tx_max_nss_for_mcs_0_to_9:4; 3053 uint32_t bw_320_rx_max_nss_for_mcs_12_and_13:4; 3054 uint32_t bw_320_tx_max_nss_for_mcs_12_and_13:4; 3055 uint32_t bw_320_rx_max_nss_for_mcs_10_and_11:4; 3056 uint32_t bw_320_tx_max_nss_for_mcs_10_and_11:4; 3057 3058 uint8_t bw_320_rx_max_nss_for_mcs_0_to_9:4; 3059 uint8_t bw_320_tx_max_nss_for_mcs_0_to_9:4; 3060 3061 #else 3062 uint16_t epcs_pri_access:1; 3063 uint16_t eht_om_ctl:1; 3064 uint16_t triggered_txop_sharing_mode1:1; 3065 uint16_t triggered_txop_sharing_mode2:1; 3066 uint16_t restricted_twt:1; 3067 uint16_t scs_traffic_desc:1; 3068 uint16_t max_mpdu_len:2; 3069 uint16_t max_a_mpdu_len_exponent_ext:1; 3070 uint16_t eht_trs_support:1; 3071 uint16_t txop_return_support_txop_share_m2:1; 3072 uint16_t reserved:5; 3073 3074 uint32_t reserved2:1; 3075 uint32_t support_320mhz_6ghz:1; 3076 uint32_t ru_242tone_wt_20mhz:1; 3077 uint32_t ndp_4x_eht_ltf_3dot2_us_gi:1; 3078 uint32_t partial_bw_mu_mimo:1; 3079 uint32_t su_beamformer:1; 3080 uint32_t su_beamformee:1; 3081 uint32_t bfee_ss_le_80mhz:3; 3082 uint32_t bfee_ss_160mhz:3; 3083 uint32_t bfee_ss_320mhz:3; 3084 uint32_t num_sounding_dim_le_80mhz:3; 3085 uint32_t num_sounding_dim_160mhz:3; 3086 uint32_t num_sounding_dim_320mhz:3; 3087 uint32_t ng_16_su_feedback:1; 3088 uint32_t ng_16_mu_feedback:1; 3089 uint32_t cb_sz_4_2_su_feedback:1; 3090 uint32_t cb_sz_7_5_su_feedback:1; 3091 uint32_t trig_su_bforming_feedback:1; 3092 uint32_t trig_mu_bforming_partial_bw_feedback:1; 3093 uint32_t triggered_cqi_feedback:1; 3094 3095 uint32_t partial_bw_dl_mu_mimo:1; 3096 uint32_t psr_based_sr:1; 3097 uint32_t power_boost_factor:1; 3098 uint32_t eht_mu_ppdu_4x_ltf_0_8_us_gi:1; 3099 uint32_t max_nc:4; 3100 uint32_t non_trig_cqi_feedback:1; 3101 uint32_t tx_1024_4096_qam_lt_242_tone_ru:1; 3102 uint32_t rx_1024_4096_qam_lt_242_tone_ru:1; 3103 uint32_t ppet_present:1; 3104 uint32_t common_nominal_pkt_padding:2; 3105 uint32_t max_num_eht_ltf:5; 3106 uint32_t mcs_15:4; 3107 uint32_t eht_dup_6ghz:1; 3108 uint32_t op_sta_rx_ndp_wider_bw_20mhz:1; 3109 uint32_t non_ofdma_ul_mu_mimo_le_80mhz:1; 3110 uint32_t non_ofdma_ul_mu_mimo_160mhz:1; 3111 uint32_t non_ofdma_ul_mu_mimo_320mhz:1; 3112 uint32_t mu_bformer_le_80mhz:1; 3113 uint32_t mu_bformer_160mhz:1; 3114 uint32_t mu_bformer_320mhz:1; 3115 uint32_t tb_sounding_feedback_rl:1; 3116 3117 uint8_t rx_1k_qam_in_wider_bw_dl_ofdma:1; 3118 uint8_t rx_4k_qam_in_wider_bw_dl_ofdma:1; 3119 uint8_t reserved3:6; 3120 3121 uint32_t bw_20_rx_max_nss_for_mcs_0_to_7:4; 3122 uint32_t bw_20_tx_max_nss_for_mcs_0_to_7:4; 3123 uint32_t bw_20_rx_max_nss_for_mcs_8_and_9:4; 3124 uint32_t bw_20_tx_max_nss_for_mcs_8_and_9:4; 3125 uint32_t bw_20_rx_max_nss_for_mcs_10_and_11:4; 3126 uint32_t bw_20_tx_max_nss_for_mcs_10_and_11:4; 3127 uint32_t bw_20_rx_max_nss_for_mcs_12_and_13:4; 3128 uint32_t bw_20_tx_max_nss_for_mcs_12_and_13:4; 3129 3130 uint32_t bw_le_80_rx_max_nss_for_mcs_0_to_9:4; 3131 uint32_t bw_le_80_tx_max_nss_for_mcs_0_to_9:4; 3132 uint32_t bw_le_80_rx_max_nss_for_mcs_10_and_11:4; 3133 uint32_t bw_le_80_tx_max_nss_for_mcs_10_and_11:4; 3134 uint32_t bw_le_80_rx_max_nss_for_mcs_12_and_13:4; 3135 uint32_t bw_le_80_tx_max_nss_for_mcs_12_and_13:4; 3136 3137 uint32_t bw_160_rx_max_nss_for_mcs_0_to_9:4; 3138 uint32_t bw_160_tx_max_nss_for_mcs_0_to_9:4; 3139 uint32_t bw_160_rx_max_nss_for_mcs_10_and_11:4; 3140 uint32_t bw_160_tx_max_nss_for_mcs_10_and_11:4; 3141 uint32_t bw_160_rx_max_nss_for_mcs_12_and_13:4; 3142 uint32_t bw_160_tx_max_nss_for_mcs_12_and_13:4; 3143 3144 uint32_t bw_320_rx_max_nss_for_mcs_0_to_9:4; 3145 uint32_t bw_320_tx_max_nss_for_mcs_0_to_9:4; 3146 uint32_t bw_320_rx_max_nss_for_mcs_10_and_11:4; 3147 uint32_t bw_320_tx_max_nss_for_mcs_10_and_11:4; 3148 uint8_t bw_320_rx_max_nss_for_mcs_12_and_13:4; 3149 uint8_t bw_320_tx_max_nss_for_mcs_12_and_13:4; 3150 #endif 3151 } qdf_packed; 3152 3153 /** 3154 * wlan_eht_cap_info_network_endian - struct for eht capabilities information 3155 * @epcs_pri_access: EPCS priority access support 3156 * @eht_om_ctl: EHT OM control support 3157 * @triggered_txop_sharing_mode1: Triggered TXOP sharing mode 1 support 3158 * @triggered_txop_sharing_mode2: Triggered TXOP sharing mode 2 support 3159 * @restricted_twt: Restricted TWT support 3160 * @scs_traffic_desc: SCS traffic description support 3161 * @max_mpdu_len: Maximum MPDU length 3162 * @max_a_mpdu_len_exponent_ext: Maximum A-MPDU Length Exponent Extension 3163 * @eht_trs_support: EHT TRS SUPPORT 3164 * @txop_return_support_txop_share_m2: TXOP Return Support in TXOP Share Mode 2 3165 * @reserved3: reserved bits 3166 * @reserved2: reserved bits 3167 * @support_320mhz_6ghz: support 320mhz in 6gz 3168 * @ru_242tone_wt_20mhz: Support For 242-tone RU In BW Wider Than 20 MHz 3169 * @ndp_4x_eht_ltf_3dot2_us_gi: NDP With 4 EHT-LTF And 3.2 μs GI 3170 * @partial_bw_mu_mimo: Partial Bandwidth UL MU-MIMO 3171 * @su_beamformer: SU Beamformer 3172 * @su_beamformee: SU Beamformer 3173 * @bfee_ss_le_80mhz: Beamformee SS (≤ 80 MHz) 3174 * @bfee_ss_160mhz: Beamformee SS (= 160 MHz) 3175 * @bfee_ss_320mhz: Beamformee SS (= 320 MHz) 3176 * @num_sounding_dim_le_80mhz: Number Of Sounding Dimensions (≤ 80 MHz) 3177 * @num_sounding_dim_160mhz: Number Of Sounding Dimensions (= 160 MHz) 3178 * @num_sounding_dim_320mhz: Number Of Sounding Dimensions (= 320 MHz) 3179 * @ng_16_su_feedback: Ng = 16 SU Feedback 3180 * @ng_16_mu_feedback: Ng = 16 MU Feedback 3181 * @cb_sz_4_2_su_feedback: Codebook Size SU Feedback 3182 * @cb_sz_7_5_su_feedback: Codebook Size SU Feedback 3183 * @trig_su_bforming_feedback: Triggered SU Beamforming Feedback 3184 * @trig_mu_bforming_partial_bw_feedback: Triggered MU Partial 3185 Beamforming Feedback 3186 * @triggered_cqi_feedback: Triggered SU Beamforming Feedback 3187 * @partial_bw_dl_mu_mimo: Partial Bandwidth DL MU-MIMO 3188 * @psr_based_sr: PSR-based SR Support 3189 * @power_boost_factor: Power Boost Factor Support 3190 * @eht_mu_ppdu_4x_ltf_0_8_us_gi: EHT MU PPDU With 4 EHT-LTF And 0.8 μs GI 3191 * @max_nc: Max Nc 3192 * @non_trig_cqi_feedback: Non-Triggered CQI Feedback 3193 * @tx_1024_4096_qam_lt_242_tone_ru: Tx 1024-QAM And 4096-QAM < 242-tone 3194 RU Support 3195 * @rx_1024_4096_qam_lt_242_tone_ru: Rx 1024-QAM And 4096-QAM < 242-tone 3196 RU Support 3197 * @ppet_present: PPE Thresholds Present 3198 * @common_nominal_pkt_padding: Common Nominal Packet Padding 3199 * @max_num_eht_ltf: Maximum Number Of Supported EHT-LTFs 3200 * @mcs_15: Support Of MCS 15 3201 * @eht_dup_6ghz: Support Of EHT DUP In 6 GHz 3202 * @op_sta_rx_ndp_wider_bw_20mhz: Support For 20 MHz Operating STA 3203 Receiving NDP With Wider Bandwidth 3204 * @non_ofdma_ul_mu_mimo_le_80mhz: Non-OFDMA UL MU-MIMO (BW ≤ 80 MHz) 3205 * @non_ofdma_ul_mu_mimo_160mhz: Non-OFDMA UL MU-MIMO (BW ≤ 160 MHz) 3206 * @non_ofdma_ul_mu_mimo_320mhz: Non-OFDMA UL MU-MIMO (BW ≤ 320 MHz) 3207 * @mu_bformer_le_80mhz: MU Beamformer (BW ≤ 80 MHz) 3208 * @mu_bformer_160mhz: MU Beamformer (BW ≤ 160 MHz) 3209 * @mu_bformer_320mhz: MU Beamformer (BW ≤ 320 MHz) 3210 * @tb_sounding_feedback_rl: TB sounding feedback rate limit 3211 * @rx_1k_qam_in_wider_bw_dl_ofdma: Rx 1024-QAM in wider bandwidth DL 3212 * OFDMA support 3213 * @rx_4k_qam_in_wider_bw_dl_ofdma: Rx 4096-QAM in wider bandwidth DL 3214 * OFDMA support 3215 * @reserved3: reserved bits 3216 * @bw_20_rx_max_nss_for_mcs_0_to_7: Max Rx NSS for MCS 0 to 7 (BW = 20MHz) 3217 * @bw_20_tx_max_nss_for_mcs_0_to_7: Max Tx NSS for MCS 0 to 7 (BW = 20MHz) 3218 * @bw_20_rx_max_nss_for_mcs_8_and_9: Max Rx NSS for MCS 8 and 9 (BW = 20MHz) 3219 * @bw_20_tx_max_nss_for_mcs_8_and_9: Max Tx NSS for MCS 8 and 9 (BW = 20MHz 3220 * @bw_20_rx_max_nss_for_mcs_10_and_11: Max Rx NSS for MCS 10 and 11 3221 * (BW = 20MHz) 3222 * @bw_20_tx_max_nss_for_mcs_10_and_11: Max Tx NSS for MCS 10 and 11 3223 * (BW = 20MHz) 3224 * @bw_20_rx_max_nss_for_mcs_12_and_13: Max Rx NSS for MCS 12 and 13 3225 * (BW = 20MHz) 3226 * @bw_20_tx_max_nss_for_mcs_12_and_13: Max Tx NSS for MCS 12 and 13 3227 * (BW = 20MHz) 3228 * @bw_le_80_rx_max_nss_for_mcs_0_to_9: Max Rx NSS for MCS 0 to 9 (BW <= 80MHz) 3229 * @bw_le_80_tx_max_nss_for_mcs_0_to_9: Max Tx NSS for MCS 0 to 9 (BW <= 80MHz) 3230 * @bw_le_80_rx_max_nss_for_mcs_10_and_11: Max Rx NSS for MCS 10 and 11 3231 * (BW <= 80MHz) 3232 * @bw_le_80_tx_max_nss_for_mcs_10_and_11: Max Tx NSS for MCS 10 and 11 3233 * (BW <= 80MHz) 3234 * @bw_le_80_rx_max_nss_for_mcs_12_and_13: Max Rx NSS for MCS 12 and 13 3235 * (BW <= 80MHz) 3236 * @bw_le_80_tx_max_nss_for_mcs_12_and_13: Max Tx NSS for MCS 12 and 13 3237 * (BW <= 80MHz) 3238 * @bw_160_rx_max_nss_for_mcs_0_to_9: Max Rx NSS for MCS 0 to 9 (BW = 160MHz) 3239 * @bw_160_tx_max_nss_for_mcs_0_to_9: Max Tx NSS for MCS 0 to 9 (BW = 160MHz) 3240 * @bw_160_rx_max_nss_for_mcs_10_and_11: Max Rx NSS for MCS 10 and 11 3241 * (BW = 160MHz) 3242 * @bw_160_tx_max_nss_for_mcs_10_and_11: Max Tx NSS for MCS 10 and 11 3243 * (BW = 160MHz) 3244 * @bw_160_rx_max_nss_for_mcs_12_and_13: Max Rx NSS for MCS 12 and 13 3245 * (BW = 160MHz) 3246 * @bw_160_tx_max_nss_for_mcs_12_and_13: Max Tx NSS for MCS 12 and 13 3247 * (BW = 160MHz) 3248 * @bw_320_rx_max_nss_for_mcs_0_to_9: Max Rx NSS for MCS 0 to 9 (BW = 320MHz) 3249 * @bw_320_tx_max_nss_for_mcs_0_to_9: Max Tx NSS for MCS 0 to 9 (BW = 320MHz) 3250 * @bw_320_rx_max_nss_for_mcs_10_and_11: Max Rx NSS for MCS 10 and 11 3251 * (BW = 320MHz) 3252 * @bw_320_tx_max_nss_for_mcs_10_and_11: Max Tx NSS for MCS 10 and 11 3253 * (BW = 320MHz) 3254 * @bw_320_rx_max_nss_for_mcs_12_and_13: Max Rx NSS for MCS 12 and 13 3255 * (BW = 320MHz) 3256 * @bw_320_tx_max_nss_for_mcs_12_and_13: Max Tx NSS for MCS 12 and 13 3257 * (BW = 320MHz) 3258 */ 3259 struct wlan_eht_cap_info_network_endian { 3260 uint16_t epcs_pri_access:1; 3261 uint16_t eht_om_ctl:1; 3262 uint16_t triggered_txop_sharing_mode1:1; 3263 uint16_t triggered_txop_sharing_mode2:1; 3264 uint16_t restricted_twt:1; 3265 uint16_t scs_traffic_desc:1; 3266 uint16_t max_mpdu_len:2; 3267 uint16_t max_a_mpdu_len_exponent_ext:1; 3268 uint16_t eht_trs_support:1; 3269 uint16_t txop_return_support_txop_share_m2:1; 3270 uint16_t reserved:5; 3271 3272 uint32_t reserved2:1; 3273 uint32_t support_320mhz_6ghz:1; 3274 uint32_t ru_242tone_wt_20mhz:1; 3275 uint32_t ndp_4x_eht_ltf_3dot2_us_gi:1; 3276 uint32_t partial_bw_mu_mimo:1; 3277 uint32_t su_beamformer:1; 3278 uint32_t su_beamformee:1; 3279 uint32_t bfee_ss_le_80mhz:3; 3280 uint32_t bfee_ss_160mhz:3; 3281 uint32_t bfee_ss_320mhz:3; 3282 uint32_t num_sounding_dim_le_80mhz:3; 3283 uint32_t num_sounding_dim_160mhz:3; 3284 uint32_t num_sounding_dim_320mhz:3; 3285 uint32_t ng_16_su_feedback:1; 3286 uint32_t ng_16_mu_feedback:1; 3287 uint32_t cb_sz_4_2_su_feedback:1; 3288 uint32_t cb_sz_7_5_su_feedback:1; 3289 uint32_t trig_su_bforming_feedback:1; 3290 uint32_t trig_mu_bforming_partial_bw_feedback:1; 3291 uint32_t triggered_cqi_feedback:1; 3292 3293 uint32_t partial_bw_dl_mu_mimo:1; 3294 uint32_t psr_based_sr:1; 3295 uint32_t power_boost_factor:1; 3296 uint32_t eht_mu_ppdu_4x_ltf_0_8_us_gi:1; 3297 uint32_t max_nc:4; 3298 uint32_t non_trig_cqi_feedback:1; 3299 uint32_t tx_1024_4096_qam_lt_242_tone_ru:1; 3300 uint32_t rx_1024_4096_qam_lt_242_tone_ru:1; 3301 uint32_t ppet_present:1; 3302 uint32_t common_nominal_pkt_padding:2; 3303 uint32_t max_num_eht_ltf:5; 3304 uint32_t mcs_15:4; 3305 uint32_t eht_dup_6ghz:1; 3306 uint32_t op_sta_rx_ndp_wider_bw_20mhz:1; 3307 uint32_t non_ofdma_ul_mu_mimo_le_80mhz:1; 3308 uint32_t non_ofdma_ul_mu_mimo_160mhz:1; 3309 uint32_t non_ofdma_ul_mu_mimo_320mhz:1; 3310 uint32_t mu_bformer_le_80mhz:1; 3311 uint32_t mu_bformer_160mhz:1; 3312 uint32_t mu_bformer_320mhz:1; 3313 uint32_t tb_sounding_feedback_rl:1; 3314 3315 uint8_t rx_1k_qam_in_wider_bw_dl_ofdma:1; 3316 uint8_t rx_4k_qam_in_wider_bw_dl_ofdma:1; 3317 uint8_t reserved3:6; 3318 3319 uint32_t bw_20_rx_max_nss_for_mcs_0_to_7:4; 3320 uint32_t bw_20_tx_max_nss_for_mcs_0_to_7:4; 3321 uint32_t bw_20_rx_max_nss_for_mcs_8_and_9:4; 3322 uint32_t bw_20_tx_max_nss_for_mcs_8_and_9:4; 3323 uint32_t bw_20_rx_max_nss_for_mcs_10_and_11:4; 3324 uint32_t bw_20_tx_max_nss_for_mcs_10_and_11:4; 3325 uint32_t bw_20_rx_max_nss_for_mcs_12_and_13:4; 3326 uint32_t bw_20_tx_max_nss_for_mcs_12_and_13:4; 3327 3328 uint32_t bw_le_80_rx_max_nss_for_mcs_0_to_9:4; 3329 uint32_t bw_le_80_tx_max_nss_for_mcs_0_to_9:4; 3330 uint32_t bw_le_80_rx_max_nss_for_mcs_10_and_11:4; 3331 uint32_t bw_le_80_tx_max_nss_for_mcs_10_and_11:4; 3332 uint32_t bw_le_80_rx_max_nss_for_mcs_12_and_13:4; 3333 uint32_t bw_le_80_tx_max_nss_for_mcs_12_and_13:4; 3334 3335 uint32_t bw_160_rx_max_nss_for_mcs_0_to_9:4; 3336 uint32_t bw_160_tx_max_nss_for_mcs_0_to_9:4; 3337 uint32_t bw_160_rx_max_nss_for_mcs_10_and_11:4; 3338 uint32_t bw_160_tx_max_nss_for_mcs_10_and_11:4; 3339 uint32_t bw_160_rx_max_nss_for_mcs_12_and_13:4; 3340 uint32_t bw_160_tx_max_nss_for_mcs_12_and_13:4; 3341 3342 uint32_t bw_320_rx_max_nss_for_mcs_0_to_9:4; 3343 uint32_t bw_320_tx_max_nss_for_mcs_0_to_9:4; 3344 uint32_t bw_320_rx_max_nss_for_mcs_10_and_11:4; 3345 uint32_t bw_320_tx_max_nss_for_mcs_10_and_11:4; 3346 uint8_t bw_320_rx_max_nss_for_mcs_12_and_13:4; 3347 } qdf_packed; 3348 3349 /** 3350 * struct oce_reduced_wan_metrics: struct for oce wan metrics 3351 * @downlink_av_cap: Download available capacity 3352 * @uplink_av_cap: Upload available capacity 3353 */ 3354 struct oce_reduced_wan_metrics { 3355 uint8_t downlink_av_cap:4; 3356 uint8_t uplink_av_cap:4; 3357 }; 3358 3359 /** 3360 * is_wpa_oui() - If vendor IE is WPA type 3361 * @frm: vendor IE pointer 3362 * 3363 * API to check if vendor IE is WPA 3364 * 3365 * Return: true if its WPA IE 3366 */ 3367 static inline bool 3368 is_wpa_oui(uint8_t *frm) 3369 { 3370 return (frm[1] > 3) && (LE_READ_4(frm + 2) == 3371 ((WLAN_WPA_OUI_TYPE << 24) | WLAN_WPA_OUI)); 3372 } 3373 3374 /** 3375 * is_wps_oui() - If vendor IE is WPS type 3376 * @frm: vendor IE pointer 3377 * 3378 * API to check if vendor IE is WPS 3379 * 3380 * Return: true if its WPS IE 3381 */ 3382 static inline bool 3383 is_wps_oui(const uint8_t *frm) 3384 { 3385 return frm[1] > 3 && BE_READ_4(frm + 2) == WSC_OUI; 3386 } 3387 3388 /** 3389 * is_mbo_oce_oui() - If vendor IE is MBO/OCE type 3390 * @frm: vendor IE pointer 3391 * 3392 * API to check if vendor IE is MBO/OCE 3393 * 3394 * Return: true if its MBO/OCE IE 3395 */ 3396 static inline bool 3397 is_mbo_oce_oui(const uint8_t *frm) 3398 { 3399 return frm[1] > 3 && BE_READ_4(frm + 2) == MBO_OCE_OUI; 3400 } 3401 3402 /** 3403 * is_wcn_oui() - If vendor IE is WCN type 3404 * @frm: vendor IE pointer 3405 * 3406 * API to check if vendor IE is WCN 3407 * 3408 * Return: true if its WCN IE 3409 */ 3410 static inline bool 3411 is_wcn_oui(uint8_t *frm) 3412 { 3413 return (frm[1] > 4) && (LE_READ_4(frm + 2) == 3414 ((WCN_OUI_TYPE << 24) | WCN_OUI)); 3415 } 3416 3417 static inline bool 3418 is_qcn_oui(uint8_t *frm) 3419 { 3420 return ((frm[1] > 4) && (LE_READ_4(frm + 2) == 3421 ((QCN_OUI_TYPE_CMN << 24) | QCA_OUI))); 3422 } 3423 3424 #define WLAN_VENDOR_WME_IE_LEN 24 3425 /** 3426 * is_wme_param() - If vendor IE is WME param type 3427 * @frm: vendor IE pointer 3428 * 3429 * API to check if vendor IE is WME param 3430 * 3431 * Return: true if its WME param IE 3432 */ 3433 static inline bool 3434 is_wme_param(const uint8_t *frm) 3435 { 3436 return (frm[1] > 5) && (LE_READ_4(frm + 2) == 3437 ((WME_OUI_TYPE << 24) | WME_OUI)) && 3438 (frm[6] == WME_PARAM_OUI_SUBTYPE); 3439 } 3440 3441 /** 3442 * is_wme_info() - If vendor IE is WME info type 3443 * @frm: vendor IE pointer 3444 * 3445 * API to check if vendor IE is WME info 3446 * 3447 * Return: true if its WME info IE 3448 */ 3449 static inline bool 3450 is_wme_info(const uint8_t *frm) 3451 { 3452 return (frm[1] > 5) && (LE_READ_4(frm + 2) == 3453 ((WME_OUI_TYPE << 24) | WME_OUI)) && 3454 (frm[6] == WME_INFO_OUI_SUBTYPE); 3455 } 3456 3457 #define WLAN_VENDOR_ATHCAPS_IE_LEN 9 3458 /** 3459 * is_atheros_oui() - If vendor IE is Atheros type 3460 * @frm: vendor IE pointer 3461 * 3462 * API to check if vendor IE is Atheros 3463 * 3464 * Return: true if its Atheros IE 3465 */ 3466 static inline bool 3467 is_atheros_oui(const uint8_t *frm) 3468 { 3469 return (frm[1] > 3) && LE_READ_4(frm + 2) == 3470 ((ATH_OUI_TYPE << 24) | ATH_OUI); 3471 } 3472 3473 #define WLAN_VENDOR_ATH_EXTCAP_IE_LEN 10 3474 /** 3475 * is_atheros_extcap_oui() - If vendor IE is Atheros ext cap 3476 * @frm: vendor IE pointer 3477 * 3478 * API to check if vendor IE is Atheros ext cap 3479 * 3480 * Return: true if its Atheros ext cap IE 3481 */ 3482 static inline int 3483 is_atheros_extcap_oui(uint8_t *frm) 3484 { 3485 return (frm[1] > 3) && (LE_READ_4(frm + 2) == 3486 ((ATH_OUI_EXTCAP_TYPE << 24) | ATH_OUI)); 3487 } 3488 3489 #define WLAN_VENDOR_SFA_IE_LEN 5 3490 /** 3491 * is_sfa_oui() - If vendor IE is SFA type 3492 * @frm: vendor IE pointer 3493 * 3494 * API to check if vendor IE is SFA 3495 * 3496 * Return: true if its SFA IE 3497 */ 3498 static inline bool 3499 is_sfa_oui(uint8_t *frm) 3500 { 3501 return (frm[1] > 4) && (LE_READ_4(frm + 2) == 3502 ((SFA_OUI_TYPE << 24) | SFA_OUI)); 3503 } 3504 3505 /** 3506 * is_p2p_oui() - If vendor IE is P2P type 3507 * @frm: vendor IE pointer 3508 * 3509 * API to check if vendor IE is P2P 3510 * 3511 * Return: true if its P2P IE 3512 */ 3513 static inline bool 3514 is_p2p_oui(const uint8_t *frm) 3515 { 3516 const uint8_t wfa_oui[3] = P2P_WFA_OUI; 3517 3518 return (frm[1] >= 4) && 3519 (frm[2] == wfa_oui[0]) && 3520 (frm[3] == wfa_oui[1]) && 3521 (frm[4] == wfa_oui[2]) && 3522 (frm[5] == P2P_WFA_VER); 3523 } 3524 3525 #define WLAN_VENDOR_SON_IE_LEN 31 3526 /** 3527 * is_qca_son_oui() - If vendor IE is QCA WHC type 3528 * @frm: vendor IE pointer 3529 * @whc_subtype: subtype 3530 * 3531 * API to check if vendor IE is QCA WHC 3532 * 3533 * Return: true if its QCA WHC IE 3534 */ 3535 static inline bool 3536 is_qca_son_oui(uint8_t *frm, uint8_t whc_subtype) 3537 { 3538 return (frm[1] > 4) && (LE_READ_4(frm + 2) == 3539 ((QCA_OUI_WHC_TYPE << 24) | QCA_OUI)) && 3540 (*(frm + 6) == whc_subtype); 3541 } 3542 3543 /** 3544 * is_qca_son_rept_oui() - If vendor IE is QCA WHC repeater type 3545 * @frm: vendor IE pointer 3546 * @whc_subtype: subtype 3547 * 3548 * API to check if vendor IE is QCA WHC REPT 3549 * 3550 * Return: true if its QCA WHC REPT IE 3551 */ 3552 static inline bool 3553 is_qca_son_rept_oui(u_int8_t *frm, u_int8_t whc_subtype) 3554 { 3555 return ((frm[1] > 4) && (LE_READ_4(frm + 2) == 3556 ((QCA_OUI_WHC_REPT_TYPE << 24) | QCA_OUI)) && 3557 (*(frm + 6) == whc_subtype)); 3558 } 3559 3560 /** 3561 * is_ht_cap() - If vendor IE is vendor HT cap type 3562 * @frm: vendor IE pointer 3563 * 3564 * API to check if vendor IE is vendor HT cap 3565 * 3566 * Return: true if its vendor HT cap IE 3567 */ 3568 static inline bool 3569 is_ht_cap(uint8_t *frm) 3570 { 3571 return (frm[1] > 3) && (BE_READ_4(frm + 2) == 3572 ((VENDOR_HT_OUI << 8) | VENDOR_HT_CAP_ID)); 3573 } 3574 3575 /** 3576 * is_ht_info() - If vendor IE is vendor HT info type 3577 * @frm: vendor IE pointer 3578 * 3579 * API to check if vendor IE is vendor HT info 3580 * 3581 * Return: true if its vendor HT info IE 3582 */ 3583 static inline bool 3584 is_ht_info(uint8_t *frm) 3585 { 3586 return (frm[1] > 3) && (BE_READ_4(frm + 2) == 3587 ((VENDOR_HT_OUI << 8) | VENDOR_HT_INFO_ID)); 3588 } 3589 3590 /** 3591 * is_interop_vht() - If vendor IE is VHT interop 3592 * @frm: vendor IE pointer 3593 * 3594 * API to check if vendor IE is VHT interop 3595 * 3596 * Return: true if its VHT interop IE 3597 */ 3598 static inline bool 3599 is_interop_vht(uint8_t *frm) 3600 { 3601 return (frm[1] > 12) && (BE_READ_4(frm + 2) == 3602 ((VHT_INTEROP_OUI << 8) | VHT_INTEROP_TYPE)) && 3603 ((*(frm + 6) == VHT_INTEROP_OUI_SUBTYPE) || 3604 (*(frm + 6) == VHT_INTEROP_OUI_SUBTYPE_VENDORSPEC)); 3605 } 3606 3607 /** 3608 * is_bwnss_oui() - If vendor IE is BW NSS type 3609 * @frm: vendor IE pointer 3610 * 3611 * API to check if vendor IE is BW NSS 3612 * 3613 * Return: true if its BW NSS IE 3614 */ 3615 static inline bool 3616 is_bwnss_oui(uint8_t *frm) 3617 { 3618 return (frm[1] > 3) && (LE_READ_4(frm + 2) == 3619 ((ATH_OUI_BW_NSS_MAP_TYPE << 24) | ATH_OUI)); 3620 } 3621 3622 #define WLAN_BWNSS_MAP_OFFSET 7 3623 3624 /** 3625 * is_he_cap_oui() - If vendor IE is HE CAP OUI 3626 * @frm: vendor IE pointer 3627 * 3628 * API to check if vendor IE is HE CAP 3629 * 3630 * Return: true if its HE CAP IE 3631 */ 3632 static inline bool 3633 is_he_cap_oui(uint8_t *frm) 3634 { 3635 return (frm[1] > 4) && (LE_READ_4(frm + 2) == 3636 ((ATH_HE_CAP_SUBTYPE << 24) | ATH_HE_OUI)); 3637 } 3638 3639 /** 3640 * is_he_op_oui() - If vendor IE is HE OP OUI 3641 * @frm: vendor IE pointer 3642 * 3643 * API to check if vendor IE is HE OP OUT 3644 * 3645 * Return: true if its HE OP OUI 3646 */ 3647 static inline bool 3648 is_he_op_oui(uint8_t *frm) 3649 { 3650 return (frm[1] > 4) && (LE_READ_4(frm + 2) == 3651 ((ATH_HE_OP_SUBTYPE << 24) | ATH_HE_OUI)); 3652 } 3653 3654 /** 3655 * is_extender_oui() - If vendor IE is EXTENDER OUI 3656 * @frm: vendor IE pointer 3657 * 3658 * API to check if vendor IE is EXTENDER OUI 3659 * 3660 * Return: true if its EXTENDER OUI 3661 */ 3662 static inline bool 3663 is_extender_oui(uint8_t *frm) 3664 { 3665 return (frm[1] > 4) && (LE_READ_4(frm + 2) == 3666 ((QCA_OUI_EXTENDER_TYPE << 24) | QCA_OUI)); 3667 } 3668 3669 /** 3670 * is_adaptive_11r_oui() - Function to check if vendor IE is ADAPTIVE 11R OUI 3671 * @frm: vendor IE pointer 3672 * 3673 * API to check if vendor IE is ADAPTIVE 11R OUI 3674 * 3675 * Return: true if its ADAPTIVE 11r OUI 3676 */ 3677 static inline bool 3678 is_adaptive_11r_oui(uint8_t *frm) 3679 { 3680 return (frm[1] > OUI_LENGTH) && (LE_READ_4(frm + 2) == 3681 ((ADAPTIVE_11R_OUI_TYPE << OUI_TYPE_BITS) | ADAPTIVE_11R_OUI)); 3682 } 3683 3684 /** 3685 * is_sae_single_pmk_oui() - Fun to check if vendor IE is sae single pmk OUI 3686 * @frm: vendor IE pointer 3687 * 3688 * API to check if vendor IE is sae single pmk OUI 3689 * 3690 * Return: true if its sae single pmk OUI 3691 */ 3692 static inline bool 3693 is_sae_single_pmk_oui(uint8_t *frm) 3694 { 3695 return (frm[1] > OUI_LENGTH) && (LE_READ_4(frm + 2) == 3696 ((SAE_SINGLE_PMK_TYPE << OUI_TYPE_BITS) | SAE_SINGLE_PMK_OUI)); 3697 } 3698 3699 /** 3700 * wlan_parse_oce_reduced_wan_metrics_ie() - parse oce wan metrics 3701 * @mbo_oce_ie: MBO/OCE ie ptr 3702 * @wan_metrics: out structure for the reduced wan metric 3703 * 3704 * API, function to parse reduced wan metric 3705 * 3706 * Return: true if oce wan metrics is present 3707 */ 3708 static inline bool 3709 wlan_parse_oce_reduced_wan_metrics_ie(uint8_t *mbo_oce_ie, 3710 struct oce_reduced_wan_metrics *wan_metrics) 3711 { 3712 uint8_t len, attribute_len, attribute_id; 3713 uint8_t *ie; 3714 3715 if (!mbo_oce_ie) 3716 return false; 3717 3718 ie = mbo_oce_ie; 3719 len = ie[1]; 3720 ie += 2; 3721 3722 if (len <= MBO_OCE_OUI_SIZE) 3723 return false; 3724 3725 ie += MBO_OCE_OUI_SIZE; 3726 len -= MBO_OCE_OUI_SIZE; 3727 3728 while (len > 2) { 3729 attribute_id = ie[0]; 3730 attribute_len = ie[1]; 3731 len -= 2; 3732 if (attribute_len > len) 3733 return false; 3734 3735 if (attribute_id == REDUCED_WAN_METRICS_ATTR) { 3736 wan_metrics->downlink_av_cap = ie[2] & 0xff; 3737 wan_metrics->uplink_av_cap = ie[2] >> 4; 3738 return true; 3739 } 3740 3741 ie += (attribute_len + 2); 3742 len -= attribute_len; 3743 } 3744 3745 return false; 3746 } 3747 3748 /** 3749 * wlan_parse_oce_subnet_id_ie() - parse oce subnet id IE 3750 * @mbo_oce_ie: MBO/OCE IE pointer 3751 * 3752 * While parsing vendor IE, is_mbo_oce_oui() API does sanity of 3753 * length and attribute ID for MBO_OCE_OUI and after passing the 3754 * sanity only mbo_oce IE is stored in scan cache. 3755 * It is a callers responsibility to get the mbo_oce_ie pointer 3756 * using util_scan_entry_mbo_oce() API, which points to mbo_oce 3757 * stored in scan cache. Thus caller is responsible for ensuring 3758 * the length of the IE is consistent with the embedded length. 3759 * 3760 * Return: true if oce subnet id is present, else false 3761 */ 3762 static inline bool 3763 wlan_parse_oce_subnet_id_ie(uint8_t *mbo_oce_ie) 3764 { 3765 uint8_t len, attribute_len, attribute_id; 3766 uint8_t *ie; 3767 3768 if (!mbo_oce_ie) 3769 return false; 3770 3771 ie = mbo_oce_ie; 3772 len = ie[1]; 3773 ie += 2; 3774 3775 if (len <= MBO_OCE_OUI_SIZE) 3776 return false; 3777 3778 ie += MBO_OCE_OUI_SIZE; 3779 len -= MBO_OCE_OUI_SIZE; 3780 3781 while (len > 2) { 3782 attribute_id = ie[0]; 3783 attribute_len = ie[1]; 3784 len -= 2; 3785 if (attribute_len > len) 3786 return false; 3787 3788 if (attribute_id == OCE_SUBNET_ID_ATTR) 3789 return true; 3790 3791 ie += (attribute_len + 2); 3792 len -= attribute_len; 3793 } 3794 3795 return false; 3796 } 3797 3798 /** 3799 * wlan_parse_oce_assoc_disallowed_ie() - parse oce assoc disallowed IE 3800 * @mbo_oce_ie: MBO/OCE ie ptr 3801 * @reason: reason for disallowing assoc. 3802 * 3803 * API, function to parse OCE assoc disallowed param from the OCE MBO IE 3804 * 3805 * Return: true if assoc disallowed field is present in the IE 3806 */ 3807 static inline bool 3808 wlan_parse_oce_assoc_disallowed_ie(uint8_t *mbo_oce_ie, uint8_t *reason) 3809 { 3810 uint8_t len, attribute_len, attribute_id; 3811 uint8_t *ie; 3812 3813 if (!mbo_oce_ie) 3814 return false; 3815 3816 ie = mbo_oce_ie; 3817 len = ie[1]; 3818 ie += 2; 3819 3820 if (len <= MBO_OCE_OUI_SIZE) 3821 return false; 3822 3823 ie += MBO_OCE_OUI_SIZE; 3824 len -= MBO_OCE_OUI_SIZE; 3825 3826 while (len > 2) { 3827 attribute_id = ie[0]; 3828 attribute_len = ie[1]; 3829 len -= 2; 3830 if (attribute_len > len) 3831 return false; 3832 3833 if (attribute_id == OCE_DISALLOW_ASSOC_ATTR) { 3834 *reason = ie[2]; 3835 return true; 3836 } 3837 3838 ie += (attribute_len + 2); 3839 len -= attribute_len; 3840 } 3841 3842 return false; 3843 } 3844 3845 /* 3846 * wlan_parse_oce_ap_tx_pwr_ie() - parse oce ap tx pwr 3847 * @mbo_oce_ie: MBO/OCE ie ptr 3848 * @ap_tx_pwr: pointer to hold value of ap_tx_pwr in dbm 3849 * 3850 * Return: true if oce ap tx pwr is present, else false 3851 */ 3852 static inline bool 3853 wlan_parse_oce_ap_tx_pwr_ie(uint8_t *mbo_oce_ie, int8_t *ap_tx_pwr_dbm) 3854 { 3855 uint8_t len, attribute_len, attribute_id; 3856 uint8_t *ie; 3857 int8_t ap_tx_power_in_2_complement; 3858 3859 if (!mbo_oce_ie) 3860 return false; 3861 3862 ie = mbo_oce_ie; 3863 len = ie[1]; 3864 ie += 2; 3865 3866 if (len <= MBO_OCE_OUI_SIZE) 3867 return false; 3868 3869 ie += MBO_OCE_OUI_SIZE; 3870 len -= MBO_OCE_OUI_SIZE; 3871 3872 while (len > 2) { 3873 attribute_id = ie[0]; 3874 attribute_len = ie[1]; 3875 len -= 2; 3876 if (attribute_len > len) 3877 return false; 3878 3879 if (attribute_id == AP_TX_PWR_ATTR) { 3880 ap_tx_power_in_2_complement = ie[2]; 3881 *ap_tx_pwr_dbm = 3882 (int8_t)(256 - ap_tx_power_in_2_complement); 3883 return true; 3884 } 3885 3886 ie += (attribute_len + 2); 3887 len -= attribute_len; 3888 } 3889 3890 return false; 3891 } 3892 3893 /** 3894 * enum mlme_csa_event_ies_present_flag - IE present flag in CSA event 3895 * @MLME_CSA_IE_PRESENT: CSA IE is present 3896 * @MLME_XCSA_IE_PRESENT: extend CSA IE is present 3897 * @MLME_WBW_IE_PRESENT: wide bandwidth channel switch IE is present 3898 * @MLME_CSWRAP_IE_EXTENDED_PRESENT: channel switch wrapper IE is present 3899 */ 3900 enum mlme_csa_event_ies_present_flag { 3901 MLME_CSA_IE_PRESENT = 0x00000001, 3902 MLME_XCSA_IE_PRESENT = 0x00000002, 3903 MLME_WBW_IE_PRESENT = 0x00000004, 3904 MLME_CSWRAP_IE_EXTENDED_PRESENT = 0x00000008, 3905 }; 3906 3907 /** 3908 * struct csa_offload_params - STA CSA offload request parameters 3909 * @channel: channel 3910 * @switch_mode: switch mode 3911 * @sec_chan_offset: secondary channel offset 3912 * @new_ch_width: new channel width 3913 * @new_ch_freq_seg1: channel center freq 1 3914 * @new_ch_freq_seg2: channel center freq 2 3915 * @ies_present_flag: BIT MAP of MLME_CSA_EVENT_IES_PRESENT_FLAG 3916 * @bssid: BSSID which triggers CSA 3917 */ 3918 struct csa_offload_params { 3919 uint8_t channel; 3920 uint32_t csa_chan_freq; 3921 uint8_t switch_mode; 3922 uint8_t sec_chan_offset; 3923 uint8_t new_ch_width; 3924 uint8_t new_op_class; 3925 uint8_t new_ch_freq_seg1; 3926 uint8_t new_ch_freq_seg2; 3927 uint32_t ies_present_flag; 3928 struct qdf_mac_addr bssid; 3929 }; 3930 #endif /* _WLAN_CMN_IEEE80211_DEFS_H_ */ 3931