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