1 /* 2 * IEEE 802.11 Frame type definitions 3 * Copyright (c) 2002-2015, Jouni Malinen <j@w1.fi> 4 * Copyright (c) 2007-2008 Intel Corporation 5 * 6 * This software may be distributed under the terms of the BSD license. 7 * See README for more details. 8 */ 9 10 #ifndef IEEE802_11_DEFS_H 11 #define IEEE802_11_DEFS_H 12 13 /* IEEE 802.11 defines */ 14 15 #define WLAN_FC_PVER 0x0003 16 #define WLAN_FC_TODS 0x0100 17 #define WLAN_FC_FROMDS 0x0200 18 #define WLAN_FC_MOREFRAG 0x0400 19 #define WLAN_FC_RETRY 0x0800 20 #define WLAN_FC_PWRMGT 0x1000 21 #define WLAN_FC_MOREDATA 0x2000 22 #define WLAN_FC_ISWEP 0x4000 23 #define WLAN_FC_ORDER 0x8000 24 25 #define WLAN_FC_GET_TYPE(fc) (((fc) & 0x000c) >> 2) 26 #define WLAN_FC_GET_STYPE(fc) (((fc) & 0x00f0) >> 4) 27 28 #define WLAN_INVALID_MGMT_SEQ 0xFFFF 29 30 #define WLAN_GET_SEQ_FRAG(seq) ((seq) & (BIT(3) | BIT(2) | BIT(1) | BIT(0))) 31 #define WLAN_GET_SEQ_SEQ(seq) \ 32 (((seq) & (~(BIT(3) | BIT(2) | BIT(1) | BIT(0)))) >> 4) 33 34 #define WLAN_FC_TYPE_MGMT 0 35 #define WLAN_FC_TYPE_CTRL 1 36 #define WLAN_FC_TYPE_DATA 2 37 38 /* management */ 39 #define WLAN_FC_STYPE_ASSOC_REQ 0 40 #define WLAN_FC_STYPE_ASSOC_RESP 1 41 #define WLAN_FC_STYPE_REASSOC_REQ 2 42 #define WLAN_FC_STYPE_REASSOC_RESP 3 43 #define WLAN_FC_STYPE_PROBE_REQ 4 44 #define WLAN_FC_STYPE_PROBE_RESP 5 45 #define WLAN_FC_STYPE_BEACON 8 46 #define WLAN_FC_STYPE_ATIM 9 47 #define WLAN_FC_STYPE_DISASSOC 10 48 #define WLAN_FC_STYPE_AUTH 11 49 #define WLAN_FC_STYPE_DEAUTH 12 50 #define WLAN_FC_STYPE_ACTION 13 51 52 /* control */ 53 #define WLAN_FC_STYPE_PSPOLL 10 54 #define WLAN_FC_STYPE_RTS 11 55 #define WLAN_FC_STYPE_CTS 12 56 #define WLAN_FC_STYPE_ACK 13 57 #define WLAN_FC_STYPE_CFEND 14 58 #define WLAN_FC_STYPE_CFENDACK 15 59 60 /* data */ 61 #define WLAN_FC_STYPE_DATA 0 62 #define WLAN_FC_STYPE_DATA_CFACK 1 63 #define WLAN_FC_STYPE_DATA_CFPOLL 2 64 #define WLAN_FC_STYPE_DATA_CFACKPOLL 3 65 #define WLAN_FC_STYPE_NULLFUNC 4 66 #define WLAN_FC_STYPE_CFACK 5 67 #define WLAN_FC_STYPE_CFPOLL 6 68 #define WLAN_FC_STYPE_CFACKPOLL 7 69 #define WLAN_FC_STYPE_QOS_DATA 8 70 #define WLAN_FC_STYPE_QOS_DATA_CFACK 9 71 #define WLAN_FC_STYPE_QOS_DATA_CFPOLL 10 72 #define WLAN_FC_STYPE_QOS_DATA_CFACKPOLL 11 73 #define WLAN_FC_STYPE_QOS_NULL 12 74 #define WLAN_FC_STYPE_QOS_CFPOLL 14 75 #define WLAN_FC_STYPE_QOS_CFACKPOLL 15 76 77 /* Authentication algorithms */ 78 #define WLAN_AUTH_OPEN 0 79 #define WLAN_AUTH_SHARED_KEY 1 80 #define WLAN_AUTH_FT 2 81 #define WLAN_AUTH_SAE 3 82 #define WLAN_AUTH_LEAP 128 83 84 #define WLAN_AUTH_CHALLENGE_LEN 128 85 86 #define WLAN_CAPABILITY_ESS BIT(0) 87 #define WLAN_CAPABILITY_IBSS BIT(1) 88 #define WLAN_CAPABILITY_CF_POLLABLE BIT(2) 89 #define WLAN_CAPABILITY_CF_POLL_REQUEST BIT(3) 90 #define WLAN_CAPABILITY_PRIVACY BIT(4) 91 #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5) 92 #define WLAN_CAPABILITY_PBCC BIT(6) 93 #define WLAN_CAPABILITY_CHANNEL_AGILITY BIT(7) 94 #define WLAN_CAPABILITY_SPECTRUM_MGMT BIT(8) 95 #define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10) 96 #define WLAN_CAPABILITY_DSSS_OFDM BIT(13) 97 98 /* Status codes (IEEE 802.11-2007, 7.3.1.9, Table 7-23) */ 99 #define WLAN_STATUS_SUCCESS 0 100 #define WLAN_STATUS_UNSPECIFIED_FAILURE 1 101 #define WLAN_STATUS_TDLS_WAKEUP_ALTERNATE 2 102 #define WLAN_STATUS_TDLS_WAKEUP_REJECT 3 103 #define WLAN_STATUS_SECURITY_DISABLED 5 104 #define WLAN_STATUS_UNACCEPTABLE_LIFETIME 6 105 #define WLAN_STATUS_NOT_IN_SAME_BSS 7 106 #define WLAN_STATUS_CAPS_UNSUPPORTED 10 107 #define WLAN_STATUS_REASSOC_NO_ASSOC 11 108 #define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12 109 #define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13 110 #define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14 111 #define WLAN_STATUS_CHALLENGE_FAIL 15 112 #define WLAN_STATUS_AUTH_TIMEOUT 16 113 #define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17 114 #define WLAN_STATUS_ASSOC_DENIED_RATES 18 115 /* IEEE 802.11b */ 116 #define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19 117 #define WLAN_STATUS_ASSOC_DENIED_NOPBCC 20 118 #define WLAN_STATUS_ASSOC_DENIED_NOAGILITY 21 119 /* IEEE 802.11h */ 120 #define WLAN_STATUS_SPEC_MGMT_REQUIRED 22 121 #define WLAN_STATUS_PWR_CAPABILITY_NOT_VALID 23 122 #define WLAN_STATUS_SUPPORTED_CHANNEL_NOT_VALID 24 123 /* IEEE 802.11g */ 124 #define WLAN_STATUS_ASSOC_DENIED_NO_SHORT_SLOT_TIME 25 125 #define WLAN_STATUS_ASSOC_DENIED_NO_DSSS_OFDM 26 126 #define WLAN_STATUS_ASSOC_DENIED_NO_HT 27 127 #define WLAN_STATUS_R0KH_UNREACHABLE 28 128 #define WLAN_STATUS_ASSOC_DENIED_NO_PCO 29 129 /* IEEE 802.11w */ 130 #define WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY 30 131 #define WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION 31 132 #define WLAN_STATUS_UNSPECIFIED_QOS_FAILURE 32 133 #define WLAN_STATUS_REQUEST_DECLINED 37 134 #define WLAN_STATUS_INVALID_PARAMETERS 38 135 /* IEEE 802.11i */ 136 #define WLAN_STATUS_INVALID_IE 40 137 #define WLAN_STATUS_GROUP_CIPHER_NOT_VALID 41 138 #define WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID 42 139 #define WLAN_STATUS_AKMP_NOT_VALID 43 140 #define WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION 44 141 #define WLAN_STATUS_INVALID_RSN_IE_CAPAB 45 142 #define WLAN_STATUS_CIPHER_REJECTED_PER_POLICY 46 143 #define WLAN_STATUS_TS_NOT_CREATED 47 144 #define WLAN_STATUS_DIRECT_LINK_NOT_ALLOWED 48 145 #define WLAN_STATUS_DEST_STA_NOT_PRESENT 49 146 #define WLAN_STATUS_DEST_STA_NOT_QOS_STA 50 147 #define WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE 51 148 /* IEEE 802.11r */ 149 #define WLAN_STATUS_INVALID_FT_ACTION_FRAME_COUNT 52 150 #define WLAN_STATUS_INVALID_PMKID 53 151 #define WLAN_STATUS_INVALID_MDIE 54 152 #define WLAN_STATUS_INVALID_FTIE 55 153 #define WLAN_STATUS_GAS_ADV_PROTO_NOT_SUPPORTED 59 154 #define WLAN_STATUS_NO_OUTSTANDING_GAS_REQ 60 155 #define WLAN_STATUS_GAS_RESP_NOT_RECEIVED 61 156 #define WLAN_STATUS_STA_TIMED_OUT_WAITING_FOR_GAS_RESP 62 157 #define WLAN_STATUS_GAS_RESP_LARGER_THAN_LIMIT 63 158 #define WLAN_STATUS_REQ_REFUSED_HOME 64 159 #define WLAN_STATUS_ADV_SRV_UNREACHABLE 65 160 #define WLAN_STATUS_REQ_REFUSED_SSPN 67 161 #define WLAN_STATUS_REQ_REFUSED_UNAUTH_ACCESS 68 162 #define WLAN_STATUS_INVALID_RSNIE 72 163 #define WLAN_STATUS_ANTI_CLOGGING_TOKEN_REQ 76 164 #define WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED 77 165 #define WLAN_STATUS_TRANSMISSION_FAILURE 79 166 #define WLAN_STATUS_QUERY_RESP_OUTSTANDING 95 167 #define WLAN_STATUS_ASSOC_DENIED_NO_VHT 104 168 169 /* Reason codes (IEEE 802.11-2007, 7.3.1.7, Table 7-22) */ 170 #define WLAN_REASON_UNSPECIFIED 1 171 #define WLAN_REASON_PREV_AUTH_NOT_VALID 2 172 #define WLAN_REASON_DEAUTH_LEAVING 3 173 #define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4 174 #define WLAN_REASON_DISASSOC_AP_BUSY 5 175 #define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6 176 #define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7 177 #define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8 178 #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 179 /* IEEE 802.11h */ 180 #define WLAN_REASON_PWR_CAPABILITY_NOT_VALID 10 181 #define WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID 11 182 /* IEEE 802.11i */ 183 #define WLAN_REASON_INVALID_IE 13 184 #define WLAN_REASON_MICHAEL_MIC_FAILURE 14 185 #define WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT 15 186 #define WLAN_REASON_GROUP_KEY_UPDATE_TIMEOUT 16 187 #define WLAN_REASON_IE_IN_4WAY_DIFFERS 17 188 #define WLAN_REASON_GROUP_CIPHER_NOT_VALID 18 189 #define WLAN_REASON_PAIRWISE_CIPHER_NOT_VALID 19 190 #define WLAN_REASON_AKMP_NOT_VALID 20 191 #define WLAN_REASON_UNSUPPORTED_RSN_IE_VERSION 21 192 #define WLAN_REASON_INVALID_RSN_IE_CAPAB 22 193 #define WLAN_REASON_IEEE_802_1X_AUTH_FAILED 23 194 #define WLAN_REASON_CIPHER_SUITE_REJECTED 24 195 #define WLAN_REASON_TDLS_TEARDOWN_UNREACHABLE 25 196 #define WLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED 26 197 /* IEEE 802.11e */ 198 #define WLAN_REASON_DISASSOC_LOW_ACK 34 199 /* IEEE 802.11s */ 200 #define WLAN_REASON_MESH_PEERING_CANCELLED 52 201 #define WLAN_REASON_MESH_MAX_PEERS 53 202 #define WLAN_REASON_MESH_CONFIG_POLICY_VIOLATION 54 203 #define WLAN_REASON_MESH_CLOSE_RCVD 55 204 #define WLAN_REASON_MESH_MAX_RETRIES 56 205 #define WLAN_REASON_MESH_CONFIRM_TIMEOUT 57 206 #define WLAN_REASON_MESH_INVALID_GTK 58 207 #define WLAN_REASON_MESH_INCONSISTENT_PARAMS 59 208 #define WLAN_REASON_MESH_INVALID_SECURITY_CAP 60 209 210 211 /* Information Element IDs */ 212 #define WLAN_EID_SSID 0 213 #define WLAN_EID_SUPP_RATES 1 214 #define WLAN_EID_FH_PARAMS 2 215 #define WLAN_EID_DS_PARAMS 3 216 #define WLAN_EID_CF_PARAMS 4 217 #define WLAN_EID_TIM 5 218 #define WLAN_EID_IBSS_PARAMS 6 219 #define WLAN_EID_COUNTRY 7 220 #define WLAN_EID_BSS_LOAD 11 221 #define WLAN_EID_CHALLENGE 16 222 /* EIDs defined by IEEE 802.11h - START */ 223 #define WLAN_EID_PWR_CONSTRAINT 32 224 #define WLAN_EID_PWR_CAPABILITY 33 225 #define WLAN_EID_TPC_REQUEST 34 226 #define WLAN_EID_TPC_REPORT 35 227 #define WLAN_EID_SUPPORTED_CHANNELS 36 228 #define WLAN_EID_CHANNEL_SWITCH 37 229 #define WLAN_EID_MEASURE_REQUEST 38 230 #define WLAN_EID_MEASURE_REPORT 39 231 #define WLAN_EID_QUITE 40 232 #define WLAN_EID_IBSS_DFS 41 233 /* EIDs defined by IEEE 802.11h - END */ 234 #define WLAN_EID_ERP_INFO 42 235 #define WLAN_EID_HT_CAP 45 236 #define WLAN_EID_QOS 46 237 #define WLAN_EID_RSN 48 238 #define WLAN_EID_EXT_SUPP_RATES 50 239 #define WLAN_EID_NEIGHBOR_REPORT 52 240 #define WLAN_EID_MOBILITY_DOMAIN 54 241 #define WLAN_EID_FAST_BSS_TRANSITION 55 242 #define WLAN_EID_TIMEOUT_INTERVAL 56 243 #define WLAN_EID_RIC_DATA 57 244 #define WLAN_EID_SUPPORTED_OPERATING_CLASSES 59 245 #define WLAN_EID_HT_OPERATION 61 246 #define WLAN_EID_SECONDARY_CHANNEL_OFFSET 62 247 #define WLAN_EID_WAPI 68 248 #define WLAN_EID_TIME_ADVERTISEMENT 69 249 #define WLAN_EID_RRM_ENABLED_CAPABILITIES 70 250 #define WLAN_EID_20_40_BSS_COEXISTENCE 72 251 #define WLAN_EID_20_40_BSS_INTOLERANT 73 252 #define WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS 74 253 #define WLAN_EID_MMIE 76 254 #define WLAN_EID_SSID_LIST 84 255 #define WLAN_EID_BSS_MAX_IDLE_PERIOD 90 256 #define WLAN_EID_TFS_REQ 91 257 #define WLAN_EID_TFS_RESP 92 258 #define WLAN_EID_WNMSLEEP 93 259 #define WLAN_EID_TIME_ZONE 98 260 #define WLAN_EID_LINK_ID 101 261 #define WLAN_EID_INTERWORKING 107 262 #define WLAN_EID_ADV_PROTO 108 263 #define WLAN_EID_QOS_MAP_SET 110 264 #define WLAN_EID_ROAMING_CONSORTIUM 111 265 #define WLAN_EID_MESH_CONFIG 113 266 #define WLAN_EID_MESH_ID 114 267 #define WLAN_EID_PEER_MGMT 117 268 #define WLAN_EID_EXT_CAPAB 127 269 #define WLAN_EID_AMPE 139 270 #define WLAN_EID_MIC 140 271 #define WLAN_EID_CCKM 156 272 #define WLAN_EID_VHT_CAP 191 273 #define WLAN_EID_VHT_OPERATION 192 274 #define WLAN_EID_VHT_EXTENDED_BSS_LOAD 193 275 #define WLAN_EID_VHT_WIDE_BW_CHSWITCH 194 276 #define WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE 195 277 #define WLAN_EID_VHT_CHANNEL_SWITCH_WRAPPER 196 278 #define WLAN_EID_VHT_AID 197 279 #define WLAN_EID_VHT_QUIET_CHANNEL 198 280 #define WLAN_EID_VHT_OPERATING_MODE_NOTIFICATION 199 281 #define WLAN_EID_VENDOR_SPECIFIC 221 282 283 284 /* Action frame categories (IEEE 802.11-2007, 7.3.1.11, Table 7-24) */ 285 #define WLAN_ACTION_SPECTRUM_MGMT 0 286 #define WLAN_ACTION_QOS 1 287 #define WLAN_ACTION_DLS 2 288 #define WLAN_ACTION_BLOCK_ACK 3 289 #define WLAN_ACTION_PUBLIC 4 290 #define WLAN_ACTION_RADIO_MEASUREMENT 5 291 #define WLAN_ACTION_FT 6 292 #define WLAN_ACTION_HT 7 293 #define WLAN_ACTION_SA_QUERY 8 294 #define WLAN_ACTION_PROTECTED_DUAL 9 295 #define WLAN_ACTION_WNM 10 296 #define WLAN_ACTION_UNPROTECTED_WNM 11 297 #define WLAN_ACTION_TDLS 12 298 #define WLAN_ACTION_SELF_PROTECTED 15 299 #define WLAN_ACTION_WMM 17 /* WMM Specification 1.1 */ 300 #define WLAN_ACTION_VENDOR_SPECIFIC 127 301 302 /* Public action codes */ 303 #define WLAN_PA_20_40_BSS_COEX 0 304 #define WLAN_PA_VENDOR_SPECIFIC 9 305 #define WLAN_PA_GAS_INITIAL_REQ 10 306 #define WLAN_PA_GAS_INITIAL_RESP 11 307 #define WLAN_PA_GAS_COMEBACK_REQ 12 308 #define WLAN_PA_GAS_COMEBACK_RESP 13 309 #define WLAN_TDLS_DISCOVERY_RESPONSE 14 310 311 /* Protected Dual of Public Action frames */ 312 #define WLAN_PROT_DSE_ENABLEMENT 1 313 #define WLAN_PROT_DSE_DEENABLEMENT 2 314 #define WLAN_PROT_EXT_CSA 4 315 #define WLAN_PROT_MEASUREMENT_REQ 5 316 #define WLAN_PROT_MEASUREMENT_REPORT 6 317 #define WLAN_PROT_DSE_POWER_CONSTRAINT 8 318 #define WLAN_PROT_VENDOR_SPECIFIC 9 319 #define WLAN_PROT_GAS_INITIAL_REQ 10 320 #define WLAN_PROT_GAS_INITIAL_RESP 11 321 #define WLAN_PROT_GAS_COMEBACK_REQ 12 322 #define WLAN_PROT_GAS_COMEBACK_RESP 13 323 324 /* SA Query Action frame (IEEE 802.11w/D8.0, 7.4.9) */ 325 #define WLAN_SA_QUERY_REQUEST 0 326 #define WLAN_SA_QUERY_RESPONSE 1 327 328 #define WLAN_SA_QUERY_TR_ID_LEN 2 329 330 /* TDLS action codes */ 331 #define WLAN_TDLS_SETUP_REQUEST 0 332 #define WLAN_TDLS_SETUP_RESPONSE 1 333 #define WLAN_TDLS_SETUP_CONFIRM 2 334 #define WLAN_TDLS_TEARDOWN 3 335 #define WLAN_TDLS_PEER_TRAFFIC_INDICATION 4 336 #define WLAN_TDLS_CHANNEL_SWITCH_REQUEST 5 337 #define WLAN_TDLS_CHANNEL_SWITCH_RESPONSE 6 338 #define WLAN_TDLS_PEER_PSM_REQUEST 7 339 #define WLAN_TDLS_PEER_PSM_RESPONSE 8 340 #define WLAN_TDLS_PEER_TRAFFIC_RESPONSE 9 341 #define WLAN_TDLS_DISCOVERY_REQUEST 10 342 343 /* Radio Measurement Action codes */ 344 #define WLAN_RRM_RADIO_MEASUREMENT_REQUEST 0 345 #define WLAN_RRM_RADIO_MEASUREMENT_REPORT 1 346 #define WLAN_RRM_LINK_MEASUREMENT_REQUEST 2 347 #define WLAN_RRM_LINK_MEASUREMENT_REPORT 3 348 #define WLAN_RRM_NEIGHBOR_REPORT_REQUEST 4 349 #define WLAN_RRM_NEIGHBOR_REPORT_RESPONSE 5 350 351 /* Radio Measurement capabilities (from RRM Capabilities IE) */ 352 /* byte 1 (out of 5) */ 353 #define WLAN_RRM_CAPS_LINK_MEASUREMENT BIT(0) 354 #define WLAN_RRM_CAPS_NEIGHBOR_REPORT BIT(1) 355 356 /* Timeout Interval Type */ 357 #define WLAN_TIMEOUT_REASSOC_DEADLINE 1 358 #define WLAN_TIMEOUT_KEY_LIFETIME 2 359 #define WLAN_TIMEOUT_ASSOC_COMEBACK 3 360 361 /* Interworking element (IEEE 802.11u) - Access Network Options */ 362 #define INTERWORKING_ANO_ACCESS_NETWORK_MASK 0x0f 363 #define INTERWORKING_ANO_INTERNET 0x10 364 #define INTERWORKING_ANO_ASRA 0x20 365 #define INTERWORKING_ANO_ESR 0x40 366 #define INTERWORKING_ANO_UESA 0x80 367 368 #define INTERWORKING_ANT_PRIVATE 0 369 #define INTERWORKING_ANT_PRIVATE_WITH_GUEST 1 370 #define INTERWORKING_ANT_CHARGEABLE_PUBLIC 2 371 #define INTERWORKING_ANT_FREE_PUBLIC 3 372 #define INTERWORKING_ANT_PERSONAL_DEVICE 4 373 #define INTERWORKING_ANT_EMERGENCY_SERVICES 5 374 #define INTERWORKING_ANT_TEST 6 375 #define INTERWORKING_ANT_WILDCARD 15 376 377 /* Advertisement Protocol ID definitions (IEEE Std 802.11u-2011) */ 378 enum adv_proto_id { 379 ACCESS_NETWORK_QUERY_PROTOCOL = 0, 380 MIH_INFO_SERVICE = 1, 381 MIH_CMD_AND_EVENT_DISCOVERY = 2, 382 EMERGENCY_ALERT_SYSTEM = 3, 383 ADV_PROTO_VENDOR_SPECIFIC = 221 384 }; 385 386 /* Access Network Query Protocol info ID definitions (IEEE Std 802.11u-2011) */ 387 enum anqp_info_id { 388 ANQP_QUERY_LIST = 256, 389 ANQP_CAPABILITY_LIST = 257, 390 ANQP_VENUE_NAME = 258, 391 ANQP_EMERGENCY_CALL_NUMBER = 259, 392 ANQP_NETWORK_AUTH_TYPE = 260, 393 ANQP_ROAMING_CONSORTIUM = 261, 394 ANQP_IP_ADDR_TYPE_AVAILABILITY = 262, 395 ANQP_NAI_REALM = 263, 396 ANQP_3GPP_CELLULAR_NETWORK = 264, 397 ANQP_AP_GEOSPATIAL_LOCATION = 265, 398 ANQP_AP_CIVIC_LOCATION = 266, 399 ANQP_AP_LOCATION_PUBLIC_URI = 267, 400 ANQP_DOMAIN_NAME = 268, 401 ANQP_EMERGENCY_ALERT_URI = 269, 402 ANQP_EMERGENCY_NAI = 271, 403 ANQP_VENDOR_SPECIFIC = 56797 404 }; 405 406 /* NAI Realm list - EAP Method subfield - Authentication Parameter ID */ 407 enum nai_realm_eap_auth_param { 408 NAI_REALM_EAP_AUTH_EXPANDED_EAP_METHOD = 1, 409 NAI_REALM_EAP_AUTH_NON_EAP_INNER_AUTH = 2, 410 NAI_REALM_EAP_AUTH_INNER_AUTH_EAP_METHOD = 3, 411 NAI_REALM_EAP_AUTH_EXPANDED_INNER_EAP_METHOD = 4, 412 NAI_REALM_EAP_AUTH_CRED_TYPE = 5, 413 NAI_REALM_EAP_AUTH_TUNNELED_CRED_TYPE = 6, 414 NAI_REALM_EAP_AUTH_VENDOR_SPECIFIC = 221 415 }; 416 417 enum nai_realm_eap_auth_inner_non_eap { 418 NAI_REALM_INNER_NON_EAP_PAP = 1, 419 NAI_REALM_INNER_NON_EAP_CHAP = 2, 420 NAI_REALM_INNER_NON_EAP_MSCHAP = 3, 421 NAI_REALM_INNER_NON_EAP_MSCHAPV2 = 4 422 }; 423 424 enum nai_realm_eap_cred_type { 425 NAI_REALM_CRED_TYPE_SIM = 1, 426 NAI_REALM_CRED_TYPE_USIM = 2, 427 NAI_REALM_CRED_TYPE_NFC_SECURE_ELEMENT = 3, 428 NAI_REALM_CRED_TYPE_HARDWARE_TOKEN = 4, 429 NAI_REALM_CRED_TYPE_SOFTOKEN = 5, 430 NAI_REALM_CRED_TYPE_CERTIFICATE = 6, 431 NAI_REALM_CRED_TYPE_USERNAME_PASSWORD = 7, 432 NAI_REALM_CRED_TYPE_NONE = 8, 433 NAI_REALM_CRED_TYPE_ANONYMOUS = 9, 434 NAI_REALM_CRED_TYPE_VENDOR_SPECIFIC = 10 435 }; 436 437 #ifdef _MSC_VER 438 #pragma pack(push, 1) 439 #endif /* _MSC_VER */ 440 441 struct ieee80211_hdr { 442 le16 frame_control; 443 le16 duration_id; 444 u8 addr1[6]; 445 u8 addr2[6]; 446 u8 addr3[6]; 447 le16 seq_ctrl; 448 /* followed by 'u8 addr4[6];' if ToDS and FromDS is set in data frame 449 */ 450 } STRUCT_PACKED; 451 452 #define IEEE80211_DA_FROMDS addr1 453 #define IEEE80211_BSSID_FROMDS addr2 454 #define IEEE80211_SA_FROMDS addr3 455 456 #define IEEE80211_HDRLEN (sizeof(struct ieee80211_hdr)) 457 458 #define IEEE80211_FC(type, stype) host_to_le16((type << 2) | (stype << 4)) 459 460 struct ieee80211_mgmt { 461 le16 frame_control; 462 le16 duration; 463 u8 da[6]; 464 u8 sa[6]; 465 u8 bssid[6]; 466 le16 seq_ctrl; 467 union { 468 struct { 469 le16 auth_alg; 470 le16 auth_transaction; 471 le16 status_code; 472 /* possibly followed by Challenge text */ 473 u8 variable[0]; 474 } STRUCT_PACKED auth; 475 struct { 476 le16 reason_code; 477 u8 variable[0]; 478 } STRUCT_PACKED deauth; 479 struct { 480 le16 capab_info; 481 le16 listen_interval; 482 /* followed by SSID and Supported rates */ 483 u8 variable[0]; 484 } STRUCT_PACKED assoc_req; 485 struct { 486 le16 capab_info; 487 le16 status_code; 488 le16 aid; 489 /* followed by Supported rates */ 490 u8 variable[0]; 491 } STRUCT_PACKED assoc_resp, reassoc_resp; 492 struct { 493 le16 capab_info; 494 le16 listen_interval; 495 u8 current_ap[6]; 496 /* followed by SSID and Supported rates */ 497 u8 variable[0]; 498 } STRUCT_PACKED reassoc_req; 499 struct { 500 le16 reason_code; 501 u8 variable[0]; 502 } STRUCT_PACKED disassoc; 503 struct { 504 u8 timestamp[8]; 505 le16 beacon_int; 506 le16 capab_info; 507 /* followed by some of SSID, Supported rates, 508 * FH Params, DS Params, CF Params, IBSS Params, TIM */ 509 u8 variable[0]; 510 } STRUCT_PACKED beacon; 511 struct { 512 /* only variable items: SSID, Supported rates */ 513 u8 variable[0]; 514 } STRUCT_PACKED probe_req; 515 struct { 516 u8 timestamp[8]; 517 le16 beacon_int; 518 le16 capab_info; 519 /* followed by some of SSID, Supported rates, 520 * FH Params, DS Params, CF Params, IBSS Params */ 521 u8 variable[0]; 522 } STRUCT_PACKED probe_resp; 523 struct { 524 u8 category; 525 union { 526 struct { 527 u8 action_code; 528 u8 dialog_token; 529 u8 status_code; 530 u8 variable[0]; 531 } STRUCT_PACKED wmm_action; 532 struct{ 533 u8 action_code; 534 u8 element_id; 535 u8 length; 536 u8 switch_mode; 537 u8 new_chan; 538 u8 switch_count; 539 } STRUCT_PACKED chan_switch; 540 struct { 541 u8 action; 542 u8 sta_addr[ETH_ALEN]; 543 u8 target_ap_addr[ETH_ALEN]; 544 u8 variable[0]; /* FT Request */ 545 } STRUCT_PACKED ft_action_req; 546 struct { 547 u8 action; 548 u8 sta_addr[ETH_ALEN]; 549 u8 target_ap_addr[ETH_ALEN]; 550 le16 status_code; 551 u8 variable[0]; /* FT Request */ 552 } STRUCT_PACKED ft_action_resp; 553 struct { 554 u8 action; 555 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; 556 } STRUCT_PACKED sa_query_req; 557 struct { 558 u8 action; /* */ 559 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; 560 } STRUCT_PACKED sa_query_resp; 561 struct { 562 u8 action; 563 u8 dialogtoken; 564 u8 variable[0]; 565 } STRUCT_PACKED wnm_sleep_req; 566 struct { 567 u8 action; 568 u8 dialogtoken; 569 le16 keydata_len; 570 u8 variable[0]; 571 } STRUCT_PACKED wnm_sleep_resp; 572 struct { 573 u8 action; 574 u8 variable[0]; 575 } STRUCT_PACKED public_action; 576 struct { 577 u8 action; /* 9 */ 578 u8 oui[3]; 579 /* Vendor-specific content */ 580 u8 variable[0]; 581 } STRUCT_PACKED vs_public_action; 582 struct { 583 u8 action; /* 7 */ 584 u8 dialog_token; 585 u8 req_mode; 586 le16 disassoc_timer; 587 u8 validity_interval; 588 /* BSS Termination Duration (optional), 589 * Session Information URL (optional), 590 * BSS Transition Candidate List 591 * Entries */ 592 u8 variable[0]; 593 } STRUCT_PACKED bss_tm_req; 594 struct { 595 u8 action; /* 8 */ 596 u8 dialog_token; 597 u8 status_code; 598 u8 bss_termination_delay; 599 /* Target BSSID (optional), 600 * BSS Transition Candidate List 601 * Entries (optional) */ 602 u8 variable[0]; 603 } STRUCT_PACKED bss_tm_resp; 604 struct { 605 u8 action; /* 6 */ 606 u8 dialog_token; 607 u8 query_reason; 608 /* BSS Transition Candidate List 609 * Entries (optional) */ 610 u8 variable[0]; 611 } STRUCT_PACKED bss_tm_query; 612 struct { 613 u8 action; /* 15 */ 614 u8 variable[0]; 615 } STRUCT_PACKED slf_prot_action; 616 } u; 617 } STRUCT_PACKED action; 618 } u; 619 } STRUCT_PACKED; 620 621 622 /* Rx MCS bitmask is in the first 77 bits of supported_mcs_set */ 623 #define IEEE80211_HT_MCS_MASK_LEN 10 624 625 /* HT Capabilities element */ 626 struct ieee80211_ht_capabilities { 627 le16 ht_capabilities_info; 628 u8 a_mpdu_params; /* Maximum A-MPDU Length Exponent B0..B1 629 * Minimum MPDU Start Spacing B2..B4 630 * Reserved B5..B7 */ 631 u8 supported_mcs_set[16]; 632 le16 ht_extended_capabilities; 633 le32 tx_bf_capability_info; 634 u8 asel_capabilities; 635 } STRUCT_PACKED; 636 637 638 /* HT Operation element */ 639 struct ieee80211_ht_operation { 640 u8 primary_chan; 641 /* Five octets of HT Operation Information */ 642 u8 ht_param; /* B0..B7 */ 643 le16 operation_mode; /* B8..B23 */ 644 le16 param; /* B24..B39 */ 645 u8 basic_mcs_set[16]; 646 } STRUCT_PACKED; 647 648 649 struct ieee80211_obss_scan_parameters { 650 le16 scan_passive_dwell; 651 le16 scan_active_dwell; 652 le16 width_trigger_scan_interval; 653 le16 scan_passive_total_per_channel; 654 le16 scan_active_total_per_channel; 655 le16 channel_transition_delay_factor; 656 le16 scan_activity_threshold; 657 } STRUCT_PACKED; 658 659 660 struct ieee80211_vht_capabilities { 661 le32 vht_capabilities_info; 662 struct { 663 le16 rx_map; 664 le16 rx_highest; 665 le16 tx_map; 666 le16 tx_highest; 667 } vht_supported_mcs_set; 668 } STRUCT_PACKED; 669 670 struct ieee80211_vht_operation { 671 u8 vht_op_info_chwidth; 672 u8 vht_op_info_chan_center_freq_seg0_idx; 673 u8 vht_op_info_chan_center_freq_seg1_idx; 674 le16 vht_basic_mcs_set; 675 } STRUCT_PACKED; 676 677 struct ieee80211_ampe_ie { 678 u8 selected_pairwise_suite[4]; 679 u8 local_nonce[32]; 680 u8 peer_nonce[32]; 681 u8 mgtk[16]; 682 u8 key_rsc[8]; 683 u8 key_expiration[4]; 684 } STRUCT_PACKED; 685 686 #ifdef _MSC_VER 687 #pragma pack(pop) 688 #endif /* _MSC_VER */ 689 690 #define ERP_INFO_NON_ERP_PRESENT BIT(0) 691 #define ERP_INFO_USE_PROTECTION BIT(1) 692 #define ERP_INFO_BARKER_PREAMBLE_MODE BIT(2) 693 694 #define OVERLAPPING_BSS_TRANS_DELAY_FACTOR 5 695 696 /* HT Capabilities Info field within HT Capabilities element */ 697 #define HT_CAP_INFO_LDPC_CODING_CAP ((u16) BIT(0)) 698 #define HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET ((u16) BIT(1)) 699 #define HT_CAP_INFO_SMPS_MASK ((u16) (BIT(2) | BIT(3))) 700 #define HT_CAP_INFO_SMPS_STATIC ((u16) 0) 701 #define HT_CAP_INFO_SMPS_DYNAMIC ((u16) BIT(2)) 702 #define HT_CAP_INFO_SMPS_DISABLED ((u16) (BIT(2) | BIT(3))) 703 #define HT_CAP_INFO_GREEN_FIELD ((u16) BIT(4)) 704 #define HT_CAP_INFO_SHORT_GI20MHZ ((u16) BIT(5)) 705 #define HT_CAP_INFO_SHORT_GI40MHZ ((u16) BIT(6)) 706 #define HT_CAP_INFO_TX_STBC ((u16) BIT(7)) 707 #define HT_CAP_INFO_RX_STBC_MASK ((u16) (BIT(8) | BIT(9))) 708 #define HT_CAP_INFO_RX_STBC_1 ((u16) BIT(8)) 709 #define HT_CAP_INFO_RX_STBC_12 ((u16) BIT(9)) 710 #define HT_CAP_INFO_RX_STBC_123 ((u16) (BIT(8) | BIT(9))) 711 #define HT_CAP_INFO_DELAYED_BA ((u16) BIT(10)) 712 #define HT_CAP_INFO_MAX_AMSDU_SIZE ((u16) BIT(11)) 713 #define HT_CAP_INFO_DSSS_CCK40MHZ ((u16) BIT(12)) 714 /* B13 - Reserved (was PSMP support during P802.11n development) */ 715 #define HT_CAP_INFO_40MHZ_INTOLERANT ((u16) BIT(14)) 716 #define HT_CAP_INFO_LSIG_TXOP_PROTECT_SUPPORT ((u16) BIT(15)) 717 718 /* HT Extended Capabilities field within HT Capabilities element */ 719 #define EXT_HT_CAP_INFO_PCO ((u16) BIT(0)) 720 #define EXT_HT_CAP_INFO_PCO_TRANS_TIME_MASK ((u16) (BIT(1) | BIT(2))) 721 #define EXT_HT_CAP_INFO_TRANS_TIME_OFFSET 1 722 /* B3..B7 - Reserved */ 723 #define EXT_HT_CAP_INFO_MCS_FEEDBACK_MASK ((u16) (BIT(8) | BIT(9))) 724 #define EXT_HT_CAP_INFO_MCS_FEEDBACK_OFFSET 8 725 #define EXT_HT_CAP_INFO_HTC_SUPPORT ((u16) BIT(10)) 726 #define EXT_HT_CAP_INFO_RD_RESPONDER ((u16) BIT(11)) 727 /* B12..B15 - Reserved */ 728 729 /* Transmit Beanforming Capabilities within HT Capabilities element */ 730 #define TX_BF_CAP_IMPLICIT_TXBF_RX_CAP ((u32) BIT(0)) 731 #define TX_BF_CAP_RX_STAGGERED_SOUNDING_CAP ((u32) BIT(1)) 732 #define TX_BF_CAP_TX_STAGGERED_SOUNDING_CAP ((u32) BIT(2)) 733 #define TX_BF_CAP_RX_NDP_CAP ((u32) BIT(3)) 734 #define TX_BF_CAP_TX_NDP_CAP ((u32) BIT(4)) 735 #define TX_BF_CAP_IMPLICIT_TX_BF_CAP ((u32) BIT(5)) 736 #define TX_BF_CAP_CALIBRATION_MASK ((u32) (BIT(6) | BIT(7)) 737 #define TX_BF_CAP_CALIB_OFFSET 6 738 #define TX_BF_CAP_EXPLICIT_CSI_TXBF_CAP ((u32) BIT(8)) 739 #define TX_BF_CAP_EXPLICIT_NONCOMPR_STEERING_CAP ((u32) BIT(9)) 740 #define TX_BF_CAP_EXPLICIT_COMPR_STEERING_CAP ((u32) BIT(10)) 741 #define TX_BF_CAP_EXPLICIT_TX_BF_CSI_FEEDBACK_MASK ((u32) (BIT(10) | BIT(11))) 742 #define TX_BF_CAP_EXPLICIT_BF_CSI_FEEDBACK_OFFSET 11 743 #define TX_BF_CAP_EXPLICIT_UNCOMPR_STEERING_MATRIX_FEEDBACK_OFFSET 13 744 #define TX_BF_CAP_EXPLICIT_COMPRESSED_STEERING_MATRIX_FEEDBACK_OFFSET 15 745 #define TX_BF_CAP_MINIMAL_GROUPING_OFFSET 17 746 #define TX_BF_CAP_CSI_NUM_BEAMFORMER_ANT_OFFSET 19 747 #define TX_BF_CAP_UNCOMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET 21 748 #define TX_BF_CAP_COMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET 23 749 #define TX_BF_CAP_SCI_MAX_OF_ROWS_BEANFORMER_SUPPORTED_OFFSET 25 750 #define TX_BF_CAP_CHANNEL_ESTIMATION_CAP_MASK ((u32) (BIT(27) | BIT(28))) 751 #define TX_BF_CAP_CHANNEL_ESTIMATION_CAP_OFFSET 27 752 /* B29..B31 - Reserved */ 753 754 /* ASEL Capability field within HT Capabilities element */ 755 #define ASEL_CAP_ASEL_CAPABLE ((u8) BIT(0)) 756 #define ASEL_CAP_EXPLICIT_CSI_FEEDBACK_BASED_TX_AS_CAP ((u8) BIT(1)) 757 #define ASEL_CAP_ANT_INDICES_FEEDBACK_BASED_TX_AS_CAP ((u8) BIT(2)) 758 #define ASEL_CAP_EXPLICIT_CSI_FEEDBACK_CAP ((u8) BIT(3)) 759 #define ASEL_CAP_ANT_INDICES_FEEDBACK_CAP ((u8) BIT(4)) 760 #define ASEL_CAP_RX_AS_CAP ((u8) BIT(5)) 761 #define ASEL_CAP_TX_SOUNDING_PPDUS_CAP ((u8) BIT(6)) 762 /* B7 - Reserved */ 763 764 /* First octet of HT Operation Information within HT Operation element */ 765 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK ((u8) BIT(0) | BIT(1)) 766 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE ((u8) BIT(0)) 767 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW ((u8) BIT(0) | BIT(1)) 768 #define HT_INFO_HT_PARAM_STA_CHNL_WIDTH ((u8) BIT(2)) 769 #define HT_INFO_HT_PARAM_RIFS_MODE ((u8) BIT(3)) 770 /* B4..B7 - Reserved */ 771 772 /* HT Protection (B8..B9 of HT Operation Information) */ 773 #define HT_PROT_NO_PROTECTION 0 774 #define HT_PROT_NONMEMBER_PROTECTION 1 775 #define HT_PROT_20MHZ_PROTECTION 2 776 #define HT_PROT_NON_HT_MIXED 3 777 /* Bits within ieee80211_ht_operation::operation_mode (BIT(0) maps to B8 in 778 * HT Operation Information) */ 779 #define HT_OPER_OP_MODE_HT_PROT_MASK ((u16) (BIT(0) | BIT(1))) /* B8..B9 */ 780 #define HT_OPER_OP_MODE_NON_GF_HT_STAS_PRESENT ((u16) BIT(2)) /* B10 */ 781 /* BIT(3), i.e., B11 in HT Operation Information field - Reserved */ 782 #define HT_OPER_OP_MODE_OBSS_NON_HT_STAS_PRESENT ((u16) BIT(4)) /* B12 */ 783 /* BIT(5)..BIT(15), i.e., B13..B23 - Reserved */ 784 785 /* Last two octets of HT Operation Information (BIT(0) = B24) */ 786 /* B24..B29 - Reserved */ 787 #define HT_OPER_PARAM_DUAL_BEACON ((u16) BIT(6)) 788 #define HT_OPER_PARAM_DUAL_CTS_PROTECTION ((u16) BIT(7)) 789 #define HT_OPER_PARAM_STBC_BEACON ((u16) BIT(8)) 790 #define HT_OPER_PARAM_LSIG_TXOP_PROT_FULL_SUPP ((u16) BIT(9)) 791 #define HT_OPER_PARAM_PCO_ACTIVE ((u16) BIT(10)) 792 #define HT_OPER_PARAM_PCO_PHASE ((u16) BIT(11)) 793 /* B36..B39 - Reserved */ 794 795 #define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126 796 #define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 797 798 /* VHT Defines */ 799 #define VHT_CAP_MAX_MPDU_LENGTH_7991 ((u32) BIT(0)) 800 #define VHT_CAP_MAX_MPDU_LENGTH_11454 ((u32) BIT(1)) 801 #define VHT_CAP_MAX_MPDU_LENGTH_MASK ((u32) BIT(0) | BIT(1)) 802 #define VHT_CAP_MAX_MPDU_LENGTH_MASK_SHIFT 0 803 #define VHT_CAP_SUPP_CHAN_WIDTH_160MHZ ((u32) BIT(2)) 804 #define VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ ((u32) BIT(3)) 805 #define VHT_CAP_SUPP_CHAN_WIDTH_MASK ((u32) BIT(2) | BIT(3)) 806 #define VHT_CAP_RXLDPC ((u32) BIT(4)) 807 #define VHT_CAP_SHORT_GI_80 ((u32) BIT(5)) 808 #define VHT_CAP_SHORT_GI_160 ((u32) BIT(6)) 809 #define VHT_CAP_TXSTBC ((u32) BIT(7)) 810 #define VHT_CAP_RXSTBC_1 ((u32) BIT(8)) 811 #define VHT_CAP_RXSTBC_2 ((u32) BIT(9)) 812 #define VHT_CAP_RXSTBC_3 ((u32) BIT(8) | BIT(9)) 813 #define VHT_CAP_RXSTBC_4 ((u32) BIT(10)) 814 #define VHT_CAP_RXSTBC_MASK ((u32) BIT(8) | BIT(9) | \ 815 BIT(10)) 816 #define VHT_CAP_RXSTBC_MASK_SHIFT 8 817 #define VHT_CAP_SU_BEAMFORMER_CAPABLE ((u32) BIT(11)) 818 #define VHT_CAP_SU_BEAMFORMEE_CAPABLE ((u32) BIT(12)) 819 #define VHT_CAP_BEAMFORMEE_STS_MAX ((u32) BIT(13) | \ 820 BIT(14) | BIT(15)) 821 #define VHT_CAP_BEAMFORMEE_STS_MAX_SHIFT 13 822 #define VHT_CAP_BEAMFORMEE_STS_OFFSET 13 823 #define VHT_CAP_SOUNDING_DIMENSION_MAX ((u32) BIT(16) | \ 824 BIT(17) | BIT(18)) 825 #define VHT_CAP_SOUNDING_DIMENSION_MAX_SHIFT 16 826 #define VHT_CAP_SOUNDING_DIMENSION_OFFSET 16 827 #define VHT_CAP_MU_BEAMFORMER_CAPABLE ((u32) BIT(19)) 828 #define VHT_CAP_MU_BEAMFORMEE_CAPABLE ((u32) BIT(20)) 829 #define VHT_CAP_VHT_TXOP_PS ((u32) BIT(21)) 830 #define VHT_CAP_HTC_VHT ((u32) BIT(22)) 831 832 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_1 ((u32) BIT(23)) 833 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_2 ((u32) BIT(24)) 834 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_3 ((u32) BIT(23) | BIT(24)) 835 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_4 ((u32) BIT(25)) 836 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_5 ((u32) BIT(23) | BIT(25)) 837 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_6 ((u32) BIT(24) | BIT(25)) 838 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX ((u32) BIT(23) | \ 839 BIT(24) | BIT(25)) 840 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX_SHIFT 23 841 #define VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB ((u32) BIT(27)) 842 #define VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB ((u32) BIT(26) | BIT(27)) 843 #define VHT_CAP_RX_ANTENNA_PATTERN ((u32) BIT(28)) 844 #define VHT_CAP_TX_ANTENNA_PATTERN ((u32) BIT(29)) 845 846 #define VHT_OPMODE_CHANNEL_WIDTH_MASK ((u8) BIT(0) | BIT(1)) 847 #define VHT_OPMODE_CHANNEL_RxNSS_MASK ((u8) BIT(4) | BIT(5) | \ 848 BIT(6)) 849 #define VHT_OPMODE_NOTIF_RX_NSS_SHIFT 4 850 851 #define VHT_RX_NSS_MAX_STREAMS 8 852 853 /* VHT channel widths */ 854 #define VHT_CHANWIDTH_USE_HT 0 855 #define VHT_CHANWIDTH_80MHZ 1 856 #define VHT_CHANWIDTH_160MHZ 2 857 #define VHT_CHANWIDTH_80P80MHZ 3 858 859 #define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs) 860 * 00:50:F2 */ 861 #define WPA_IE_VENDOR_TYPE 0x0050f201 862 #define WMM_IE_VENDOR_TYPE 0x0050f202 863 #define WPS_IE_VENDOR_TYPE 0x0050f204 864 #define OUI_WFA 0x506f9a 865 #define P2P_IE_VENDOR_TYPE 0x506f9a09 866 #define WFD_IE_VENDOR_TYPE 0x506f9a0a 867 #define WFD_OUI_TYPE 10 868 #define HS20_IE_VENDOR_TYPE 0x506f9a10 869 #define OSEN_IE_VENDOR_TYPE 0x506f9a12 870 871 #define WMM_OUI_TYPE 2 872 #define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0 873 #define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1 874 #define WMM_OUI_SUBTYPE_TSPEC_ELEMENT 2 875 #define WMM_VERSION 1 876 877 #define WMM_ACTION_CODE_ADDTS_REQ 0 878 #define WMM_ACTION_CODE_ADDTS_RESP 1 879 #define WMM_ACTION_CODE_DELTS 2 880 881 #define WMM_ADDTS_STATUS_ADMISSION_ACCEPTED 0 882 #define WMM_ADDTS_STATUS_INVALID_PARAMETERS 1 883 /* 2 - Reserved */ 884 #define WMM_ADDTS_STATUS_REFUSED 3 885 /* 4-255 - Reserved */ 886 887 /* WMM TSPEC Direction Field Values */ 888 #define WMM_TSPEC_DIRECTION_UPLINK 0 889 #define WMM_TSPEC_DIRECTION_DOWNLINK 1 890 /* 2 - Reserved */ 891 #define WMM_TSPEC_DIRECTION_BI_DIRECTIONAL 3 892 893 /* 894 * WMM Information Element (used in (Re)Association Request frames; may also be 895 * used in Beacon frames) 896 */ 897 struct wmm_information_element { 898 /* Element ID: 221 (0xdd); Length: 7 */ 899 /* required fields for WMM version 1 */ 900 u8 oui[3]; /* 00:50:f2 */ 901 u8 oui_type; /* 2 */ 902 u8 oui_subtype; /* 0 */ 903 u8 version; /* 1 for WMM version 1.0 */ 904 u8 qos_info; /* AP/STA specific QoS info */ 905 906 } STRUCT_PACKED; 907 908 #define WMM_QOSINFO_AP_UAPSD 0x80 909 910 #define WMM_QOSINFO_STA_AC_MASK 0x0f 911 #define WMM_QOSINFO_STA_SP_MASK 0x03 912 #define WMM_QOSINFO_STA_SP_SHIFT 5 913 914 #define WMM_AC_AIFSN_MASK 0x0f 915 #define WMM_AC_AIFNS_SHIFT 0 916 #define WMM_AC_ACM 0x10 917 #define WMM_AC_ACI_MASK 0x60 918 #define WMM_AC_ACI_SHIFT 5 919 920 #define WMM_AC_ECWMIN_MASK 0x0f 921 #define WMM_AC_ECWMIN_SHIFT 0 922 #define WMM_AC_ECWMAX_MASK 0xf0 923 #define WMM_AC_ECWMAX_SHIFT 4 924 925 struct wmm_ac_parameter { 926 u8 aci_aifsn; /* AIFSN, ACM, ACI */ 927 u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */ 928 le16 txop_limit; 929 } STRUCT_PACKED; 930 931 /* 932 * WMM Parameter Element (used in Beacon, Probe Response, and (Re)Association 933 * Response frmaes) 934 */ 935 struct wmm_parameter_element { 936 /* Element ID: 221 (0xdd); Length: 24 */ 937 /* required fields for WMM version 1 */ 938 u8 oui[3]; /* 00:50:f2 */ 939 u8 oui_type; /* 2 */ 940 u8 oui_subtype; /* 1 */ 941 u8 version; /* 1 for WMM version 1.0 */ 942 u8 qos_info; /* AP/STA specific QoS info */ 943 u8 reserved; /* 0 */ 944 struct wmm_ac_parameter ac[4]; /* AC_BE, AC_BK, AC_VI, AC_VO */ 945 946 } STRUCT_PACKED; 947 948 /* WMM TSPEC Element */ 949 struct wmm_tspec_element { 950 u8 eid; /* 221 = 0xdd */ 951 u8 length; /* 6 + 55 = 61 */ 952 u8 oui[3]; /* 00:50:f2 */ 953 u8 oui_type; /* 2 */ 954 u8 oui_subtype; /* 2 */ 955 u8 version; /* 1 */ 956 /* WMM TSPEC body (55 octets): */ 957 u8 ts_info[3]; 958 le16 nominal_msdu_size; 959 le16 maximum_msdu_size; 960 le32 minimum_service_interval; 961 le32 maximum_service_interval; 962 le32 inactivity_interval; 963 le32 suspension_interval; 964 le32 service_start_time; 965 le32 minimum_data_rate; 966 le32 mean_data_rate; 967 le32 peak_data_rate; 968 le32 maximum_burst_size; 969 le32 delay_bound; 970 le32 minimum_phy_rate; 971 le16 surplus_bandwidth_allowance; 972 le16 medium_time; 973 } STRUCT_PACKED; 974 975 976 /* Access Categories / ACI to AC coding */ 977 enum wmm_ac { 978 WMM_AC_BE = 0 /* Best Effort */, 979 WMM_AC_BK = 1 /* Background */, 980 WMM_AC_VI = 2 /* Video */, 981 WMM_AC_VO = 3 /* Voice */, 982 WMM_AC_NUM = 4 983 }; 984 985 986 #define HS20_INDICATION_OUI_TYPE 16 987 #define HS20_ANQP_OUI_TYPE 17 988 #define HS20_OSEN_OUI_TYPE 18 989 #define HS20_STYPE_QUERY_LIST 1 990 #define HS20_STYPE_CAPABILITY_LIST 2 991 #define HS20_STYPE_OPERATOR_FRIENDLY_NAME 3 992 #define HS20_STYPE_WAN_METRICS 4 993 #define HS20_STYPE_CONNECTION_CAPABILITY 5 994 #define HS20_STYPE_NAI_HOME_REALM_QUERY 6 995 #define HS20_STYPE_OPERATING_CLASS 7 996 #define HS20_STYPE_OSU_PROVIDERS_LIST 8 997 #define HS20_STYPE_ICON_REQUEST 10 998 #define HS20_STYPE_ICON_BINARY_FILE 11 999 1000 #define HS20_DGAF_DISABLED 0x01 1001 #define HS20_PPS_MO_ID_PRESENT 0x02 1002 #define HS20_ANQP_DOMAIN_ID_PRESENT 0x04 1003 #define HS20_VERSION 0x10 /* Release 2 */ 1004 1005 /* WNM-Notification WFA vendors specific subtypes */ 1006 #define HS20_WNM_SUB_REM_NEEDED 0 1007 #define HS20_WNM_DEAUTH_IMMINENT_NOTICE 1 1008 1009 #define HS20_DEAUTH_REASON_CODE_BSS 0 1010 #define HS20_DEAUTH_REASON_CODE_ESS 1 1011 1012 /* Wi-Fi Direct (P2P) */ 1013 1014 #define P2P_OUI_TYPE 9 1015 1016 enum p2p_attr_id { 1017 P2P_ATTR_STATUS = 0, 1018 P2P_ATTR_MINOR_REASON_CODE = 1, 1019 P2P_ATTR_CAPABILITY = 2, 1020 P2P_ATTR_DEVICE_ID = 3, 1021 P2P_ATTR_GROUP_OWNER_INTENT = 4, 1022 P2P_ATTR_CONFIGURATION_TIMEOUT = 5, 1023 P2P_ATTR_LISTEN_CHANNEL = 6, 1024 P2P_ATTR_GROUP_BSSID = 7, 1025 P2P_ATTR_EXT_LISTEN_TIMING = 8, 1026 P2P_ATTR_INTENDED_INTERFACE_ADDR = 9, 1027 P2P_ATTR_MANAGEABILITY = 10, 1028 P2P_ATTR_CHANNEL_LIST = 11, 1029 P2P_ATTR_NOTICE_OF_ABSENCE = 12, 1030 P2P_ATTR_DEVICE_INFO = 13, 1031 P2P_ATTR_GROUP_INFO = 14, 1032 P2P_ATTR_GROUP_ID = 15, 1033 P2P_ATTR_INTERFACE = 16, 1034 P2P_ATTR_OPERATING_CHANNEL = 17, 1035 P2P_ATTR_INVITATION_FLAGS = 18, 1036 P2P_ATTR_OOB_GO_NEG_CHANNEL = 19, 1037 P2P_ATTR_SERVICE_HASH = 21, 1038 P2P_ATTR_SESSION_INFORMATION_DATA = 22, 1039 P2P_ATTR_CONNECTION_CAPABILITY = 23, 1040 P2P_ATTR_ADVERTISEMENT_ID = 24, 1041 P2P_ATTR_ADVERTISED_SERVICE = 25, 1042 P2P_ATTR_SESSION_ID = 26, 1043 P2P_ATTR_FEATURE_CAPABILITY = 27, 1044 P2P_ATTR_PERSISTENT_GROUP = 28, 1045 P2P_ATTR_VENDOR_SPECIFIC = 221 1046 }; 1047 1048 #define P2P_MAX_GO_INTENT 15 1049 1050 /* P2P Capability - Device Capability bitmap */ 1051 #define P2P_DEV_CAPAB_SERVICE_DISCOVERY BIT(0) 1052 #define P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY BIT(1) 1053 #define P2P_DEV_CAPAB_CONCURRENT_OPER BIT(2) 1054 #define P2P_DEV_CAPAB_INFRA_MANAGED BIT(3) 1055 #define P2P_DEV_CAPAB_DEVICE_LIMIT BIT(4) 1056 #define P2P_DEV_CAPAB_INVITATION_PROCEDURE BIT(5) 1057 1058 /* P2P Capability - Group Capability bitmap */ 1059 #define P2P_GROUP_CAPAB_GROUP_OWNER BIT(0) 1060 #define P2P_GROUP_CAPAB_PERSISTENT_GROUP BIT(1) 1061 #define P2P_GROUP_CAPAB_GROUP_LIMIT BIT(2) 1062 #define P2P_GROUP_CAPAB_INTRA_BSS_DIST BIT(3) 1063 #define P2P_GROUP_CAPAB_CROSS_CONN BIT(4) 1064 #define P2P_GROUP_CAPAB_PERSISTENT_RECONN BIT(5) 1065 #define P2P_GROUP_CAPAB_GROUP_FORMATION BIT(6) 1066 #define P2P_GROUP_CAPAB_IP_ADDR_ALLOCATION BIT(7) 1067 1068 /* Invitation Flags */ 1069 #define P2P_INVITATION_FLAGS_TYPE BIT(0) 1070 1071 /* P2P Manageability */ 1072 #define P2P_MAN_DEVICE_MANAGEMENT BIT(0) 1073 #define P2P_MAN_CROSS_CONNECTION_PERMITTED BIT(1) 1074 #define P2P_MAN_COEXISTENCE_OPTIONAL BIT(2) 1075 1076 enum p2p_status_code { 1077 P2P_SC_SUCCESS = 0, 1078 P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE = 1, 1079 P2P_SC_FAIL_INCOMPATIBLE_PARAMS = 2, 1080 P2P_SC_FAIL_LIMIT_REACHED = 3, 1081 P2P_SC_FAIL_INVALID_PARAMS = 4, 1082 P2P_SC_FAIL_UNABLE_TO_ACCOMMODATE = 5, 1083 P2P_SC_FAIL_PREV_PROTOCOL_ERROR = 6, 1084 P2P_SC_FAIL_NO_COMMON_CHANNELS = 7, 1085 P2P_SC_FAIL_UNKNOWN_GROUP = 8, 1086 P2P_SC_FAIL_BOTH_GO_INTENT_15 = 9, 1087 P2P_SC_FAIL_INCOMPATIBLE_PROV_METHOD = 10, 1088 P2P_SC_FAIL_REJECTED_BY_USER = 11, 1089 P2P_SC_SUCCESS_DEFERRED = 12, 1090 }; 1091 1092 enum p2p_role_indication { 1093 P2P_DEVICE_NOT_IN_GROUP = 0x00, 1094 P2P_CLIENT_IN_A_GROUP = 0x01, 1095 P2P_GO_IN_A_GROUP = 0x02, 1096 }; 1097 1098 #define P2P_WILDCARD_SSID "DIRECT-" 1099 #define P2P_WILDCARD_SSID_LEN 7 1100 1101 /* P2P action frames */ 1102 enum p2p_act_frame_type { 1103 P2P_NOA = 0, 1104 P2P_PRESENCE_REQ = 1, 1105 P2P_PRESENCE_RESP = 2, 1106 P2P_GO_DISC_REQ = 3 1107 }; 1108 1109 /* P2P public action frames */ 1110 enum p2p_action_frame_type { 1111 P2P_GO_NEG_REQ = 0, 1112 P2P_GO_NEG_RESP = 1, 1113 P2P_GO_NEG_CONF = 2, 1114 P2P_INVITATION_REQ = 3, 1115 P2P_INVITATION_RESP = 4, 1116 P2P_DEV_DISC_REQ = 5, 1117 P2P_DEV_DISC_RESP = 6, 1118 P2P_PROV_DISC_REQ = 7, 1119 P2P_PROV_DISC_RESP = 8 1120 }; 1121 1122 enum p2p_service_protocol_type { 1123 P2P_SERV_ALL_SERVICES = 0, 1124 P2P_SERV_BONJOUR = 1, 1125 P2P_SERV_UPNP = 2, 1126 P2P_SERV_WS_DISCOVERY = 3, 1127 P2P_SERV_WIFI_DISPLAY = 4, 1128 P2P_SERV_P2PS = 11, 1129 P2P_SERV_VENDOR_SPECIFIC = 255 1130 }; 1131 1132 enum p2p_sd_status { 1133 P2P_SD_SUCCESS = 0, 1134 P2P_SD_PROTO_NOT_AVAILABLE = 1, 1135 P2P_SD_REQUESTED_INFO_NOT_AVAILABLE = 2, 1136 P2P_SD_BAD_REQUEST = 3 1137 }; 1138 1139 1140 enum wifi_display_subelem { 1141 WFD_SUBELEM_DEVICE_INFO = 0, 1142 WFD_SUBELEM_ASSOCIATED_BSSID = 1, 1143 WFD_SUBELEM_AUDIO_FORMATS = 2, 1144 WFD_SUBELEM_VIDEO_FORMATS = 3, 1145 WFD_SUBELEM_3D_VIDEO_FORMATS = 4, 1146 WFD_SUBELEM_CONTENT_PROTECTION = 5, 1147 WFD_SUBELEM_COUPLED_SINK = 6, 1148 WFD_SUBELEM_EXT_CAPAB = 7, 1149 WFD_SUBELEM_LOCAL_IP_ADDRESS = 8, 1150 WFD_SUBELEM_SESSION_INFO = 9 1151 }; 1152 1153 /* 802.11s */ 1154 #define MESH_SYNC_METHOD_NEIGHBOR_OFFSET 1 1155 #define MESH_SYNC_METHOD_VENDOR 255 1156 #define MESH_PATH_PROTOCOL_HWMP 1 1157 #define MESH_PATH_PROTOCOL_VENDOR 255 1158 #define MESH_PATH_METRIC_AIRTIME 1 1159 #define MESH_PATH_METRIC_VENDOR 255 1160 1161 enum plink_action_field { 1162 PLINK_OPEN = 1, 1163 PLINK_CONFIRM, 1164 PLINK_CLOSE 1165 }; 1166 1167 #define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */ 1168 #define VENDOR_VHT_TYPE 0x04 1169 #define VENDOR_VHT_SUBTYPE 0x08 1170 #define VENDOR_VHT_SUBTYPE2 0x00 1171 1172 #define VENDOR_HT_CAPAB_OUI_TYPE 0x33 /* 00-90-4c:0x33 */ 1173 1174 /* cipher suite selectors */ 1175 #define WLAN_CIPHER_SUITE_USE_GROUP 0x000FAC00 1176 #define WLAN_CIPHER_SUITE_WEP40 0x000FAC01 1177 #define WLAN_CIPHER_SUITE_TKIP 0x000FAC02 1178 /* reserved: 0x000FAC03 */ 1179 #define WLAN_CIPHER_SUITE_CCMP 0x000FAC04 1180 #define WLAN_CIPHER_SUITE_WEP104 0x000FAC05 1181 #define WLAN_CIPHER_SUITE_AES_CMAC 0x000FAC06 1182 #define WLAN_CIPHER_SUITE_NO_GROUP_ADDR 0x000FAC07 1183 #define WLAN_CIPHER_SUITE_GCMP 0x000FAC08 1184 #define WLAN_CIPHER_SUITE_GCMP_256 0x000FAC09 1185 #define WLAN_CIPHER_SUITE_CCMP_256 0x000FAC0A 1186 #define WLAN_CIPHER_SUITE_BIP_GMAC_128 0x000FAC0B 1187 #define WLAN_CIPHER_SUITE_BIP_GMAC_256 0x000FAC0C 1188 #define WLAN_CIPHER_SUITE_BIP_CMAC_256 0x000FAC0D 1189 1190 #define WLAN_CIPHER_SUITE_SMS4 0x00147201 1191 1192 #define WLAN_CIPHER_SUITE_CKIP 0x00409600 1193 #define WLAN_CIPHER_SUITE_CKIP_CMIC 0x00409601 1194 #define WLAN_CIPHER_SUITE_CMIC 0x00409602 1195 #define WLAN_CIPHER_SUITE_KRK 0x004096FF /* for nl80211 use only */ 1196 1197 /* AKM suite selectors */ 1198 #define WLAN_AKM_SUITE_8021X 0x000FAC01 1199 #define WLAN_AKM_SUITE_PSK 0x000FAC02 1200 #define WLAN_AKM_SUITE_FT_8021X 0x000FAC03 1201 #define WLAN_AKM_SUITE_FT_PSK 0x000FAC04 1202 #define WLAN_AKM_SUITE_8021X_SHA256 0x000FAC05 1203 #define WLAN_AKM_SUITE_PSK_SHA256 0x000FAC06 1204 #define WLAN_AKM_SUITE_8021X_SUITE_B 0x000FAC11 1205 #define WLAN_AKM_SUITE_8021X_SUITE_B_192 0x000FAC12 1206 #define WLAN_AKM_SUITE_CCKM 0x00409600 1207 #define WLAN_AKM_SUITE_OSEN 0x506f9a01 1208 1209 1210 /* IEEE 802.11v - WNM Action field values */ 1211 enum wnm_action { 1212 WNM_EVENT_REQ = 0, 1213 WNM_EVENT_REPORT = 1, 1214 WNM_DIAGNOSTIC_REQ = 2, 1215 WNM_DIAGNOSTIC_REPORT = 3, 1216 WNM_LOCATION_CFG_REQ = 4, 1217 WNM_LOCATION_CFG_RESP = 5, 1218 WNM_BSS_TRANS_MGMT_QUERY = 6, 1219 WNM_BSS_TRANS_MGMT_REQ = 7, 1220 WNM_BSS_TRANS_MGMT_RESP = 8, 1221 WNM_FMS_REQ = 9, 1222 WNM_FMS_RESP = 10, 1223 WNM_COLLOCATED_INTERFERENCE_REQ = 11, 1224 WNM_COLLOCATED_INTERFERENCE_REPORT = 12, 1225 WNM_TFS_REQ = 13, 1226 WNM_TFS_RESP = 14, 1227 WNM_TFS_NOTIFY = 15, 1228 WNM_SLEEP_MODE_REQ = 16, 1229 WNM_SLEEP_MODE_RESP = 17, 1230 WNM_TIM_BROADCAST_REQ = 18, 1231 WNM_TIM_BROADCAST_RESP = 19, 1232 WNM_QOS_TRAFFIC_CAPAB_UPDATE = 20, 1233 WNM_CHANNEL_USAGE_REQ = 21, 1234 WNM_CHANNEL_USAGE_RESP = 22, 1235 WNM_DMS_REQ = 23, 1236 WNM_DMS_RESP = 24, 1237 WNM_TIMING_MEASUREMENT_REQ = 25, 1238 WNM_NOTIFICATION_REQ = 26, 1239 WNM_NOTIFICATION_RESP = 27 1240 }; 1241 1242 /* IEEE 802.11v - BSS Transition Management Request - Request Mode */ 1243 #define WNM_BSS_TM_REQ_PREF_CAND_LIST_INCLUDED BIT(0) 1244 #define WNM_BSS_TM_REQ_ABRIDGED BIT(1) 1245 #define WNM_BSS_TM_REQ_DISASSOC_IMMINENT BIT(2) 1246 #define WNM_BSS_TM_REQ_BSS_TERMINATION_INCLUDED BIT(3) 1247 #define WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT BIT(4) 1248 1249 /* IEEE Std 802.11-2012 - Table 8-253 */ 1250 enum bss_trans_mgmt_status_code { 1251 WNM_BSS_TM_ACCEPT = 0, 1252 WNM_BSS_TM_REJECT_UNSPECIFIED = 1, 1253 WNM_BSS_TM_REJECT_INSUFFICIENT_BEACON = 2, 1254 WNM_BSS_TM_REJECT_INSUFFICIENT_CAPABITY = 3, 1255 WNM_BSS_TM_REJECT_UNDESIRED = 4, 1256 WNM_BSS_TM_REJECT_DELAY_REQUEST = 5, 1257 WNM_BSS_TM_REJECT_STA_CANDIDATE_LIST_PROVIDED = 6, 1258 WNM_BSS_TM_REJECT_NO_SUITABLE_CANDIDATES = 7, 1259 WNM_BSS_TM_REJECT_LEAVING_ESS = 8 1260 }; 1261 1262 #define WNM_NEIGHBOR_TSF 1 1263 #define WNM_NEIGHBOR_CONDENSED_COUNTRY_STRING 2 1264 #define WNM_NEIGHBOR_BSS_TRANSITION_CANDIDATE 3 1265 #define WNM_NEIGHBOR_BSS_TERMINATION_DURATION 4 1266 #define WNM_NEIGHBOR_BEARING 5 1267 #define WNM_NEIGHBOR_MEASUREMENT_PILOT 66 1268 #define WNM_NEIGHBOR_RRM_ENABLED_CAPABILITIES 70 1269 #define WNM_NEIGHBOR_MULTIPLE_BSSID 71 1270 1271 /* QoS action */ 1272 enum qos_action { 1273 QOS_ADDTS_REQ = 0, 1274 QOS_ADDTS_RESP = 1, 1275 QOS_DELTS = 2, 1276 QOS_SCHEDULE = 3, 1277 QOS_QOS_MAP_CONFIG = 4, 1278 }; 1279 1280 /* IEEE Std 802.11-2012, 8.4.2.62 20/40 BSS Coexistence element */ 1281 #define WLAN_20_40_BSS_COEX_INFO_REQ BIT(0) 1282 #define WLAN_20_40_BSS_COEX_40MHZ_INTOL BIT(1) 1283 #define WLAN_20_40_BSS_COEX_20MHZ_WIDTH_REQ BIT(2) 1284 #define WLAN_20_40_BSS_COEX_OBSS_EXEMPT_REQ BIT(3) 1285 #define WLAN_20_40_BSS_COEX_OBSS_EXEMPT_GRNT BIT(4) 1286 1287 struct ieee80211_2040_bss_coex_ie { 1288 u8 element_id; 1289 u8 length; 1290 u8 coex_param; 1291 } STRUCT_PACKED; 1292 1293 struct ieee80211_2040_intol_chan_report { 1294 u8 element_id; 1295 u8 length; 1296 u8 op_class; 1297 u8 variable[0]; /* Channel List */ 1298 } STRUCT_PACKED; 1299 1300 /* IEEE 802.11v - WNM-Sleep Mode element */ 1301 struct wnm_sleep_element { 1302 u8 eid; /* WLAN_EID_WNMSLEEP */ 1303 u8 len; 1304 u8 action_type; /* WNM_SLEEP_ENTER/WNM_SLEEP_MODE_EXIT */ 1305 u8 status; 1306 le16 intval; 1307 } STRUCT_PACKED; 1308 1309 #define WNM_SLEEP_MODE_ENTER 0 1310 #define WNM_SLEEP_MODE_EXIT 1 1311 1312 enum wnm_sleep_mode_response_status { 1313 WNM_STATUS_SLEEP_ACCEPT = 0, 1314 WNM_STATUS_SLEEP_EXIT_ACCEPT_GTK_UPDATE = 1, 1315 WNM_STATUS_DENIED_ACTION = 2, 1316 WNM_STATUS_DENIED_TMP = 3, 1317 WNM_STATUS_DENIED_KEY = 4, 1318 WNM_STATUS_DENIED_OTHER_WNM_SERVICE = 5 1319 }; 1320 1321 /* WNM-Sleep Mode subelement IDs */ 1322 enum wnm_sleep_mode_subelement_id { 1323 WNM_SLEEP_SUBELEM_GTK = 0, 1324 WNM_SLEEP_SUBELEM_IGTK = 1 1325 }; 1326 1327 /* Channel Switch modes (802.11h) */ 1328 #define CHAN_SWITCH_MODE_ALLOW_TX 0 1329 #define CHAN_SWITCH_MODE_BLOCK_TX 1 1330 1331 struct tpc_report { 1332 u8 eid; 1333 u8 len; 1334 u8 tx_power; 1335 u8 link_margin; 1336 } STRUCT_PACKED; 1337 1338 /* IEEE Std 802.11-2012, 8.5.7.4 - Link Measurement Request frame format */ 1339 struct rrm_link_measurement_request { 1340 u8 dialog_token; 1341 s8 tx_power; 1342 s8 max_tp; 1343 u8 variable[0]; 1344 } STRUCT_PACKED; 1345 1346 /* IEEE Std 802.11-2012, 8.5.7.5 - Link Measurement Report frame format */ 1347 struct rrm_link_measurement_report { 1348 u8 dialog_token; 1349 struct tpc_report tpc; 1350 u8 rx_ant_id; 1351 u8 tx_ant_id; 1352 u8 rcpi; 1353 u8 rsni; 1354 u8 variable[0]; 1355 } STRUCT_PACKED; 1356 1357 #endif /* IEEE802_11_DEFS_H */ 1358