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