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 #include <utils/common.h> 14 15 /* IEEE 802.11 defines */ 16 17 #define WLAN_FC_PVER 0x0003 18 #define WLAN_FC_TODS 0x0100 19 #define WLAN_FC_FROMDS 0x0200 20 #define WLAN_FC_MOREFRAG 0x0400 21 #define WLAN_FC_RETRY 0x0800 22 #define WLAN_FC_PWRMGT 0x1000 23 #define WLAN_FC_MOREDATA 0x2000 24 #define WLAN_FC_ISWEP 0x4000 25 #define WLAN_FC_ORDER 0x8000 26 27 #define WLAN_FC_GET_TYPE(fc) (((fc) & 0x000c) >> 2) 28 #define WLAN_FC_GET_STYPE(fc) (((fc) & 0x00f0) >> 4) 29 30 #define WLAN_INVALID_MGMT_SEQ 0xFFFF 31 32 #define WLAN_GET_SEQ_FRAG(seq) ((seq) & (BIT(3) | BIT(2) | BIT(1) | BIT(0))) 33 #define WLAN_GET_SEQ_SEQ(seq) \ 34 (((seq) & (~(BIT(3) | BIT(2) | BIT(1) | BIT(0)))) >> 4) 35 36 #define WLAN_FC_TYPE_MGMT 0 37 #define WLAN_FC_TYPE_CTRL 1 38 #define WLAN_FC_TYPE_DATA 2 39 40 /* management */ 41 #define WLAN_FC_STYPE_ASSOC_REQ 0 42 #define WLAN_FC_STYPE_ASSOC_RESP 1 43 #define WLAN_FC_STYPE_REASSOC_REQ 2 44 #define WLAN_FC_STYPE_REASSOC_RESP 3 45 #define WLAN_FC_STYPE_PROBE_REQ 4 46 #define WLAN_FC_STYPE_PROBE_RESP 5 47 #define WLAN_FC_STYPE_BEACON 8 48 #define WLAN_FC_STYPE_ATIM 9 49 #define WLAN_FC_STYPE_DISASSOC 10 50 #define WLAN_FC_STYPE_AUTH 11 51 #define WLAN_FC_STYPE_DEAUTH 12 52 #define WLAN_FC_STYPE_ACTION 13 53 54 /* control */ 55 #define WLAN_FC_STYPE_PSPOLL 10 56 #define WLAN_FC_STYPE_RTS 11 57 #define WLAN_FC_STYPE_CTS 12 58 #define WLAN_FC_STYPE_ACK 13 59 #define WLAN_FC_STYPE_CFEND 14 60 #define WLAN_FC_STYPE_CFENDACK 15 61 62 /* data */ 63 #define WLAN_FC_STYPE_DATA 0 64 #define WLAN_FC_STYPE_DATA_CFACK 1 65 #define WLAN_FC_STYPE_DATA_CFPOLL 2 66 #define WLAN_FC_STYPE_DATA_CFACKPOLL 3 67 #define WLAN_FC_STYPE_NULLFUNC 4 68 #define WLAN_FC_STYPE_CFACK 5 69 #define WLAN_FC_STYPE_CFPOLL 6 70 #define WLAN_FC_STYPE_CFACKPOLL 7 71 #define WLAN_FC_STYPE_QOS_DATA 8 72 #define WLAN_FC_STYPE_QOS_DATA_CFACK 9 73 #define WLAN_FC_STYPE_QOS_DATA_CFPOLL 10 74 #define WLAN_FC_STYPE_QOS_DATA_CFACKPOLL 11 75 #define WLAN_FC_STYPE_QOS_NULL 12 76 #define WLAN_FC_STYPE_QOS_CFPOLL 14 77 #define WLAN_FC_STYPE_QOS_CFACKPOLL 15 78 79 /* Authentication algorithms */ 80 #define WLAN_AUTH_OPEN 0 81 #define WLAN_AUTH_SHARED_KEY 1 82 #define WLAN_AUTH_FT 2 83 #define WLAN_AUTH_SAE 3 84 #define WLAN_AUTH_FILS_SK 4 85 #define WLAN_AUTH_FILS_SK_PFS 5 86 #define WLAN_AUTH_FILS_PK 6 87 #define WLAN_AUTH_LEAP 128 88 89 #define WLAN_AUTH_CHALLENGE_LEN 128 90 91 #define WLAN_CAPABILITY_ESS BIT(0) 92 #define WLAN_CAPABILITY_IBSS BIT(1) 93 #define WLAN_CAPABILITY_CF_POLLABLE BIT(2) 94 #define WLAN_CAPABILITY_CF_POLL_REQUEST BIT(3) 95 #define WLAN_CAPABILITY_PRIVACY BIT(4) 96 #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5) 97 #define WLAN_CAPABILITY_PBCC BIT(6) 98 #define WLAN_CAPABILITY_CHANNEL_AGILITY BIT(7) 99 #define WLAN_CAPABILITY_SPECTRUM_MGMT BIT(8) 100 #define WLAN_CAPABILITY_QOS BIT(9) 101 #define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10) 102 #define WLAN_CAPABILITY_APSD BIT(11) 103 #define WLAN_CAPABILITY_RADIO_MEASUREMENT BIT(12) 104 #define WLAN_CAPABILITY_DSSS_OFDM BIT(13) 105 #define WLAN_CAPABILITY_DELAYED_BLOCK_ACK BIT(14) 106 #define WLAN_CAPABILITY_IMM_BLOCK_ACK BIT(15) 107 108 /* Status codes (IEEE Std 802.11-2016, 9.4.1.9, Table 9-46) */ 109 #define WLAN_STATUS_SUCCESS 0 110 #define WLAN_STATUS_UNSPECIFIED_FAILURE 1 111 #define WLAN_STATUS_TDLS_WAKEUP_ALTERNATE 2 112 #define WLAN_STATUS_TDLS_WAKEUP_REJECT 3 113 #define WLAN_STATUS_SECURITY_DISABLED 5 114 #define WLAN_STATUS_UNACCEPTABLE_LIFETIME 6 115 #define WLAN_STATUS_NOT_IN_SAME_BSS 7 116 #define WLAN_STATUS_CAPS_UNSUPPORTED 10 117 #define WLAN_STATUS_REASSOC_NO_ASSOC 11 118 #define WLAN_STATUS_ASSOC_DENIED_UNSPEC 12 119 #define WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG 13 120 #define WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION 14 121 #define WLAN_STATUS_CHALLENGE_FAIL 15 122 #define WLAN_STATUS_AUTH_TIMEOUT 16 123 #define WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA 17 124 #define WLAN_STATUS_ASSOC_DENIED_RATES 18 125 #define WLAN_STATUS_ASSOC_DENIED_NOSHORT 19 126 #define WLAN_STATUS_SPEC_MGMT_REQUIRED 22 127 #define WLAN_STATUS_PWR_CAPABILITY_NOT_VALID 23 128 #define WLAN_STATUS_SUPPORTED_CHANNEL_NOT_VALID 24 129 #define WLAN_STATUS_ASSOC_DENIED_NO_SHORT_SLOT_TIME 25 130 #define WLAN_STATUS_ASSOC_DENIED_NO_HT 27 131 #define WLAN_STATUS_R0KH_UNREACHABLE 28 132 #define WLAN_STATUS_ASSOC_DENIED_NO_PCO 29 133 #define WLAN_STATUS_ASSOC_REJECTED_TEMPORARILY 30 134 #define WLAN_STATUS_ROBUST_MGMT_FRAME_POLICY_VIOLATION 31 135 #define WLAN_STATUS_UNSPECIFIED_QOS_FAILURE 32 136 #define WLAN_STATUS_DENIED_INSUFFICIENT_BANDWIDTH 33 137 #define WLAN_STATUS_DENIED_POOR_CHANNEL_CONDITIONS 34 138 #define WLAN_STATUS_DENIED_QOS_NOT_SUPPORTED 35 139 #define WLAN_STATUS_REQUEST_DECLINED 37 140 #define WLAN_STATUS_INVALID_PARAMETERS 38 141 #define WLAN_STATUS_REJECTED_WITH_SUGGESTED_CHANGES 39 142 #define WLAN_STATUS_INVALID_IE 40 143 #define WLAN_STATUS_GROUP_CIPHER_NOT_VALID 41 144 #define WLAN_STATUS_PAIRWISE_CIPHER_NOT_VALID 42 145 #define WLAN_STATUS_AKMP_NOT_VALID 43 146 #define WLAN_STATUS_UNSUPPORTED_RSN_IE_VERSION 44 147 #define WLAN_STATUS_INVALID_RSN_IE_CAPAB 45 148 #define WLAN_STATUS_CIPHER_REJECTED_PER_POLICY 46 149 #define WLAN_STATUS_TS_NOT_CREATED 47 150 #define WLAN_STATUS_DIRECT_LINK_NOT_ALLOWED 48 151 #define WLAN_STATUS_DEST_STA_NOT_PRESENT 49 152 #define WLAN_STATUS_DEST_STA_NOT_QOS_STA 50 153 #define WLAN_STATUS_ASSOC_DENIED_LISTEN_INT_TOO_LARGE 51 154 #define WLAN_STATUS_INVALID_FT_ACTION_FRAME_COUNT 52 155 #define WLAN_STATUS_INVALID_PMKID 53 156 #define WLAN_STATUS_INVALID_MDIE 54 157 #define WLAN_STATUS_INVALID_FTIE 55 158 #define WLAN_STATUS_REQUESTED_TCLAS_NOT_SUPPORTED 56 159 #define WLAN_STATUS_INSUFFICIENT_TCLAS_PROCESSING_RESOURCES 57 160 #define WLAN_STATUS_TRY_ANOTHER_BSS 58 161 #define WLAN_STATUS_GAS_ADV_PROTO_NOT_SUPPORTED 59 162 #define WLAN_STATUS_NO_OUTSTANDING_GAS_REQ 60 163 #define WLAN_STATUS_GAS_RESP_NOT_RECEIVED 61 164 #define WLAN_STATUS_STA_TIMED_OUT_WAITING_FOR_GAS_RESP 62 165 #define WLAN_STATUS_GAS_RESP_LARGER_THAN_LIMIT 63 166 #define WLAN_STATUS_REQ_REFUSED_HOME 64 167 #define WLAN_STATUS_ADV_SRV_UNREACHABLE 65 168 #define WLAN_STATUS_REQ_REFUSED_SSPN 67 169 #define WLAN_STATUS_REQ_REFUSED_UNAUTH_ACCESS 68 170 #define WLAN_STATUS_INVALID_RSNIE 72 171 #define WLAN_STATUS_U_APSD_COEX_NOT_SUPPORTED 73 172 #define WLAN_STATUS_U_APSD_COEX_MODE_NOT_SUPPORTED 74 173 #define WLAN_STATUS_BAD_INTERVAL_WITH_U_APSD_COEX 75 174 #define WLAN_STATUS_ANTI_CLOGGING_TOKEN_REQ 76 175 #define WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED 77 176 #define WLAN_STATUS_CANNOT_FIND_ALT_TBTT 78 177 #define WLAN_STATUS_TRANSMISSION_FAILURE 79 178 #define WLAN_STATUS_REQ_TCLAS_NOT_SUPPORTED 80 179 #define WLAN_STATUS_TCLAS_RESOURCES_EXCHAUSTED 81 180 #define WLAN_STATUS_REJECTED_WITH_SUGGESTED_BSS_TRANSITION 82 181 #define WLAN_STATUS_REJECT_WITH_SCHEDULE 83 182 #define WLAN_STATUS_REJECT_NO_WAKEUP_SPECIFIED 84 183 #define WLAN_STATUS_SUCCESS_POWER_SAVE_MODE 85 184 #define WLAN_STATUS_PENDING_ADMITTING_FST_SESSION 86 185 #define WLAN_STATUS_PERFORMING_FST_NOW 87 186 #define WLAN_STATUS_PENDING_GAP_IN_BA_WINDOW 88 187 #define WLAN_STATUS_REJECT_U_PID_SETTING 89 188 #define WLAN_STATUS_REFUSED_EXTERNAL_REASON 92 189 #define WLAN_STATUS_REFUSED_AP_OUT_OF_MEMORY 93 190 #define WLAN_STATUS_REJECTED_EMERGENCY_SERVICE_NOT_SUPPORTED 94 191 #define WLAN_STATUS_QUERY_RESP_OUTSTANDING 95 192 #define WLAN_STATUS_REJECT_DSE_BAND 96 193 #define WLAN_STATUS_TCLAS_PROCESSING_TERMINATED 97 194 #define WLAN_STATUS_TS_SCHEDULE_CONFLICT 98 195 #define WLAN_STATUS_DENIED_WITH_SUGGESTED_BAND_AND_CHANNEL 99 196 #define WLAN_STATUS_MCCAOP_RESERVATION_CONFLICT 100 197 #define WLAN_STATUS_MAF_LIMIT_EXCEEDED 101 198 #define WLAN_STATUS_MCCA_TRACK_LIMIT_EXCEEDED 102 199 #define WLAN_STATUS_DENIED_DUE_TO_SPECTRUM_MANAGEMENT 103 200 #define WLAN_STATUS_ASSOC_DENIED_NO_VHT 104 201 #define WLAN_STATUS_ENABLEMENT_DENIED 105 202 #define WLAN_STATUS_RESTRICTION_FROM_AUTHORIZED_GDB 106 203 #define WLAN_STATUS_AUTHORIZATION_DEENABLED 107 204 #define WLAN_STATUS_FILS_AUTHENTICATION_FAILURE 112 205 #define WLAN_STATUS_UNKNOWN_AUTHENTICATION_SERVER 113 206 #define WLAN_STATUS_UNKNOWN_PASSWORD_IDENTIFIER 123 207 208 /* Reason codes (IEEE Std 802.11-2016, 9.4.1.7, Table 9-45) */ 209 #define WLAN_REASON_UNSPECIFIED 1 210 #define WLAN_REASON_PREV_AUTH_NOT_VALID 2 211 #define WLAN_REASON_DEAUTH_LEAVING 3 212 #define WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY 4 213 #define WLAN_REASON_DISASSOC_AP_BUSY 5 214 #define WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA 6 215 #define WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA 7 216 #define WLAN_REASON_DISASSOC_STA_HAS_LEFT 8 217 #define WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH 9 218 #define WLAN_REASON_PWR_CAPABILITY_NOT_VALID 10 219 #define WLAN_REASON_SUPPORTED_CHANNEL_NOT_VALID 11 220 #define WLAN_REASON_BSS_TRANSITION_DISASSOC 12 221 #define WLAN_REASON_INVALID_IE 13 222 #define WLAN_REASON_MICHAEL_MIC_FAILURE 14 223 #define WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT 15 224 #define WLAN_REASON_GROUP_KEY_UPDATE_TIMEOUT 16 225 #define WLAN_REASON_IE_IN_4WAY_DIFFERS 17 226 #define WLAN_REASON_GROUP_CIPHER_NOT_VALID 18 227 #define WLAN_REASON_PAIRWISE_CIPHER_NOT_VALID 19 228 #define WLAN_REASON_AKMP_NOT_VALID 20 229 #define WLAN_REASON_UNSUPPORTED_RSN_IE_VERSION 21 230 #define WLAN_REASON_INVALID_RSN_IE_CAPAB 22 231 #define WLAN_REASON_IEEE_802_1X_AUTH_FAILED 23 232 #define WLAN_REASON_CIPHER_SUITE_REJECTED 24 233 #define WLAN_REASON_TDLS_TEARDOWN_UNREACHABLE 25 234 #define WLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED 26 235 #define WLAN_REASON_SSP_REQUESTED_DISASSOC 27 236 #define WLAN_REASON_NO_SSP_ROAMING_AGREEMENT 28 237 #define WLAN_REASON_BAD_CIPHER_OR_AKM 29 238 #define WLAN_REASON_NOT_AUTHORIZED_THIS_LOCATION 30 239 #define WLAN_REASON_SERVICE_CHANGE_PRECLUDES_TS 31 240 #define WLAN_REASON_UNSPECIFIED_QOS_REASON 32 241 #define WLAN_REASON_NOT_ENOUGH_BANDWIDTH 33 242 #define WLAN_REASON_DISASSOC_LOW_ACK 34 243 #define WLAN_REASON_EXCEEDED_TXOP 35 244 #define WLAN_REASON_STA_LEAVING 36 245 #define WLAN_REASON_END_TS_BA_DLS 37 246 #define WLAN_REASON_UNKNOWN_TS_BA 38 247 #define WLAN_REASON_TIMEOUT 39 248 #define WLAN_REASON_PEERKEY_MISMATCH 45 249 #define WLAN_REASON_AUTHORIZED_ACCESS_LIMIT_REACHED 46 250 #define WLAN_REASON_EXTERNAL_SERVICE_REQUIREMENTS 47 251 #define WLAN_REASON_INVALID_FT_ACTION_FRAME_COUNT 48 252 #define WLAN_REASON_INVALID_PMKID 49 253 #define WLAN_REASON_INVALID_MDE 50 254 #define WLAN_REASON_INVALID_FTE 51 255 #define WLAN_REASON_MESH_PEERING_CANCELLED 52 256 #define WLAN_REASON_MESH_MAX_PEERS 53 257 #define WLAN_REASON_MESH_CONFIG_POLICY_VIOLATION 54 258 #define WLAN_REASON_MESH_CLOSE_RCVD 55 259 #define WLAN_REASON_MESH_MAX_RETRIES 56 260 #define WLAN_REASON_MESH_CONFIRM_TIMEOUT 57 261 #define WLAN_REASON_MESH_INVALID_GTK 58 262 #define WLAN_REASON_MESH_INCONSISTENT_PARAMS 59 263 #define WLAN_REASON_MESH_INVALID_SECURITY_CAP 60 264 #define WLAN_REASON_MESH_PATH_ERROR_NO_PROXY_INFO 61 265 #define WLAN_REASON_MESH_PATH_ERROR_NO_FORWARDING_INFO 62 266 #define WLAN_REASON_MESH_PATH_ERROR_DEST_UNREACHABLE 63 267 #define WLAN_REASON_MAC_ADDRESS_ALREADY_EXISTS_IN_MBSS 64 268 #define WLAN_REASON_MESH_CHANNEL_SWITCH_REGULATORY_REQ 65 269 #define WLAN_REASON_MESH_CHANNEL_SWITCH_UNSPECIFIED 66 270 271 272 /* Information Element IDs (IEEE Std 802.11-2016, 9.4.2.1, Table 9-77) */ 273 #define WLAN_EID_SSID 0 274 #define WLAN_EID_SUPP_RATES 1 275 #define WLAN_EID_DS_PARAMS 3 276 #define WLAN_EID_CF_PARAMS 4 277 #define WLAN_EID_TIM 5 278 #define WLAN_EID_IBSS_PARAMS 6 279 #define WLAN_EID_COUNTRY 7 280 #define WLAN_EID_REQUEST 10 281 #define WLAN_EID_BSS_LOAD 11 282 #define WLAN_EID_EDCA_PARAM_SET 12 283 #define WLAN_EID_TSPEC 13 284 #define WLAN_EID_TCLAS 14 285 #define WLAN_EID_SCHEDULE 15 286 #define WLAN_EID_CHALLENGE 16 287 #define WLAN_EID_PWR_CONSTRAINT 32 288 #define WLAN_EID_PWR_CAPABILITY 33 289 #define WLAN_EID_TPC_REQUEST 34 290 #define WLAN_EID_TPC_REPORT 35 291 #define WLAN_EID_SUPPORTED_CHANNELS 36 292 #define WLAN_EID_CHANNEL_SWITCH 37 293 #define WLAN_EID_MEASURE_REQUEST 38 294 #define WLAN_EID_MEASURE_REPORT 39 295 #define WLAN_EID_QUIET 40 296 #define WLAN_EID_IBSS_DFS 41 297 #define WLAN_EID_ERP_INFO 42 298 #define WLAN_EID_TS_DELAY 43 299 #define WLAN_EID_TCLAS_PROCESSING 44 300 #define WLAN_EID_HT_CAP 45 301 #define WLAN_EID_QOS 46 302 #define WLAN_EID_RSN 48 303 #define WLAN_EID_EXT_SUPP_RATES 50 304 #define WLAN_EID_AP_CHANNEL_REPORT 51 305 #define WLAN_EID_NEIGHBOR_REPORT 52 306 #define WLAN_EID_RCPI 53 307 #define WLAN_EID_MOBILITY_DOMAIN 54 308 #define WLAN_EID_FAST_BSS_TRANSITION 55 309 #define WLAN_EID_TIMEOUT_INTERVAL 56 310 #define WLAN_EID_RIC_DATA 57 311 #define WLAN_EID_DSE_REGISTERED_LOCATION 58 312 #define WLAN_EID_SUPPORTED_OPERATING_CLASSES 59 313 #define WLAN_EID_EXT_CHANSWITCH_ANN 60 314 #define WLAN_EID_HT_OPERATION 61 315 #define WLAN_EID_SECONDARY_CHANNEL_OFFSET 62 316 #define WLAN_EID_BSS_AVERAGE_ACCESS_DELAY 63 317 #define WLAN_EID_ANTENNA 64 318 #define WLAN_EID_RSNI 65 319 #define WLAN_EID_MEASUREMENT_PILOT_TRANSMISSION 66 320 #define WLAN_EID_BSS_AVAILABLE_ADM_CAPA 67 321 #define WLAN_EID_BSS_AC_ACCESS_DELAY 68 /* note: also used by WAPI */ 322 #define WLAN_EID_TIME_ADVERTISEMENT 69 323 #define WLAN_EID_RRM_ENABLED_CAPABILITIES 70 324 #define WLAN_EID_MULTIPLE_BSSID 71 325 #define WLAN_EID_20_40_BSS_COEXISTENCE 72 326 #define WLAN_EID_20_40_BSS_INTOLERANT 73 327 #define WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS 74 328 #define WLAN_EID_RIC_DESCRIPTOR 75 329 #define WLAN_EID_MMIE 76 330 #define WLAN_EID_EVENT_REQUEST 78 331 #define WLAN_EID_EVENT_REPORT 79 332 #define WLAN_EID_DIAGNOSTIC_REQUEST 80 333 #define WLAN_EID_DIAGNOSTIC_REPORT 81 334 #define WLAN_EID_LOCATION_PARAMETERS 82 335 #define WLAN_EID_NONTRANSMITTED_BSSID_CAPA 83 336 #define WLAN_EID_SSID_LIST 84 337 #define WLAN_EID_MLTIPLE_BSSID_INDEX 85 338 #define WLAN_EID_FMS_DESCRIPTOR 86 339 #define WLAN_EID_FMS_REQUEST 87 340 #define WLAN_EID_FMS_RESPONSE 88 341 #define WLAN_EID_QOS_TRAFFIC_CAPABILITY 89 342 #define WLAN_EID_BSS_MAX_IDLE_PERIOD 90 343 #define WLAN_EID_TFS_REQ 91 344 #define WLAN_EID_TFS_RESP 92 345 #define WLAN_EID_WNMSLEEP 93 346 #define WLAN_EID_TIM_BROADCAST_REQUEST 94 347 #define WLAN_EID_TIM_BROADCAST_RESPONSE 95 348 #define WLAN_EID_COLLOCATED_INTERFERENCE_REPORT 96 349 #define WLAN_EID_CHANNEL_USAGE 97 350 #define WLAN_EID_TIME_ZONE 98 351 #define WLAN_EID_DMS_REQUEST 99 352 #define WLAN_EID_DMS_RESPONSE 100 353 #define WLAN_EID_LINK_ID 101 354 #define WLAN_EID_WAKEUP_SCHEDULE 102 355 #define WLAN_EID_CHANNEL_SWITCH_TIMING 104 356 #define WLAN_EID_PTI_CONTROL 105 357 #define WLAN_EID_TPU_BUFFER_STATUS 106 358 #define WLAN_EID_INTERWORKING 107 359 #define WLAN_EID_ADV_PROTO 108 360 #define WLAN_EID_EXPEDITED_BANDWIDTH_REQ 109 361 #define WLAN_EID_QOS_MAP_SET 110 362 #define WLAN_EID_ROAMING_CONSORTIUM 111 363 #define WLAN_EID_EMERGENCY_ALERT_ID 112 364 #define WLAN_EID_MESH_CONFIG 113 365 #define WLAN_EID_MESH_ID 114 366 #define WLAN_EID_MESH_LINK_METRIC_REPORT 115 367 #define WLAN_EID_CONGESTION_NOTIFICATION 116 368 #define WLAN_EID_PEER_MGMT 117 369 #define WLAN_EID_MESH_CHANNEL_SWITCH_PARAMETERS 118 370 #define WLAN_EID_MESH_AWAKE_WINDOW 119 371 #define WLAN_EID_BEACON_TIMING 120 372 #define WLAN_EID_MCCAOP_SETUP_REQUEST 121 373 #define WLAN_EID_MCCAOP_SETUP_REPLY 122 374 #define WLAN_EID_MCCAOP_ADVERTISEMENT 123 375 #define WLAN_EID_MCCAOP_TEARDOWN 124 376 #define WLAN_EID_GANN 125 377 #define WLAN_EID_RANN 126 378 #define WLAN_EID_EXT_CAPAB 127 379 #define WLAN_EID_PREQ 130 380 #define WLAN_EID_PREP 131 381 #define WLAN_EID_PERR 132 382 #define WLAN_EID_PXU 137 383 #define WLAN_EID_PXUC 138 384 #define WLAN_EID_AMPE 139 385 #define WLAN_EID_MIC 140 386 #define WLAN_EID_DESTINATION_URI 141 387 #define WLAN_EID_U_APSD_COEX 142 388 #define WLAN_EID_DMG_WAKEUP_SCHEDULE 143 389 #define WLAN_EID_EXTENDED_SCHEDULE 144 390 #define WLAN_EID_STA_AVAILABILITY 145 391 #define WLAN_EID_DMG_TSPEC 146 392 #define WLAN_EID_NEXT_DMG_ATI 147 393 #define WLAN_EID_DMG_CAPABILITIES 148 394 #define WLAN_EID_DMG_OPERATION 151 395 #define WLAN_EID_DMG_BSS_PARAMETER_CHANGE 152 396 #define WLAN_EID_DMG_BEAM_REFINEMENT 153 397 #define WLAN_EID_CHANNEL_MEASUREMENT_FEEDBACK 154 398 #define WLAN_EID_CCKM 156 399 #define WLAN_EID_AWAKE_WINDOW 157 400 #define WLAN_EID_MULTI_BAND 158 401 #define WLAN_EID_ADDBA_EXTENSION 159 402 #define WLAN_EID_NEXTPCP_LIST 160 403 #define WLAN_EID_PCP_HANDOVER 161 404 #define WLAN_EID_DMG_LINK_MARGIN 162 405 #define WLAN_EID_SWITCHING_STREAM 163 406 #define WLAN_EID_SESSION_TRANSITION 164 407 #define WLAN_EID_DYNAMIC_TONE_PAIRING_REPORT 165 408 #define WLAN_EID_CLUSTER_REPORT 166 409 #define WLAN_EID_REPLAY_CAPABILITIES 167 410 #define WLAN_EID_RELAY_TRANSFER_PARAM_SET 168 411 #define WLAN_EID_BEAMLINK_MAINTENANCE 169 412 #define WLAN_EID_MULTIPLE_MAC_SUBLAYERS 170 413 #define WLAN_EID_U_PID 171 414 #define WLAN_EID_DMG_LINK_ADAPTATION_ACK 172 415 #define WLAN_EID_MCCAOP_ADVERTISEMENT_OVERVIEW 174 416 #define WLAN_EID_QUIET_PERIOD_REQUEST 175 417 #define WLAN_EID_QUIET_PERIOD_RESPONSE 177 418 #define WLAN_EID_QMF_POLICY 181 419 #define WLAN_EID_ECAPC_POLICY 182 420 #define WLAN_EID_CLUSTER_TIME_OFFSET 183 421 #define WLAN_EID_INTRA_ACCESS_CATEGORY_PRIORITY 184 422 #define WLAN_EID_SCS_DESCRIPTOR 185 423 #define WLAN_EID_QLOAD_REPORT 186 424 #define WLAN_EID_HCCA_TXOP_UPDATE_COUNT 187 425 #define WLAN_EID_HIGHER_LAYER_STREAM_ID 188 426 #define WLAN_EID_GCR_GROUP_ADDRESS 189 427 #define WLAN_EID_ANTENNA_SECTOR_ID_PATTERN 190 428 #define WLAN_EID_VHT_CAP 191 429 #define WLAN_EID_VHT_OPERATION 192 430 #define WLAN_EID_VHT_EXTENDED_BSS_LOAD 193 431 #define WLAN_EID_VHT_WIDE_BW_CHSWITCH 194 432 #define WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE 195 433 #define WLAN_EID_VHT_CHANNEL_SWITCH_WRAPPER 196 434 #define WLAN_EID_VHT_AID 197 435 #define WLAN_EID_VHT_QUIET_CHANNEL 198 436 #define WLAN_EID_VHT_OPERATING_MODE_NOTIFICATION 199 437 #define WLAN_EID_UPSIM 200 438 #define WLAN_EID_REDUCED_NEIGHBOR_REPORT 201 439 #define WLAN_EID_TVHT_OPERATION 202 440 #define WLAN_EID_DEVICE_LOCATION 204 441 #define WLAN_EID_WHITE_SPACE_MAP 205 442 #define WLAN_EID_FTM_PARAMETERS 206 443 #define WLAN_EID_VENDOR_SPECIFIC 221 444 #define WLAN_EID_CAG_NUMBER 237 445 #define WLAN_EID_AP_CSN 239 446 #define WLAN_EID_FILS_INDICATION 240 447 #define WLAN_EID_DILS 241 448 #define WLAN_EID_FRAGMENT 242 449 #define WLAN_EID_EXTENSION 255 450 451 /* Element ID Extension (EID 255) values */ 452 #define WLAN_EID_EXT_ASSOC_DELAY_INFO 1 453 #define WLAN_EID_EXT_FILS_REQ_PARAMS 2 454 #define WLAN_EID_EXT_FILS_KEY_CONFIRM 3 455 #define WLAN_EID_EXT_FILS_SESSION 4 456 #define WLAN_EID_EXT_FILS_HLP_CONTAINER 5 457 #define WLAN_EID_EXT_FILS_IP_ADDR_ASSIGN 6 458 #define WLAN_EID_EXT_KEY_DELIVERY 7 459 #define WLAN_EID_EXT_FILS_WRAPPED_DATA 8 460 #define WLAN_EID_EXT_FTM_SYNC_INFO 9 461 #define WLAN_EID_EXT_EXTENDED_REQUEST 10 462 #define WLAN_EID_EXT_ESTIMATED_SERVICE_PARAMS 11 463 #define WLAN_EID_EXT_FILS_PUBLIC_KEY 12 464 #define WLAN_EID_EXT_FILS_NONCE 13 465 #define WLAN_EID_EXT_FUTURE_CHANNEL_GUIDANCE 14 466 #define WLAN_EID_EXT_OWE_DH_PARAM 32 467 #define WLAN_EID_EXT_PASSWORD_IDENTIFIER 33 468 #define WLAN_EID_EXT_HE_CAPABILITIES 35 469 #define WLAN_EID_EXT_HE_OPERATION 36 470 471 472 /* Action frame categories (IEEE Std 802.11-2016, 9.4.1.11, Table 9-76) */ 473 #define WLAN_ACTION_SPECTRUM_MGMT 0 474 #define WLAN_ACTION_QOS 1 475 #define WLAN_ACTION_DLS 2 476 #define WLAN_ACTION_BLOCK_ACK 3 477 #define WLAN_ACTION_PUBLIC 4 478 #define WLAN_ACTION_RADIO_MEASUREMENT 5 479 #define WLAN_ACTION_FT 6 480 #define WLAN_ACTION_HT 7 481 #define WLAN_ACTION_SA_QUERY 8 482 #define WLAN_ACTION_PROTECTED_DUAL 9 483 #define WLAN_ACTION_WNM 10 484 #define WLAN_ACTION_UNPROTECTED_WNM 11 485 #define WLAN_ACTION_TDLS 12 486 #define WLAN_ACTION_MESH 13 487 #define WLAN_ACTION_MULTIHOP 14 488 #define WLAN_ACTION_SELF_PROTECTED 15 489 #define WLAN_ACTION_DMG 16 490 #define WLAN_ACTION_WMM 17 /* WMM Specification 1.1 */ 491 #define WLAN_ACTION_FST 18 492 #define WLAN_ACTION_ROBUST_AV_STREAMING 19 493 #define WLAN_ACTION_UNPROTECTED_DMG 20 494 #define WLAN_ACTION_VHT 21 495 #define WLAN_ACTION_FILS 26 496 #define WLAN_ACTION_VENDOR_SPECIFIC_PROTECTED 126 497 #define WLAN_ACTION_VENDOR_SPECIFIC 127 498 /* Note: 128-255 used to report errors by setting category | 0x80 */ 499 500 /* Public action codes (IEEE Std 802.11-2016, 9.6.8.1, Table 9-307) */ 501 #define WLAN_PA_20_40_BSS_COEX 0 502 #define WLAN_PA_DSE_ENABLEMENT 1 503 #define WLAN_PA_DSE_DEENABLEMENT 2 504 #define WLAN_PA_DSE_REG_LOCATION_ANNOUNCE 3 505 #define WLAN_PA_EXT_CHANNEL_SWITCH_ANNOUNCE 4 506 #define WLAN_PA_DSE_MEASUREMENT_REQ 5 507 #define WLAN_PA_DSE_MEASUREMENT_RESP 6 508 #define WLAN_PA_MEASUREMENT_PILOT 7 509 #define WLAN_PA_DSE_POWER_CONSTRAINT 8 510 #define WLAN_PA_VENDOR_SPECIFIC 9 511 #define WLAN_PA_GAS_INITIAL_REQ 10 512 #define WLAN_PA_GAS_INITIAL_RESP 11 513 #define WLAN_PA_GAS_COMEBACK_REQ 12 514 #define WLAN_PA_GAS_COMEBACK_RESP 13 515 #define WLAN_TDLS_DISCOVERY_RESPONSE 14 516 #define WLAN_PA_LOCATION_TRACK_NOTIFICATION 15 517 #define WLAN_PA_QAB_REQUEST_FRAME 16 518 #define WLAN_PA_QAB_RESPONSE_FRAME 17 519 #define WLAN_PA_QMF_POLICY 18 520 #define WLAN_PA_QMF_POLICY_CHANGE 19 521 #define WLAN_PA_QLOAD_REQUEST 20 522 #define WLAN_PA_QLOAD_REPORT 21 523 #define WLAN_PA_HCCA_TXOP_ADVERTISEMENT 22 524 #define WLAN_PA_HCCA_TXOP_RESPONSE 23 525 #define WLAN_PA_PUBLIC_KEY 24 526 #define WLAN_PA_CHANNEL_AVAILABILITY_QUERY 25 527 #define WLAN_PA_CHANNEL_SCHEDULE_MANAGEMENT 26 528 #define WLAN_PA_CONTACT_VERIFICATION_SIGNAL 27 529 #define WLAN_PA_GDD_ENABLEMENT_REQ 28 530 #define WLAN_PA_GDD_ENABLEMENT_RESP 29 531 #define WLAN_PA_NETWORK_CHANNEL_CONTROL 30 532 #define WLAN_PA_WHITE_SPACE_MAP_ANNOUNCEMENT 31 533 #define WLAN_PA_FTM_REQUEST 32 534 #define WLAN_PA_FTM 33 535 #define WLAN_PA_FILS_DISCOVERY 34 536 537 /* Protected Dual of Public Action frames (IEEE Std 802.11-2016, 9.6.11, 538 * Table 9-332) */ 539 #define WLAN_PROT_DSE_ENABLEMENT 1 540 #define WLAN_PROT_DSE_DEENABLEMENT 2 541 #define WLAN_PROT_EXT_CSA 4 542 #define WLAN_PROT_MEASUREMENT_REQ 5 543 #define WLAN_PROT_MEASUREMENT_REPORT 6 544 #define WLAN_PROT_DSE_POWER_CONSTRAINT 8 545 #define WLAN_PROT_VENDOR_SPECIFIC 9 546 #define WLAN_PROT_GAS_INITIAL_REQ 10 547 #define WLAN_PROT_GAS_INITIAL_RESP 11 548 #define WLAN_PROT_GAS_COMEBACK_REQ 12 549 #define WLAN_PROT_GAS_COMEBACK_RESP 13 550 #define WLAN_PROT_QAB_REQUEST_FRAME 16 551 #define WLAN_PROT_QAB_RESPONSE_FRAME 17 552 #define WLAN_PROT_QMF_POLICY 18 553 #define WLAN_PROT_QMF_POLICY_CHANGE 19 554 #define WLAN_PROT_QLOAD_REQUEST 20 555 #define WLAN_PROT_QLOAD_REPORT 21 556 #define WLAN_PROT_HCCA_TXOP_ADVERTISEMENT 22 557 #define WLAN_PROT_HCCA_TXOP_RESPONSE 23 558 #define WLAN_PROT_CHANNEL_AVAILABILITY_QUERY 25 559 #define WLAN_PROT_CHANNEL_SCHEDULE_MANAGEMENT 26 560 #define WLAN_PROT_CONTACT_VERIFICATION_SIGNAL 27 561 #define WLAN_PROT_GDD_ENABLEMENT_REQ 28 562 #define WLAN_PROT_GDD_ENABLEMENT_RESP 29 563 #define WLAN_PROT_NETWORK_CHANNEL_CONTROL 30 564 #define WLAN_PROT_WHITE_SPACE_MAP_ANNOUNCEMENT 31 565 566 /* SA Query Action frame (IEEE 802.11w/D8.0, 7.4.9) */ 567 #define WLAN_SA_QUERY_REQUEST 0 568 #define WLAN_SA_QUERY_RESPONSE 1 569 570 #define WLAN_SA_QUERY_TR_ID_LEN 2 571 572 /* TDLS action codes */ 573 #define WLAN_TDLS_SETUP_REQUEST 0 574 #define WLAN_TDLS_SETUP_RESPONSE 1 575 #define WLAN_TDLS_SETUP_CONFIRM 2 576 #define WLAN_TDLS_TEARDOWN 3 577 #define WLAN_TDLS_PEER_TRAFFIC_INDICATION 4 578 #define WLAN_TDLS_CHANNEL_SWITCH_REQUEST 5 579 #define WLAN_TDLS_CHANNEL_SWITCH_RESPONSE 6 580 #define WLAN_TDLS_PEER_PSM_REQUEST 7 581 #define WLAN_TDLS_PEER_PSM_RESPONSE 8 582 #define WLAN_TDLS_PEER_TRAFFIC_RESPONSE 9 583 #define WLAN_TDLS_DISCOVERY_REQUEST 10 584 585 /* Radio Measurement Action codes */ 586 #define WLAN_RRM_RADIO_MEASUREMENT_REQUEST 0 587 #define WLAN_RRM_RADIO_MEASUREMENT_REPORT 1 588 #define WLAN_RRM_LINK_MEASUREMENT_REQUEST 2 589 #define WLAN_RRM_LINK_MEASUREMENT_REPORT 3 590 #define WLAN_RRM_NEIGHBOR_REPORT_REQUEST 4 591 #define WLAN_RRM_NEIGHBOR_REPORT_RESPONSE 5 592 593 /* Radio Measurement capabilities (from RM Enabled Capabilities element) 594 * IEEE Std 802.11-2016, 9.4.2.45, Table 9-157 */ 595 /* byte 1 (out of 5) */ 596 #define WLAN_RRM_CAPS_LINK_MEASUREMENT BIT(0) 597 #define WLAN_RRM_CAPS_NEIGHBOR_REPORT BIT(1) 598 #define WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE BIT(4) 599 #define WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE BIT(5) 600 #define WLAN_RRM_CAPS_BEACON_REPORT_TABLE BIT(6) 601 /* byte 2 (out of 5) */ 602 #define WLAN_RRM_CAPS_LCI_MEASUREMENT BIT(4) 603 /* byte 5 (out of 5) */ 604 #define WLAN_RRM_CAPS_FTM_RANGE_REPORT BIT(2) 605 606 /* 607 * IEEE P802.11-REVmc/D5.0, 9.4.2.21.19 (Fine Timing Measurement Range 608 * request) - Minimum AP count 609 */ 610 #define WLAN_RRM_RANGE_REQ_MAX_MIN_AP 15 611 612 /* Timeout Interval Type */ 613 #define WLAN_TIMEOUT_REASSOC_DEADLINE 1 614 #define WLAN_TIMEOUT_KEY_LIFETIME 2 615 #define WLAN_TIMEOUT_ASSOC_COMEBACK 3 616 617 /* Interworking element (IEEE 802.11u) - Access Network Options */ 618 #define INTERWORKING_ANO_ACCESS_NETWORK_MASK 0x0f 619 #define INTERWORKING_ANO_INTERNET 0x10 620 #define INTERWORKING_ANO_ASRA 0x20 621 #define INTERWORKING_ANO_ESR 0x40 622 #define INTERWORKING_ANO_UESA 0x80 623 624 #define INTERWORKING_ANT_PRIVATE 0 625 #define INTERWORKING_ANT_PRIVATE_WITH_GUEST 1 626 #define INTERWORKING_ANT_CHARGEABLE_PUBLIC 2 627 #define INTERWORKING_ANT_FREE_PUBLIC 3 628 #define INTERWORKING_ANT_PERSONAL_DEVICE 4 629 #define INTERWORKING_ANT_EMERGENCY_SERVICES 5 630 #define INTERWORKING_ANT_TEST 6 631 #define INTERWORKING_ANT_WILDCARD 15 632 633 /* Advertisement Protocol ID definitions (IEEE Std 802.11-2016, Table 9-215) */ 634 enum adv_proto_id { 635 ACCESS_NETWORK_QUERY_PROTOCOL = 0, 636 MIH_INFO_SERVICE = 1, 637 MIH_CMD_AND_EVENT_DISCOVERY = 2, 638 EMERGENCY_ALERT_SYSTEM = 3, 639 REGISTERED_LOCATION_QUERY_PROTO = 4, 640 ADV_PROTO_VENDOR_SPECIFIC = 221 641 }; 642 643 /* Access Network Query Protocol info ID definitions (IEEE Std 802.11-2016, 644 * Table 9-271; P802.11ai) */ 645 enum anqp_info_id { 646 ANQP_QUERY_LIST = 256, 647 ANQP_CAPABILITY_LIST = 257, 648 ANQP_VENUE_NAME = 258, 649 ANQP_EMERGENCY_CALL_NUMBER = 259, 650 ANQP_NETWORK_AUTH_TYPE = 260, 651 ANQP_ROAMING_CONSORTIUM = 261, 652 ANQP_IP_ADDR_TYPE_AVAILABILITY = 262, 653 ANQP_NAI_REALM = 263, 654 ANQP_3GPP_CELLULAR_NETWORK = 264, 655 ANQP_AP_GEOSPATIAL_LOCATION = 265, 656 ANQP_AP_CIVIC_LOCATION = 266, 657 ANQP_AP_LOCATION_PUBLIC_URI = 267, 658 ANQP_DOMAIN_NAME = 268, 659 ANQP_EMERGENCY_ALERT_URI = 269, 660 ANQP_TDLS_CAPABILITY = 270, 661 ANQP_EMERGENCY_NAI = 271, 662 ANQP_NEIGHBOR_REPORT = 272, 663 ANQP_QUERY_AP_LIST = 273, 664 ANQP_AP_LIST_RESPONSE = 274, 665 ANQP_FILS_REALM_INFO = 275, 666 ANQP_CAG = 276, 667 ANQP_VENUE_URL = 277, 668 ANQP_ADVICE_OF_CHARGE = 278, 669 ANQP_LOCAL_CONTENT = 279, 670 ANQP_NETWORK_AUTH_TYPE_TIMESTAMP = 280, 671 ANQP_VENDOR_SPECIFIC = 56797 672 }; 673 674 /* NAI Realm list - EAP Method subfield - Authentication Parameter ID */ 675 enum nai_realm_eap_auth_param { 676 NAI_REALM_EAP_AUTH_EXPANDED_EAP_METHOD = 1, 677 NAI_REALM_EAP_AUTH_NON_EAP_INNER_AUTH = 2, 678 NAI_REALM_EAP_AUTH_INNER_AUTH_EAP_METHOD = 3, 679 NAI_REALM_EAP_AUTH_EXPANDED_INNER_EAP_METHOD = 4, 680 NAI_REALM_EAP_AUTH_CRED_TYPE = 5, 681 NAI_REALM_EAP_AUTH_TUNNELED_CRED_TYPE = 6, 682 NAI_REALM_EAP_AUTH_VENDOR_SPECIFIC = 221 683 }; 684 685 enum nai_realm_eap_auth_inner_non_eap { 686 NAI_REALM_INNER_NON_EAP_PAP = 1, 687 NAI_REALM_INNER_NON_EAP_CHAP = 2, 688 NAI_REALM_INNER_NON_EAP_MSCHAP = 3, 689 NAI_REALM_INNER_NON_EAP_MSCHAPV2 = 4 690 }; 691 692 enum nai_realm_eap_cred_type { 693 NAI_REALM_CRED_TYPE_SIM = 1, 694 NAI_REALM_CRED_TYPE_USIM = 2, 695 NAI_REALM_CRED_TYPE_NFC_SECURE_ELEMENT = 3, 696 NAI_REALM_CRED_TYPE_HARDWARE_TOKEN = 4, 697 NAI_REALM_CRED_TYPE_SOFTOKEN = 5, 698 NAI_REALM_CRED_TYPE_CERTIFICATE = 6, 699 NAI_REALM_CRED_TYPE_USERNAME_PASSWORD = 7, 700 NAI_REALM_CRED_TYPE_NONE = 8, 701 NAI_REALM_CRED_TYPE_ANONYMOUS = 9, 702 NAI_REALM_CRED_TYPE_VENDOR_SPECIFIC = 10 703 }; 704 705 /* 706 * IEEE P802.11-REVmc/D5.0 Table 9-81 - Measurement type definitions for 707 * measurement requests 708 */ 709 enum measure_type { 710 MEASURE_TYPE_BASIC = 0, 711 MEASURE_TYPE_CCA = 1, 712 MEASURE_TYPE_RPI_HIST = 2, 713 MEASURE_TYPE_CHANNEL_LOAD = 3, 714 MEASURE_TYPE_NOISE_HIST = 4, 715 MEASURE_TYPE_BEACON = 5, 716 MEASURE_TYPE_FRAME = 6, 717 MEASURE_TYPE_STA_STATISTICS = 7, 718 MEASURE_TYPE_LCI = 8, 719 MEASURE_TYPE_TRANSMIT_STREAM = 9, 720 MEASURE_TYPE_MULTICAST_DIAG = 10, 721 MEASURE_TYPE_LOCATION_CIVIC = 11, 722 MEASURE_TYPE_LOCATION_ID = 12, 723 MEASURE_TYPE_DIRECTIONAL_CHAN_QUALITY = 13, 724 MEASURE_TYPE_DIRECTIONAL_MEASURE = 14, 725 MEASURE_TYPE_DIRECTIONAL_STATS = 15, 726 MEASURE_TYPE_FTM_RANGE = 16, 727 MEASURE_TYPE_MEASURE_PAUSE = 255, 728 }; 729 730 /* IEEE Std 802.11-2012 Table 8-71 - Location subject definition */ 731 enum location_subject { 732 LOCATION_SUBJECT_LOCAL = 0, 733 LOCATION_SUBJECT_REMOTE = 1, 734 LOCATION_SUBJECT_3RD_PARTY = 2, 735 }; 736 737 /* 738 * IEEE P802.11-REVmc/D5.0 Table 9-94 - Optional subelement IDs for LCI request 739 */ 740 enum lci_req_subelem { 741 LCI_REQ_SUBELEM_AZIMUTH_REQ = 1, 742 LCI_REQ_SUBELEM_ORIGINATOR_MAC_ADDR = 2, 743 LCI_REQ_SUBELEM_TARGET_MAC_ADDR = 3, 744 LCI_REQ_SUBELEM_MAX_AGE = 4, 745 }; 746 747 #define FILS_NONCE_LEN 16 748 #define FILS_SESSION_LEN 8 749 #define FILS_CACHE_ID_LEN 2 750 #define FILS_MAX_KEY_AUTH_LEN 48 751 752 #ifdef _MSC_VER 753 #pragma pack(push, 1) 754 #endif /* _MSC_VER */ 755 756 struct ieee80211_hdr { 757 le16 frame_control; 758 le16 duration_id; 759 u8 addr1[6]; 760 u8 addr2[6]; 761 u8 addr3[6]; 762 le16 seq_ctrl; 763 /* followed by 'u8 addr4[6];' if ToDS and FromDS is set in data frame 764 */ 765 } STRUCT_PACKED; 766 767 #define IEEE80211_DA_FROMDS addr1 768 #define IEEE80211_BSSID_FROMDS addr2 769 #define IEEE80211_SA_FROMDS addr3 770 771 #define IEEE80211_HDRLEN (sizeof(struct ieee80211_hdr)) 772 773 #define IEEE80211_FC(type, stype) host_to_le16((type << 2) | (stype << 4)) 774 775 struct ieee80211_mgmt { 776 le16 frame_control; 777 le16 duration; 778 u8 da[6]; 779 u8 sa[6]; 780 u8 bssid[6]; 781 le16 seq_ctrl; 782 union { 783 struct { 784 le16 auth_alg; 785 le16 auth_transaction; 786 le16 status_code; 787 /* possibly followed by Challenge text */ 788 u8 variable[]; 789 } STRUCT_PACKED auth; 790 struct { 791 le16 reason_code; 792 u8 variable[]; 793 } STRUCT_PACKED deauth; 794 struct { 795 le16 capab_info; 796 le16 listen_interval; 797 /* followed by SSID and Supported rates */ 798 u8 variable[]; 799 } STRUCT_PACKED assoc_req; 800 struct { 801 le16 capab_info; 802 le16 status_code; 803 le16 aid; 804 /* followed by Supported rates */ 805 u8 variable[]; 806 } STRUCT_PACKED assoc_resp, reassoc_resp; 807 struct { 808 le16 capab_info; 809 le16 listen_interval; 810 u8 current_ap[6]; 811 /* followed by SSID and Supported rates */ 812 u8 variable[]; 813 } STRUCT_PACKED reassoc_req; 814 struct { 815 le16 reason_code; 816 u8 variable[]; 817 } STRUCT_PACKED disassoc; 818 struct { 819 u8 timestamp[8]; 820 le16 beacon_int; 821 le16 capab_info; 822 /* followed by some of SSID, Supported rates, 823 * FH Params, DS Params, CF Params, IBSS Params, TIM */ 824 u8 variable[]; 825 } STRUCT_PACKED beacon; 826 /* probe_req: only variable items: SSID, Supported rates */ 827 struct { 828 u8 timestamp[8]; 829 le16 beacon_int; 830 le16 capab_info; 831 /* followed by some of SSID, Supported rates, 832 * FH Params, DS Params, CF Params, IBSS Params */ 833 u8 variable[]; 834 } STRUCT_PACKED probe_resp; 835 struct { 836 u8 category; 837 union { 838 struct { 839 u8 action_code; 840 u8 dialog_token; 841 u8 status_code; 842 u8 variable[]; 843 } STRUCT_PACKED wmm_action; 844 struct{ 845 u8 action_code; 846 u8 element_id; 847 u8 length; 848 u8 switch_mode; 849 u8 new_chan; 850 u8 switch_count; 851 } STRUCT_PACKED chan_switch; 852 struct { 853 u8 action; 854 u8 sta_addr[ETH_ALEN]; 855 u8 target_ap_addr[ETH_ALEN]; 856 u8 variable[]; /* FT Request */ 857 } STRUCT_PACKED ft_action_req; 858 struct { 859 u8 action; 860 u8 sta_addr[ETH_ALEN]; 861 u8 target_ap_addr[ETH_ALEN]; 862 le16 status_code; 863 u8 variable[]; /* FT Request */ 864 } STRUCT_PACKED ft_action_resp; 865 struct { 866 u8 action; 867 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; 868 } STRUCT_PACKED sa_query_req; 869 struct { 870 u8 action; /* */ 871 u8 trans_id[WLAN_SA_QUERY_TR_ID_LEN]; 872 } STRUCT_PACKED sa_query_resp; 873 struct { 874 u8 action; 875 u8 dialogtoken; 876 u8 variable[]; 877 } STRUCT_PACKED wnm_sleep_req; 878 struct { 879 u8 action; 880 u8 dialogtoken; 881 le16 keydata_len; 882 u8 variable[]; 883 } STRUCT_PACKED wnm_sleep_resp; 884 struct { 885 u8 action; 886 u8 variable[]; 887 } STRUCT_PACKED public_action; 888 struct { 889 u8 action; /* 9 */ 890 u8 oui[3]; 891 /* Vendor-specific content */ 892 u8 variable[]; 893 } STRUCT_PACKED vs_public_action; 894 struct { 895 u8 action; /* 7 */ 896 u8 dialog_token; 897 u8 req_mode; 898 le16 disassoc_timer; 899 u8 validity_interval; 900 /* BSS Termination Duration (optional), 901 * Session Information URL (optional), 902 * BSS Transition Candidate List 903 * Entries */ 904 u8 variable[]; 905 } STRUCT_PACKED bss_tm_req; 906 struct { 907 u8 action; /* 8 */ 908 u8 dialog_token; 909 u8 status_code; 910 u8 bss_termination_delay; 911 /* Target BSSID (optional), 912 * BSS Transition Candidate List 913 * Entries (optional) */ 914 u8 variable[]; 915 } STRUCT_PACKED bss_tm_resp; 916 struct { 917 u8 action; /* 6 */ 918 u8 dialog_token; 919 u8 query_reason; 920 /* BSS Transition Candidate List 921 * Entries (optional) */ 922 u8 variable[]; 923 } STRUCT_PACKED bss_tm_query; 924 struct { 925 u8 action; /* 11 */ 926 u8 dialog_token; 927 u8 req_info; 928 } STRUCT_PACKED coloc_intf_req; 929 struct { 930 u8 action; /* 12 */ 931 u8 dialog_token; 932 u8 variable[]; 933 } STRUCT_PACKED coloc_intf_report; 934 struct { 935 u8 action; /* 15 */ 936 u8 variable[]; 937 } STRUCT_PACKED slf_prot_action; 938 struct { 939 u8 action; 940 u8 variable[]; 941 } STRUCT_PACKED fst_action; 942 struct { 943 u8 action; 944 u8 dialog_token; 945 u8 variable[]; 946 } STRUCT_PACKED rrm; 947 } u; 948 } STRUCT_PACKED action; 949 } u; 950 } STRUCT_PACKED; 951 952 953 #define IEEE80211_MAX_MMPDU_SIZE 2304 954 955 /* Rx MCS bitmask is in the first 77 bits of supported_mcs_set */ 956 #define IEEE80211_HT_MCS_MASK_LEN 10 957 958 /* HT Capabilities element */ 959 struct ieee80211_ht_capabilities { 960 le16 ht_capabilities_info; 961 u8 a_mpdu_params; /* Maximum A-MPDU Length Exponent B0..B1 962 * Minimum MPDU Start Spacing B2..B4 963 * Reserved B5..B7 */ 964 u8 supported_mcs_set[16]; 965 le16 ht_extended_capabilities; 966 le32 tx_bf_capability_info; 967 u8 asel_capabilities; 968 } STRUCT_PACKED; 969 970 971 /* HT Operation element */ 972 struct ieee80211_ht_operation { 973 u8 primary_chan; 974 /* Five octets of HT Operation Information */ 975 u8 ht_param; /* B0..B7 */ 976 le16 operation_mode; /* B8..B23 */ 977 le16 param; /* B24..B39 */ 978 u8 basic_mcs_set[16]; 979 } STRUCT_PACKED; 980 981 982 struct ieee80211_obss_scan_parameters { 983 le16 scan_passive_dwell; 984 le16 scan_active_dwell; 985 le16 width_trigger_scan_interval; 986 le16 scan_passive_total_per_channel; 987 le16 scan_active_total_per_channel; 988 le16 channel_transition_delay_factor; 989 le16 scan_activity_threshold; 990 } STRUCT_PACKED; 991 992 993 struct ieee80211_vht_capabilities { 994 le32 vht_capabilities_info; 995 struct { 996 le16 rx_map; 997 le16 rx_highest; 998 le16 tx_map; 999 le16 tx_highest; 1000 } vht_supported_mcs_set; 1001 } STRUCT_PACKED; 1002 1003 struct ieee80211_vht_operation { 1004 u8 vht_op_info_chwidth; 1005 u8 vht_op_info_chan_center_freq_seg0_idx; 1006 u8 vht_op_info_chan_center_freq_seg1_idx; 1007 le16 vht_basic_mcs_set; 1008 } STRUCT_PACKED; 1009 1010 struct ieee80211_ampe_ie { 1011 u8 selected_pairwise_suite[4]; 1012 u8 local_nonce[32]; 1013 u8 peer_nonce[32]; 1014 /* Followed by 1015 * Key Replay Counter[8] (optional) 1016 * (only in Mesh Group Key Inform/Acknowledge frames) 1017 * GTKdata[variable] (optional) 1018 * (MGTK[variable] || Key RSC[8] || GTKExpirationTime[4]) 1019 * IGTKdata[variable] (optional) 1020 * (Key ID[2], IPN[6], IGTK[variable] in IGTK KDE format) 1021 */ 1022 } STRUCT_PACKED; 1023 1024 #ifdef _MSC_VER 1025 #pragma pack(pop) 1026 #endif /* _MSC_VER */ 1027 1028 #define ERP_INFO_NON_ERP_PRESENT BIT(0) 1029 #define ERP_INFO_USE_PROTECTION BIT(1) 1030 #define ERP_INFO_BARKER_PREAMBLE_MODE BIT(2) 1031 1032 #define OVERLAPPING_BSS_TRANS_DELAY_FACTOR 5 1033 1034 /* HT Capabilities Info field within HT Capabilities element */ 1035 #define HT_CAP_INFO_LDPC_CODING_CAP ((u16) BIT(0)) 1036 #define HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET ((u16) BIT(1)) 1037 #define HT_CAP_INFO_SMPS_MASK ((u16) (BIT(2) | BIT(3))) 1038 #define HT_CAP_INFO_SMPS_STATIC ((u16) 0) 1039 #define HT_CAP_INFO_SMPS_DYNAMIC ((u16) BIT(2)) 1040 #define HT_CAP_INFO_SMPS_DISABLED ((u16) (BIT(2) | BIT(3))) 1041 #define HT_CAP_INFO_GREEN_FIELD ((u16) BIT(4)) 1042 #define HT_CAP_INFO_SHORT_GI20MHZ ((u16) BIT(5)) 1043 #define HT_CAP_INFO_SHORT_GI40MHZ ((u16) BIT(6)) 1044 #define HT_CAP_INFO_TX_STBC ((u16) BIT(7)) 1045 #define HT_CAP_INFO_RX_STBC_MASK ((u16) (BIT(8) | BIT(9))) 1046 #define HT_CAP_INFO_RX_STBC_1 ((u16) BIT(8)) 1047 #define HT_CAP_INFO_RX_STBC_12 ((u16) BIT(9)) 1048 #define HT_CAP_INFO_RX_STBC_123 ((u16) (BIT(8) | BIT(9))) 1049 #define HT_CAP_INFO_DELAYED_BA ((u16) BIT(10)) 1050 #define HT_CAP_INFO_MAX_AMSDU_SIZE ((u16) BIT(11)) 1051 #define HT_CAP_INFO_DSSS_CCK40MHZ ((u16) BIT(12)) 1052 /* B13 - Reserved (was PSMP support during P802.11n development) */ 1053 #define HT_CAP_INFO_40MHZ_INTOLERANT ((u16) BIT(14)) 1054 #define HT_CAP_INFO_LSIG_TXOP_PROTECT_SUPPORT ((u16) BIT(15)) 1055 1056 /* HT Extended Capabilities field within HT Capabilities element */ 1057 #define EXT_HT_CAP_INFO_PCO ((u16) BIT(0)) 1058 #define EXT_HT_CAP_INFO_PCO_TRANS_TIME_MASK ((u16) (BIT(1) | BIT(2))) 1059 #define EXT_HT_CAP_INFO_TRANS_TIME_OFFSET 1 1060 /* B3..B7 - Reserved */ 1061 #define EXT_HT_CAP_INFO_MCS_FEEDBACK_MASK ((u16) (BIT(8) | BIT(9))) 1062 #define EXT_HT_CAP_INFO_MCS_FEEDBACK_OFFSET 8 1063 #define EXT_HT_CAP_INFO_HTC_SUPPORT ((u16) BIT(10)) 1064 #define EXT_HT_CAP_INFO_RD_RESPONDER ((u16) BIT(11)) 1065 /* B12..B15 - Reserved */ 1066 1067 /* Transmit Beanforming Capabilities within HT Capabilities element */ 1068 #define TX_BF_CAP_IMPLICIT_TXBF_RX_CAP ((u32) BIT(0)) 1069 #define TX_BF_CAP_RX_STAGGERED_SOUNDING_CAP ((u32) BIT(1)) 1070 #define TX_BF_CAP_TX_STAGGERED_SOUNDING_CAP ((u32) BIT(2)) 1071 #define TX_BF_CAP_RX_NDP_CAP ((u32) BIT(3)) 1072 #define TX_BF_CAP_TX_NDP_CAP ((u32) BIT(4)) 1073 #define TX_BF_CAP_IMPLICIT_TX_BF_CAP ((u32) BIT(5)) 1074 #define TX_BF_CAP_CALIBRATION_MASK ((u32) (BIT(6) | BIT(7)) 1075 #define TX_BF_CAP_CALIB_OFFSET 6 1076 #define TX_BF_CAP_EXPLICIT_CSI_TXBF_CAP ((u32) BIT(8)) 1077 #define TX_BF_CAP_EXPLICIT_NONCOMPR_STEERING_CAP ((u32) BIT(9)) 1078 #define TX_BF_CAP_EXPLICIT_COMPR_STEERING_CAP ((u32) BIT(10)) 1079 #define TX_BF_CAP_EXPLICIT_TX_BF_CSI_FEEDBACK_MASK ((u32) (BIT(10) | BIT(11))) 1080 #define TX_BF_CAP_EXPLICIT_BF_CSI_FEEDBACK_OFFSET 11 1081 #define TX_BF_CAP_EXPLICIT_UNCOMPR_STEERING_MATRIX_FEEDBACK_OFFSET 13 1082 #define TX_BF_CAP_EXPLICIT_COMPRESSED_STEERING_MATRIX_FEEDBACK_OFFSET 15 1083 #define TX_BF_CAP_MINIMAL_GROUPING_OFFSET 17 1084 #define TX_BF_CAP_CSI_NUM_BEAMFORMER_ANT_OFFSET 19 1085 #define TX_BF_CAP_UNCOMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET 21 1086 #define TX_BF_CAP_COMPRESSED_STEERING_MATRIX_BEAMFORMER_ANT_OFFSET 23 1087 #define TX_BF_CAP_SCI_MAX_OF_ROWS_BEANFORMER_SUPPORTED_OFFSET 25 1088 #define TX_BF_CAP_CHANNEL_ESTIMATION_CAP_MASK ((u32) (BIT(27) | BIT(28))) 1089 #define TX_BF_CAP_CHANNEL_ESTIMATION_CAP_OFFSET 27 1090 /* B29..B31 - Reserved */ 1091 1092 /* ASEL Capability field within HT Capabilities element */ 1093 #define ASEL_CAP_ASEL_CAPABLE ((u8) BIT(0)) 1094 #define ASEL_CAP_EXPLICIT_CSI_FEEDBACK_BASED_TX_AS_CAP ((u8) BIT(1)) 1095 #define ASEL_CAP_ANT_INDICES_FEEDBACK_BASED_TX_AS_CAP ((u8) BIT(2)) 1096 #define ASEL_CAP_EXPLICIT_CSI_FEEDBACK_CAP ((u8) BIT(3)) 1097 #define ASEL_CAP_ANT_INDICES_FEEDBACK_CAP ((u8) BIT(4)) 1098 #define ASEL_CAP_RX_AS_CAP ((u8) BIT(5)) 1099 #define ASEL_CAP_TX_SOUNDING_PPDUS_CAP ((u8) BIT(6)) 1100 /* B7 - Reserved */ 1101 1102 /* First octet of HT Operation Information within HT Operation element */ 1103 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_OFF_MASK ((u8) BIT(0) | BIT(1)) 1104 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_ABOVE ((u8) BIT(0)) 1105 #define HT_INFO_HT_PARAM_SECONDARY_CHNL_BELOW ((u8) BIT(0) | BIT(1)) 1106 #define HT_INFO_HT_PARAM_STA_CHNL_WIDTH ((u8) BIT(2)) 1107 #define HT_INFO_HT_PARAM_RIFS_MODE ((u8) BIT(3)) 1108 /* B4..B7 - Reserved */ 1109 1110 /* HT Protection (B8..B9 of HT Operation Information) */ 1111 #define HT_PROT_NO_PROTECTION 0 1112 #define HT_PROT_NONMEMBER_PROTECTION 1 1113 #define HT_PROT_20MHZ_PROTECTION 2 1114 #define HT_PROT_NON_HT_MIXED 3 1115 /* Bits within ieee80211_ht_operation::operation_mode (BIT(0) maps to B8 in 1116 * HT Operation Information) */ 1117 #define HT_OPER_OP_MODE_HT_PROT_MASK ((u16) (BIT(0) | BIT(1))) /* B8..B9 */ 1118 #define HT_OPER_OP_MODE_NON_GF_HT_STAS_PRESENT ((u16) BIT(2)) /* B10 */ 1119 /* BIT(3), i.e., B11 in HT Operation Information field - Reserved */ 1120 #define HT_OPER_OP_MODE_OBSS_NON_HT_STAS_PRESENT ((u16) BIT(4)) /* B12 */ 1121 /* BIT(5)..BIT(15), i.e., B13..B23 - Reserved */ 1122 1123 /* Last two octets of HT Operation Information (BIT(0) = B24) */ 1124 /* B24..B29 - Reserved */ 1125 #define HT_OPER_PARAM_DUAL_BEACON ((u16) BIT(6)) 1126 #define HT_OPER_PARAM_DUAL_CTS_PROTECTION ((u16) BIT(7)) 1127 #define HT_OPER_PARAM_STBC_BEACON ((u16) BIT(8)) 1128 #define HT_OPER_PARAM_LSIG_TXOP_PROT_FULL_SUPP ((u16) BIT(9)) 1129 #define HT_OPER_PARAM_PCO_ACTIVE ((u16) BIT(10)) 1130 #define HT_OPER_PARAM_PCO_PHASE ((u16) BIT(11)) 1131 /* B36..B39 - Reserved */ 1132 1133 #define BSS_MEMBERSHIP_SELECTOR_VHT_PHY 126 1134 #define BSS_MEMBERSHIP_SELECTOR_HT_PHY 127 1135 1136 /* VHT Defines */ 1137 #define VHT_CAP_MAX_MPDU_LENGTH_7991 ((u32) BIT(0)) 1138 #define VHT_CAP_MAX_MPDU_LENGTH_11454 ((u32) BIT(1)) 1139 #define VHT_CAP_MAX_MPDU_LENGTH_MASK ((u32) BIT(0) | BIT(1)) 1140 #define VHT_CAP_MAX_MPDU_LENGTH_MASK_SHIFT 0 1141 #define VHT_CAP_SUPP_CHAN_WIDTH_160MHZ ((u32) BIT(2)) 1142 #define VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ ((u32) BIT(3)) 1143 #define VHT_CAP_SUPP_CHAN_WIDTH_MASK ((u32) BIT(2) | BIT(3)) 1144 #define VHT_CAP_SUPP_CHAN_WIDTH_MASK_SHIFT 2 1145 #define VHT_CAP_RXLDPC ((u32) BIT(4)) 1146 #define VHT_CAP_SHORT_GI_80 ((u32) BIT(5)) 1147 #define VHT_CAP_SHORT_GI_160 ((u32) BIT(6)) 1148 #define VHT_CAP_TXSTBC ((u32) BIT(7)) 1149 #define VHT_CAP_RXSTBC_1 ((u32) BIT(8)) 1150 #define VHT_CAP_RXSTBC_2 ((u32) BIT(9)) 1151 #define VHT_CAP_RXSTBC_3 ((u32) BIT(8) | BIT(9)) 1152 #define VHT_CAP_RXSTBC_4 ((u32) BIT(10)) 1153 #define VHT_CAP_RXSTBC_MASK ((u32) BIT(8) | BIT(9) | \ 1154 BIT(10)) 1155 #define VHT_CAP_RXSTBC_MASK_SHIFT 8 1156 #define VHT_CAP_SU_BEAMFORMER_CAPABLE ((u32) BIT(11)) 1157 #define VHT_CAP_SU_BEAMFORMEE_CAPABLE ((u32) BIT(12)) 1158 #define VHT_CAP_BEAMFORMEE_STS_MAX ((u32) BIT(13) | \ 1159 BIT(14) | BIT(15)) 1160 #define VHT_CAP_BEAMFORMEE_STS_MAX_SHIFT 13 1161 #define VHT_CAP_BEAMFORMEE_STS_OFFSET 13 1162 #define VHT_CAP_SOUNDING_DIMENSION_MAX ((u32) BIT(16) | \ 1163 BIT(17) | BIT(18)) 1164 #define VHT_CAP_SOUNDING_DIMENSION_MAX_SHIFT 16 1165 #define VHT_CAP_SOUNDING_DIMENSION_OFFSET 16 1166 #define VHT_CAP_MU_BEAMFORMER_CAPABLE ((u32) BIT(19)) 1167 #define VHT_CAP_MU_BEAMFORMEE_CAPABLE ((u32) BIT(20)) 1168 #define VHT_CAP_VHT_TXOP_PS ((u32) BIT(21)) 1169 #define VHT_CAP_HTC_VHT ((u32) BIT(22)) 1170 1171 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_1 ((u32) BIT(23)) 1172 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_2 ((u32) BIT(24)) 1173 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_3 ((u32) BIT(23) | BIT(24)) 1174 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_4 ((u32) BIT(25)) 1175 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_5 ((u32) BIT(23) | BIT(25)) 1176 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_6 ((u32) BIT(24) | BIT(25)) 1177 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX ((u32) BIT(23) | \ 1178 BIT(24) | BIT(25)) 1179 #define VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MAX_SHIFT 23 1180 #define VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB ((u32) BIT(27)) 1181 #define VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB ((u32) BIT(26) | BIT(27)) 1182 #define VHT_CAP_RX_ANTENNA_PATTERN ((u32) BIT(28)) 1183 #define VHT_CAP_TX_ANTENNA_PATTERN ((u32) BIT(29)) 1184 1185 #define VHT_OPMODE_CHANNEL_WIDTH_MASK ((u8) BIT(0) | BIT(1)) 1186 #define VHT_OPMODE_CHANNEL_RxNSS_MASK ((u8) BIT(4) | BIT(5) | \ 1187 BIT(6)) 1188 #define VHT_OPMODE_NOTIF_RX_NSS_SHIFT 4 1189 1190 #define VHT_RX_NSS_MAX_STREAMS 8 1191 1192 /* VHT channel widths */ 1193 #define VHT_CHANWIDTH_USE_HT 0 1194 #define VHT_CHANWIDTH_80MHZ 1 1195 #define VHT_CHANWIDTH_160MHZ 2 1196 #define VHT_CHANWIDTH_80P80MHZ 3 1197 1198 #define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs) 1199 * 00:50:F2 */ 1200 #define WPA_IE_VENDOR_TYPE 0x0050f201 1201 #define WMM_IE_VENDOR_TYPE 0x0050f202 1202 #define WPS_IE_VENDOR_TYPE 0x0050f204 1203 #define OUI_WFA 0x506f9a 1204 #define P2P_IE_VENDOR_TYPE 0x506f9a09 1205 #define WFD_IE_VENDOR_TYPE 0x506f9a0a 1206 #define WFD_OUI_TYPE 10 1207 #define HS20_IE_VENDOR_TYPE 0x506f9a10 1208 #define OSEN_IE_VENDOR_TYPE 0x506f9a12 1209 #define MBO_IE_VENDOR_TYPE 0x506f9a16 1210 #define MBO_OUI_TYPE 22 1211 #define OWE_IE_VENDOR_TYPE 0x506f9a1c 1212 #define OWE_OUI_TYPE 28 1213 1214 #define WMM_OUI_TYPE 2 1215 #define WMM_OUI_SUBTYPE_INFORMATION_ELEMENT 0 1216 #define WMM_OUI_SUBTYPE_PARAMETER_ELEMENT 1 1217 #define WMM_OUI_SUBTYPE_TSPEC_ELEMENT 2 1218 #define WMM_VERSION 1 1219 1220 #define WMM_ACTION_CODE_ADDTS_REQ 0 1221 #define WMM_ACTION_CODE_ADDTS_RESP 1 1222 #define WMM_ACTION_CODE_DELTS 2 1223 1224 #define WMM_ADDTS_STATUS_ADMISSION_ACCEPTED 0 1225 #define WMM_ADDTS_STATUS_INVALID_PARAMETERS 1 1226 /* 2 - Reserved */ 1227 #define WMM_ADDTS_STATUS_REFUSED 3 1228 /* 4-255 - Reserved */ 1229 1230 /* WMM TSPEC Direction Field Values */ 1231 #define WMM_TSPEC_DIRECTION_UPLINK 0 1232 #define WMM_TSPEC_DIRECTION_DOWNLINK 1 1233 /* 2 - Reserved */ 1234 #define WMM_TSPEC_DIRECTION_BI_DIRECTIONAL 3 1235 1236 /* 1237 * WMM Information Element (used in (Re)Association Request frames; may also be 1238 * used in Beacon frames) 1239 */ 1240 struct wmm_information_element { 1241 /* Element ID: 221 (0xdd); Length: 7 */ 1242 /* required fields for WMM version 1 */ 1243 u8 oui[3]; /* 00:50:f2 */ 1244 u8 oui_type; /* 2 */ 1245 u8 oui_subtype; /* 0 */ 1246 u8 version; /* 1 for WMM version 1.0 */ 1247 u8 qos_info; /* AP/STA specific QoS info */ 1248 1249 } STRUCT_PACKED; 1250 1251 #define WMM_QOSINFO_AP_UAPSD 0x80 1252 1253 #define WMM_QOSINFO_STA_AC_MASK 0x0f 1254 #define WMM_QOSINFO_STA_SP_MASK 0x03 1255 #define WMM_QOSINFO_STA_SP_SHIFT 5 1256 1257 #define WMM_AC_AIFSN_MASK 0x0f 1258 #define WMM_AC_AIFNS_SHIFT 0 1259 #define WMM_AC_ACM 0x10 1260 #define WMM_AC_ACI_MASK 0x60 1261 #define WMM_AC_ACI_SHIFT 5 1262 1263 #define WMM_AC_ECWMIN_MASK 0x0f 1264 #define WMM_AC_ECWMIN_SHIFT 0 1265 #define WMM_AC_ECWMAX_MASK 0xf0 1266 #define WMM_AC_ECWMAX_SHIFT 4 1267 1268 struct wmm_ac_parameter { 1269 u8 aci_aifsn; /* AIFSN, ACM, ACI */ 1270 u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */ 1271 le16 txop_limit; 1272 } STRUCT_PACKED; 1273 1274 /* 1275 * WMM Parameter Element (used in Beacon, Probe Response, and (Re)Association 1276 * Response frmaes) 1277 */ 1278 struct wmm_parameter_element { 1279 /* Element ID: 221 (0xdd); Length: 24 */ 1280 /* required fields for WMM version 1 */ 1281 u8 oui[3]; /* 00:50:f2 */ 1282 u8 oui_type; /* 2 */ 1283 u8 oui_subtype; /* 1 */ 1284 u8 version; /* 1 for WMM version 1.0 */ 1285 u8 qos_info; /* AP/STA specific QoS info */ 1286 u8 reserved; /* 0 */ 1287 struct wmm_ac_parameter ac[4]; /* AC_BE, AC_BK, AC_VI, AC_VO */ 1288 1289 } STRUCT_PACKED; 1290 1291 /* WMM TSPEC Element */ 1292 struct wmm_tspec_element { 1293 u8 eid; /* 221 = 0xdd */ 1294 u8 length; /* 6 + 55 = 61 */ 1295 u8 oui[3]; /* 00:50:f2 */ 1296 u8 oui_type; /* 2 */ 1297 u8 oui_subtype; /* 2 */ 1298 u8 version; /* 1 */ 1299 /* WMM TSPEC body (55 octets): */ 1300 u8 ts_info[3]; 1301 le16 nominal_msdu_size; 1302 le16 maximum_msdu_size; 1303 le32 minimum_service_interval; 1304 le32 maximum_service_interval; 1305 le32 inactivity_interval; 1306 le32 suspension_interval; 1307 le32 service_start_time; 1308 le32 minimum_data_rate; 1309 le32 mean_data_rate; 1310 le32 peak_data_rate; 1311 le32 maximum_burst_size; 1312 le32 delay_bound; 1313 le32 minimum_phy_rate; 1314 le16 surplus_bandwidth_allowance; 1315 le16 medium_time; 1316 } STRUCT_PACKED; 1317 1318 1319 /* Access Categories / ACI to AC coding */ 1320 enum wmm_ac { 1321 WMM_AC_BE = 0 /* Best Effort */, 1322 WMM_AC_BK = 1 /* Background */, 1323 WMM_AC_VI = 2 /* Video */, 1324 WMM_AC_VO = 3 /* Voice */, 1325 WMM_AC_NUM = 4 1326 }; 1327 1328 1329 #define HS20_INDICATION_OUI_TYPE 16 1330 #define HS20_ANQP_OUI_TYPE 17 1331 #define HS20_OSEN_OUI_TYPE 18 1332 #define HS20_ROAMING_CONS_SEL_OUI_TYPE 29 1333 #define HS20_STYPE_QUERY_LIST 1 1334 #define HS20_STYPE_CAPABILITY_LIST 2 1335 #define HS20_STYPE_OPERATOR_FRIENDLY_NAME 3 1336 #define HS20_STYPE_WAN_METRICS 4 1337 #define HS20_STYPE_CONNECTION_CAPABILITY 5 1338 #define HS20_STYPE_NAI_HOME_REALM_QUERY 6 1339 #define HS20_STYPE_OPERATING_CLASS 7 1340 #define HS20_STYPE_OSU_PROVIDERS_LIST 8 1341 #define HS20_STYPE_ICON_REQUEST 10 1342 #define HS20_STYPE_ICON_BINARY_FILE 11 1343 #define HS20_STYPE_OPERATOR_ICON_METADATA 12 1344 #define HS20_STYPE_OSU_PROVIDERS_NAI_LIST 13 1345 1346 #define HS20_DGAF_DISABLED 0x01 1347 #define HS20_PPS_MO_ID_PRESENT 0x02 1348 #define HS20_ANQP_DOMAIN_ID_PRESENT 0x04 1349 #ifndef HS20_VERSION 1350 #define HS20_VERSION 0x10 /* Release 2 */ 1351 #endif /* HS20_VERSION */ 1352 1353 /* WNM-Notification WFA vendors specific subtypes */ 1354 #define HS20_WNM_SUB_REM_NEEDED 0 1355 #define HS20_WNM_DEAUTH_IMMINENT_NOTICE 1 1356 #define HS20_WNM_T_C_ACCEPTANCE 2 1357 1358 #define HS20_DEAUTH_REASON_CODE_BSS 0 1359 #define HS20_DEAUTH_REASON_CODE_ESS 1 1360 1361 /* MBO v0.0_r19, 4.2: MBO Attributes */ 1362 /* Table 4-5: MBO Attributes */ 1363 /* OCE v0.0.10, Table 4-3: OCE Attributes */ 1364 enum mbo_attr_id { 1365 MBO_ATTR_ID_AP_CAPA_IND = 1, 1366 MBO_ATTR_ID_NON_PREF_CHAN_REPORT = 2, 1367 MBO_ATTR_ID_CELL_DATA_CAPA = 3, 1368 MBO_ATTR_ID_ASSOC_DISALLOW = 4, 1369 MBO_ATTR_ID_CELL_DATA_PREF = 5, 1370 MBO_ATTR_ID_TRANSITION_REASON = 6, 1371 MBO_ATTR_ID_TRANSITION_REJECT_REASON = 7, 1372 MBO_ATTR_ID_ASSOC_RETRY_DELAY = 8, 1373 OCE_ATTR_ID_CAPA_IND = 101, 1374 OCE_ATTR_ID_RSSI_BASED_ASSOC_REJECT = 102, 1375 OCE_ATTR_ID_REDUCED_WAN_METRICS = 103, 1376 OCE_ATTR_ID_RNR_COMPLETENESS = 104, 1377 }; 1378 1379 /* MBO v0.0_r19, 4.2.1: MBO AP Capability Indication Attribute */ 1380 /* Table 4-7: MBO AP Capability Indication Field Values */ 1381 #define MBO_AP_CAPA_CELL_AWARE BIT(6) 1382 1383 /* MBO v0.0_r19, 4.2.2: Non-preferred Channel Report Attribute */ 1384 /* Table 4-10: Reason Code Field Values */ 1385 enum mbo_non_pref_chan_reason { 1386 MBO_NON_PREF_CHAN_REASON_UNSPECIFIED = 0, 1387 MBO_NON_PREF_CHAN_REASON_RSSI = 1, 1388 MBO_NON_PREF_CHAN_REASON_EXT_INTERFERENCE = 2, 1389 MBO_NON_PREF_CHAN_REASON_INT_INTERFERENCE = 3, 1390 }; 1391 1392 /* MBO v0.0_r19, 4.2.3: Cellular Data Capabilities Attribute */ 1393 /* Table 4-13: Cellular Data Connectivity Field */ 1394 enum mbo_cellular_capa { 1395 MBO_CELL_CAPA_AVAILABLE = 1, 1396 MBO_CELL_CAPA_NOT_AVAILABLE = 2, 1397 MBO_CELL_CAPA_NOT_SUPPORTED = 3, 1398 }; 1399 1400 /* MBO v0.0_r19, 4.2.4: Association Disallowed Attribute */ 1401 /* Table 4-15: Reason Code Field Values */ 1402 enum mbo_assoc_disallow_reason { 1403 MBO_ASSOC_DISALLOW_REASON_UNSPECIFIED = 1, 1404 MBO_ASSOC_DISALLOW_REASON_MAX_STA = 2, 1405 MBO_ASSOC_DISALLOW_REASON_AIR_INTERFERENCE = 3, 1406 MBO_ASSOC_DISALLOW_REASON_AUTH_SERVER_OVERLOAD = 4, 1407 MBO_ASSOC_DISALLOW_REASON_LOW_RSSI = 5, 1408 }; 1409 1410 /* MBO v0.0_r19, 4.2.5: Cellular Data Connection Preference Attribute */ 1411 /* Table 4-17: Cellular Preference Field Values */ 1412 enum mbo_cell_pref { 1413 MBO_CELL_PREF_EXCLUDED = 0, 1414 MBO_CELL_PREF_NO_USE = 1, 1415 MBO_CELL_PREF_USE = 255 1416 }; 1417 1418 /* MBO v0.0_r19, 4.2.6: Transition Reason Code Attribute */ 1419 /* Table 4-19: Transition Reason Code Field Values */ 1420 enum mbo_transition_reason { 1421 MBO_TRANSITION_REASON_UNSPECIFIED = 0, 1422 MBO_TRANSITION_REASON_FRAME_LOSS = 1, 1423 MBO_TRANSITION_REASON_DELAY = 2, 1424 MBO_TRANSITION_REASON_BANDWIDTH = 3, 1425 MBO_TRANSITION_REASON_LOAD_BALANCE = 4, 1426 MBO_TRANSITION_REASON_RSSI = 5, 1427 MBO_TRANSITION_REASON_RETRANSMISSIONS = 6, 1428 MBO_TRANSITION_REASON_INTERFERENCE = 7, 1429 MBO_TRANSITION_REASON_GRAY_ZONE = 8, 1430 MBO_TRANSITION_REASON_PREMIUM_AP = 9, 1431 }; 1432 1433 /* MBO v0.0_r19, 4.2.7: Transition Rejection Reason Code Attribute */ 1434 /* Table 4-21: Transition Rejection Reason Code Field Values */ 1435 enum mbo_transition_reject_reason { 1436 MBO_TRANSITION_REJECT_REASON_UNSPECIFIED = 0, 1437 MBO_TRANSITION_REJECT_REASON_FRAME_LOSS = 1, 1438 MBO_TRANSITION_REJECT_REASON_DELAY = 2, 1439 MBO_TRANSITION_REJECT_REASON_QOS_CAPACITY = 3, 1440 MBO_TRANSITION_REJECT_REASON_RSSI = 4, 1441 MBO_TRANSITION_REJECT_REASON_INTERFERENCE = 5, 1442 MBO_TRANSITION_REJECT_REASON_SERVICES = 6, 1443 }; 1444 1445 /* MBO v0.0_r19, 4.4: WNM-Notification vendor subelements */ 1446 enum wfa_wnm_notif_subelem_id { 1447 WFA_WNM_NOTIF_SUBELEM_NON_PREF_CHAN_REPORT = 2, 1448 WFA_WNM_NOTIF_SUBELEM_CELL_DATA_CAPA = 3, 1449 }; 1450 1451 /* MBO v0.0_r27, 4.3: MBO ANQP-elements */ 1452 #define MBO_ANQP_OUI_TYPE 0x12 1453 #define MBO_ANQP_SUBTYPE_QUERY_LIST 1 1454 #define MBO_ANQP_SUBTYPE_CELL_CONN_PREF 2 1455 #define MAX_MBO_ANQP_SUBTYPE MBO_ANQP_SUBTYPE_CELL_CONN_PREF 1456 1457 /* OCE v0.0.10, 4.2.1: OCE Capability Indication Attribute */ 1458 #define OCE_RELEASE 1 1459 #define OCE_RELEASE_MASK (BIT(0) | BIT(1) | BIT(2)) 1460 #define OCE_IS_STA_CFON BIT(3) 1461 #define OCE_IS_NON_OCE_AP_PRESENT BIT(4) 1462 1463 /* Wi-Fi Direct (P2P) */ 1464 1465 #define P2P_OUI_TYPE 9 1466 1467 enum p2p_attr_id { 1468 P2P_ATTR_STATUS = 0, 1469 P2P_ATTR_MINOR_REASON_CODE = 1, 1470 P2P_ATTR_CAPABILITY = 2, 1471 P2P_ATTR_DEVICE_ID = 3, 1472 P2P_ATTR_GROUP_OWNER_INTENT = 4, 1473 P2P_ATTR_CONFIGURATION_TIMEOUT = 5, 1474 P2P_ATTR_LISTEN_CHANNEL = 6, 1475 P2P_ATTR_GROUP_BSSID = 7, 1476 P2P_ATTR_EXT_LISTEN_TIMING = 8, 1477 P2P_ATTR_INTENDED_INTERFACE_ADDR = 9, 1478 P2P_ATTR_MANAGEABILITY = 10, 1479 P2P_ATTR_CHANNEL_LIST = 11, 1480 P2P_ATTR_NOTICE_OF_ABSENCE = 12, 1481 P2P_ATTR_DEVICE_INFO = 13, 1482 P2P_ATTR_GROUP_INFO = 14, 1483 P2P_ATTR_GROUP_ID = 15, 1484 P2P_ATTR_INTERFACE = 16, 1485 P2P_ATTR_OPERATING_CHANNEL = 17, 1486 P2P_ATTR_INVITATION_FLAGS = 18, 1487 P2P_ATTR_OOB_GO_NEG_CHANNEL = 19, 1488 P2P_ATTR_SERVICE_HASH = 21, 1489 P2P_ATTR_SESSION_INFORMATION_DATA = 22, 1490 P2P_ATTR_CONNECTION_CAPABILITY = 23, 1491 P2P_ATTR_ADVERTISEMENT_ID = 24, 1492 P2P_ATTR_ADVERTISED_SERVICE = 25, 1493 P2P_ATTR_SESSION_ID = 26, 1494 P2P_ATTR_FEATURE_CAPABILITY = 27, 1495 P2P_ATTR_PERSISTENT_GROUP = 28, 1496 P2P_ATTR_VENDOR_SPECIFIC = 221 1497 }; 1498 1499 #define P2P_MAX_GO_INTENT 15 1500 1501 /* P2P Capability - Device Capability bitmap */ 1502 #define P2P_DEV_CAPAB_SERVICE_DISCOVERY BIT(0) 1503 #define P2P_DEV_CAPAB_CLIENT_DISCOVERABILITY BIT(1) 1504 #define P2P_DEV_CAPAB_CONCURRENT_OPER BIT(2) 1505 #define P2P_DEV_CAPAB_INFRA_MANAGED BIT(3) 1506 #define P2P_DEV_CAPAB_DEVICE_LIMIT BIT(4) 1507 #define P2P_DEV_CAPAB_INVITATION_PROCEDURE BIT(5) 1508 1509 /* P2P Capability - Group Capability bitmap */ 1510 #define P2P_GROUP_CAPAB_GROUP_OWNER BIT(0) 1511 #define P2P_GROUP_CAPAB_PERSISTENT_GROUP BIT(1) 1512 #define P2P_GROUP_CAPAB_GROUP_LIMIT BIT(2) 1513 #define P2P_GROUP_CAPAB_INTRA_BSS_DIST BIT(3) 1514 #define P2P_GROUP_CAPAB_CROSS_CONN BIT(4) 1515 #define P2P_GROUP_CAPAB_PERSISTENT_RECONN BIT(5) 1516 #define P2P_GROUP_CAPAB_GROUP_FORMATION BIT(6) 1517 #define P2P_GROUP_CAPAB_IP_ADDR_ALLOCATION BIT(7) 1518 1519 /* P2PS Coordination Protocol Transport Bitmap */ 1520 #define P2PS_FEATURE_CAPAB_UDP_TRANSPORT BIT(0) 1521 #define P2PS_FEATURE_CAPAB_MAC_TRANSPORT BIT(1) 1522 1523 struct p2ps_feature_capab { 1524 u8 cpt; 1525 u8 reserved; 1526 } STRUCT_PACKED; 1527 1528 /* Invitation Flags */ 1529 #define P2P_INVITATION_FLAGS_TYPE BIT(0) 1530 1531 /* P2P Manageability */ 1532 #define P2P_MAN_DEVICE_MANAGEMENT BIT(0) 1533 #define P2P_MAN_CROSS_CONNECTION_PERMITTED BIT(1) 1534 #define P2P_MAN_COEXISTENCE_OPTIONAL BIT(2) 1535 1536 enum p2p_status_code { 1537 P2P_SC_SUCCESS = 0, 1538 P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE = 1, 1539 P2P_SC_FAIL_INCOMPATIBLE_PARAMS = 2, 1540 P2P_SC_FAIL_LIMIT_REACHED = 3, 1541 P2P_SC_FAIL_INVALID_PARAMS = 4, 1542 P2P_SC_FAIL_UNABLE_TO_ACCOMMODATE = 5, 1543 P2P_SC_FAIL_PREV_PROTOCOL_ERROR = 6, 1544 P2P_SC_FAIL_NO_COMMON_CHANNELS = 7, 1545 P2P_SC_FAIL_UNKNOWN_GROUP = 8, 1546 P2P_SC_FAIL_BOTH_GO_INTENT_15 = 9, 1547 P2P_SC_FAIL_INCOMPATIBLE_PROV_METHOD = 10, 1548 P2P_SC_FAIL_REJECTED_BY_USER = 11, 1549 P2P_SC_SUCCESS_DEFERRED = 12, 1550 }; 1551 1552 enum p2p_role_indication { 1553 P2P_DEVICE_NOT_IN_GROUP = 0x00, 1554 P2P_CLIENT_IN_A_GROUP = 0x01, 1555 P2P_GO_IN_A_GROUP = 0x02, 1556 }; 1557 1558 #define P2P_WILDCARD_SSID "DIRECT-" 1559 #define P2P_WILDCARD_SSID_LEN 7 1560 1561 /* P2P action frames */ 1562 enum p2p_act_frame_type { 1563 P2P_NOA = 0, 1564 P2P_PRESENCE_REQ = 1, 1565 P2P_PRESENCE_RESP = 2, 1566 P2P_GO_DISC_REQ = 3 1567 }; 1568 1569 /* P2P public action frames */ 1570 enum p2p_action_frame_type { 1571 P2P_GO_NEG_REQ = 0, 1572 P2P_GO_NEG_RESP = 1, 1573 P2P_GO_NEG_CONF = 2, 1574 P2P_INVITATION_REQ = 3, 1575 P2P_INVITATION_RESP = 4, 1576 P2P_DEV_DISC_REQ = 5, 1577 P2P_DEV_DISC_RESP = 6, 1578 P2P_PROV_DISC_REQ = 7, 1579 P2P_PROV_DISC_RESP = 8 1580 }; 1581 1582 enum p2p_service_protocol_type { 1583 P2P_SERV_ALL_SERVICES = 0, 1584 P2P_SERV_BONJOUR = 1, 1585 P2P_SERV_UPNP = 2, 1586 P2P_SERV_WS_DISCOVERY = 3, 1587 P2P_SERV_WIFI_DISPLAY = 4, 1588 P2P_SERV_P2PS = 11, 1589 P2P_SERV_VENDOR_SPECIFIC = 255 1590 }; 1591 1592 enum p2p_sd_status { 1593 P2P_SD_SUCCESS = 0, 1594 P2P_SD_PROTO_NOT_AVAILABLE = 1, 1595 P2P_SD_REQUESTED_INFO_NOT_AVAILABLE = 2, 1596 P2P_SD_BAD_REQUEST = 3 1597 }; 1598 1599 1600 enum wifi_display_subelem { 1601 WFD_SUBELEM_DEVICE_INFO = 0, 1602 WFD_SUBELEM_ASSOCIATED_BSSID = 1, 1603 WFD_SUBELEM_AUDIO_FORMATS = 2, 1604 WFD_SUBELEM_VIDEO_FORMATS = 3, 1605 WFD_SUBELEM_3D_VIDEO_FORMATS = 4, 1606 WFD_SUBELEM_CONTENT_PROTECTION = 5, 1607 WFD_SUBELEM_COUPLED_SINK = 6, 1608 WFD_SUBELEM_EXT_CAPAB = 7, 1609 WFD_SUBELEM_LOCAL_IP_ADDRESS = 8, 1610 WFD_SUBELEM_SESSION_INFO = 9, 1611 WFD_SUBELEM_MAC_INFO = 10, 1612 WFD_SUBELEM_R2_DEVICE_INFO = 11, 1613 }; 1614 1615 /* 802.11s */ 1616 #define MESH_SYNC_METHOD_NEIGHBOR_OFFSET 1 1617 #define MESH_SYNC_METHOD_VENDOR 255 1618 #define MESH_PATH_PROTOCOL_HWMP 1 1619 #define MESH_PATH_PROTOCOL_VENDOR 255 1620 #define MESH_PATH_METRIC_AIRTIME 1 1621 #define MESH_PATH_METRIC_VENDOR 255 1622 /* IEEE 802.11s - Mesh Capability */ 1623 #define MESH_CAP_ACCEPT_ADDITIONAL_PEER BIT(0) 1624 #define MESH_CAP_MCCA_SUPPORTED BIT(1) 1625 #define MESH_CAP_MCCA_ENABLED BIT(2) 1626 #define MESH_CAP_FORWARDING BIT(3) 1627 #define MESH_CAP_MBCA_ENABLED BIT(4) 1628 #define MESH_CAP_TBTT_ADJUSTING BIT(5) 1629 #define MESH_CAP_MESH_PS_LEVEL BIT(6) 1630 1631 enum plink_action_field { 1632 PLINK_OPEN = 1, 1633 PLINK_CONFIRM, 1634 PLINK_CLOSE 1635 }; 1636 1637 #define OUI_BROADCOM 0x00904c /* Broadcom (Epigram) */ 1638 #define VENDOR_VHT_TYPE 0x04 1639 #define VENDOR_VHT_SUBTYPE 0x08 1640 #define VENDOR_VHT_SUBTYPE2 0x00 1641 1642 #define VENDOR_HT_CAPAB_OUI_TYPE 0x33 /* 00-90-4c:0x33 */ 1643 1644 1645 /* IEEE 802.11v - WNM Action field values */ 1646 enum wnm_action { 1647 WNM_EVENT_REQ = 0, 1648 WNM_EVENT_REPORT = 1, 1649 WNM_DIAGNOSTIC_REQ = 2, 1650 WNM_DIAGNOSTIC_REPORT = 3, 1651 WNM_LOCATION_CFG_REQ = 4, 1652 WNM_LOCATION_CFG_RESP = 5, 1653 WNM_BSS_TRANS_MGMT_QUERY = 6, 1654 WNM_BSS_TRANS_MGMT_REQ = 7, 1655 WNM_BSS_TRANS_MGMT_RESP = 8, 1656 WNM_FMS_REQ = 9, 1657 WNM_FMS_RESP = 10, 1658 WNM_COLLOCATED_INTERFERENCE_REQ = 11, 1659 WNM_COLLOCATED_INTERFERENCE_REPORT = 12, 1660 WNM_TFS_REQ = 13, 1661 WNM_TFS_RESP = 14, 1662 WNM_TFS_NOTIFY = 15, 1663 WNM_SLEEP_MODE_REQ = 16, 1664 WNM_SLEEP_MODE_RESP = 17, 1665 WNM_TIM_BROADCAST_REQ = 18, 1666 WNM_TIM_BROADCAST_RESP = 19, 1667 WNM_QOS_TRAFFIC_CAPAB_UPDATE = 20, 1668 WNM_CHANNEL_USAGE_REQ = 21, 1669 WNM_CHANNEL_USAGE_RESP = 22, 1670 WNM_DMS_REQ = 23, 1671 WNM_DMS_RESP = 24, 1672 WNM_TIMING_MEASUREMENT_REQ = 25, 1673 WNM_NOTIFICATION_REQ = 26, 1674 WNM_NOTIFICATION_RESP = 27 1675 }; 1676 1677 /* IEEE 802.11v - BSS Transition Management Request - Request Mode */ 1678 #define WNM_BSS_TM_REQ_PREF_CAND_LIST_INCLUDED BIT(0) 1679 #define WNM_BSS_TM_REQ_ABRIDGED BIT(1) 1680 #define WNM_BSS_TM_REQ_DISASSOC_IMMINENT BIT(2) 1681 #define WNM_BSS_TM_REQ_BSS_TERMINATION_INCLUDED BIT(3) 1682 #define WNM_BSS_TM_REQ_ESS_DISASSOC_IMMINENT BIT(4) 1683 1684 /* IEEE Std 802.11-2012 - Table 8-253 */ 1685 enum bss_trans_mgmt_status_code { 1686 WNM_BSS_TM_ACCEPT = 0, 1687 WNM_BSS_TM_REJECT_UNSPECIFIED = 1, 1688 WNM_BSS_TM_REJECT_INSUFFICIENT_BEACON = 2, 1689 WNM_BSS_TM_REJECT_INSUFFICIENT_CAPABITY = 3, 1690 WNM_BSS_TM_REJECT_UNDESIRED = 4, 1691 WNM_BSS_TM_REJECT_DELAY_REQUEST = 5, 1692 WNM_BSS_TM_REJECT_STA_CANDIDATE_LIST_PROVIDED = 6, 1693 WNM_BSS_TM_REJECT_NO_SUITABLE_CANDIDATES = 7, 1694 WNM_BSS_TM_REJECT_LEAVING_ESS = 8 1695 }; 1696 1697 /* 1698 * IEEE P802.11-REVmc/D5.0 Table 9-150 - Optional subelement IDs for 1699 * neighbor report 1700 */ 1701 #define WNM_NEIGHBOR_TSF 1 1702 #define WNM_NEIGHBOR_CONDENSED_COUNTRY_STRING 2 1703 #define WNM_NEIGHBOR_BSS_TRANSITION_CANDIDATE 3 1704 #define WNM_NEIGHBOR_BSS_TERMINATION_DURATION 4 1705 #define WNM_NEIGHBOR_BEARING 5 1706 #define WNM_NEIGHBOR_WIDE_BW_CHAN 6 1707 #define WNM_NEIGHBOR_MEASUREMENT_REPORT 39 1708 #define WNM_NEIGHBOR_HT_CAPAB 45 1709 #define WNM_NEIGHBOR_HT_OPER 61 1710 #define WNM_NEIGHBOR_SEC_CHAN_OFFSET 62 1711 #define WNM_NEIGHBOR_MEASUREMENT_PILOT 66 1712 #define WNM_NEIGHBOR_RRM_ENABLED_CAPABILITIES 70 1713 #define WNM_NEIGHBOR_MULTIPLE_BSSID 71 1714 #define WNM_NEIGHBOR_VHT_CAPAB 191 1715 #define WNM_NEIGHBOR_VHT_OPER 192 1716 1717 /* QoS action */ 1718 enum qos_action { 1719 QOS_ADDTS_REQ = 0, 1720 QOS_ADDTS_RESP = 1, 1721 QOS_DELTS = 2, 1722 QOS_SCHEDULE = 3, 1723 QOS_QOS_MAP_CONFIG = 4, 1724 }; 1725 1726 /* IEEE Std 802.11-2012, 8.4.2.62 20/40 BSS Coexistence element */ 1727 #define WLAN_20_40_BSS_COEX_INFO_REQ BIT(0) 1728 #define WLAN_20_40_BSS_COEX_40MHZ_INTOL BIT(1) 1729 #define WLAN_20_40_BSS_COEX_20MHZ_WIDTH_REQ BIT(2) 1730 #define WLAN_20_40_BSS_COEX_OBSS_EXEMPT_REQ BIT(3) 1731 #define WLAN_20_40_BSS_COEX_OBSS_EXEMPT_GRNT BIT(4) 1732 1733 struct ieee80211_2040_bss_coex_ie { 1734 u8 element_id; 1735 u8 length; 1736 u8 coex_param; 1737 } STRUCT_PACKED; 1738 1739 struct ieee80211_2040_intol_chan_report { 1740 u8 element_id; 1741 u8 length; 1742 u8 op_class; 1743 u8 variable[0]; /* Channel List */ 1744 } STRUCT_PACKED; 1745 1746 /* IEEE 802.11v - WNM-Sleep Mode element */ 1747 struct wnm_sleep_element { 1748 u8 eid; /* WLAN_EID_WNMSLEEP */ 1749 u8 len; 1750 u8 action_type; /* WNM_SLEEP_ENTER/WNM_SLEEP_MODE_EXIT */ 1751 u8 status; 1752 le16 intval; 1753 } STRUCT_PACKED; 1754 1755 #define WNM_SLEEP_MODE_ENTER 0 1756 #define WNM_SLEEP_MODE_EXIT 1 1757 1758 enum wnm_sleep_mode_response_status { 1759 WNM_STATUS_SLEEP_ACCEPT = 0, 1760 WNM_STATUS_SLEEP_EXIT_ACCEPT_GTK_UPDATE = 1, 1761 WNM_STATUS_DENIED_ACTION = 2, 1762 WNM_STATUS_DENIED_TMP = 3, 1763 WNM_STATUS_DENIED_KEY = 4, 1764 WNM_STATUS_DENIED_OTHER_WNM_SERVICE = 5 1765 }; 1766 1767 /* WNM-Sleep Mode subelement IDs */ 1768 enum wnm_sleep_mode_subelement_id { 1769 WNM_SLEEP_SUBELEM_GTK = 0, 1770 WNM_SLEEP_SUBELEM_IGTK = 1 1771 }; 1772 1773 /* Channel Switch modes (802.11h) */ 1774 #define CHAN_SWITCH_MODE_ALLOW_TX 0 1775 #define CHAN_SWITCH_MODE_BLOCK_TX 1 1776 1777 struct tpc_report { 1778 u8 eid; 1779 u8 len; 1780 u8 tx_power; 1781 u8 link_margin; 1782 } STRUCT_PACKED; 1783 1784 #define RRM_CAPABILITIES_IE_LEN 5 1785 1786 /* IEEE Std 802.11-2012, 8.5.7.4 - Link Measurement Request frame format */ 1787 struct rrm_link_measurement_request { 1788 u8 dialog_token; 1789 s8 tx_power; 1790 s8 max_tp; 1791 u8 variable[0]; 1792 } STRUCT_PACKED; 1793 1794 /* IEEE Std 802.11-2012, 8.5.7.5 - Link Measurement Report frame format */ 1795 struct rrm_link_measurement_report { 1796 u8 dialog_token; 1797 struct tpc_report tpc; 1798 u8 rx_ant_id; 1799 u8 tx_ant_id; 1800 u8 rcpi; 1801 u8 rsni; 1802 u8 variable[0]; 1803 } STRUCT_PACKED; 1804 1805 /* IEEE Std 802.11-2016, 9.4.2.21 - Measurement Request element */ 1806 struct rrm_measurement_request_element { 1807 u8 eid; /* Element ID */ 1808 u8 len; /* Length */ 1809 u8 token; /* Measurement Token */ 1810 u8 mode; /* Measurement Request Mode */ 1811 u8 type; /* Measurement Type */ 1812 u8 variable[0]; /* Measurement Request */ 1813 } STRUCT_PACKED; 1814 1815 /* IEEE Std 802.11-2016, Figure 9-148 - Measurement Request Mode field */ 1816 #define MEASUREMENT_REQUEST_MODE_PARALLEL BIT(0) 1817 #define MEASUREMENT_REQUEST_MODE_ENABLE BIT(1) 1818 #define MEASUREMENT_REQUEST_MODE_REQUEST BIT(2) 1819 #define MEASUREMENT_REQUEST_MODE_REPORT BIT(3) 1820 #define MEASUREMENT_REQUEST_MODE_DURATION_MANDATORY BIT(4) 1821 1822 /* IEEE Std 802.11-2016, 9.4.2.21.7 - Beacon request */ 1823 struct rrm_measurement_beacon_request { 1824 u8 oper_class; /* Operating Class */ 1825 u8 channel; /* Channel Number */ 1826 le16 rand_interval; /* Randomization Interval (in TUs) */ 1827 le16 duration; /* Measurement Duration (in TUs) */ 1828 u8 mode; /* Measurement Mode */ 1829 u8 bssid[ETH_ALEN]; /* BSSID */ 1830 u8 variable[0]; /* Optional Subelements */ 1831 } STRUCT_PACKED; 1832 1833 /* 1834 * IEEE Std 802.11-2016, Table 9-87 - Measurement Mode definitions for Beacon 1835 * request 1836 */ 1837 enum beacon_report_mode { 1838 BEACON_REPORT_MODE_PASSIVE = 0, 1839 BEACON_REPORT_MODE_ACTIVE = 1, 1840 BEACON_REPORT_MODE_TABLE = 2, 1841 }; 1842 1843 /* IEEE Std 802.11-2016, Table 9-88 - Beacon Request subelement IDs */ 1844 #define WLAN_BEACON_REQUEST_SUBELEM_SSID 0 1845 #define WLAN_BEACON_REQUEST_SUBELEM_INFO 1 /* Beacon Reporting */ 1846 #define WLAN_BEACON_REQUEST_SUBELEM_DETAIL 2 /* Reporting Detail */ 1847 #define WLAN_BEACON_REQUEST_SUBELEM_REQUEST 10 1848 #define WLAN_BEACON_REQUEST_SUBELEM_AP_CHANNEL 51 /* AP Channel Report */ 1849 #define WLAN_BEACON_REQUEST_SUBELEM_VENDOR 221 1850 1851 /* 1852 * IEEE Std 802.11-2016, Table 9-90 - Reporting Detail values 1853 */ 1854 enum beacon_report_detail { 1855 /* No fixed-length fields or elements */ 1856 BEACON_REPORT_DETAIL_NONE = 0, 1857 /* All fixed-length fields and any requested elements in the Request 1858 * element if present */ 1859 BEACON_REPORT_DETAIL_REQUESTED_ONLY = 1, 1860 /* All fixed-length fields and elements (default, used when Reporting 1861 * Detail subelement is not included in a Beacon request) */ 1862 BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS = 2, 1863 }; 1864 1865 /* IEEE Std 802.11-2016, 9.4.2.22 - Measurement Report element */ 1866 struct rrm_measurement_report_element { 1867 u8 eid; /* Element ID */ 1868 u8 len; /* Length */ 1869 u8 token; /* Measurement Token */ 1870 u8 mode; /* Measurement Report Mode */ 1871 u8 type; /* Measurement Type */ 1872 u8 variable[0]; /* Measurement Report */ 1873 } STRUCT_PACKED; 1874 1875 /* IEEE Std 802.11-2016, Figure 9-192 - Measurement Report Mode field */ 1876 #define MEASUREMENT_REPORT_MODE_ACCEPT 0 1877 #define MEASUREMENT_REPORT_MODE_REJECT_LATE BIT(0) 1878 #define MEASUREMENT_REPORT_MODE_REJECT_INCAPABLE BIT(1) 1879 #define MEASUREMENT_REPORT_MODE_REJECT_REFUSED BIT(2) 1880 1881 /* IEEE Std 802.11-2016, 9.4.2.22.7 - Beacon report */ 1882 struct rrm_measurement_beacon_report { 1883 u8 op_class; /* Operating Class */ 1884 u8 channel; /* Channel Number */ 1885 le64 start_time; /* Actual Measurement Start Time 1886 * (in TSF of the BSS requesting the measurement) */ 1887 le16 duration; /* in TUs */ 1888 u8 report_info; /* Reported Frame Information */ 1889 u8 rcpi; /* RCPI */ 1890 u8 rsni; /* RSNI */ 1891 u8 bssid[ETH_ALEN]; /* BSSID */ 1892 u8 antenna_id; /* Antenna ID */ 1893 le32 parent_tsf; /* Parent TSF */ 1894 u8 variable[0]; /* Optional Subelements */ 1895 } STRUCT_PACKED; 1896 1897 /* IEEE Std 802.11-2016, Table 9-112 - Beacon report Subelement IDs */ 1898 #define WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY 1 1899 #define WLAN_BEACON_REPORT_SUBELEM_VENDOR 221 1900 1901 /* IEEE Std 802.11ad-2012 - Multi-band element */ 1902 struct multi_band_ie { 1903 u8 eid; /* WLAN_EID_MULTI_BAND */ 1904 u8 len; 1905 u8 mb_ctrl; 1906 u8 band_id; 1907 u8 op_class; 1908 u8 chan; 1909 u8 bssid[ETH_ALEN]; 1910 le16 beacon_int; 1911 u8 tsf_offs[8]; 1912 u8 mb_connection_capability; 1913 u8 fst_session_tmout; 1914 /* Optional: 1915 * STA MAC Address 1916 * Pairwise Cipher Suite Count 1917 * Pairwise Cipher Suite List 1918 */ 1919 u8 variable[0]; 1920 } STRUCT_PACKED; 1921 1922 enum mb_ctrl_sta_role { 1923 MB_STA_ROLE_AP = 0, 1924 MB_STA_ROLE_TDLS_STA = 1, 1925 MB_STA_ROLE_IBSS_STA = 2, 1926 MB_STA_ROLE_PCP = 3, 1927 MB_STA_ROLE_NON_PCP_NON_AP = 4 1928 }; 1929 1930 #define MB_CTRL_ROLE_MASK (BIT(0) | BIT(1) | BIT(2)) 1931 #define MB_CTRL_ROLE(ctrl) ((u8) ((ctrl) & MB_CTRL_ROLE_MASK)) 1932 #define MB_CTRL_STA_MAC_PRESENT ((u8) (BIT(3))) 1933 #define MB_CTRL_PAIRWISE_CIPHER_SUITE_PRESENT ((u8) (BIT(4))) 1934 1935 enum mb_band_id { 1936 MB_BAND_ID_WIFI_2_4GHZ = 2, /* 2.4 GHz */ 1937 MB_BAND_ID_WIFI_5GHZ = 4, /* 4.9 and 5 GHz */ 1938 MB_BAND_ID_WIFI_60GHZ = 5, /* 60 GHz */ 1939 }; 1940 1941 #define MB_CONNECTION_CAPABILITY_AP ((u8) (BIT(0))) 1942 #define MB_CONNECTION_CAPABILITY_PCP ((u8) (BIT(1))) 1943 #define MB_CONNECTION_CAPABILITY_DLS ((u8) (BIT(2))) 1944 #define MB_CONNECTION_CAPABILITY_TDLS ((u8) (BIT(3))) 1945 #define MB_CONNECTION_CAPABILITY_IBSS ((u8) (BIT(4))) 1946 1947 /* IEEE Std 802.11ad-2014 - FST Action field */ 1948 enum fst_action { 1949 FST_ACTION_SETUP_REQUEST = 0, 1950 FST_ACTION_SETUP_RESPONSE = 1, 1951 FST_ACTION_TEAR_DOWN = 2, 1952 FST_ACTION_ACK_REQUEST = 3, 1953 FST_ACTION_ACK_RESPONSE = 4, 1954 FST_ACTION_ON_CHANNEL_TUNNEL = 5, 1955 }; 1956 1957 /* IEEE Std 802.11ac-2013, Annex C - dot11PHYType */ 1958 enum phy_type { 1959 PHY_TYPE_UNSPECIFIED = 0, 1960 PHY_TYPE_FHSS = 1, 1961 PHY_TYPE_DSSS = 2, 1962 PHY_TYPE_IRBASEBAND = 3, 1963 PHY_TYPE_OFDM = 4, 1964 PHY_TYPE_HRDSSS = 5, 1965 PHY_TYPE_ERP = 6, 1966 PHY_TYPE_HT = 7, 1967 PHY_TYPE_DMG = 8, 1968 PHY_TYPE_VHT = 9, 1969 }; 1970 1971 /* IEEE P802.11-REVmc/D5.0, 9.4.2.37 - Neighbor Report element */ 1972 /* BSSID Information Field */ 1973 #define NEI_REP_BSSID_INFO_AP_NOT_REACH BIT(0) 1974 #define NEI_REP_BSSID_INFO_AP_UNKNOWN_REACH BIT(1) 1975 #define NEI_REP_BSSID_INFO_AP_REACHABLE (BIT(0) | BIT(1)) 1976 #define NEI_REP_BSSID_INFO_SECURITY BIT(2) 1977 #define NEI_REP_BSSID_INFO_KEY_SCOPE BIT(3) 1978 #define NEI_REP_BSSID_INFO_SPECTRUM_MGMT BIT(4) 1979 #define NEI_REP_BSSID_INFO_QOS BIT(5) 1980 #define NEI_REP_BSSID_INFO_APSD BIT(6) 1981 #define NEI_REP_BSSID_INFO_RM BIT(7) 1982 #define NEI_REP_BSSID_INFO_DELAYED_BA BIT(8) 1983 #define NEI_REP_BSSID_INFO_IMM_BA BIT(9) 1984 #define NEI_REP_BSSID_INFO_MOBILITY_DOMAIN BIT(10) 1985 #define NEI_REP_BSSID_INFO_HT BIT(11) 1986 #define NEI_REP_BSSID_INFO_VHT BIT(12) 1987 #define NEI_REP_BSSID_INFO_FTM BIT(13) 1988 1989 /* 1990 * IEEE P802.11-REVmc/D5.0 Table 9-152 - HT/VHT Operation Information 1991 * subfields. 1992 * Note: These definitions are not the same as other VHT_CHANWIDTH_*. 1993 */ 1994 enum nr_chan_width { 1995 NR_CHAN_WIDTH_20 = 0, 1996 NR_CHAN_WIDTH_40 = 1, 1997 NR_CHAN_WIDTH_80 = 2, 1998 NR_CHAN_WIDTH_160 = 3, 1999 NR_CHAN_WIDTH_80P80 = 4, 2000 }; 2001 2002 struct ieee80211_he_capabilities { 2003 u8 he_mac_capab_info[5]; 2004 u8 he_phy_capab_info[9]; 2005 u8 he_txrx_mcs_support[12]; /* TODO: 4, 8, or 12 octets */ 2006 /* PPE Thresholds (optional) */ 2007 } STRUCT_PACKED; 2008 2009 struct ieee80211_he_operation { 2010 u32 he_oper_params; 2011 u8 he_mcs_nss_set[2]; 2012 u8 vht_op_info_chwidth; 2013 u8 vht_op_info_chan_center_freq_seg0_idx; 2014 u8 vht_op_info_chan_center_freq_seg1_idx; 2015 /* Followed by conditional MaxBSSID Indicator subfield (u8) */ 2016 } STRUCT_PACKED; 2017 2018 /* HE Capabilities Information defines */ 2019 #define HE_PHYCAP_SU_BEAMFORMER_CAPAB_IDX 3 2020 #define HE_PHYCAP_SU_BEAMFORMER_CAPAB ((u8) BIT(7)) 2021 #define HE_PHYCAP_SU_BEAMFORMEE_CAPAB_IDX 4 2022 #define HE_PHYCAP_SU_BEAMFORMEE_CAPAB ((u8) BIT(0)) 2023 #define HE_PHYCAP_MU_BEAMFORMER_CAPAB_IDX 4 2024 #define HE_PHYCAP_MU_BEAMFORMER_CAPAB ((u8) BIT(1)) 2025 2026 /* HE Operation defines */ 2027 #define HE_OPERATION_BSS_COLOR_MASK ((u32) (BIT(0) | BIT(1) | \ 2028 BIT(2) | BIT(3) | \ 2029 BIT(4) | BIT(5))) 2030 #define HE_OPERATION_DFLT_PE_DURATION_MASK ((u32) (BIT(6) | BIT(7) | \ 2031 BIT(8))) 2032 #define HE_OPERATION_DFLT_PE_DURATION_OFFSET 6 2033 #define HE_OPERATION_TWT_REQUIRED ((u32) BIT(9)) 2034 #define HE_OPERATION_RTS_THRESHOLD_MASK ((u32) (BIT(10) | BIT(11) | \ 2035 BIT(12) | BIT(13) | \ 2036 BIT(14) | BIT(15) | \ 2037 BIT(16) | BIT(17) | \ 2038 BIT(18) | BIT(19))) 2039 #define HE_OPERATION_RTS_THRESHOLD_OFFSET 10 2040 #define HE_OPERATION_PARTIAL_BSS_COLOR ((u32) BIT(20)) 2041 #define HE_OPERATION_MAX_BSSID_INDICATOR_MASK ((u32) (BIT(21) | BIT(22) | \ 2042 BIT(23) | BIT(24) | \ 2043 BIT(25) | BIT(26) | \ 2044 BIT(27) | BIT(28))) 2045 #define HE_OPERATION_MAX_BSSID_INDICATOR_OFFSET 21 2046 #define HE_OPERATION_TX_BSSID_INDICATOR ((u32) BIT(29)) 2047 #define HE_OPERATION_BSS_COLOR_DISABLED ((u32) BIT(30)) 2048 #define HE_OPERATION_BSS_DUAL_BEACON ((u32) BIT(31)) 2049 2050 /* DPP Public Action frame identifiers - OUI_WFA */ 2051 #define DPP_OUI_TYPE 0x1A 2052 2053 #endif /* IEEE802_11_DEFS_H */ 2054