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