1 /* 2 * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef _WLAN_MGMT_TXRX_UTILS_API_H_ 20 #define _WLAN_MGMT_TXRX_UTILS_API_H_ 21 22 /** 23 * DOC: wlan_mgmt_txrx_utils_api.h 24 * 25 * management tx/rx layer public API and structures 26 * for umac converged components. 27 * 28 */ 29 30 #include "wlan_objmgr_cmn.h" 31 #include "qdf_nbuf.h" 32 33 #define mgmt_txrx_alert(params...) \ 34 QDF_TRACE_FATAL(QDF_MODULE_ID_MGMT_TXRX, params) 35 #define mgmt_txrx_err(params...) \ 36 QDF_TRACE_ERROR(QDF_MODULE_ID_MGMT_TXRX, params) 37 #define mgmt_txrx_warn(params...) \ 38 QDF_TRACE_WARN(QDF_MODULE_ID_MGMT_TXRX, params) 39 #define mgmt_txrx_notice(params...) \ 40 QDF_TRACE_INFO(QDF_MODULE_ID_MGMT_TXRX, params) 41 #define mgmt_txrx_info(params...) \ 42 QDF_TRACE_INFO(QDF_MODULE_ID_MGMT_TXRX, params) 43 #define mgmt_txrx_debug(params...) \ 44 QDF_TRACE_DEBUG(QDF_MODULE_ID_MGMT_TXRX, params) 45 #define mgmt_txrx_err_rl(params...) \ 46 QDF_TRACE_ERROR_RL(QDF_MODULE_ID_MGMT_TXRX, params) 47 #define mgmt_txrx_debug_rl(params...) \ 48 QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_MGMT_TXRX, params) 49 50 #define mgmttxrx_nofl_alert(params...) \ 51 QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_MGMT_TXRX, params) 52 #define mgmttxrx_nofl_err(params...) \ 53 QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_MGMT_TXRX, params) 54 #define mgmttxrx_nofl_warn(params...) \ 55 QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_MGMT_TXRX, params) 56 #define mgmttxrx_nofl_info(params...) \ 57 QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_MGMT_TXRX, params) 58 #define mgmttxrx_nofl_debug(params...) \ 59 QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_MGMT_TXRX, params) 60 61 /** 62 * enum mgmt_subtype - enum of mgmt. subtypes 63 * @MGMT_SUBTYPE_ASSOC_REQ: association request frame 64 * @MGMT_SUBTYPE_ASSOC_RESP: association response frame 65 * @MGMT_SUBTYPE_REASSOC_REQ: reassociation request frame 66 * @MGMT_SUBTYPE_REASSOC_RESP: reassociation response frame 67 * @MGMT_SUBTYPE_PROBE_REQ: probe request frame 68 * @MGMT_SUBTYPE_PROBE_RESP: probe response frame 69 * @MGMT_SUBTYPE_BEACON: beacon frame 70 * @MGMT_SUBTYPE_ATIM: ATIM frame 71 * @MGMT_SUBTYPE_DISASSOC: disassociation frame 72 * @MGMT_SUBTYPE_AUTH: authentication frame 73 * @MGMT_SUBTYPE_DEAUTH: deauthentication frame 74 * @MGMT_SUBTYPE_ACTION: action frame 75 * @MGMT_SUBTYPE_ACTION_NO_ACK: action no ack frame 76 */ 77 enum mgmt_subtype { 78 MGMT_SUBTYPE_ASSOC_REQ = 0x00, 79 MGMT_SUBTYPE_ASSOC_RESP = 0x10, 80 MGMT_SUBTYPE_REASSOC_REQ = 0x20, 81 MGMT_SUBTYPE_REASSOC_RESP = 0x30, 82 MGMT_SUBTYPE_PROBE_REQ = 0x40, 83 MGMT_SUBTYPE_PROBE_RESP = 0x50, 84 MGMT_SUBTYPE_BEACON = 0x80, 85 MGMT_SUBTYPE_ATIM = 0x90, 86 MGMT_SUBTYPE_DISASSOC = 0xa0, 87 MGMT_SUBTYPE_AUTH = 0xb0, 88 MGMT_SUBTYPE_DEAUTH = 0xc0, 89 MGMT_SUBTYPE_ACTION = 0xd0, 90 MGMT_SUBTYPE_ACTION_NO_ACK = 0xe0, 91 }; 92 93 /** 94 * enum mgmt_action_category - mgmt. action categories 95 * @ACTION_CATEGORY_SPECTRUM_MGMT: spectrum mgmt. action category 96 * @ACTION_CATEGORY_QOS: qos action category 97 * @ACTION_CATEGORY_DLS: dls action category 98 * @ACTION_CATEGORY_BACK: block ack action category 99 * @ACTION_CATEGORY_PUBLIC: public action category 100 * @ACTION_CATEGORY_RRM: rrm action category 101 * @ACTION_FAST_BSS_TRNST: trnst action category 102 * @ACTION_CATEGORY_HT: ht actipon category 103 * @ACTION_CATEGORY_SA_QUERY: sa query action category 104 * @ACTION_CATEGORY_PROTECTED_DUAL_OF_PUBLIC_ACTION: protected 105 * public action category 106 * @ACTION_CATEGORY_WNM: wnm action category 107 * @ACTION_CATEGORY_WNM_UNPROTECTED: wnm protected action category 108 * @ACTION_CATEGORY_TDLS: tdls action category 109 * @ACTION_CATEGORY_MESH_ACTION: mesh action category 110 * @ACTION_CATEGORY_MULTIHOP_ACTION: multihop action category 111 * @ACTION_CATEGORY_SELF_PROTECTED: self protected action category 112 * @ACTION_CATEGORY_DMG: unprotected dmg action category 113 * @ACTION_CATEGORY_WMM: wmm action category 114 * @ACTION_CATEGORY_FST: fst action category 115 * @ACTION_CATEGORY_RVS: robust av streaming action category 116 * @ACTION_CATEGORY_UNPROT_DMG: dmg action category 117 * @ACTION_CATEGORY_VHT: vht action category 118 * @ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED: vendor specific protected 119 * action category 120 * @ACTION_CATEGORY_VENDOR_SPECIFIC: vendor specific action category 121 */ 122 enum mgmt_action_category { 123 ACTION_CATEGORY_SPECTRUM_MGMT = 0, 124 ACTION_CATEGORY_QOS = 1, 125 ACTION_CATEGORY_DLS = 2, 126 ACTION_CATEGORY_BACK = 3, 127 ACTION_CATEGORY_PUBLIC = 4, 128 ACTION_CATEGORY_RRM = 5, 129 ACTION_FAST_BSS_TRNST = 6, 130 ACTION_CATEGORY_HT = 7, 131 ACTION_CATEGORY_SA_QUERY = 8, 132 ACTION_CATEGORY_PROTECTED_DUAL_OF_PUBLIC_ACTION = 9, 133 ACTION_CATEGORY_WNM = 10, 134 ACTION_CATEGORY_WNM_UNPROTECTED = 11, 135 ACTION_CATEGORY_TDLS = 12, 136 ACTION_CATEGORY_MESH_ACTION = 13, 137 ACTION_CATEGORY_MULTIHOP_ACTION = 14, 138 ACTION_CATEGORY_SELF_PROTECTED = 15, 139 ACTION_CATEGORY_DMG = 16, 140 ACTION_CATEGORY_WMM = 17, 141 ACTION_CATEGORY_FST = 18, 142 ACTION_CATEGORY_RVS = 19, 143 ACTION_CATEGORY_UNPROT_DMG = 20, 144 ACTION_CATEGORY_VHT = 21, 145 ACTION_CATEGORY_VENDOR_SPECIFIC_PROTECTED = 126, 146 ACTION_CATEGORY_VENDOR_SPECIFIC = 127, 147 }; 148 149 /** 150 * enum spectrum_mgmt_actioncode - spectrum mgmt. action frms 151 * @ACTION_SPCT_MSR_REQ: spectrum measurement request frame 152 * @ACTION_SPCT_MSR_RPRT: spectrum measurement report frame 153 * @ACTION_SPCT_TPC_REQ: spectrum tpc request frame 154 * @ACTION_SPCT_TPC_RPRT: spectrum tpc report frame 155 * @ACTION_SPCT_CHL_SWITCH: spectrum channel switch frame 156 */ 157 enum spectrum_mgmt_actioncode { 158 ACTION_SPCT_MSR_REQ, 159 ACTION_SPCT_MSR_RPRT, 160 ACTION_SPCT_TPC_REQ, 161 ACTION_SPCT_TPC_RPRT, 162 ACTION_SPCT_CHL_SWITCH, 163 }; 164 165 /** 166 * enum qos_actioncode - qos action frames 167 * @QOS_ADD_TS_REQ: qos add ts request frame 168 * @QOS_ADD_TS_RSP: qos add ts response frame 169 * @QOS_DEL_TS_REQ: qos del ts request frame 170 * @QOS_SCHEDULE: qos schecule frame 171 * @QOS_MAP_CONFIGURE: qos map configure frame 172 */ 173 enum qos_actioncode { 174 QOS_ADD_TS_REQ, 175 QOS_ADD_TS_RSP, 176 QOS_DEL_TS_REQ, 177 QOS_SCHEDULE, 178 QOS_MAP_CONFIGURE, 179 }; 180 181 /** 182 * enum dls_actioncode - dls action frames 183 * @DLS_REQUEST: dls request frame 184 * @DLS_RESPONSE: dls response frame 185 * @DLS_TEARDOWN: dls teardown frame 186 */ 187 enum dls_actioncode { 188 DLS_REQUEST, 189 DLS_RESPONSE, 190 DLS_TEARDOWN, 191 }; 192 193 /** 194 * enum block_ack_actioncode - block ack action frames 195 * @ADDBA_REQUEST: add block ack request frame 196 * @ADDBA_RESPONSE: add block ack response frame 197 * @DELBA: delete block ack frame 198 */ 199 enum block_ack_actioncode { 200 ADDBA_REQUEST, 201 ADDBA_RESPONSE, 202 DELBA, 203 }; 204 205 /** 206 * enum pub_actioncode - public action frames 207 * @PUB_ACTION_2040_BSS_COEXISTENCE: public 20-40 bss coex action frame 208 * @PUB_ACTION_EXT_CHANNEL_SWITCH_ID: public ext channel switch id action frame 209 * @PUB_ACTION_VENDOR_SPECIFIC: vendor specific public action frame 210 * @PUB_ACTION_GAS_INITIAL_REQUEST: GAS initial request action frame 211 * @PUB_ACTION_GAS_INITIAL_RESPONSE: GAS initial response action frame 212 * @PUB_ACTION_GAS_COMEBACK_REQUEST: GAS comeback request action frame 213 * @PUB_ACTION_GAS_COMEBACK_RESPONSE: GAS comeback respose action frame 214 * @PUB_ACTION_TDLS_DISCRESP: tdls discovery response public action frame 215 */ 216 enum pub_actioncode { 217 PUB_ACTION_2040_BSS_COEXISTENCE = 0, 218 PUB_ACTION_EXT_CHANNEL_SWITCH_ID = 4, 219 PUB_ACTION_VENDOR_SPECIFIC = 9, 220 PUB_ACTION_GAS_INITIAL_REQUEST = 10, 221 PUB_ACTION_GAS_INITIAL_RESPONSE = 11, 222 PUB_ACTION_GAS_COMEBACK_REQUEST = 12, 223 PUB_ACTION_GAS_COMEBACK_RESPONSE = 13, 224 PUB_ACTION_TDLS_DISCRESP = 14, 225 }; 226 227 /** 228 * enum rrm_actioncode - rrm action frames 229 * @RRM_RADIO_MEASURE_REQ: rrm radio meas. request frame 230 * @RRM_RADIO_MEASURE_RPT: rrm radio meas. report frame 231 * @RRM_LINK_MEASUREMENT_REQ: rrm link meas. request frmae 232 * @RRM_LINK_MEASUREMENT_RPT: rrm link meas. report frame 233 * @RRM_NEIGHBOR_REQ: rrm neighbor request frame 234 * @RRM_NEIGHBOR_RPT: rrm neighbor report frame 235 */ 236 enum rrm_actioncode { 237 RRM_RADIO_MEASURE_REQ, 238 RRM_RADIO_MEASURE_RPT, 239 RRM_LINK_MEASUREMENT_REQ, 240 RRM_LINK_MEASUREMENT_RPT, 241 RRM_NEIGHBOR_REQ, 242 RRM_NEIGHBOR_RPT, 243 }; 244 245 /** 246 * enum ft_actioncode - ft action frames 247 * @FT_FAST_BSS_TRNST_REQ: ft request frame 248 * @FT_FAST_BSS_TRNST_RES: ft response frame 249 * @FT_FAST_BSS_TRNST_CONFIRM: ft confirm frame 250 * @FT_FAST_BSS_TRNST_ACK: ft ACK frame 251 */ 252 enum ft_actioncode { 253 FT_FAST_BSS_TRNST_REQ = 1, 254 FT_FAST_BSS_TRNST_RES, 255 FT_FAST_BSS_TRNST_CONFIRM, 256 FT_FAST_BSS_TRNST_ACK, 257 }; 258 259 /** 260 * enum ht_actioncode - ht action frames 261 * @HT_ACTION_NOTIFY_CHANWIDTH: ht notify bw action frame 262 * @HT_ACTION_SMPS: ht smps action frame 263 * @HT_ACTION_PSMP: ht psmp action frame 264 * @HT_ACTION_PCO_PHASE: ht pco phase action frame 265 * @HT_ACTION_CSI: ht csi action frame 266 * @HT_ACTION_NONCOMPRESSED_BF: ht noncompressed bf action frame 267 * @HT_ACTION_COMPRESSED_BF: ht compressed bf action frame 268 * @HT_ACTION_ASEL_IDX_FEEDBACK: ht asel idx feedback action frame 269 */ 270 enum ht_actioncode { 271 HT_ACTION_NOTIFY_CHANWIDTH, 272 HT_ACTION_SMPS, 273 HT_ACTION_PSMP, 274 HT_ACTION_PCO_PHASE, 275 HT_ACTION_CSI, 276 HT_ACTION_NONCOMPRESSED_BF, 277 HT_ACTION_COMPRESSED_BF, 278 HT_ACTION_ASEL_IDX_FEEDBACK, 279 }; 280 281 /** 282 * enum sa_query_action - sa query action frames 283 * @SA_QUERY_REQUEST: sa query request frame 284 * @SA_QUERY_RESPONSE: sa query response frame 285 */ 286 enum sa_query_action { 287 SA_QUERY_REQUEST, 288 SA_QUERY_RESPONSE, 289 }; 290 291 /** 292 * enum protected_dual_actioncode - protected dual action frames 293 * @PDPA_GAS_INIT_REQ: pdpa gas init request frame 294 * @PDPA_GAS_INIT_RSP: pdpa gas init response frame 295 * @PDPA_GAS_COMEBACK_REQ: pdpa gas comeback request frame 296 * @PDPA_GAS_COMEBACK_RSP: pdpa gas comeback response frame 297 */ 298 enum protected_dual_actioncode { 299 PDPA_GAS_INIT_REQ = 10, 300 PDPA_GAS_INIT_RSP = 11, 301 PDPA_GAS_COMEBACK_REQ = 12, 302 PDPA_GAS_COMEBACK_RSP = 13, 303 }; 304 305 /** 306 * enum wnm_actioncode - wnm action frames 307 * @WNM_BSS_TM_QUERY: wnm bss tm query frame 308 * @WNM_BSS_TM_REQUEST: wnm bss tm request frame 309 * @WNM_BSS_TM_RESPONSE: wnm bss tm response frame 310 * @WNM_FMS_REQ: wnm fms request frame 311 * @WNM_FMS_RESP: wnm fms response frame 312 * @WNM_TFS_REQ: wnm tfs request frame 313 * @WNM_TFS_RESP: wnm tfs response frame 314 * @WNM_TFS_NOTIFY: wnm tfs notify frame 315 * @WNM_SLEEP_REQ: wnm sleep request frame 316 * @WNM_SLEEP_RESP: wnm sleep response frame 317 * @WNM_TIM_REQ: wnm Tim broadcast request frame 318 * @WNM_TIM_RESP: wnm Tim broadcast response frame 319 * @WNM_NOTIF_REQUEST: wnm notify request frame 320 * @WNM_NOTIF_RESPONSE: wnm notify response frame 321 */ 322 enum wnm_actioncode { 323 WNM_BSS_TM_QUERY = 6, 324 WNM_BSS_TM_REQUEST = 7, 325 WNM_BSS_TM_RESPONSE = 8, 326 WNM_FMS_REQ = 9, 327 WNM_FMS_RESP = 10, 328 WNM_TFS_REQ = 13, 329 WNM_TFS_RESP = 14, 330 WNM_TFS_NOTIFY = 15, 331 WNM_SLEEP_REQ = 16, 332 WNM_SLEEP_RESP = 17, 333 WNM_TIM_REQ = 18, 334 WNM_TIM_RESP = 19, 335 WNM_NOTIF_REQUEST = 26, 336 WNM_NOTIF_RESPONSE = 27, 337 }; 338 339 /** 340 * enum tdls_actioncode - tdls action frames 341 * @TDLS_SETUP_REQUEST: tdls setup request frame 342 * @TDLS_SETUP_RESPONSE: tdls setup response frame 343 * @TDLS_SETUP_CONFIRM: tdls setup confirm frame 344 * @TDLS_TEARDOWN: tdls teardown frame 345 * @TDLS_PEER_TRAFFIC_INDICATION: tdls peer traffic indication frame 346 * @TDLS_CHANNEL_SWITCH_REQUEST: tdls channel switch req. frame 347 * @TDLS_CHANNEL_SWITCH_RESPONSE: tdls channel switch response frame 348 * @TDLS_PEER_PSM_REQUEST: tdls peer psm request frame 349 * @TDLS_PEER_PSM_RESPONSE: tdls peer psm response frame 350 * @TDLS_PEER_TRAFFIC_RESPONSE: tdls peer traffic response frame 351 * @TDLS_DISCOVERY_REQUEST: tdls discovery request frame 352 */ 353 enum tdls_actioncode { 354 TDLS_SETUP_REQUEST = 0, 355 TDLS_SETUP_RESPONSE = 1, 356 TDLS_SETUP_CONFIRM = 2, 357 TDLS_TEARDOWN = 3, 358 TDLS_PEER_TRAFFIC_INDICATION = 4, 359 TDLS_CHANNEL_SWITCH_REQUEST = 5, 360 TDLS_CHANNEL_SWITCH_RESPONSE = 6, 361 TDLS_PEER_PSM_REQUEST = 7, 362 TDLS_PEER_PSM_RESPONSE = 8, 363 TDLS_PEER_TRAFFIC_RESPONSE = 9, 364 TDLS_DISCOVERY_REQUEST = 10, 365 TDLS_DISCOVERY_RESPONSE = 14, 366 }; 367 368 /** 369 * enum mesh_actioncode - mesh action frames 370 * @MESH_ACTION_LINK_METRIC_REPORT: mesh link metric report action frame 371 * @MESH_ACTION_HWMP_PATH_SELECTION: mesh hwmp path selection action frame 372 * @MESH_ACTION_GATE_ANNOUNCEMENT: mesh gate announcement action frame 373 * @MESH_ACTION_CONGESTION_CONTROL_NOTIFICATION: mesh congestion control frame 374 * @MESH_ACTION_MCCA_SETUP_REQUEST: mesh mcca setup request action frame 375 * @MESH_ACTION_MCCA_SETUP_REPLY: mesh mcca setup reply action frame 376 * @MESH_ACTION_MCCA_ADVERTISEMENT_REQUEST: mesh mcca advertisement req. frame 377 * @MESH_ACTION_MCCA_ADVERTISEMENT: mesh mcca advertisement action frame 378 * @MESH_ACTION_MCCA_TEARDOWN: mesh mcca teardown action frame 379 * @MESH_ACTION_TBTT_ADJUSTMENT_REQUEST: mesh tbtt adjustment req. frame 380 * @MESH_ACTION_TBTT_ADJUSTMENT_RESPONSE: mesh tbtt adjustment rsp. frame 381 */ 382 enum mesh_actioncode { 383 MESH_ACTION_LINK_METRIC_REPORT, 384 MESH_ACTION_HWMP_PATH_SELECTION, 385 MESH_ACTION_GATE_ANNOUNCEMENT, 386 MESH_ACTION_CONGESTION_CONTROL_NOTIFICATION, 387 MESH_ACTION_MCCA_SETUP_REQUEST, 388 MESH_ACTION_MCCA_SETUP_REPLY, 389 MESH_ACTION_MCCA_ADVERTISEMENT_REQUEST, 390 MESH_ACTION_MCCA_ADVERTISEMENT, 391 MESH_ACTION_MCCA_TEARDOWN, 392 MESH_ACTION_TBTT_ADJUSTMENT_REQUEST, 393 MESH_ACTION_TBTT_ADJUSTMENT_RESPONSE, 394 }; 395 396 /** 397 * enum self_protected_actioncode - self protected action frames 398 * @SP_RESERVED: self protected reserved 399 * @SP_MESH_PEERING_OPEN: self protected mesh peering open frame 400 * @SP_MESH_PEERING_CONFIRM: self protected mesh peering confirm frame 401 * @SP_MESH_PEERING_CLOSE: self protected mesh peering close frame 402 * @SP_MGK_INFORM: self protected mgk inform frame 403 * @SP_MGK_ACK: self protected mgk ack frame 404 */ 405 enum self_protected_actioncode { 406 SP_RESERVED, 407 SP_MESH_PEERING_OPEN, 408 SP_MESH_PEERING_CONFIRM, 409 SP_MESH_PEERING_CLOSE, 410 SP_MGK_INFORM, 411 SP_MGK_ACK, 412 }; 413 414 /** 415 * enum wmm_actioncode - wmm action frames 416 * @WMM_QOS_SETUP_REQ: wmm qos setup request frame 417 * @WMM_QOS_SETUP_RESP: q wmm qos setup response frame 418 * @WMM_QOS_TEARDOWN: wmm qos teardown frame 419 */ 420 enum wmm_actioncode { 421 WMM_QOS_SETUP_REQ, 422 WMM_QOS_SETUP_RESP, 423 WMM_QOS_TEARDOWN, 424 }; 425 426 /** 427 * enum fst_actioncode - fst action frames 428 * @FST_SETUP_REQ: fst setup request frame 429 * @FST_SETUP_RSP: fst setup response frame 430 * @FST_TEAR_DOWN: fst qos teardown frame 431 * @FST_ACK_REQ: fst ack frame for request 432 * @FST_ACK_RSP: fst ack frame for response 433 * @FST_ON_CHANNEL_TUNNEL: fst on channel tunnel frame 434 */ 435 enum fst_actioncode { 436 FST_SETUP_REQ, 437 FST_SETUP_RSP, 438 FST_TEAR_DOWN, 439 FST_ACK_REQ, 440 FST_ACK_RSP, 441 FST_ON_CHANNEL_TUNNEL, 442 }; 443 444 /** 445 * enum rvs_actioncode - Robust av streaming action frames 446 * @SCS_REQ: scs request frame 447 * @SCS_RSP: scs response frame 448 * @GROUP_MEMBERSHIP_REQ: Group Membership Request frame 449 * @GROUP_MEMBERSHIP_RSP: Group Membership Response frame 450 * @MCSC_REQ: mcsc request frame 451 * @MCSC_RSP: mcsc response frame 452 */ 453 enum rvs_actioncode { 454 SCS_REQ, 455 SCS_RSP, 456 GROUP_MEMBERSHIP_REQ, 457 GROUP_MEMBERSHIP_RSP, 458 MCSC_REQ, 459 MCSC_RSP, 460 }; 461 462 /** 463 * enum vht_actioncode - vht action frames 464 * @VHT_ACTION_COMPRESSED_BF: vht compressed bf action frame 465 * @VHT_ACTION_GID_NOTIF: vht gid notification action frame 466 * @VHT_ACTION_OPMODE_NOTIF: vht opmode notification action frame 467 */ 468 enum vht_actioncode { 469 VHT_ACTION_COMPRESSED_BF, 470 VHT_ACTION_GID_NOTIF, 471 VHT_ACTION_OPMODE_NOTIF, 472 }; 473 474 /** 475 * struct action_frm_hdr - action frame header 476 * @action_category: action category 477 * @action_code: action code 478 */ 479 struct action_frm_hdr { 480 uint8_t action_category; 481 uint8_t action_code; 482 }; 483 484 /** 485 * enum mgmt_frame_type - enum of mgmt. frames 486 * @MGMT_FRM_UNSPECIFIED: unspecified 487 * @MGMT_ASSOC_REQ: association request frame 488 * @MGMT_ASSOC_RESP: association response frame 489 * @MGMT_REASSOC_REQ: reassociation request frame 490 * @MGMT_REASSOC_RESP: reassociation response frame 491 * @MGMT_PROBE_REQ: probe request frame 492 * @MGMT_PROBE_RESP: probe response frame 493 * @MGMT_BEACON: beacon frame 494 * @MGMT_ATIM: ATIM frame 495 * @MGMT_DISASSOC: disassociation frame 496 * @MGMT_AUTH: authentication frame 497 * @MGMT_DEAUTH: deauthentication frame 498 * @MGMT_ACTION_MEAS_REQUEST: measure channels request action frame 499 * @MGMT_ACTION_MEAS_REPORT: measure channels response action frame 500 * @MGMT_ACTION_TPC_REQUEST: transmit power control request action frame 501 * @MGMT_ACTION_TPC_REPORT: transmit power control response action frame 502 * @MGMT_ACTION_CHAN_SWITCH: 802.11 channel switch announcement frame 503 * @MGMT_ACTION_QOS_ADD_TS_REQ: qos add ts request frame 504 * @MGMT_ACTION_QOS_ADD_TS_RSP: qos add ts response frame 505 * @MGMT_ACTION_QOS_DEL_TS_REQ: qos del ts request frame 506 * @MGMT_ACTION_QOS_SCHEDULE: qos schedule frame 507 * @MGMT_ACTION_QOS_MAP_CONFIGURE: qos map configure frame 508 * @MGMT_ACTION_DLS_REQUEST: DLS request action frame 509 * @MGMT_ACTION_DLS_RESPONSE: DLS response action frame 510 * @MGMT_ACTION_DLS_TEARDOWN: DLS taerdown action frame 511 * @MGMT_ACTION_BA_ADDBA_REQUEST: ADDBA request action frame 512 * @MGMT_ACTION_BA_ADDBA_RESPONSE: ADDBA response action frame 513 * @MGMT_ACTION_BA_DELBA: DELBA action frame 514 * @MGMT_ACTION_2040_BSS_COEXISTENCE: 20-40 bss coex action frame 515 * @MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC: category vendor spcific action frame 516 * @MGMT_ACTION_EXT_CHANNEL_SWITCH_ID: ext channel switch id action frame 517 * @MGMT_ACTION_VENDOR_SPECIFIC: vendor specific action frame 518 * @MGMT_ACTION_TDLS_DISCRESP: TDLS discovery response frame 519 * @MGMT_ACTION_RRM_RADIO_MEASURE_REQ: rrm radio meas. req. action frame 520 * @MGMT_ACTION_RRM_RADIO_MEASURE_RPT: rrm radio meas. report action frame 521 * @MGMT_ACTION_RRM_LINK_MEASUREMENT_REQ: rrm link meas. req. action frame 522 * @MGMT_ACTION_RRM_LINK_MEASUREMENT_RPT: rrm link meas. report action frame 523 * @MGMT_ACTION_RRM_NEIGHBOR_REQ: rrm neighbor request action frame 524 * @MGMT_ACTION_RRM_NEIGHBOR_RPT: rrm neighbor response action frame 525 * @MGMT_ACTION_HT_NOTIFY_CHANWIDTH: notify channel width action frame 526 * @MGMT_ACTION_HT_SMPS: spatial multiplexing power save action frame 527 * @MGMT_ACTION_HT_PSMP: psmp action frame 528 * @MGMT_ACTION_HT_PCO_PHASE: pco phase action frame 529 * @MGMT_ACTION_HT_CSI: CSI action frame 530 * @MGMT_ACTION_HT_NONCOMPRESSED_BF: non-compressed beamforming action frame 531 * @MGMT_ACTION_HT_COMPRESSED_BF: compressed beamforming action frame 532 * @MGMT_ACTION_HT_ASEL_IDX_FEEDBACK: asel idx feedback action frame 533 * @MGMT_ACTION_SA_QUERY_REQUEST: SA query request frame 534 * @MGMT_ACTION_SA_QUERY_RESPONSE: SA query response frame 535 * @MGMT_ACTION_PDPA_GAS_INIT_REQ: pdpa gas init request action frame 536 * @MGMT_ACTION_PDPA_GAS_INIT_RSP: pdpa gas init response frame 537 * @MGMT_ACTION_PDPA_GAS_COMEBACK_REQ: pdpa gas comeback req. action frame 538 * @MGMT_ACTION_PDPA_GAS_COMEBACK_RSP: pdpa gas comeback rsp. action frame 539 * @MGMT_ACTION_WNM_BSS_TM_QUERY: wnm bss tm query action frame 540 * @MGMT_ACTION_WNM_BSS_TM_REQUEST: wnm bss tm request action frame 541 * @MGMT_ACTION_WNM_BSS_TM_RESPONSE: wnm bss tm response action frame 542 * @MGMT_ACTION_WNM_NOTIF_REQUEST: wnm notification request action frame 543 * @MGMT_ACTION_WNM_NOTIF_RESPONSE: wnm notification response action frame 544 * @MGMT_ACTION_WNM_FMS_REQ: wnm fms request frame 545 * @MGMT_ACTION_WNM_FMS_RESP: wnm fms response frame 546 * @MGMT_ACTION_WNM_TFS_REQ: wnm tfs request frame 547 * @MGMT_ACTION_WNM_TFS_RESP: wnm tfs response frame 548 * @MGMT_ACTION_WNM_TFS_NOTIFY: wnm tfs notify frame 549 * @MGMT_ACTION_WNM_SLEEP_REQ: wnm sleep request frame 550 * @MGMT_ACTION_WNM_SLEEP_RESP: wnm sleep response frame 551 * @MGMT_ACTION_WNM_TIM_REQ: wnm Tim broadcast request frame 552 * @MGMT_ACTION_WNM_TIM_RESP: wnm Tim broadcast response frame 553 * @MGMT_ACTION_TDLS_SETUP_REQ: tdls setup request action frame 554 * @MGMT_ACTION_TDLS_SETUP_RSP: tdls setup response frame 555 * @MGMT_ACTION_TDLS_SETUP_CNF: tdls setup confirm frame 556 * @MGMT_ACTION_TDLS_TEARDOWN: tdls teardown frame 557 * @MGMT_ACTION_TDLS_PEER_TRAFFIC_IND: tdls peer traffic indication frame 558 * @MGMT_ACTION_TDLS_CH_SWITCH_REQ: tdls channel switch req. frame 559 * @MGMT_ACTION_TDLS_CH_SWITCH_RSP: tdls channel switch response frame 560 * @MGMT_ACTION_TDLS_PEER_PSM_REQUEST: tdls peer psm request frame 561 * @MGMT_ACTION_TDLS_PEER_PSM_RESPONSE: tdls peer psm response frame 562 * @MGMT_ACTION_TDLS_PEER_TRAFFIC_RSP: tdls peer traffic response frame 563 * @MGMT_ACTION_TDLS_DIS_REQ: tdls discovery request frame 564 * @MGMT_ACTION_MESH_LINK_METRIC_REPORT: mesh link metric report action frame 565 * @MGMT_ACTION_MESH_HWMP_PATH_SELECTION: mesh hwmp path selection action frame 566 * @MGMT_ACTION_MESH_GATE_ANNOUNCEMENT: mesh gate announcement action frame 567 * @MGMT_ACTION_MESH_CONGESTION_CONTROL_NOTIFICATION: mesh congestion control 568 * @MGMT_ACTION_MESH_MCCA_SETUP_REQUEST: mesh mcca setup request action frame 569 * @MGMT_ACTION_MESH_MCCA_SETUP_REPLY: mesh mcca setup reply action frame 570 * @MGMT_ACTION_MESH_MCCA_ADVERTISEMENT_REQUEST: mesh mcca advertisement req. 571 * @MGMT_ACTION_MESH_MCCA_ADVERTISEMENT: mesh mcca advertisement action frame 572 * @MGMT_ACTION_MESH_MCCA_TEARDOWN: mesh mcca teardown action fram 573 * @MGMT_ACTION_MESH_TBTT_ADJUSTMENT_REQUEST: mesh tbtt adjustment req. frame 574 * @MGMT_ACTION_MESH_TBTT_ADJUSTMENT_RESPONSE: mesh tbtt adjustment rsp. frame 575 * @MGMT_ACTION_SP_MESH_PEERING_OPEN: self protected mesh peering open frame 576 * @MGMT_ACTION_SP_MESH_PEERING_CONFIRM: self protected mesh peering confirm 577 * @MGMT_ACTION_SP_MESH_PEERING_CLOSE: self protected mesh peering close frame 578 * @MGMT_ACTION_SP_MGK_INFORM: self protected mgk inform frame 579 * @MGMT_ACTION_SP_MGK_ACK: self protected mgk ack frame 580 * @MGMT_ACTION_WMM_QOS_SETUP_REQ: WMM qos setup request action frame 581 * @MGMT_ACTION_WMM_QOS_SETUP_RESP: WMM qos setup response action frame 582 * @MGMT_ACTION_WMM_QOS_TEARDOWN: WMM qos teardown action frame 583 * @MGMT_ACTION_VHT_COMPRESSED_BF: vht compressed bf action frame 584 * @MGMT_ACTION_VHT_GID_NOTIF: vht gid notification action frame 585 * @MGMT_ACTION_VHT_OPMODE_NOTIF: vht opmode notification action frame 586 * @MGMT_ACTION_GAS_INITIAL_REQUEST: GAS Initial request action frame 587 * @MGMT_ACTION_GAS_INITIAL_RESPONSE: GAS Initial response action frame 588 * @MGMT_ACTION_GAS_COMEBACK_REQUEST: GAS Comeback request action frame 589 * @MGMT_ACTION_GAS_COMEBACK_RESPONSE: GAS Comeback response action frame 590 * @MGMT_ACTION_FST_SETUP_REQ: FST setup request frame 591 * @MGMT_ACTION_FST_SETUP_RSPA: FST setup response frame 592 * @MGMT_ACTION_FST_TEAR_DOWN: FST qos teardown frame 593 * @MGMT_ACTION_FST_ACK_REQ: FST ack frame for request 594 * @MGMT_ACTION_FST_ACK_RSP: FST ack frame for response 595 * @MGMT_ACTION_FST_ON_CHANNEL_TUNNEL: FST on channel tunnel frame 596 * @MGMT_ACTION_SCS_REQ: SCS request frame 597 * @MGMT_ACTION_SCS_RSP: SCS response frame 598 * @MGMT_ACTION_GROUP_MEMBERSHIP_REQ: group membership request frame 599 * @MGMT_ACTION_GROUP_MEMBERSHIP_RSP: group membership response frame 600 * @MGMT_ACTION_MCSC_REQ: MCSC request frame 601 * @MGMT_ACTION_MCSC_RSP: MCSC response frame 602 * @MGMT_FRAME_TYPE_ALL: mgmt frame type for all type of frames 603 * @MGMT_MAX_FRAME_TYPE: max. mgmt frame types 604 */ 605 enum mgmt_frame_type { 606 MGMT_FRM_UNSPECIFIED = -1, 607 MGMT_ASSOC_REQ, 608 MGMT_ASSOC_RESP, 609 MGMT_REASSOC_REQ, 610 MGMT_REASSOC_RESP, 611 MGMT_PROBE_REQ, 612 MGMT_PROBE_RESP, 613 MGMT_BEACON, 614 MGMT_ATIM, 615 MGMT_DISASSOC, 616 MGMT_AUTH, 617 MGMT_DEAUTH, 618 MGMT_ACTION_MEAS_REQUEST, 619 MGMT_ACTION_MEAS_REPORT, 620 MGMT_ACTION_TPC_REQUEST, 621 MGMT_ACTION_TPC_REPORT, 622 MGMT_ACTION_CHAN_SWITCH, 623 MGMT_ACTION_QOS_ADD_TS_REQ, 624 MGMT_ACTION_QOS_ADD_TS_RSP, 625 MGMT_ACTION_QOS_DEL_TS_REQ, 626 MGMT_ACTION_QOS_SCHEDULE, 627 MGMT_ACTION_QOS_MAP_CONFIGURE, 628 MGMT_ACTION_DLS_REQUEST, 629 MGMT_ACTION_DLS_RESPONSE, 630 MGMT_ACTION_DLS_TEARDOWN, 631 MGMT_ACTION_BA_ADDBA_REQUEST, 632 MGMT_ACTION_BA_ADDBA_RESPONSE, 633 MGMT_ACTION_BA_DELBA, 634 MGMT_ACTION_2040_BSS_COEXISTENCE, 635 MGMT_ACTION_CATEGORY_VENDOR_SPECIFIC, 636 MGMT_ACTION_EXT_CHANNEL_SWITCH_ID, 637 MGMT_ACTION_VENDOR_SPECIFIC, 638 MGMT_ACTION_TDLS_DISCRESP, 639 MGMT_ACTION_RRM_RADIO_MEASURE_REQ, 640 MGMT_ACTION_RRM_RADIO_MEASURE_RPT, 641 MGMT_ACTION_RRM_LINK_MEASUREMENT_REQ, 642 MGMT_ACTION_RRM_LINK_MEASUREMENT_RPT, 643 MGMT_ACTION_RRM_NEIGHBOR_REQ, 644 MGMT_ACTION_RRM_NEIGHBOR_RPT, 645 MGMT_ACTION_FT_REQUEST, 646 MGMT_ACTION_FT_RESPONSE, 647 MGMT_ACTION_FT_CONFIRM, 648 MGMT_ACTION_FT_ACK, 649 MGMT_ACTION_HT_NOTIFY_CHANWIDTH, 650 MGMT_ACTION_HT_SMPS, 651 MGMT_ACTION_HT_PSMP, 652 MGMT_ACTION_HT_PCO_PHASE, 653 MGMT_ACTION_HT_CSI, 654 MGMT_ACTION_HT_NONCOMPRESSED_BF, 655 MGMT_ACTION_HT_COMPRESSED_BF, 656 MGMT_ACTION_HT_ASEL_IDX_FEEDBACK, 657 MGMT_ACTION_SA_QUERY_REQUEST, 658 MGMT_ACTION_SA_QUERY_RESPONSE, 659 MGMT_ACTION_PDPA_GAS_INIT_REQ, 660 MGMT_ACTION_PDPA_GAS_INIT_RSP, 661 MGMT_ACTION_PDPA_GAS_COMEBACK_REQ, 662 MGMT_ACTION_PDPA_GAS_COMEBACK_RSP, 663 MGMT_ACTION_WNM_BSS_TM_QUERY, 664 MGMT_ACTION_WNM_BSS_TM_REQUEST, 665 MGMT_ACTION_WNM_BSS_TM_RESPONSE, 666 MGMT_ACTION_WNM_NOTIF_REQUEST, 667 MGMT_ACTION_WNM_NOTIF_RESPONSE, 668 MGMT_ACTION_WNM_FMS_REQ, 669 MGMT_ACTION_WNM_FMS_RESP, 670 MGMT_ACTION_WNM_TFS_REQ, 671 MGMT_ACTION_WNM_TFS_RESP, 672 MGMT_ACTION_WNM_TFS_NOTIFY, 673 MGMT_ACTION_WNM_SLEEP_REQ, 674 MGMT_ACTION_WNM_SLEEP_RESP, 675 MGMT_ACTION_WNM_TIM_REQ, 676 MGMT_ACTION_WNM_TIM_RESP, 677 MGMT_ACTION_TDLS_SETUP_REQ, 678 MGMT_ACTION_TDLS_SETUP_RSP, 679 MGMT_ACTION_TDLS_SETUP_CNF, 680 MGMT_ACTION_TDLS_TEARDOWN, 681 MGMT_ACTION_TDLS_PEER_TRAFFIC_IND, 682 MGMT_ACTION_TDLS_CH_SWITCH_REQ, 683 MGMT_ACTION_TDLS_CH_SWITCH_RSP, 684 MGMT_ACTION_TDLS_PEER_PSM_REQUEST, 685 MGMT_ACTION_TDLS_PEER_PSM_RESPONSE, 686 MGMT_ACTION_TDLS_PEER_TRAFFIC_RSP, 687 MGMT_ACTION_TDLS_DIS_REQ, 688 MGMT_ACTION_MESH_LINK_METRIC_REPORT, 689 MGMT_ACTION_MESH_HWMP_PATH_SELECTION, 690 MGMT_ACTION_MESH_GATE_ANNOUNCEMENT, 691 MGMT_ACTION_MESH_CONGESTION_CONTROL_NOTIFICATION, 692 MGMT_ACTION_MESH_MCCA_SETUP_REQUEST, 693 MGMT_ACTION_MESH_MCCA_SETUP_REPLY, 694 MGMT_ACTION_MESH_MCCA_ADVERTISEMENT_REQUEST, 695 MGMT_ACTION_MESH_MCCA_ADVERTISEMENT, 696 MGMT_ACTION_MESH_MCCA_TEARDOWN, 697 MGMT_ACTION_MESH_TBTT_ADJUSTMENT_REQUEST, 698 MGMT_ACTION_MESH_TBTT_ADJUSTMENT_RESPONSE, 699 MGMT_ACTION_SP_MESH_PEERING_OPEN, 700 MGMT_ACTION_SP_MESH_PEERING_CONFIRM, 701 MGMT_ACTION_SP_MESH_PEERING_CLOSE, 702 MGMT_ACTION_SP_MGK_INFORM, 703 MGMT_ACTION_SP_MGK_ACK, 704 MGMT_ACTION_WMM_QOS_SETUP_REQ, 705 MGMT_ACTION_WMM_QOS_SETUP_RESP, 706 MGMT_ACTION_WMM_QOS_TEARDOWN, 707 MGMT_ACTION_VHT_COMPRESSED_BF, 708 MGMT_ACTION_VHT_GID_NOTIF, 709 MGMT_ACTION_VHT_OPMODE_NOTIF, 710 MGMT_ACTION_GAS_INITIAL_REQUEST, 711 MGMT_ACTION_GAS_INITIAL_RESPONSE, 712 MGMT_ACTION_GAS_COMEBACK_REQUEST, 713 MGMT_ACTION_GAS_COMEBACK_RESPONSE, 714 MGMT_ACTION_FST_SETUP_REQ, 715 MGMT_ACTION_FST_SETUP_RSP, 716 MGMT_ACTION_FST_TEAR_DOWN, 717 MGMT_ACTION_FST_ACK_REQ, 718 MGMT_ACTION_FST_ACK_RSP, 719 MGMT_ACTION_FST_ON_CHANNEL_TUNNEL, 720 MGMT_ACTION_SCS_REQ, 721 MGMT_ACTION_SCS_RSP, 722 MGMT_ACTION_GROUP_MEMBERSHIP_REQ, 723 MGMT_ACTION_GROUP_MEMBERSHIP_RSP, 724 MGMT_ACTION_MCSC_REQ, 725 MGMT_ACTION_MCSC_RSP, 726 MGMT_FRAME_TYPE_ALL, 727 MGMT_MAX_FRAME_TYPE, 728 }; 729 730 #define WLAN_MGMT_TXRX_HOST_MAX_ANTENNA 4 731 #define WLAN_INVALID_PER_CHAIN_RSSI 0xFF 732 #define WLAN_INVALID_PER_CHAIN_SNR 0x80 733 #define WLAN_NOISE_FLOOR_DBM_DEFAULT -96 734 /** 735 * struct mgmt_rx_event_params - host mgmt header params 736 * @chan_freq: channel frequency on which this frame is received 737 * @channel: channel on which this frame is received 738 * @snr: snr information used to call rssi 739 * @rssi_ctl[WLAN_MGMT_TXRX_HOST_MAX_ANTENNA]: RSSI of PRI 20MHz for each chain 740 * @rate: Rate kbps 741 * @phy_mode: rx phy mode 742 * @buf_len: length of the frame 743 * @status: rx status 744 * @flags: information about the management frame e.g. can give a 745 * scan source for a scan result mgmt frame 746 * @rssi: combined RSSI, i.e. the sum of the snr + noise floor (dBm units) 747 * @tsf_delta: tsf delta 748 * @pdev_id: pdev id 749 * @rx_params: pointer to other rx params 750 * (win specific, will be removed in phase 4) 751 */ 752 struct mgmt_rx_event_params { 753 uint32_t chan_freq; 754 uint32_t channel; 755 uint32_t snr; 756 uint8_t rssi_ctl[WLAN_MGMT_TXRX_HOST_MAX_ANTENNA]; 757 uint32_t rate; 758 enum wlan_phymode phy_mode; 759 uint32_t buf_len; 760 QDF_STATUS status; 761 uint32_t flags; 762 int32_t rssi; 763 uint32_t tsf_delta; 764 uint8_t pdev_id; 765 void *rx_params; 766 }; 767 768 /** 769 * mgmt_tx_download_comp_cb - function pointer for tx download completions. 770 * @context: caller component specific context 771 * @buf: buffer 772 * @free: to free/not free the buffer 773 * 774 * This is the function pointer to be called on tx download completion 775 * if download complete is required. 776 * 777 * Return: QDF_STATUS_SUCCESS - in case of success 778 */ 779 typedef QDF_STATUS (*mgmt_tx_download_comp_cb)(void *context, 780 qdf_nbuf_t buf, bool free); 781 782 /** 783 * mgmt_ota_comp_cb - function pointer for tx ota completions. 784 * @context: caller component specific context 785 * @buf: buffer 786 * @status: tx completion status 787 * @tx_compl_params: tx completion params 788 * 789 * This is the function pointer to be called on tx ota completion. 790 * 791 * Return: QDF_STATUS_SUCCESS - in case of success 792 */ 793 typedef QDF_STATUS (*mgmt_ota_comp_cb)(void *context, qdf_nbuf_t buf, 794 uint32_t status, void *tx_compl_params); 795 796 /** 797 * mgmt_frame_rx_callback - function pointer for receiving mgmt rx frames 798 * @psoc: psoc context 799 * @peer: peer 800 * @buf: buffer 801 * @mgmt_rx_params: rx params 802 * @frm_type: mgmt rx frame type 803 * 804 * This is the function pointer to be called on receiving mgmt rx frames. 805 * 806 * Return: QDF_STATUS_SUCCESS - in case of success 807 */ 808 typedef QDF_STATUS (*mgmt_frame_rx_callback)( 809 struct wlan_objmgr_psoc *psoc, 810 struct wlan_objmgr_peer *peer, 811 qdf_nbuf_t buf, 812 struct mgmt_rx_event_params *mgmt_rx_params, 813 enum mgmt_frame_type frm_type); 814 815 /** 816 * mgmt_frame_fill_peer_cb - Function pointer to fill peer in the buf 817 * @peer: peer 818 * @buf: buffer 819 * 820 * This is the function pointer to be called during drain to fill the 821 * peer into the buf's cb structure. 822 * 823 * Return: QDF_STATUS_SUCCESS - in case of success 824 */ 825 typedef QDF_STATUS (*mgmt_frame_fill_peer_cb)( 826 struct wlan_objmgr_peer *peer, 827 qdf_nbuf_t buf); 828 829 /** 830 * struct mgmt_txrx_mgmt_frame_cb_info - frm and corresponding rx cb info 831 * @frm_type: mgmt frm type 832 * @mgmt_rx_cb: corresponding rx callback 833 */ 834 struct mgmt_txrx_mgmt_frame_cb_info { 835 enum mgmt_frame_type frm_type; 836 mgmt_frame_rx_callback mgmt_rx_cb; 837 }; 838 839 840 /** 841 * wlan_mgmt_txrx_init() - initialize mgmt txrx context. 842 * 843 * This function initializes the mgmt txrx context, 844 * mgmt descriptor pool, etc. 845 * 846 * Return: QDF_STATUS_SUCCESS - in case of success 847 */ 848 QDF_STATUS wlan_mgmt_txrx_init(void); 849 850 /** 851 * wlan_mgmt_txrx_deinit() - deinitialize mgmt txrx context. 852 * 853 * This function deinitializes the mgmt txrx context, 854 * mgmt descriptor pool, etc. 855 * 856 * Return: QDF_STATUS_SUCCESS - in case of success 857 */ 858 QDF_STATUS wlan_mgmt_txrx_deinit(void); 859 860 /** 861 * wlan_mgmt_txrx_mgmt_frame_tx() - transmits mgmt. frame 862 * @peer: peer 863 * @context: caller component specific context 864 * @buf: buffer to be transmitted 865 * @comp_cb: download completion cb function 866 * @ota_cb: post processing cb function 867 * @comp_id: umac component id 868 * @mgmt_tx_params: mgmt tx params 869 * 870 * This function transmits the mgmt. frame to southbound interface. 871 * 872 * Return: QDF_STATUS_SUCCESS - in case of success 873 */ 874 QDF_STATUS wlan_mgmt_txrx_mgmt_frame_tx(struct wlan_objmgr_peer *peer, 875 void *context, 876 qdf_nbuf_t buf, 877 mgmt_tx_download_comp_cb tx_comp_cb, 878 mgmt_ota_comp_cb tx_ota_comp_cb, 879 enum wlan_umac_comp_id comp_id, 880 void *mgmt_tx_params); 881 882 /** 883 * wlan_mgmt_txrx_beacon_frame_tx() - transmits mgmt. beacon 884 * @psoc: psoc context 885 * @buf: buffer to be transmitted 886 * @comp_id: umac component id 887 * 888 * This function transmits the mgmt. beacon to southbound interface. 889 * 890 * Return: QDF_STATUS_SUCCESS - in case of success 891 */ 892 QDF_STATUS wlan_mgmt_txrx_beacon_frame_tx(struct wlan_objmgr_peer *peer, 893 qdf_nbuf_t buf, 894 enum wlan_umac_comp_id comp_id); 895 896 #ifdef WLAN_SUPPORT_FILS 897 /** 898 * wlan_mgmt_txrx_fd_action_frame_tx() - transmits mgmt. FD Action frame 899 * @vdev: vdev object 900 * @buf: buffer to be transmitted 901 * @comp_id: umac component id 902 * 903 * This function transmits the FILS Dicovery Action frame to 904 * southbound interface. 905 * 906 * Return: QDF_STATUS_SUCCESS - in case of success 907 */ 908 QDF_STATUS wlan_mgmt_txrx_fd_action_frame_tx(struct wlan_objmgr_vdev *vdev, 909 qdf_nbuf_t buf, 910 enum wlan_umac_comp_id comp_id); 911 #endif /* WLAN_SUPPORT_FILS */ 912 913 /** 914 * wlan_mgmt_txrx_register_rx_cb() - registers the rx cb for mgmt. frames 915 * @psoc: psoc context 916 * @comp_id: umac component id 917 * @frm_cb_info: pointer to array of structure containing frm type and callback 918 * @num_entries: num of frames for which cb to be registered 919 * 920 * This function registers rx callback for mgmt. frames for 921 * the corresponding umac component passed in the func. 922 * 923 * Return: QDF_STATUS_SUCCESS - in case of success 924 */ 925 QDF_STATUS wlan_mgmt_txrx_register_rx_cb( 926 struct wlan_objmgr_psoc *psoc, 927 enum wlan_umac_comp_id comp_id, 928 struct mgmt_txrx_mgmt_frame_cb_info *frm_cb_info, 929 uint8_t num_entries); 930 931 /** 932 * wlan_mgmt_txrx_vdev_drain() - Function to drain all mgmt packets 933 * specific to a vdev 934 * @vdev: vdev context 935 * @mgmt_fill_peer_cb: callback func to UMAC to fill peer into buf 936 * @status: opaque pointer about the status of the pkts passed to UMAC 937 * 938 * This function drains all mgmt packets of a vdev. This can be used in the 939 * event of target going down without sending completions. 940 * 941 * Return: QDF_STATUS_SUCCESS - in case of success 942 */ 943 QDF_STATUS wlan_mgmt_txrx_vdev_drain( 944 struct wlan_objmgr_vdev *vdev, 945 mgmt_frame_fill_peer_cb mgmt_fill_peer_cb, 946 void *status); 947 948 /** 949 * wlan_mgmt_txrx_deregister_rx_cb() - deregisters the rx cb for mgmt. frames 950 * @psoc: psoc context 951 * @comp_id: umac component id 952 * @frm_cb_info: pointer to array of structure containing frm type and callback 953 * @num_entries: num of frames for which cb to be deregistered 954 * 955 * This function deregisters rx callback for mgmt. frames for 956 * the corresponding umac component passed in the func. 957 * 958 * Return: QDF_STATUS_SUCCESS - in case of success 959 */ 960 QDF_STATUS wlan_mgmt_txrx_deregister_rx_cb( 961 struct wlan_objmgr_psoc *psoc, 962 enum wlan_umac_comp_id comp_id, 963 struct mgmt_txrx_mgmt_frame_cb_info *frm_cb_info, 964 uint8_t num_entries); 965 966 /** 967 * wlan_mgmt_txrx_psoc_open() - mgmt txrx module psoc open API 968 * @psoc: psoc context 969 * 970 * Return: QDF_STATUS_SUCCESS - in case of success 971 */ 972 QDF_STATUS wlan_mgmt_txrx_psoc_open(struct wlan_objmgr_psoc *psoc); 973 974 /** 975 * wlan_mgmt_txrx_psoc_close() - mgmt txrx module psoc close API 976 * @psoc: psoc context 977 * 978 * Return: QDF_STATUS_SUCCESS - in case of success 979 */ 980 QDF_STATUS wlan_mgmt_txrx_psoc_close(struct wlan_objmgr_psoc *psoc); 981 982 /** 983 * wlan_mgmt_txrx_pdev_open() - mgmt txrx module pdev open API 984 * @pdev: pdev context 985 * 986 * Return: QDF_STATUS_SUCCESS - in case of success 987 */ 988 QDF_STATUS wlan_mgmt_txrx_pdev_open(struct wlan_objmgr_pdev *pdev); 989 990 991 /** 992 * wlan_mgmt_txrx_pdev_close() - mgmt txrx module pdev close API 993 * @pdev: pdev context 994 * 995 * Return: QDF_STATUS_SUCCESS - in case of success 996 */ 997 QDF_STATUS wlan_mgmt_txrx_pdev_close(struct wlan_objmgr_pdev *pdev); 998 #endif 999 1000 1001