1 /* 2 * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 #ifndef _WLAN_MGMT_TXRX_UTILS_API_H_ 21 #define _WLAN_MGMT_TXRX_UTILS_API_H_ 22 23 /** 24 * DOC: wlan_mgmt_txrx_utils_api.h 25 * 26 * management tx/rx layer public API and structures 27 * for umac converged components. 28 * 29 */ 30 31 #include "wlan_objmgr_cmn.h" 32 #include "qdf_nbuf.h" 33 #include "wlan_mgmt_txrx_rx_reo_public_structs.h" 34 35 #define mgmt_txrx_alert(params...) \ 36 QDF_TRACE_FATAL(QDF_MODULE_ID_MGMT_TXRX, params) 37 #define mgmt_txrx_err(params...) \ 38 QDF_TRACE_ERROR(QDF_MODULE_ID_MGMT_TXRX, params) 39 #define mgmt_txrx_warn(params...) \ 40 QDF_TRACE_WARN(QDF_MODULE_ID_MGMT_TXRX, params) 41 #define mgmt_txrx_notice(params...) \ 42 QDF_TRACE_INFO(QDF_MODULE_ID_MGMT_TXRX, params) 43 #define mgmt_txrx_info(params...) \ 44 QDF_TRACE_INFO(QDF_MODULE_ID_MGMT_TXRX, params) 45 #define mgmt_txrx_debug(params...) \ 46 QDF_TRACE_DEBUG(QDF_MODULE_ID_MGMT_TXRX, params) 47 #define mgmt_txrx_err_rl(params...) \ 48 QDF_TRACE_ERROR_RL(QDF_MODULE_ID_MGMT_TXRX, params) 49 #define mgmt_txrx_debug_rl(params...) \ 50 QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_MGMT_TXRX, params) 51 52 #define mgmttxrx_nofl_alert(params...) \ 53 QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_MGMT_TXRX, params) 54 #define mgmttxrx_nofl_err(params...) \ 55 QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_MGMT_TXRX, params) 56 #define mgmttxrx_nofl_warn(params...) \ 57 QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_MGMT_TXRX, params) 58 #define mgmttxrx_nofl_info(params...) \ 59 QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_MGMT_TXRX, params) 60 #define mgmttxrx_nofl_debug(params...) \ 61 QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_MGMT_TXRX, params) 62 63 /** 64 * mgmt_txrx_frame_hex_dump() - Print the type and dump the rx tx frame 65 * @frame_data: The base address of the mgmt frame data to be logged. 66 * @frame_len: The size of the frame to be logged. 67 * @is_tx: is tx frame 68 * 69 * Return: None 70 */ 71 void mgmt_txrx_frame_hex_dump(void *frame_data, int frame_len, bool is_tx); 72 73 /** 74 * enum mgmt_subtype - enum of mgmt. subtypes 75 * @MGMT_SUBTYPE_ASSOC_REQ: association request frame 76 * @MGMT_SUBTYPE_ASSOC_RESP: association response frame 77 * @MGMT_SUBTYPE_REASSOC_REQ: reassociation request frame 78 * @MGMT_SUBTYPE_REASSOC_RESP: reassociation response frame 79 * @MGMT_SUBTYPE_PROBE_REQ: probe request frame 80 * @MGMT_SUBTYPE_PROBE_RESP: probe response frame 81 * @MGMT_SUBTYPE_BEACON: beacon frame 82 * @MGMT_SUBTYPE_ATIM: ATIM frame 83 * @MGMT_SUBTYPE_DISASSOC: disassociation frame 84 * @MGMT_SUBTYPE_AUTH: authentication frame 85 * @MGMT_SUBTYPE_DEAUTH: deauthentication frame 86 * @MGMT_SUBTYPE_ACTION: action frame 87 * @MGMT_SUBTYPE_ACTION_NO_ACK: action no ack frame 88 */ 89 enum mgmt_subtype { 90 MGMT_SUBTYPE_ASSOC_REQ = 0x00, 91 MGMT_SUBTYPE_ASSOC_RESP = 0x10, 92 MGMT_SUBTYPE_REASSOC_REQ = 0x20, 93 MGMT_SUBTYPE_REASSOC_RESP = 0x30, 94 MGMT_SUBTYPE_PROBE_REQ = 0x40, 95 MGMT_SUBTYPE_PROBE_RESP = 0x50, 96 MGMT_SUBTYPE_BEACON = 0x80, 97 MGMT_SUBTYPE_ATIM = 0x90, 98 MGMT_SUBTYPE_DISASSOC = 0xa0, 99 MGMT_SUBTYPE_AUTH = 0xb0, 100 MGMT_SUBTYPE_DEAUTH = 0xc0, 101 MGMT_SUBTYPE_ACTION = 0xd0, 102 MGMT_SUBTYPE_ACTION_NO_ACK = 0xe0, 103 }; 104 105 /** 106 * enum mgmt_action_category - mgmt. action categories 107 * @ACTION_CATEGORY_SPECTRUM_MGMT: spectrum mgmt. action category 108 * @ACTION_CATEGORY_QOS: qos action category 109 * @ACTION_CATEGORY_DLS: dls action category 110 * @ACTION_CATEGORY_BACK: block ack action category 111 * @ACTION_CATEGORY_PUBLIC: public action category 112 * @ACTION_CATEGORY_RRM: rrm action category 113 * @ACTION_FAST_BSS_TRNST: trnst action category 114 * @ACTION_CATEGORY_HT: ht actipon category 115 * @ACTION_CATEGORY_SA_QUERY: sa query action category 116 * @ACTION_CATEGORY_PROTECTED_DUAL_OF_PUBLIC_ACTION: protected 117 * public action category 118 * @ACTION_CATEGORY_WNM: wnm action category 119 * @ACTION_CATEGORY_WNM_UNPROTECTED: wnm protected action category 120 * @ACTION_CATEGORY_TDLS: tdls action category 121 * @ACTION_CATEGORY_MESH_ACTION: mesh action category 122 * @ACTION_CATEGORY_MULTIHOP_ACTION: multihop action category 123 * @ACTION_CATEGORY_SELF_PROTECTED: self protected action category 124 * @ACTION_CATEGORY_DMG: unprotected dmg action category 125 * @ACTION_CATEGORY_WMM: wmm action category 126 * @ACTION_CATEGORY_FST: fst action category 127 * @ACTION_CATEGORY_RVS: robust av streaming action category 128 * @ACTION_CATEGORY_UNPROT_DMG: dmg action category 129 * @ACTION_CATEGORY_VHT: vht action category 130 * @ACTION_CATEGORY_USIG: Unprotected S1G Action frame 131 * @ACTION_CATEGORY_SIG: S1G Action frame 132 * @ACTION_CATEGORY_FLOW_CONTROL: Flow Control Action frame 133 * @ACTION_CATEGORY_CONTROL_RSP_MCS_NEGO: Control Response MCS Negotiation frame 134 * @ACTION_CATEGORY_FILS: FILS Action frame 135 * @ACTION_CATEGORY_CDMG: CDMG Action frame 136 * @ACTION_CATEGORY_CMMG: CMMG Action frame 137 * @ACTION_CATEGORY_GLK: GLK Action frame 138 * @ACTION_CATEGORY_PROTECTED_EHT: Protected EHT Action frame 139 * @ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED: vendor specific protected 140 * action category 141 * @ACTION_CATEGORY_VENDOR_SPECIFIC: vendor specific action category 142 */ 143 enum mgmt_action_category { 144 ACTION_CATEGORY_SPECTRUM_MGMT = 0, 145 ACTION_CATEGORY_QOS = 1, 146 ACTION_CATEGORY_DLS = 2, 147 ACTION_CATEGORY_BACK = 3, 148 ACTION_CATEGORY_PUBLIC = 4, 149 ACTION_CATEGORY_RRM = 5, 150 ACTION_FAST_BSS_TRNST = 6, 151 ACTION_CATEGORY_HT = 7, 152 ACTION_CATEGORY_SA_QUERY = 8, 153 ACTION_CATEGORY_PROTECTED_DUAL_OF_PUBLIC_ACTION = 9, 154 ACTION_CATEGORY_WNM = 10, 155 ACTION_CATEGORY_WNM_UNPROTECTED = 11, 156 ACTION_CATEGORY_TDLS = 12, 157 ACTION_CATEGORY_MESH_ACTION = 13, 158 ACTION_CATEGORY_MULTIHOP_ACTION = 14, 159 ACTION_CATEGORY_SELF_PROTECTED = 15, 160 ACTION_CATEGORY_DMG = 16, 161 ACTION_CATEGORY_WMM = 17, 162 ACTION_CATEGORY_FST = 18, 163 ACTION_CATEGORY_RVS = 19, 164 ACTION_CATEGORY_UNPROT_DMG = 20, 165 ACTION_CATEGORY_VHT = 21, 166 ACTION_CATEGORY_USIG = 22, 167 ACTION_CATEGORY_SIG = 23, 168 ACTION_CATEGORY_FLOW_CONTROL = 24, 169 ACTION_CATEGORY_CONTROL_RSP_MCS_NEGO = 25, 170 ACTION_CATEGORY_FILS = 26, 171 ACTION_CATEGORY_CDMG = 27, 172 ACTION_CATEGORY_CMMG = 28, 173 ACTION_CATEGORY_GLK = 29, 174 ACTION_CATEGORY_PROTECTED_EHT = 37, 175 ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, 176 ACTION_CATEGORY_VENDOR_SPECIFIC = 127, 177 }; 178 179 /** 180 * enum spectrum_mgmt_actioncode - spectrum mgmt. action frms 181 * @ACTION_SPCT_MSR_REQ: spectrum measurement request frame 182 * @ACTION_SPCT_MSR_RPRT: spectrum measurement report frame 183 * @ACTION_SPCT_TPC_REQ: spectrum tpc request frame 184 * @ACTION_SPCT_TPC_RPRT: spectrum tpc report frame 185 * @ACTION_SPCT_CHL_SWITCH: spectrum channel switch frame 186 */ 187 enum spectrum_mgmt_actioncode { 188 ACTION_SPCT_MSR_REQ, 189 ACTION_SPCT_MSR_RPRT, 190 ACTION_SPCT_TPC_REQ, 191 ACTION_SPCT_TPC_RPRT, 192 ACTION_SPCT_CHL_SWITCH, 193 }; 194 195 /** 196 * enum qos_actioncode - qos action frames 197 * @QOS_ADD_TS_REQ: qos add ts request frame 198 * @QOS_ADD_TS_RSP: qos add ts response frame 199 * @QOS_DEL_TS_REQ: qos del ts request frame 200 * @QOS_SCHEDULE: qos schecule frame 201 * @QOS_MAP_CONFIGURE: qos map configure frame 202 */ 203 enum qos_actioncode { 204 QOS_ADD_TS_REQ, 205 QOS_ADD_TS_RSP, 206 QOS_DEL_TS_REQ, 207 QOS_SCHEDULE, 208 QOS_MAP_CONFIGURE, 209 }; 210 211 /** 212 * enum dls_actioncode - dls action frames 213 * @DLS_REQUEST: dls request frame 214 * @DLS_RESPONSE: dls response frame 215 * @DLS_TEARDOWN: dls teardown frame 216 */ 217 enum dls_actioncode { 218 DLS_REQUEST, 219 DLS_RESPONSE, 220 DLS_TEARDOWN, 221 }; 222 223 /** 224 * enum block_ack_actioncode - block ack action frames 225 * @ADDBA_REQUEST: add block ack request frame 226 * @ADDBA_RESPONSE: add block ack response frame 227 * @DELBA: delete block ack frame 228 */ 229 enum block_ack_actioncode { 230 ADDBA_REQUEST, 231 ADDBA_RESPONSE, 232 DELBA, 233 }; 234 235 /** 236 * enum pub_actioncode - public action frames 237 * Reference IEEE Std 802.11-2020 Table 9-364—Public Action field values 238 * @PUB_ACTION_2040_BSS_COEXISTENCE: public 20-40 bss coex action frame 239 * @PUB_ACTION_EXT_CHANNEL_SWITCH_ID: public ext channel switch id action frame 240 * @PUB_ACTION_VENDOR_SPECIFIC: vendor specific public action frame 241 * @PUB_ACTION_GAS_INITIAL_REQUEST: GAS initial request action frame 242 * @PUB_ACTION_GAS_INITIAL_RESPONSE: GAS initial response action frame 243 * @PUB_ACTION_GAS_COMEBACK_REQUEST: GAS comeback request action frame 244 * @PUB_ACTION_GAS_COMEBACK_RESPONSE: GAS comeback response action frame 245 * @PUB_ACTION_TDLS_DISCRESP: tdls discovery response public action frame 246 * @PUB_ACTION_FTM_REQUEST: FTM request action frame 247 * @PUB_ACTION_FTM_RESPONSE: FTM response action frame 248 * @PUB_ACTION_FILS_DISCOVERY: FILS Discovery action frame 249 */ 250 enum pub_actioncode { 251 PUB_ACTION_2040_BSS_COEXISTENCE = 0, 252 PUB_ACTION_EXT_CHANNEL_SWITCH_ID = 4, 253 PUB_ACTION_VENDOR_SPECIFIC = 9, 254 PUB_ACTION_GAS_INITIAL_REQUEST = 10, 255 PUB_ACTION_GAS_INITIAL_RESPONSE = 11, 256 PUB_ACTION_GAS_COMEBACK_REQUEST = 12, 257 PUB_ACTION_GAS_COMEBACK_RESPONSE = 13, 258 PUB_ACTION_TDLS_DISCRESP = 14, 259 PUB_ACTION_FTM_REQUEST = 32, 260 PUB_ACTION_FTM_RESPONSE = 33, 261 PUB_ACTION_FILS_DISCOVERY = 34, 262 }; 263 264 /** 265 * enum rrm_actioncode - rrm action frames 266 * @RRM_RADIO_MEASURE_REQ: rrm radio meas. request frame 267 * @RRM_RADIO_MEASURE_RPT: rrm radio meas. report frame 268 * @RRM_LINK_MEASUREMENT_REQ: rrm link meas. request frmae 269 * @RRM_LINK_MEASUREMENT_RPT: rrm link meas. report frame 270 * @RRM_NEIGHBOR_REQ: rrm neighbor request frame 271 * @RRM_NEIGHBOR_RPT: rrm neighbor report frame 272 */ 273 enum rrm_actioncode { 274 RRM_RADIO_MEASURE_REQ, 275 RRM_RADIO_MEASURE_RPT, 276 RRM_LINK_MEASUREMENT_REQ, 277 RRM_LINK_MEASUREMENT_RPT, 278 RRM_NEIGHBOR_REQ, 279 RRM_NEIGHBOR_RPT, 280 }; 281 282 /** 283 * enum ft_actioncode - ft action frames 284 * @FT_FAST_BSS_TRNST_REQ: ft request frame 285 * @FT_FAST_BSS_TRNST_RES: ft response frame 286 * @FT_FAST_BSS_TRNST_CONFIRM: ft confirm frame 287 * @FT_FAST_BSS_TRNST_ACK: ft ACK frame 288 */ 289 enum ft_actioncode { 290 FT_FAST_BSS_TRNST_REQ = 1, 291 FT_FAST_BSS_TRNST_RES, 292 FT_FAST_BSS_TRNST_CONFIRM, 293 FT_FAST_BSS_TRNST_ACK, 294 }; 295 296 /** 297 * enum ht_actioncode - ht action frames 298 * @HT_ACTION_NOTIFY_CHANWIDTH: ht notify bw action frame 299 * @HT_ACTION_SMPS: ht smps action frame 300 * @HT_ACTION_PSMP: ht psmp action frame 301 * @HT_ACTION_PCO_PHASE: ht pco phase action frame 302 * @HT_ACTION_CSI: ht csi action frame 303 * @HT_ACTION_NONCOMPRESSED_BF: ht noncompressed bf action frame 304 * @HT_ACTION_COMPRESSED_BF: ht compressed bf action frame 305 * @HT_ACTION_ASEL_IDX_FEEDBACK: ht asel idx feedback action frame 306 */ 307 enum ht_actioncode { 308 HT_ACTION_NOTIFY_CHANWIDTH, 309 HT_ACTION_SMPS, 310 HT_ACTION_PSMP, 311 HT_ACTION_PCO_PHASE, 312 HT_ACTION_CSI, 313 HT_ACTION_NONCOMPRESSED_BF, 314 HT_ACTION_COMPRESSED_BF, 315 HT_ACTION_ASEL_IDX_FEEDBACK, 316 }; 317 318 /** 319 * enum sa_query_action - sa query action frames 320 * @SA_QUERY_REQUEST: sa query request frame 321 * @SA_QUERY_RESPONSE: sa query response frame 322 */ 323 enum sa_query_action { 324 SA_QUERY_REQUEST, 325 SA_QUERY_RESPONSE, 326 }; 327 328 /** 329 * enum protected_dual_actioncode - protected dual action frames 330 * @PDPA_ACTION_VENDOR_SPECIFIC: PDPA action vendor specific frame 331 * @PDPA_GAS_INIT_REQ: pdpa gas init request frame 332 * @PDPA_GAS_INIT_RSP: pdpa gas init response frame 333 * @PDPA_GAS_COMEBACK_REQ: pdpa gas comeback request frame 334 * @PDPA_GAS_COMEBACK_RSP: pdpa gas comeback response frame 335 */ 336 enum protected_dual_actioncode { 337 PDPA_ACTION_VENDOR_SPECIFIC = 9, 338 PDPA_GAS_INIT_REQ = 10, 339 PDPA_GAS_INIT_RSP = 11, 340 PDPA_GAS_COMEBACK_REQ = 12, 341 PDPA_GAS_COMEBACK_RSP = 13, 342 }; 343 344 /** 345 * enum wnm_actioncode - wnm action frames 346 * @WNM_BSS_TM_QUERY: wnm bss tm query frame 347 * @WNM_BSS_TM_REQUEST: wnm bss tm request frame 348 * @WNM_BSS_TM_RESPONSE: wnm bss tm response frame 349 * @WNM_FMS_REQ: wnm fms request frame 350 * @WNM_FMS_RESP: wnm fms response frame 351 * @WNM_TFS_REQ: wnm tfs request frame 352 * @WNM_TFS_RESP: wnm tfs response frame 353 * @WNM_TFS_NOTIFY: wnm tfs notify frame 354 * @WNM_SLEEP_REQ: wnm sleep request frame 355 * @WNM_SLEEP_RESP: wnm sleep response frame 356 * @WNM_TIM_REQ: wnm Tim broadcast request frame 357 * @WNM_TIM_RESP: wnm Tim broadcast response frame 358 * @WNM_NOTIF_REQUEST: wnm notify request frame 359 * @WNM_NOTIF_RESPONSE: wnm notify response frame 360 */ 361 enum wnm_actioncode { 362 WNM_BSS_TM_QUERY = 6, 363 WNM_BSS_TM_REQUEST = 7, 364 WNM_BSS_TM_RESPONSE = 8, 365 WNM_FMS_REQ = 9, 366 WNM_FMS_RESP = 10, 367 WNM_TFS_REQ = 13, 368 WNM_TFS_RESP = 14, 369 WNM_TFS_NOTIFY = 15, 370 WNM_SLEEP_REQ = 16, 371 WNM_SLEEP_RESP = 17, 372 WNM_TIM_REQ = 18, 373 WNM_TIM_RESP = 19, 374 WNM_NOTIF_REQUEST = 26, 375 WNM_NOTIF_RESPONSE = 27, 376 }; 377 378 /** 379 * enum tdls_actioncode - tdls action frames 380 * @TDLS_SETUP_REQUEST: tdls setup request frame 381 * @TDLS_SETUP_RESPONSE: tdls setup response frame 382 * @TDLS_SETUP_CONFIRM: tdls setup confirm frame 383 * @TDLS_TEARDOWN: tdls teardown frame 384 * @TDLS_PEER_TRAFFIC_INDICATION: tdls peer traffic indication frame 385 * @TDLS_CHANNEL_SWITCH_REQUEST: tdls channel switch req. frame 386 * @TDLS_CHANNEL_SWITCH_RESPONSE: tdls channel switch response frame 387 * @TDLS_PEER_PSM_REQUEST: tdls peer psm request frame 388 * @TDLS_PEER_PSM_RESPONSE: tdls peer psm response frame 389 * @TDLS_PEER_TRAFFIC_RESPONSE: tdls peer traffic response frame 390 * @TDLS_DISCOVERY_REQUEST: tdls discovery request frame 391 * @TDLS_DISCOVERY_RESPONSE: tdls discovery response frame 392 * @TDLS_MAX_ACTION_CODE: tdls max number of invalid action 393 */ 394 enum tdls_actioncode { 395 TDLS_SETUP_REQUEST = 0, 396 TDLS_SETUP_RESPONSE = 1, 397 TDLS_SETUP_CONFIRM = 2, 398 TDLS_TEARDOWN = 3, 399 TDLS_PEER_TRAFFIC_INDICATION = 4, 400 TDLS_CHANNEL_SWITCH_REQUEST = 5, 401 TDLS_CHANNEL_SWITCH_RESPONSE = 6, 402 TDLS_PEER_PSM_REQUEST = 7, 403 TDLS_PEER_PSM_RESPONSE = 8, 404 TDLS_PEER_TRAFFIC_RESPONSE = 9, 405 TDLS_DISCOVERY_REQUEST = 10, 406 TDLS_DISCOVERY_RESPONSE = 14, 407 /* keep last one */ 408 TDLS_MAX_ACTION_CODE, 409 }; 410 411 /** 412 * enum mesh_actioncode - mesh action frames 413 * @MESH_ACTION_LINK_METRIC_REPORT: mesh link metric report action frame 414 * @MESH_ACTION_HWMP_PATH_SELECTION: mesh hwmp path selection action frame 415 * @MESH_ACTION_GATE_ANNOUNCEMENT: mesh gate announcement action frame 416 * @MESH_ACTION_CONGESTION_CONTROL_NOTIFICATION: mesh congestion control frame 417 * @MESH_ACTION_MCCA_SETUP_REQUEST: mesh mcca setup request action frame 418 * @MESH_ACTION_MCCA_SETUP_REPLY: mesh mcca setup reply action frame 419 * @MESH_ACTION_MCCA_ADVERTISEMENT_REQUEST: mesh mcca advertisement req. frame 420 * @MESH_ACTION_MCCA_ADVERTISEMENT: mesh mcca advertisement action frame 421 * @MESH_ACTION_MCCA_TEARDOWN: mesh mcca teardown action frame 422 * @MESH_ACTION_TBTT_ADJUSTMENT_REQUEST: mesh tbtt adjustment req. frame 423 * @MESH_ACTION_TBTT_ADJUSTMENT_RESPONSE: mesh tbtt adjustment rsp. frame 424 */ 425 enum mesh_actioncode { 426 MESH_ACTION_LINK_METRIC_REPORT, 427 MESH_ACTION_HWMP_PATH_SELECTION, 428 MESH_ACTION_GATE_ANNOUNCEMENT, 429 MESH_ACTION_CONGESTION_CONTROL_NOTIFICATION, 430 MESH_ACTION_MCCA_SETUP_REQUEST, 431 MESH_ACTION_MCCA_SETUP_REPLY, 432 MESH_ACTION_MCCA_ADVERTISEMENT_REQUEST, 433 MESH_ACTION_MCCA_ADVERTISEMENT, 434 MESH_ACTION_MCCA_TEARDOWN, 435 MESH_ACTION_TBTT_ADJUSTMENT_REQUEST, 436 MESH_ACTION_TBTT_ADJUSTMENT_RESPONSE, 437 }; 438 439 /** 440 * enum self_protected_actioncode - self protected action frames 441 * @SP_RESERVED: self protected reserved 442 * @SP_MESH_PEERING_OPEN: self protected mesh peering open frame 443 * @SP_MESH_PEERING_CONFIRM: self protected mesh peering confirm frame 444 * @SP_MESH_PEERING_CLOSE: self protected mesh peering close frame 445 * @SP_MGK_INFORM: self protected mgk inform frame 446 * @SP_MGK_ACK: self protected mgk ack frame 447 */ 448 enum self_protected_actioncode { 449 SP_RESERVED, 450 SP_MESH_PEERING_OPEN, 451 SP_MESH_PEERING_CONFIRM, 452 SP_MESH_PEERING_CLOSE, 453 SP_MGK_INFORM, 454 SP_MGK_ACK, 455 }; 456 457 /** 458 * enum wmm_actioncode - wmm action frames 459 * @WMM_QOS_SETUP_REQ: wmm qos setup request frame 460 * @WMM_QOS_SETUP_RESP: q wmm qos setup response frame 461 * @WMM_QOS_TEARDOWN: wmm qos teardown frame 462 */ 463 enum wmm_actioncode { 464 WMM_QOS_SETUP_REQ, 465 WMM_QOS_SETUP_RESP, 466 WMM_QOS_TEARDOWN, 467 }; 468 469 /** 470 * enum fst_actioncode - fst action frames 471 * @FST_SETUP_REQ: fst setup request frame 472 * @FST_SETUP_RSP: fst setup response frame 473 * @FST_TEAR_DOWN: fst qos teardown frame 474 * @FST_ACK_REQ: fst ack frame for request 475 * @FST_ACK_RSP: fst ack frame for response 476 * @FST_ON_CHANNEL_TUNNEL: fst on channel tunnel frame 477 */ 478 enum fst_actioncode { 479 FST_SETUP_REQ, 480 FST_SETUP_RSP, 481 FST_TEAR_DOWN, 482 FST_ACK_REQ, 483 FST_ACK_RSP, 484 FST_ON_CHANNEL_TUNNEL, 485 }; 486 487 /** 488 * enum rvs_actioncode - Robust av streaming action frames 489 * @SCS_REQ: scs request frame 490 * @SCS_RSP: scs response frame 491 * @GROUP_MEMBERSHIP_REQ: Group Membership Request frame 492 * @GROUP_MEMBERSHIP_RSP: Group Membership Response frame 493 * @MCSC_REQ: mcsc request frame 494 * @MCSC_RSP: mcsc response frame 495 */ 496 enum rvs_actioncode { 497 SCS_REQ, 498 SCS_RSP, 499 GROUP_MEMBERSHIP_REQ, 500 GROUP_MEMBERSHIP_RSP, 501 MCSC_REQ, 502 MCSC_RSP, 503 }; 504 505 /** 506 * enum vht_actioncode - vht action frames 507 * @VHT_ACTION_COMPRESSED_BF: vht compressed bf action frame 508 * @VHT_ACTION_GID_NOTIF: vht gid notification action frame 509 * @VHT_ACTION_OPMODE_NOTIF: vht opmode notification action frame 510 */ 511 enum vht_actioncode { 512 VHT_ACTION_COMPRESSED_BF, 513 VHT_ACTION_GID_NOTIF, 514 VHT_ACTION_OPMODE_NOTIF, 515 }; 516 517 /** 518 * enum twt_actioncode - twt action frames 519 * @TWT_SETUP: twt set up action frame 520 * @TWT_TEARDOWN: twt teardown action frame 521 * @TWT_INFORMATION: twt information action frame 522 */ 523 enum twt_actioncode { 524 TWT_SETUP = 6, 525 TWT_TEARDOWN = 7, 526 TWT_INFORMATION = 11, 527 }; 528 529 /** 530 * enum eht_actioncode - Protected EHT action frames 531 * @EHT_T2LM_REQUEST: T2LM request action frame 532 * @EHT_T2LM_RESPONSE: T2LM response action frame 533 * @EHT_T2LM_TEARDOWN: T2LM teardown action frame 534 * @EHT_EPCS_REQUEST: EPCS request action frame 535 * @EHT_EPCS_RESPONSE: EPCS response action frame 536 * @EHT_EPCS_TEARDOWN: EPCS teardown action frame 537 */ 538 enum eht_actioncode { 539 EHT_T2LM_REQUEST = 0, 540 EHT_T2LM_RESPONSE = 1, 541 EHT_T2LM_TEARDOWN = 2, 542 EHT_EPCS_REQUEST = 3, 543 EHT_EPCS_RESPONSE = 4, 544 EHT_EPCS_TEARDOWN = 5, 545 }; 546 547 /** 548 * struct action_frm_hdr - action frame header 549 * @action_category: action category 550 * @action_code: action code 551 */ 552 struct action_frm_hdr { 553 uint8_t action_category; 554 uint8_t action_code; 555 }; 556 557 /** 558 * enum mgmt_frame_type - enum of mgmt. frames 559 * @MGMT_FRM_UNSPECIFIED: unspecified 560 * @MGMT_ASSOC_REQ: association request frame 561 * @MGMT_ASSOC_RESP: association response frame 562 * @MGMT_REASSOC_REQ: reassociation request frame 563 * @MGMT_REASSOC_RESP: reassociation response frame 564 * @MGMT_PROBE_REQ: probe request frame 565 * @MGMT_PROBE_RESP: probe response frame 566 * @MGMT_BEACON: beacon frame 567 * @MGMT_ATIM: ATIM frame 568 * @MGMT_DISASSOC: disassociation frame 569 * @MGMT_AUTH: authentication frame 570 * @MGMT_DEAUTH: deauthentication frame 571 * @MGMT_ACTION_MEAS_REQUEST: measure channels request action frame 572 * @MGMT_ACTION_MEAS_REPORT: measure channels response action frame 573 * @MGMT_ACTION_TPC_REQUEST: transmit power control request action frame 574 * @MGMT_ACTION_TPC_REPORT: transmit power control response action frame 575 * @MGMT_ACTION_CHAN_SWITCH: 802.11 channel switch announcement frame 576 * @MGMT_ACTION_QOS_ADD_TS_REQ: qos add ts request frame 577 * @MGMT_ACTION_QOS_ADD_TS_RSP: qos add ts response frame 578 * @MGMT_ACTION_QOS_DEL_TS_REQ: qos del ts request frame 579 * @MGMT_ACTION_QOS_SCHEDULE: qos schedule frame 580 * @MGMT_ACTION_QOS_MAP_CONFIGURE: qos map configure frame 581 * @MGMT_ACTION_DLS_REQUEST: DLS request action frame 582 * @MGMT_ACTION_DLS_RESPONSE: DLS response action frame 583 * @MGMT_ACTION_DLS_TEARDOWN: DLS taerdown action frame 584 * @MGMT_ACTION_BA_ADDBA_REQUEST: ADDBA request action frame 585 * @MGMT_ACTION_BA_ADDBA_RESPONSE: ADDBA response action frame 586 * @MGMT_ACTION_BA_DELBA: DELBA action frame 587 * @MGMT_ACTION_2040_BSS_COEXISTENCE: 20-40 bss coex action frame 588 * @MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC: category vendor specific action frame 589 * @MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED: category vendor specific 590 * protected action frame 591 * @MGMT_ACTION_EXT_CHANNEL_SWITCH_ID: ext channel switch id action frame 592 * @MGMT_ACTION_VENDOR_SPECIFIC: vendor specific action frame 593 * @MGMT_ACTION_TDLS_DISCRESP: TDLS discovery response frame 594 * @MGMT_ACTION_RRM_RADIO_MEASURE_REQ: rrm radio meas. req. action frame 595 * @MGMT_ACTION_RRM_RADIO_MEASURE_RPT: rrm radio meas. report action frame 596 * @MGMT_ACTION_RRM_LINK_MEASUREMENT_REQ: rrm link meas. req. action frame 597 * @MGMT_ACTION_RRM_LINK_MEASUREMENT_RPT: rrm link meas. report action frame 598 * @MGMT_ACTION_RRM_NEIGHBOR_REQ: rrm neighbor request action frame 599 * @MGMT_ACTION_RRM_NEIGHBOR_RPT: rrm neighbor response action frame 600 * @MGMT_ACTION_FT_REQUEST: ft request action frame 601 * @MGMT_ACTION_FT_RESPONSE: ft response action frame 602 * @MGMT_ACTION_FT_CONFIRM: ft confirm action frame 603 * @MGMT_ACTION_FT_ACK: ft ack action frame 604 * @MGMT_ACTION_HT_NOTIFY_CHANWIDTH: notify channel width action frame 605 * @MGMT_ACTION_HT_SMPS: spatial multiplexing power save action frame 606 * @MGMT_ACTION_HT_PSMP: psmp action frame 607 * @MGMT_ACTION_HT_PCO_PHASE: pco phase action frame 608 * @MGMT_ACTION_HT_CSI: CSI action frame 609 * @MGMT_ACTION_HT_NONCOMPRESSED_BF: non-compressed beamforming action frame 610 * @MGMT_ACTION_HT_COMPRESSED_BF: compressed beamforming action frame 611 * @MGMT_ACTION_HT_ASEL_IDX_FEEDBACK: asel idx feedback action frame 612 * @MGMT_ACTION_SA_QUERY_REQUEST: SA query request frame 613 * @MGMT_ACTION_SA_QUERY_RESPONSE: SA query response frame 614 * @MGMT_ACTION_PDPA_GAS_INIT_REQ: pdpa gas init request action frame 615 * @MGMT_ACTION_PDPA_GAS_INIT_RSP: pdpa gas init response frame 616 * @MGMT_ACTION_PDPA_GAS_COMEBACK_REQ: pdpa gas comeback req. action frame 617 * @MGMT_ACTION_PDPA_GAS_COMEBACK_RSP: pdpa gas comeback rsp. action frame 618 * @MGMT_ACTION_WNM_BSS_TM_QUERY: wnm bss tm query action frame 619 * @MGMT_ACTION_WNM_BSS_TM_REQUEST: wnm bss tm request action frame 620 * @MGMT_ACTION_WNM_BSS_TM_RESPONSE: wnm bss tm response action frame 621 * @MGMT_ACTION_WNM_NOTIF_REQUEST: wnm notification request action frame 622 * @MGMT_ACTION_WNM_NOTIF_RESPONSE: wnm notification response action frame 623 * @MGMT_ACTION_WNM_FMS_REQ: wnm fms request frame 624 * @MGMT_ACTION_WNM_FMS_RESP: wnm fms response frame 625 * @MGMT_ACTION_WNM_TFS_REQ: wnm tfs request frame 626 * @MGMT_ACTION_WNM_TFS_RESP: wnm tfs response frame 627 * @MGMT_ACTION_WNM_TFS_NOTIFY: wnm tfs notify frame 628 * @MGMT_ACTION_WNM_SLEEP_REQ: wnm sleep request frame 629 * @MGMT_ACTION_WNM_SLEEP_RESP: wnm sleep response frame 630 * @MGMT_ACTION_WNM_TIM_REQ: wnm Tim broadcast request frame 631 * @MGMT_ACTION_WNM_TIM_RESP: wnm Tim broadcast response frame 632 * @MGMT_ACTION_TDLS_SETUP_REQ: tdls setup request action frame 633 * @MGMT_ACTION_TDLS_SETUP_RSP: tdls setup response frame 634 * @MGMT_ACTION_TDLS_SETUP_CNF: tdls setup confirm frame 635 * @MGMT_ACTION_TDLS_TEARDOWN: tdls teardown frame 636 * @MGMT_ACTION_TDLS_PEER_TRAFFIC_IND: tdls peer traffic indication frame 637 * @MGMT_ACTION_TDLS_CH_SWITCH_REQ: tdls channel switch req. frame 638 * @MGMT_ACTION_TDLS_CH_SWITCH_RSP: tdls channel switch response frame 639 * @MGMT_ACTION_TDLS_PEER_PSM_REQUEST: tdls peer psm request frame 640 * @MGMT_ACTION_TDLS_PEER_PSM_RESPONSE: tdls peer psm response frame 641 * @MGMT_ACTION_TDLS_PEER_TRAFFIC_RSP: tdls peer traffic response frame 642 * @MGMT_ACTION_TDLS_DIS_REQ: tdls discovery request frame 643 * @MGMT_ACTION_MESH_LINK_METRIC_REPORT: mesh link metric report action frame 644 * @MGMT_ACTION_MESH_HWMP_PATH_SELECTION: mesh hwmp path selection action frame 645 * @MGMT_ACTION_MESH_GATE_ANNOUNCEMENT: mesh gate announcement action frame 646 * @MGMT_ACTION_MESH_CONGESTION_CONTROL_NOTIFICATION: mesh congestion control 647 * @MGMT_ACTION_MESH_MCCA_SETUP_REQUEST: mesh mcca setup request action frame 648 * @MGMT_ACTION_MESH_MCCA_SETUP_REPLY: mesh mcca setup reply action frame 649 * @MGMT_ACTION_MESH_MCCA_ADVERTISEMENT_REQUEST: mesh mcca advertisement req. 650 * @MGMT_ACTION_MESH_MCCA_ADVERTISEMENT: mesh mcca advertisement action frame 651 * @MGMT_ACTION_MESH_MCCA_TEARDOWN: mesh mcca teardown action fram 652 * @MGMT_ACTION_MESH_TBTT_ADJUSTMENT_REQUEST: mesh tbtt adjustment req. frame 653 * @MGMT_ACTION_MESH_TBTT_ADJUSTMENT_RESPONSE: mesh tbtt adjustment rsp. frame 654 * @MGMT_ACTION_SP_MESH_PEERING_OPEN: self protected mesh peering open frame 655 * @MGMT_ACTION_SP_MESH_PEERING_CONFIRM: self protected mesh peering confirm 656 * @MGMT_ACTION_SP_MESH_PEERING_CLOSE: self protected mesh peering close frame 657 * @MGMT_ACTION_SP_MGK_INFORM: self protected mgk inform frame 658 * @MGMT_ACTION_SP_MGK_ACK: self protected mgk ack frame 659 * @MGMT_ACTION_WMM_QOS_SETUP_REQ: WMM qos setup request action frame 660 * @MGMT_ACTION_WMM_QOS_SETUP_RESP: WMM qos setup response action frame 661 * @MGMT_ACTION_WMM_QOS_TEARDOWN: WMM qos teardown action frame 662 * @MGMT_ACTION_VHT_COMPRESSED_BF: vht compressed bf action frame 663 * @MGMT_ACTION_VHT_GID_NOTIF: vht gid notification action frame 664 * @MGMT_ACTION_VHT_OPMODE_NOTIF: vht opmode notification action frame 665 * @MGMT_ACTION_GAS_INITIAL_REQUEST: GAS Initial request action frame 666 * @MGMT_ACTION_GAS_INITIAL_RESPONSE: GAS Initial response action frame 667 * @MGMT_ACTION_GAS_COMEBACK_REQUEST: GAS Comeback request action frame 668 * @MGMT_ACTION_GAS_COMEBACK_RESPONSE: GAS Comeback response action frame 669 * @MGMT_ACTION_FST_SETUP_REQ: FST setup request frame 670 * @MGMT_ACTION_FST_SETUP_RSP: FST setup response frame 671 * @MGMT_ACTION_FST_TEAR_DOWN: FST qos teardown frame 672 * @MGMT_ACTION_FST_ACK_REQ: FST ack frame for request 673 * @MGMT_ACTION_FST_ACK_RSP: FST ack frame for response 674 * @MGMT_ACTION_FST_ON_CHANNEL_TUNNEL: FST on channel tunnel frame 675 * @MGMT_ACTION_SCS_REQ: SCS request frame 676 * @MGMT_ACTION_SCS_RSP: SCS response frame 677 * @MGMT_ACTION_GROUP_MEMBERSHIP_REQ: group membership request frame 678 * @MGMT_ACTION_GROUP_MEMBERSHIP_RSP: group membership response frame 679 * @MGMT_ACTION_MCSC_REQ: MCSC request frame 680 * @MGMT_ACTION_MCSC_RSP: MCSC response frame 681 * @MGMT_FRAME_TYPE_ALL: mgmt frame type for all type of frames 682 * @MGMT_CTRL_FRAME: Control Frames 683 * @MGMT_ACTION_TWT_SETUP: TWT setup frame 684 * @MGMT_ACTION_TWT_TEARDOWN: TWT teardown frame 685 * @MGMT_ACTION_TWT_INFORMATION: TWT information frame 686 * @MGMT_ACTION_EHT_T2LM_REQUEST: T2LM request frame 687 * @MGMT_ACTION_EHT_T2LM_RESPONSE: T2LM response frame 688 * @MGMT_ACTION_EHT_T2LM_TEARDOWN: T2LM teardown frame 689 * @MGMT_ACTION_EHT_EPCS_REQUEST: EPCS request frame 690 * @MGMT_ACTION_EHT_EPCS_RESPONSE: EPCS response frame 691 * @MGMT_ACTION_EHT_EPCS_TEARDOWN: EPCS teardown frame 692 * @MGMT_ACTION_FTM_REQUEST: FTM request frame 693 * @MGMT_ACTION_FTM_RESPONSE: FTM response frame 694 * @MGMT_ACTION_FILS_DISCOVERY: FILS Discovery frame 695 * @MGMT_MAX_FRAME_TYPE: max. mgmt frame types 696 */ 697 enum mgmt_frame_type { 698 MGMT_FRM_UNSPECIFIED = -1, 699 MGMT_ASSOC_REQ, 700 MGMT_ASSOC_RESP, 701 MGMT_REASSOC_REQ, 702 MGMT_REASSOC_RESP, 703 MGMT_PROBE_REQ, 704 MGMT_PROBE_RESP, 705 MGMT_BEACON, 706 MGMT_ATIM, 707 MGMT_DISASSOC, 708 MGMT_AUTH, 709 MGMT_DEAUTH, 710 MGMT_ACTION_MEAS_REQUEST, 711 MGMT_ACTION_MEAS_REPORT, 712 MGMT_ACTION_TPC_REQUEST, 713 MGMT_ACTION_TPC_REPORT, 714 MGMT_ACTION_CHAN_SWITCH, 715 MGMT_ACTION_QOS_ADD_TS_REQ, 716 MGMT_ACTION_QOS_ADD_TS_RSP, 717 MGMT_ACTION_QOS_DEL_TS_REQ, 718 MGMT_ACTION_QOS_SCHEDULE, 719 MGMT_ACTION_QOS_MAP_CONFIGURE, 720 MGMT_ACTION_DLS_REQUEST, 721 MGMT_ACTION_DLS_RESPONSE, 722 MGMT_ACTION_DLS_TEARDOWN, 723 MGMT_ACTION_BA_ADDBA_REQUEST, 724 MGMT_ACTION_BA_ADDBA_RESPONSE, 725 MGMT_ACTION_BA_DELBA, 726 MGMT_ACTION_2040_BSS_COEXISTENCE, 727 MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC, 728 MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED, 729 MGMT_ACTION_EXT_CHANNEL_SWITCH_ID, 730 MGMT_ACTION_VENDOR_SPECIFIC, 731 MGMT_ACTION_TDLS_DISCRESP, 732 MGMT_ACTION_RRM_RADIO_MEASURE_REQ, 733 MGMT_ACTION_RRM_RADIO_MEASURE_RPT, 734 MGMT_ACTION_RRM_LINK_MEASUREMENT_REQ, 735 MGMT_ACTION_RRM_LINK_MEASUREMENT_RPT, 736 MGMT_ACTION_RRM_NEIGHBOR_REQ, 737 MGMT_ACTION_RRM_NEIGHBOR_RPT, 738 MGMT_ACTION_FT_REQUEST, 739 MGMT_ACTION_FT_RESPONSE, 740 MGMT_ACTION_FT_CONFIRM, 741 MGMT_ACTION_FT_ACK, 742 MGMT_ACTION_HT_NOTIFY_CHANWIDTH, 743 MGMT_ACTION_HT_SMPS, 744 MGMT_ACTION_HT_PSMP, 745 MGMT_ACTION_HT_PCO_PHASE, 746 MGMT_ACTION_HT_CSI, 747 MGMT_ACTION_HT_NONCOMPRESSED_BF, 748 MGMT_ACTION_HT_COMPRESSED_BF, 749 MGMT_ACTION_HT_ASEL_IDX_FEEDBACK, 750 MGMT_ACTION_SA_QUERY_REQUEST, 751 MGMT_ACTION_SA_QUERY_RESPONSE, 752 MGMT_ACTION_PDPA_GAS_INIT_REQ, 753 MGMT_ACTION_PDPA_GAS_INIT_RSP, 754 MGMT_ACTION_PDPA_GAS_COMEBACK_REQ, 755 MGMT_ACTION_PDPA_GAS_COMEBACK_RSP, 756 MGMT_ACTION_WNM_BSS_TM_QUERY, 757 MGMT_ACTION_WNM_BSS_TM_REQUEST, 758 MGMT_ACTION_WNM_BSS_TM_RESPONSE, 759 MGMT_ACTION_WNM_NOTIF_REQUEST, 760 MGMT_ACTION_WNM_NOTIF_RESPONSE, 761 MGMT_ACTION_WNM_FMS_REQ, 762 MGMT_ACTION_WNM_FMS_RESP, 763 MGMT_ACTION_WNM_TFS_REQ, 764 MGMT_ACTION_WNM_TFS_RESP, 765 MGMT_ACTION_WNM_TFS_NOTIFY, 766 MGMT_ACTION_WNM_SLEEP_REQ, 767 MGMT_ACTION_WNM_SLEEP_RESP, 768 MGMT_ACTION_WNM_TIM_REQ, 769 MGMT_ACTION_WNM_TIM_RESP, 770 MGMT_ACTION_TDLS_SETUP_REQ, 771 MGMT_ACTION_TDLS_SETUP_RSP, 772 MGMT_ACTION_TDLS_SETUP_CNF, 773 MGMT_ACTION_TDLS_TEARDOWN, 774 MGMT_ACTION_TDLS_PEER_TRAFFIC_IND, 775 MGMT_ACTION_TDLS_CH_SWITCH_REQ, 776 MGMT_ACTION_TDLS_CH_SWITCH_RSP, 777 MGMT_ACTION_TDLS_PEER_PSM_REQUEST, 778 MGMT_ACTION_TDLS_PEER_PSM_RESPONSE, 779 MGMT_ACTION_TDLS_PEER_TRAFFIC_RSP, 780 MGMT_ACTION_TDLS_DIS_REQ, 781 MGMT_ACTION_MESH_LINK_METRIC_REPORT, 782 MGMT_ACTION_MESH_HWMP_PATH_SELECTION, 783 MGMT_ACTION_MESH_GATE_ANNOUNCEMENT, 784 MGMT_ACTION_MESH_CONGESTION_CONTROL_NOTIFICATION, 785 MGMT_ACTION_MESH_MCCA_SETUP_REQUEST, 786 MGMT_ACTION_MESH_MCCA_SETUP_REPLY, 787 MGMT_ACTION_MESH_MCCA_ADVERTISEMENT_REQUEST, 788 MGMT_ACTION_MESH_MCCA_ADVERTISEMENT, 789 MGMT_ACTION_MESH_MCCA_TEARDOWN, 790 MGMT_ACTION_MESH_TBTT_ADJUSTMENT_REQUEST, 791 MGMT_ACTION_MESH_TBTT_ADJUSTMENT_RESPONSE, 792 MGMT_ACTION_SP_MESH_PEERING_OPEN, 793 MGMT_ACTION_SP_MESH_PEERING_CONFIRM, 794 MGMT_ACTION_SP_MESH_PEERING_CLOSE, 795 MGMT_ACTION_SP_MGK_INFORM, 796 MGMT_ACTION_SP_MGK_ACK, 797 MGMT_ACTION_WMM_QOS_SETUP_REQ, 798 MGMT_ACTION_WMM_QOS_SETUP_RESP, 799 MGMT_ACTION_WMM_QOS_TEARDOWN, 800 MGMT_ACTION_VHT_COMPRESSED_BF, 801 MGMT_ACTION_VHT_GID_NOTIF, 802 MGMT_ACTION_VHT_OPMODE_NOTIF, 803 MGMT_ACTION_GAS_INITIAL_REQUEST, 804 MGMT_ACTION_GAS_INITIAL_RESPONSE, 805 MGMT_ACTION_GAS_COMEBACK_REQUEST, 806 MGMT_ACTION_GAS_COMEBACK_RESPONSE, 807 MGMT_ACTION_FST_SETUP_REQ, 808 MGMT_ACTION_FST_SETUP_RSP, 809 MGMT_ACTION_FST_TEAR_DOWN, 810 MGMT_ACTION_FST_ACK_REQ, 811 MGMT_ACTION_FST_ACK_RSP, 812 MGMT_ACTION_FST_ON_CHANNEL_TUNNEL, 813 MGMT_ACTION_SCS_REQ, 814 MGMT_ACTION_SCS_RSP, 815 MGMT_ACTION_GROUP_MEMBERSHIP_REQ, 816 MGMT_ACTION_GROUP_MEMBERSHIP_RSP, 817 MGMT_ACTION_MCSC_REQ, 818 MGMT_ACTION_MCSC_RSP, 819 MGMT_FRAME_TYPE_ALL, 820 MGMT_CTRL_FRAME, 821 MGMT_ACTION_TWT_SETUP, 822 MGMT_ACTION_TWT_TEARDOWN, 823 MGMT_ACTION_TWT_INFORMATION, 824 MGMT_ACTION_EHT_T2LM_REQUEST, 825 MGMT_ACTION_EHT_T2LM_RESPONSE, 826 MGMT_ACTION_EHT_T2LM_TEARDOWN, 827 MGMT_ACTION_EHT_EPCS_REQUEST, 828 MGMT_ACTION_EHT_EPCS_RESPONSE, 829 MGMT_ACTION_EHT_EPCS_TEARDOWN, 830 MGMT_ACTION_FTM_REQUEST, 831 MGMT_ACTION_FTM_RESPONSE, 832 MGMT_ACTION_FILS_DISCOVERY, 833 MGMT_MAX_FRAME_TYPE, 834 }; 835 836 #define WLAN_MGMT_TXRX_HOST_MAX_ANTENNA 4 837 #define WLAN_MGMT_TXRX_HOST_MAX_PN_LEN 8 838 #define WLAN_INVALID_PER_CHAIN_RSSI 0xFF 839 #define WLAN_INVALID_PER_CHAIN_SNR 0x80 840 #define WLAN_NOISE_FLOOR_DBM_DEFAULT -96 841 842 /** 843 * struct frame_pn_params - host PN params 844 * @curr_pn: current running PN of rx frames 845 * @prev_pn: previous PN of rx frames 846 */ 847 struct frame_pn_params { 848 uint8_t curr_pn[WLAN_MGMT_TXRX_HOST_MAX_PN_LEN]; 849 uint8_t prev_pn[WLAN_MGMT_TXRX_HOST_MAX_PN_LEN]; 850 }; 851 852 /** 853 * struct frm_conn_ap - connected ap 854 * @mgmt_frm_sub_type: type of frame 855 * @is_conn_ap_frm: set if frm is from connected ap 856 */ 857 struct frm_conn_ap { 858 uint8_t mgmt_frm_sub_type; 859 uint8_t is_conn_ap_frm; 860 }; 861 862 /** 863 * enum mgmt_rx_evt_ext_meta_id - Identifier to rx_params ext data 864 * @MGMT_RX_PARAMS_EXT_META_ADDBA: Tag id to indicate ADDBA meta info 865 * @MGMT_RX_PARAMS_EXT_META_TWT: Tag id to indicate TWT IE in meta info 866 */ 867 enum mgmt_rx_evt_ext_meta_id { 868 MGMT_RX_PARAMS_EXT_META_ADDBA, 869 MGMT_RX_PARAMS_EXT_META_TWT, 870 }; 871 872 #define MAX_TWT_IE_RX_PARAMS_LEN 255 873 /** 874 * struct mgmt_rx_event_ext_params - Host mgmt extended params 875 * @meta_id: Meta id to identify if this is ADDBA or TWT related info 876 * @add_ba_params: set for meta_id MGMT_RX_PARAMS_EXT_META_ADDBA 877 * @ba_win_size: Block-Ack window size 878 * @reo_win_size: Reo win size 879 * @twt_ie: Set when meta_id is MGMT_RX_PARAMS_EXT_META_TWT 880 * @ie_len: IE len of TWT IE from FW 881 * @ie_data: IE data of TWT IE from FW 882 * @u: union of above two params as it is mutually exclusive. 883 */ 884 struct mgmt_rx_event_ext_params { 885 enum mgmt_rx_evt_ext_meta_id meta_id; 886 union { 887 struct add_ba_params { 888 uint16_t ba_win_size; 889 uint16_t reo_win_size; 890 } addba; 891 struct twt_ie { 892 uint16_t ie_len; 893 uint8_t ie_data[MAX_TWT_IE_RX_PARAMS_LEN]; 894 } twt; 895 } u; 896 }; 897 898 #ifdef WLAN_FEATURE_11BE_MLO 899 #define CU_VDEV_MAP_MASK 0xFFFF 900 /* 901 * Maximum number of CU LINKS across the system. 902 * this is not the CU links within and AP MLD. 903 */ 904 #define CU_MAX_MLO_LINKS 6 905 #define MAX_AP_MLDS_PER_LINK 16 906 /** 907 * struct mlo_mgmt_ml_info - Ongoing Critical Update information. 908 * @cu_vdev_map: Per link critical update ap vdev bit map. 909 * bit 0 Indicate vap with least vdev id in a link 910 * bit 15 Indicate vap with max vdev id in a link 911 * @vdev_bpcc: Each byte contains BPCC value per MLO VAP 912 * 16 byte entries for each link corresponding to AP MLD in a link. 913 * Max number of byte entries will be 914 * (max MLO links supported * max AP MLDs in a link). 915 * 916 * The mlo_mgmt_ml_info contain AP MLD CU indication and latest copies of BSS 917 * parameter change count BPCC values of all AP MLDs in an available MLO links. 918 * Per-link contains 16 AP MLDs at max. 919 * 16 bits to indicate respective AP MLD VDEVs in a link. 920 * Number of max links supported are 6. 921 */ 922 struct mlo_mgmt_ml_info { 923 uint16_t cu_vdev_map[CU_MAX_MLO_LINKS]; 924 uint8_t vdev_bpcc[MAX_AP_MLDS_PER_LINK * CU_MAX_MLO_LINKS]; 925 }; 926 927 /** 928 * struct mlo_bcast_t2lm_info - TID-to-link mapping broadcast info 929 * @num_vdevs: Number of vdevs for which FW populated the expected duration 930 * @vdev_id: Array of vdev ids 931 * @expected_duration: Array of expected duration for vdev ids 932 */ 933 struct mlo_bcast_t2lm_info { 934 uint8_t num_vdevs; 935 uint8_t vdev_id[MAX_AP_MLDS_PER_LINK]; 936 uint32_t expected_duration[MAX_AP_MLDS_PER_LINK]; 937 }; 938 939 /** 940 * struct mlo_vdev_pause - ML vdev pause info 941 * @vdev_id: vdev id of vdev to be paused 942 * @vdev_pause_duration: vdev pause duration 943 */ 944 struct mlo_vdev_pause { 945 uint16_t vdev_id; 946 uint32_t vdev_pause_duration; 947 }; 948 #endif 949 950 /** 951 * struct mgmt_rx_event_params - host mgmt header params 952 * @chan_freq: channel frequency on which this frame is received 953 * @channel: channel on which this frame is received 954 * @snr: snr information used to call rssi 955 * @rssi_ctl: RSSI of PRI 20MHz for each chain 956 * @rate: Rate kbps 957 * @phy_mode: rx phy mode 958 * @buf_len: length of the frame 959 * @status: rx status. It is a bitfield being used based on below defines 960 * WMI_HOST_RXERR_CRC = 0x01 961 * WMI_HOST_RXERR_DECRYPT = 0x08 962 * WMI_HOST_RXERR_MIC = 0x10 963 * WMI_HOST_RXERR_KEY_CACHE_MISS = 0x20 964 * WMI_HOST_RXERR_PN = 0x80 965 * @flags: information about the management frame e.g. can give a 966 * scan source for a scan result mgmt frame 967 * @rssi: combined RSSI, i.e. the sum of the snr + noise floor (dBm units) 968 * @tsf_delta: tsf delta 969 * @tsf_l32: tsf value 970 * @pdev_id: pdev id 971 * @rx_params: pointer to other rx params 972 * (win specific, will be removed in phase 4) 973 * @reo_params: Pointer to MGMT Rx REO params 974 * @pn_params: Frame PN params 975 * @ext_params: Extended params 976 * @is_conn_ap: Frame is from connected ap 977 * @cu_params: MLO MGMT Critical Update params 978 * @link_removal_info: MLO link removal information array 979 * @num_link_removal_info: Number of elements in @link_removal_info 980 * @t2lm_params: T2LM related info received from FW 981 */ 982 struct mgmt_rx_event_params { 983 uint32_t chan_freq; 984 uint32_t channel; 985 uint32_t snr; 986 uint8_t rssi_ctl[WLAN_MGMT_TXRX_HOST_MAX_ANTENNA]; 987 uint32_t rate; 988 enum wlan_phymode phy_mode; 989 uint32_t buf_len; 990 uint8_t status; 991 uint32_t flags; 992 int32_t rssi; 993 uint32_t tsf_delta; 994 uint32_t tsf_l32; 995 uint8_t pdev_id; 996 void *rx_params; 997 #ifdef WLAN_MGMT_RX_REO_SUPPORT 998 struct mgmt_rx_reo_params *reo_params; 999 #endif 1000 struct frame_pn_params pn_params; 1001 struct mgmt_rx_event_ext_params *ext_params; 1002 struct frm_conn_ap is_conn_ap; 1003 #ifdef WLAN_FEATURE_11BE_MLO 1004 struct mlo_mgmt_ml_info cu_params; 1005 struct mgmt_rx_mlo_link_removal_info *link_removal_info; 1006 int num_link_removal_info; 1007 struct mlo_bcast_t2lm_info t2lm_params; 1008 #endif 1009 }; 1010 1011 #ifdef WLAN_FEATURE_11BE_MLO 1012 #define free_mgmt_rx_mlo_link_removal_info(rx_params) \ 1013 qdf_mem_free((rx_params)->link_removal_info) 1014 #else 1015 #define free_mgmt_rx_mlo_link_removal_info(rx_params) 1016 #endif 1017 1018 #ifdef WLAN_MGMT_RX_REO_SUPPORT 1019 static inline 1020 struct mgmt_rx_event_params *alloc_mgmt_rx_event_params(void) 1021 { 1022 struct mgmt_rx_event_params *rx_params; 1023 1024 rx_params = qdf_mem_malloc(sizeof(struct mgmt_rx_event_params)); 1025 if (!rx_params) 1026 return NULL; 1027 1028 rx_params->reo_params = 1029 qdf_mem_malloc(sizeof(struct mgmt_rx_reo_params)); 1030 1031 if (!rx_params->reo_params) { 1032 qdf_mem_free(rx_params); 1033 return NULL; 1034 } 1035 1036 rx_params->ext_params = 1037 qdf_mem_malloc(sizeof(struct mgmt_rx_event_ext_params)); 1038 1039 if (!rx_params->ext_params) { 1040 qdf_mem_free(rx_params->reo_params); 1041 qdf_mem_free(rx_params); 1042 return NULL; 1043 } 1044 1045 return rx_params; 1046 } 1047 1048 static inline void 1049 free_mgmt_rx_event_params(struct mgmt_rx_event_params *rx_params) 1050 { 1051 if (rx_params) { 1052 qdf_mem_free(rx_params->ext_params); 1053 qdf_mem_free(rx_params->reo_params); 1054 free_mgmt_rx_mlo_link_removal_info(rx_params); 1055 } 1056 1057 qdf_mem_free(rx_params); 1058 } 1059 #else 1060 static inline 1061 struct mgmt_rx_event_params *alloc_mgmt_rx_event_params(void) 1062 { 1063 struct mgmt_rx_event_params *rx_params; 1064 1065 rx_params = qdf_mem_malloc(sizeof(struct mgmt_rx_event_params)); 1066 if (!rx_params) 1067 return NULL; 1068 1069 rx_params->ext_params = 1070 qdf_mem_malloc(sizeof(struct mgmt_rx_event_ext_params)); 1071 1072 if (!rx_params->ext_params) { 1073 qdf_mem_free(rx_params); 1074 return NULL; 1075 } 1076 1077 return rx_params; 1078 } 1079 1080 static inline void 1081 free_mgmt_rx_event_params(struct mgmt_rx_event_params *rx_params) 1082 { 1083 if (rx_params) { 1084 qdf_mem_free(rx_params->ext_params); 1085 free_mgmt_rx_mlo_link_removal_info(rx_params); 1086 } 1087 1088 qdf_mem_free(rx_params); 1089 } 1090 #endif 1091 1092 /** 1093 * typedef mgmt_tx_download_comp_cb() - function pointer for tx download 1094 * completions. 1095 * @context: caller component specific context 1096 * @buf: buffer 1097 * @free: to free/not free the buffer 1098 * 1099 * This is the function pointer to be called on tx download completion 1100 * if download complete is required. 1101 * 1102 * Return: QDF_STATUS_SUCCESS - in case of success 1103 */ 1104 typedef QDF_STATUS (*mgmt_tx_download_comp_cb)(void *context, 1105 qdf_nbuf_t buf, bool free); 1106 1107 /** 1108 * typedef mgmt_ota_comp_cb() - function pointer for tx ota completions. 1109 * @context: caller component specific context 1110 * @buf: buffer 1111 * @status: tx completion status 1112 * @tx_compl_params: tx completion params 1113 * 1114 * This is the function pointer to be called on tx ota completion. 1115 * 1116 * Return: QDF_STATUS_SUCCESS - in case of success 1117 */ 1118 typedef QDF_STATUS (*mgmt_ota_comp_cb)(void *context, qdf_nbuf_t buf, 1119 uint32_t status, void *tx_compl_params); 1120 1121 /** 1122 * typedef mgmt_frame_rx_callback() - function pointer for receiving mgmt 1123 * rx frames 1124 * @psoc: psoc context 1125 * @peer: peer 1126 * @buf: buffer 1127 * @mgmt_rx_params: rx params 1128 * @frm_type: mgmt rx frame type 1129 * 1130 * This is the function pointer to be called on receiving mgmt rx frames. 1131 * 1132 * Return: QDF_STATUS_SUCCESS - in case of success 1133 */ 1134 typedef QDF_STATUS (*mgmt_frame_rx_callback)( 1135 struct wlan_objmgr_psoc *psoc, 1136 struct wlan_objmgr_peer *peer, 1137 qdf_nbuf_t buf, 1138 struct mgmt_rx_event_params *mgmt_rx_params, 1139 enum mgmt_frame_type frm_type); 1140 1141 /** 1142 * typedef mgmt_frame_fill_peer_cb() - Function pointer to fill peer in the buf 1143 * @peer: peer 1144 * @buf: buffer 1145 * 1146 * This is the function pointer to be called during drain to fill the 1147 * peer into the buf's cb structure. 1148 * 1149 * Return: QDF_STATUS_SUCCESS - in case of success 1150 */ 1151 typedef QDF_STATUS (*mgmt_frame_fill_peer_cb)( 1152 struct wlan_objmgr_peer *peer, 1153 qdf_nbuf_t buf); 1154 1155 /** 1156 * struct mgmt_txrx_mgmt_frame_cb_info - frm and corresponding rx cb info 1157 * @frm_type: mgmt frm type 1158 * @mgmt_rx_cb: corresponding rx callback 1159 */ 1160 struct mgmt_txrx_mgmt_frame_cb_info { 1161 enum mgmt_frame_type frm_type; 1162 mgmt_frame_rx_callback mgmt_rx_cb; 1163 }; 1164 1165 1166 /** 1167 * wlan_mgmt_txrx_init() - initialize mgmt txrx context. 1168 * 1169 * This function initializes the mgmt txrx context, 1170 * mgmt descriptor pool, etc. 1171 * 1172 * Return: QDF_STATUS_SUCCESS - in case of success 1173 */ 1174 QDF_STATUS wlan_mgmt_txrx_init(void); 1175 1176 /** 1177 * wlan_mgmt_txrx_deinit() - deinitialize mgmt txrx context. 1178 * 1179 * This function deinitializes the mgmt txrx context, 1180 * mgmt descriptor pool, etc. 1181 * 1182 * Return: QDF_STATUS_SUCCESS - in case of success 1183 */ 1184 QDF_STATUS wlan_mgmt_txrx_deinit(void); 1185 1186 /** 1187 * wlan_mgmt_txrx_mgmt_frame_tx() - transmits mgmt. frame 1188 * @peer: peer 1189 * @context: caller component specific context 1190 * @buf: buffer to be transmitted 1191 * @tx_comp_cb: download completion cb function 1192 * @tx_ota_comp_cb: post processing cb function 1193 * @comp_id: umac component id 1194 * @mgmt_tx_params: mgmt tx params 1195 * 1196 * This function transmits the mgmt. frame to southbound interface. 1197 * 1198 * Return: QDF_STATUS_SUCCESS - in case of success 1199 */ 1200 QDF_STATUS wlan_mgmt_txrx_mgmt_frame_tx(struct wlan_objmgr_peer *peer, 1201 void *context, 1202 qdf_nbuf_t buf, 1203 mgmt_tx_download_comp_cb tx_comp_cb, 1204 mgmt_ota_comp_cb tx_ota_comp_cb, 1205 enum wlan_umac_comp_id comp_id, 1206 void *mgmt_tx_params); 1207 /** 1208 * wlan_mgmt_is_rmf_mgmt_action_frame() - API to check action category is rmf 1209 * @action_category: action category to check 1210 * 1211 * Return: true if action category is rmf else false 1212 */ 1213 bool wlan_mgmt_is_rmf_mgmt_action_frame(uint8_t action_category); 1214 1215 /** 1216 * wlan_mgmt_txrx_beacon_frame_tx() - transmits mgmt. beacon 1217 * @peer: peer context 1218 * @buf: buffer to be transmitted 1219 * @comp_id: umac component id 1220 * 1221 * This function transmits the mgmt. beacon to southbound interface. 1222 * 1223 * Return: QDF_STATUS_SUCCESS - in case of success 1224 */ 1225 QDF_STATUS wlan_mgmt_txrx_beacon_frame_tx(struct wlan_objmgr_peer *peer, 1226 qdf_nbuf_t buf, 1227 enum wlan_umac_comp_id comp_id); 1228 1229 #ifdef WLAN_SUPPORT_FILS 1230 /** 1231 * wlan_mgmt_txrx_fd_action_frame_tx() - transmits mgmt. FD Action frame 1232 * @vdev: vdev object 1233 * @buf: buffer to be transmitted 1234 * @comp_id: umac component id 1235 * 1236 * This function transmits the FILS Discovery Action frame to 1237 * southbound interface. 1238 * 1239 * Return: QDF_STATUS_SUCCESS - in case of success 1240 */ 1241 QDF_STATUS wlan_mgmt_txrx_fd_action_frame_tx(struct wlan_objmgr_vdev *vdev, 1242 qdf_nbuf_t buf, 1243 enum wlan_umac_comp_id comp_id); 1244 #endif /* WLAN_SUPPORT_FILS */ 1245 1246 /** 1247 * wlan_mgmt_txrx_register_rx_cb() - registers the rx cb for mgmt. frames 1248 * @psoc: psoc context 1249 * @comp_id: umac component id 1250 * @frm_cb_info: pointer to array of structure containing frm type and callback 1251 * @num_entries: num of frames for which cb to be registered 1252 * 1253 * This function registers rx callback for mgmt. frames for 1254 * the corresponding umac component passed in the func. 1255 * 1256 * Return: QDF_STATUS_SUCCESS - in case of success 1257 */ 1258 QDF_STATUS wlan_mgmt_txrx_register_rx_cb( 1259 struct wlan_objmgr_psoc *psoc, 1260 enum wlan_umac_comp_id comp_id, 1261 struct mgmt_txrx_mgmt_frame_cb_info *frm_cb_info, 1262 uint8_t num_entries); 1263 1264 /** 1265 * wlan_mgmt_txrx_vdev_drain() - Function to drain all mgmt packets 1266 * specific to a vdev 1267 * @vdev: vdev context 1268 * @mgmt_fill_peer_cb: callback func to UMAC to fill peer into buf 1269 * @status: opaque pointer about the status of the pkts passed to UMAC 1270 * 1271 * This function drains all mgmt packets of a vdev. This can be used in the 1272 * event of target going down without sending completions. 1273 * 1274 * Return: QDF_STATUS_SUCCESS - in case of success 1275 */ 1276 QDF_STATUS wlan_mgmt_txrx_vdev_drain( 1277 struct wlan_objmgr_vdev *vdev, 1278 mgmt_frame_fill_peer_cb mgmt_fill_peer_cb, 1279 void *status); 1280 1281 /** 1282 * wlan_mgmt_txrx_deregister_rx_cb() - deregisters the rx cb for mgmt. frames 1283 * @psoc: psoc context 1284 * @comp_id: umac component id 1285 * @frm_cb_info: pointer to array of structure containing frm type and callback 1286 * @num_entries: num of frames for which cb to be deregistered 1287 * 1288 * This function deregisters rx callback for mgmt. frames for 1289 * the corresponding umac component passed in the func. 1290 * 1291 * Return: QDF_STATUS_SUCCESS - in case of success 1292 */ 1293 QDF_STATUS wlan_mgmt_txrx_deregister_rx_cb( 1294 struct wlan_objmgr_psoc *psoc, 1295 enum wlan_umac_comp_id comp_id, 1296 struct mgmt_txrx_mgmt_frame_cb_info *frm_cb_info, 1297 uint8_t num_entries); 1298 1299 /** 1300 * wlan_mgmt_txrx_psoc_open() - mgmt txrx module psoc open API 1301 * @psoc: psoc context 1302 * 1303 * Return: QDF_STATUS_SUCCESS - in case of success 1304 */ 1305 QDF_STATUS wlan_mgmt_txrx_psoc_open(struct wlan_objmgr_psoc *psoc); 1306 1307 /** 1308 * wlan_mgmt_txrx_psoc_close() - mgmt txrx module psoc close API 1309 * @psoc: psoc context 1310 * 1311 * Return: QDF_STATUS_SUCCESS - in case of success 1312 */ 1313 QDF_STATUS wlan_mgmt_txrx_psoc_close(struct wlan_objmgr_psoc *psoc); 1314 1315 /** 1316 * wlan_mgmt_txrx_pdev_open() - mgmt txrx module pdev open API 1317 * @pdev: pdev context 1318 * 1319 * Return: QDF_STATUS_SUCCESS - in case of success 1320 */ 1321 QDF_STATUS wlan_mgmt_txrx_pdev_open(struct wlan_objmgr_pdev *pdev); 1322 1323 1324 /** 1325 * wlan_mgmt_txrx_pdev_close() - mgmt txrx module pdev close API 1326 * @pdev: pdev context 1327 * 1328 * Return: QDF_STATUS_SUCCESS - in case of success 1329 */ 1330 QDF_STATUS wlan_mgmt_txrx_pdev_close(struct wlan_objmgr_pdev *pdev); 1331 1332 /** 1333 * wlan_mgmt_txrx_psoc_enable() - mgmt txrx module psoc enable API 1334 * @psoc: psoc context 1335 * 1336 * Return: QDF_STATUS_SUCCESS - in case of success 1337 */ 1338 QDF_STATUS wlan_mgmt_txrx_psoc_enable(struct wlan_objmgr_psoc *psoc); 1339 1340 /** 1341 * wlan_mgmt_txrx_psoc_disable() - mgmt txrx module psoc disable API 1342 * @psoc: psoc context 1343 * 1344 * Return: QDF_STATUS_SUCCESS - in case of success 1345 */ 1346 QDF_STATUS wlan_mgmt_txrx_psoc_disable(struct wlan_objmgr_psoc *psoc); 1347 #endif 1348 1349 1350