xref: /wlan-driver/qca-wifi-host-cmn/qdf/inc/qdf_types.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: qdf_types.h
22  * QCA driver framework (QDF) basic type definitions
23  */
24 
25 #if !defined(__QDF_TYPES_H)
26 #define __QDF_TYPES_H
27 
28 #define qdf_must_check __qdf_must_check
29 
30 /* Include Files */
31 #include <i_qdf_types.h>
32 #ifdef TSOSEG_DEBUG
33 #include <qdf_atomic.h>
34 #endif
35 #include "qdf_status.h"
36 
37 /* Preprocessor definitions and constants */
38 #define QDF_MAX_SGLIST 4
39 
40 #define __QDF_DECLARE_FLEX_ARRAY(type, name) \
41 	struct { \
42 		struct {} dummy_struct; \
43 		type name[]; \
44 	}
45 
46 /* Define a QDF macro for declaring flexible arrays */
47 #define QDF_FLEX_ARRAY(type, name) \
48 	union { \
49 		type name ## _first_element; \
50 		__QDF_DECLARE_FLEX_ARRAY(type, name); \
51 	}
52 
53 /*
54  * Add more levels here based on the number of perf clusters in SoC
55  * Also modify hif_get_perf_cluster_bitmap
56  */
57 #define CPU_CLUSTER_TYPE_LITTLE 0
58 #define CPU_CLUSTER_TYPE_PERF 1
59 #if defined(NUM_SOC_PERF_CLUSTER) && (NUM_SOC_PERF_CLUSTER > 1)
60 #define CPU_CLUSTER_TYPE_PERF2 2
61 #endif
62 
63 /**
64  * struct qdf_sglist - scatter-gather list
65  * @nsegs: total number of segments
66  * @sg_segs: scatter-gather segment list
67  * @sg_segs.vaddr: Virtual address of the segment
68  * @sg_segs.len: Length of the segment
69  */
70 typedef struct qdf_sglist {
71 	uint32_t nsegs;
72 	struct __sg_segs {
73 		uint8_t  *vaddr;
74 		uint32_t len;
75 	} sg_segs[QDF_MAX_SGLIST];
76 } qdf_sglist_t;
77 
78 #define QDF_MAX_SCATTER __QDF_MAX_SCATTER
79 #define QDF_NSEC_PER_MSEC __QDF_NSEC_PER_MSEC
80 #define QDF_NSEC_PER_USEC __QDF_NSEC_PER_USEC
81 #define QDF_USEC_PER_MSEC __QDF_USEC_PER_MSEC
82 #define QDF_NSEC_PER_SEC __QDF_NSEC_PER_SEC
83 
84 /**
85  * QDF_SWAP_U16 - swap input u16 value
86  * @_x: variable to swap
87  */
88 #define QDF_SWAP_U16(_x) \
89 	((((_x) << 8) & 0xFF00) | (((_x) >> 8) & 0x00FF))
90 
91 /**
92  * QDF_SWAP_U32 - swap input u32 value
93  * @_x: variable to swap
94  */
95 #define QDF_SWAP_U32(_x) \
96 	(((((_x) << 24) & 0xFF000000) | (((_x) >> 24) & 0x000000FF)) | \
97 	 ((((_x) << 8) & 0x00FF0000) | (((_x) >> 8) & 0x0000FF00)))
98 
99 /* ticks per second */
100 #define QDF_TICKS_PER_SECOND (1000)
101 
102 /**
103  * QDF_ARRAY_SIZE - get array size
104  * @_arr: array variable name
105  */
106 #define QDF_ARRAY_SIZE(_arr) (sizeof(_arr) / sizeof((_arr)[0]))
107 
108 #define QDF_MAX_SCATTER __QDF_MAX_SCATTER
109 
110 /**
111  * qdf_packed - denotes structure is packed.
112  */
113 #define qdf_packed __qdf_packed
114 
115 /**
116  * qdf_toupper - char lower to upper.
117  */
118 #define qdf_toupper __qdf_toupper
119 
120 /* set if the flags were changed */
121 #define QDF_MONITOR_FLAG_CHANGED __QDF_MONITOR_FLAG_CHANGED
122 /* Pass frames with bad FCS */
123 #define QDF_MONITOR_FLAG_FCSFAIL __QDF_MONITOR_FLAG_FCSFAIL
124 /* Pass frames with bad PLCP */
125 #define QDF_MONITOR_FLAG_PLCPFAIL __QDF_MONITOR_FLAG_PLCPFAIL
126 /* Pass control frames */
127 #define QDF_MONITOR_FLAG_CONTROL __QDF_MONITOR_FLAG_CONTROL
128 /* Disable BSSID filtering */
129 #define QDF_MONITOR_FLAG_OTHER_BSS __QDF_MONITOR_FLAG_OTHER_BSS
130 /* Report frames after processing */
131 #define QDF_MONITOR_FLAG_COOK_FRAMES __QDF_MONITOR_FLAG_COOK_FRAMES
132 /* Use the configured MAC address and ACK incoming unicast packets */
133 #define QDF_MONITOR_FLAG_ACTIVE __QDF_MONITOR_FLAG_ACTIVE
134 
135 typedef void *qdf_net_handle_t;
136 
137 typedef void *qdf_netlink_handle_t;
138 typedef void *qdf_drv_handle_t;
139 typedef void *qdf_os_handle_t;
140 typedef void *qdf_pm_t;
141 
142 /*
143  * typedef qdf_handle_t - handles opaque to each other
144  */
145 typedef void *qdf_handle_t;
146 
147 /*
148  * typedef qdf_freq_t - define frequency as a 16 bit/32 bit
149  * unsigned integer depending on the requirement
150  */
151 #ifdef CONFIG_16_BIT_FREQ_TYPE
152 typedef uint16_t qdf_freq_t;
153 #else
154 typedef uint32_t qdf_freq_t;
155 #endif
156 
157 /**
158  * typedef qdf_device_t - Platform/bus generic handle.
159  * Used for bus specific functions.
160  */
161 typedef __qdf_device_t qdf_device_t;
162 
163 /* Byte order identifiers */
164 typedef __qdf_le16_t qdf_le16_t;
165 typedef __qdf_le32_t qdf_le32_t;
166 typedef __qdf_le64_t qdf_le64_t;
167 typedef __qdf_be16_t qdf_be16_t;
168 typedef __qdf_be32_t qdf_be32_t;
169 typedef __qdf_be64_t qdf_be64_t;
170 
171 /**
172  * typedef qdf_size_t - size of an object
173  */
174 typedef __qdf_size_t qdf_size_t;
175 
176 /**
177  * typedef qdf_off_t - offset for API's that need them.
178  */
179 typedef __qdf_off_t   qdf_off_t;
180 
181 /**
182  * typedef qdf_dma_map_t - DMA mapping object.
183  */
184 typedef __qdf_dma_map_t qdf_dma_map_t;
185 
186 /**
187  * typedef qdf_dma_addr_t - DMA address.
188  */
189 typedef __qdf_dma_addr_t qdf_dma_addr_t;
190 
191 /**
192  * typedef qdf_dma_size_t - DMA size.
193  */
194 typedef __qdf_dma_size_t qdf_dma_size_t;
195 
196 /**
197  * typedef qdf_dma_context_t - DMA context.
198  */
199 typedef __qdf_dma_context_t qdf_dma_context_t;
200 
201 typedef __qdf_mem_info_t qdf_mem_info_t;
202 typedef __sgtable_t sgtable_t;
203 
204 /**
205  * typedef qdf_cpu_mask - CPU Mask
206  */
207 typedef __qdf_cpu_mask qdf_cpu_mask;
208 
209 /*
210  * pointer to net device
211  */
212 typedef __qdf_netdev_t qdf_netdev_t;
213 
214 /*
215  * pointer to napi struct
216  */
217 typedef __qdf_napi_struct qdf_napi_struct;
218 
219 /*
220  * pointer to net dev stats
221  */
222 typedef __qdf_net_dev_stats qdf_net_dev_stats;
223 
224 /*
225  * pointer to dummy net device
226  */
227 typedef __qdf_dummy_netdev_t qdf_dummy_netdev_t;
228 
229 /**
230  * struct qdf_dma_map_info - Information inside a DMA map.
231  * @nsegs: total number mapped segments
232  * @dma_segs: list of segments
233  * @dma_segs.paddr: physical(dma'able) address of the segment
234  * @dma_segs.len: length of the segment
235  */
236 typedef struct qdf_dma_map_info {
237 	uint32_t nsegs;
238 	struct __dma_segs {
239 		qdf_dma_addr_t paddr;
240 		qdf_dma_size_t len;
241 	} dma_segs[QDF_MAX_SCATTER];
242 } qdf_dmamap_info_t;
243 
244 /*
245  * struct qdf_shared_mem - Shared memory resource
246  * @mem_info: memory info struct
247  * @vaddr: virtual address
248  * @sgtable: scatter-gather table
249  * @qdf_dma_mem_context: dma address
250  *
251  * NB: not using kernel-doc format since the kernel-doc script doesn't
252  *     handle the qdf_dma_mem_context() macro
253  */
254 typedef struct qdf_shared_mem {
255 	qdf_mem_info_t mem_info;
256 	void *vaddr;
257 	sgtable_t sgtable;
258 	qdf_dma_mem_context(memctx);
259 } qdf_shared_mem_t;
260 
261 #define qdf_iomem_t __qdf_iomem_t
262 
263 /**
264  * typedef QDF_TIMER_TYPE - QDF timer type
265  * @QDF_TIMER_TYPE_SW: Deferrable SW timer it will not cause CPU to wake up
266  * on expiry
267  * @QDF_TIMER_TYPE_WAKE_APPS: Non deferrable timer which will cause CPU to
268  * wake up on expiry
269  * @QDF_TIMER_TYPE_SW_SPIN: Deferrable&Pinned SW timer, it will not cause cpu
270  * to wake up on expiry and be able to queue on assigned cpu by add_timer_on
271  */
272 typedef enum {
273 	QDF_TIMER_TYPE_SW,
274 	QDF_TIMER_TYPE_WAKE_APPS,
275 	QDF_TIMER_TYPE_SW_SPIN
276 } QDF_TIMER_TYPE;
277 
278 /**
279  * typedef qdf_resource_type_t - hw resources
280  * @QDF_RESOURCE_TYPE_MEM: memory resource
281  * @QDF_RESOURCE_TYPE_IO: io resource
282  * Define the hw resources the OS has allocated for the device
283  * Note that start defines a mapped area.
284  */
285 typedef enum {
286 	QDF_RESOURCE_TYPE_MEM,
287 	QDF_RESOURCE_TYPE_IO,
288 } qdf_resource_type_t;
289 
290 /**
291  * typedef qdf_resource_t - representation of a h/w resource.
292  * @start: start
293  * @end: end
294  * @type: resource type
295  */
296 typedef struct {
297 	uint64_t start;
298 	uint64_t end;
299 	qdf_resource_type_t type;
300 } qdf_resource_t;
301 
302 /**
303  * typedef qdf_dma_dir_t - DMA directions
304  * @QDF_DMA_BIDIRECTIONAL: bidirectional data
305  * @QDF_DMA_TO_DEVICE: data going from device to memory
306  * @QDF_DMA_FROM_DEVICE: data going from memory to device
307  */
308 typedef enum {
309 	QDF_DMA_BIDIRECTIONAL = __QDF_DMA_BIDIRECTIONAL,
310 	QDF_DMA_TO_DEVICE = __QDF_DMA_TO_DEVICE,
311 	QDF_DMA_FROM_DEVICE = __QDF_DMA_FROM_DEVICE,
312 } qdf_dma_dir_t;
313 
314 /**
315  * enum qdf_driver_type - Indicate the driver type and based on this
316  * do appropriate initialization.
317  *
318  * @QDF_DRIVER_TYPE_PRODUCTION: Driver used in the production
319  * @QDF_DRIVER_TYPE_MFG: Driver used in the Factory
320  * @QDF_DRIVER_TYPE_INVALID: Invalid and unrecognized type
321  *
322  */
323 enum qdf_driver_type {
324 	QDF_DRIVER_TYPE_PRODUCTION = 0,
325 	QDF_DRIVER_TYPE_MFG = 1,
326 	QDF_DRIVER_TYPE_INVALID = 0x7FFFFFFF
327 };
328 
329 #ifdef DP_UMAC_HW_RESET_SUPPORT
330 typedef void (*qdf_mem_release_cb) (void *ctxt, void *elem, void *elem_list);
331 #endif
332 
333 /* work queue(kernel thread)/DPC function callback */
334 typedef void (*qdf_defer_fn_t)(void *);
335 
336 /*
337  * Prototype of the critical region function that is to be
338  * executed with spinlock held and interrupt disabled
339  */
340 typedef bool (*qdf_irqlocked_func_t)(void *);
341 
342 #define qdf_offsetof(type, field) offsetof(type, field)
343 
344 /**
345  * typedef QDF_MODULE_ID  - Debug category level
346  * @QDF_MODULE_ID_MIN: The smallest/starting module id
347  * @QDF_MODULE_ID_TDLS: TDLS
348  * @QDF_MODULE_ID_ACS: auto channel selection
349  * @QDF_MODULE_ID_SCAN_SM: scan state machine
350  * @QDF_MODULE_ID_SCANENTRY: scan entry
351  * @QDF_MODULE_ID_WDS: WDS handling
352  * @QDF_MODULE_ID_ACTION: action management frames
353  * @QDF_MODULE_ID_ROAM: sta mode roaming
354  * @QDF_MODULE_ID_INACT: inactivity handling
355  * @QDF_MODULE_ID_DOTH: 11.h
356  * @QDF_MODULE_ID_IQUE: IQUE features
357  * @QDF_MODULE_ID_WME: WME protocol
358  * @QDF_MODULE_ID_ACL: ACL handling
359  * @QDF_MODULE_ID_WPA: WPA/RSN protocol
360  * @QDF_MODULE_ID_RADKEYS: dump 802.1x keys
361  * @QDF_MODULE_ID_RADDUMP: dump 802.1x radius packets
362  * @QDF_MODULE_ID_RADIUS: 802.1x radius client
363  * @QDF_MODULE_ID_DOT1XSM: 802.1x state machine
364  * @QDF_MODULE_ID_DOT1X: 802.1x authenticator
365  * @QDF_MODULE_ID_POWER: power save handling
366  * @QDF_MODULE_ID_STATS: state machine
367  * @QDF_MODULE_ID_OUTPUT: output handling
368  * @QDF_MODULE_ID_SCAN: scanning
369  * @QDF_MODULE_ID_AUTH: authentication handling
370  * @QDF_MODULE_ID_ASSOC: association handling
371  * @QDF_MODULE_ID_NODE: node handling
372  * @QDF_MODULE_ID_ELEMID: element id parsing
373  * @QDF_MODULE_ID_XRATE: rate set handling
374  * @QDF_MODULE_ID_INPUT: input handling
375  * @QDF_MODULE_ID_CRYPTO: crypto work
376  * @QDF_MODULE_ID_DUMPPKTS: IFF_LINK2 equivalent
377  * @QDF_MODULE_ID_DEBUG: IFF_DEBUG equivalent
378  * @QDF_MODULE_ID_MLME: MLME
379  * @QDF_MODULE_ID_RRM: Radio resource measurement
380  * @QDF_MODULE_ID_WNM: Wireless Network Management
381  * @QDF_MODULE_ID_P2P_PROT: P2P Protocol driver
382  * @QDF_MODULE_ID_PROXYARP: 11v Proxy ARP
383  * @QDF_MODULE_ID_L2TIF: Hotspot 2.0 L2 TIF
384  * @QDF_MODULE_ID_WIFIPOS: WifiPositioning Feature
385  * @QDF_MODULE_ID_WRAP: WRAP or Wireless ProxySTA
386  * @QDF_MODULE_ID_DFS: DFS debug mesg
387  * @QDF_MODULE_ID_TLSHIM: TLSHIM module ID
388  * @QDF_MODULE_ID_WMI: WMI module ID
389  * @QDF_MODULE_ID_HTT: HTT module ID
390  * @QDF_MODULE_ID_HDD: HDD module ID
391  * @QDF_MODULE_ID_SME: SME module ID
392  * @QDF_MODULE_ID_PE: PE module ID
393  * @QDF_MODULE_ID_WMA: WMA module ID
394  * @QDF_MODULE_ID_SYS: SYS module ID
395  * @QDF_MODULE_ID_QDF: QDF module ID
396  * @QDF_MODULE_ID_SAP: SAP module ID
397  * @QDF_MODULE_ID_HDD_SOFTAP: HDD SAP module ID
398  * @QDF_MODULE_ID_HDD_DATA: HDD DATA module ID
399  * @QDF_MODULE_ID_HDD_SAP_DATA: HDD SAP DATA module ID
400  * @QDF_MODULE_ID_HIF: HIF module ID
401  * @QDF_MODULE_ID_HTC: HTC module ID
402  * @QDF_MODULE_ID_TXRX: TXRX module ID
403  * @QDF_MODULE_ID_QDF_DEVICE: QDF DEVICE module ID
404  * @QDF_MODULE_ID_CFG: CFG module ID
405  * @QDF_MODULE_ID_BMI: BMI module ID
406  * @QDF_MODULE_ID_EPPING: EPPING module ID
407  * @QDF_MODULE_ID_QVIT: QVIT module ID
408  * @QDF_MODULE_ID_DP: Data-path module ID
409  * @QDF_MODULE_ID_HAL: Hal abstraction module ID
410  * @QDF_MODULE_ID_SOC: SOC module ID
411  * @QDF_MODULE_ID_OS_IF: OS-interface module ID
412  * @QDF_MODULE_ID_TARGET_IF: target interface module ID
413  * @QDF_MODULE_ID_SCHEDULER: scheduler module ID
414  * @QDF_MODULE_ID_MGMT_TXRX: management TX/RX module ID
415  * @QDF_MODULE_ID_SERIALIZATION: serialization module ID
416  * @QDF_MODULE_ID_PMO: PMO (power manager and offloads) Module ID
417  * @QDF_MODULE_ID_P2P: P2P module ID
418  * @QDF_MODULE_ID_POLICY_MGR: Policy Manager module ID
419  * @QDF_MODULE_ID_CONFIG: CFG (configuration) component ID
420  * @QDF_MODULE_ID_REGULATORY: REGULATORY module ID
421  * @QDF_MODULE_ID_NAN: NAN module ID
422  * @QDF_MODULE_ID_SPECTRAL: Spectral module ID
423  * @QDF_MODULE_ID_ROAM_DEBUG: Roam Debug logging
424  * @QDF_MODULE_ID_CDP: Converged Data Path module ID
425  * @QDF_MODULE_ID_DIRECT_BUF_RX: Direct Buffer Receive module ID
426  * @QDF_MODULE_ID_DISA: DISA (encryption test) module ID
427  * @QDF_MODULE_ID_GREEN_AP: Green AP related logging
428  * @QDF_MODULE_ID_FTM: FTM module ID
429  * @QDF_MODULE_ID_FD: FILS discovery logging
430  * @QDF_MODULE_ID_OCB: OCB module ID
431  * @QDF_MODULE_ID_IPA: IPA module ID
432  * @QDF_MODULE_ID_CP_STATS: Control Plane Statistics ID
433  * @QDF_MODULE_ID_ACTION_OUI: ACTION OUI module ID
434  * @QDF_MODULE_ID_TARGET: Target module ID
435  * @QDF_MODULE_ID_MBSSIE: MBSS IE ID
436  * @QDF_MODULE_ID_FWOL: FW Offload module ID
437  * @QDF_MODULE_ID_SM_ENGINE: SM engine module ID
438  * @QDF_MODULE_ID_CMN_MLME: CMN MLME module ID
439  * @QDF_MODULE_ID_CFR: CFR module ID
440  * @QDF_MODULE_ID_DP_TX_CAPTURE: Tx capture enhancement feature ID
441  * @QDF_MODULE_ID_INTEROP_ISSUES_AP: interop issues ap module ID
442  * @QDF_MODULE_ID_DENYLIST_MGR: Denylist Manager module
443  * @QDF_MODULE_ID_QLD: QCA Live Debug module ID
444  * @QDF_MODULE_ID_DYNAMIC_MODE_CHG: Dynamic mode change module ID
445  * @QDF_MODULE_ID_COEX: Coex related config module ID
446  * @QDF_MODULE_ID_FTM_TIME_SYNC: FTM Time sync module ID
447  * @QDF_MODULE_ID_PKT_CAPTURE: PACKET CAPTURE module ID
448  * @QDF_MODULE_ID_MON_FILTER: Monitor filter related config module ID
449  * @QDF_MODULE_ID_DCS: DCS module ID
450  * @QDF_MODULE_ID_RPTR: Repeater module ID
451  * @QDF_MODULE_ID_6GHZ: 6Ghz specific feature ID
452  * @QDF_MODULE_ID_IOT_SIM: IOT Simulation for rogue AP module ID
453  * @QDF_MODULE_ID_IFMGR: Interface Manager feature ID
454  * @QDF_MODULE_ID_MSCS: MSCS feature ID
455  * @QDF_MODULE_ID_GPIO: GPIO configuration module ID
456  * @QDF_MODULE_ID_DIAG: Host diag module ID
457  * @QDF_MODULE_ID_DP_INIT: INIT/DEINIT path of datapath module ID
458  * @QDF_MODULE_ID_DP_TX: TX path of datapath module ID
459  * @QDF_MODULE_ID_DP_RX: RX path of datapath module ID
460  * @QDF_MODULE_ID_DP_STATS: TX/RX stats, AST stats module ID
461  * @QDF_MODULE_ID_DP_HTT: Firmware to host DP event handling module ID
462  * @QDF_MODULE_ID_DP_PEER: DP peer module ID
463  * @QDF_MODULE_ID_DP_RX_ERROR: Packet handling from WBM release ring module ID
464  * @QDF_MODULE_ID_DP_HTT_TX_STATS: FW to host Tx  PPDU stats module ID
465  * @QDF_MODULE_ID_DP_RX_MON_STATUS: RX mon status ring module ID
466  * @QDF_MODULE_ID_DP_RX_MON_DEST: Monitor ode processing module ID
467  * @QDF_MODULE_ID_DP_REO: REO command status module ID
468  * @QDF_MODULE_ID_DP_TX_COMP: TX completion module ID
469  * @QDF_MODULE_ID_DP_VDEV: DP Vdev module ID
470  * @QDF_MODULE_ID_DP_CDP: Configuration module ID
471  * @QDF_MODULE_ID_TSO: TSO module ID
472  * @QDF_MODULE_ID_ME: Multicast Enhancement module ID
473  * @QDF_MODULE_ID_QWRAP: QWRAP module ID
474  * @QDF_MODULE_ID_DBDC_REP: DBDC repeater module ID
475  * @QDF_MODULE_ID_EXT_AP: Extended AP module ID
476  * @QDF_MODULE_ID_MLO: MLO Manager module ID
477  * @QDF_MODULE_ID_MLOIE: MLO related IE protocol processing module ID
478  * @QDF_MODULE_ID_MBSS: MBSS Framework module ID
479  * @QDF_MODULE_ID_MON: Monitor module ID
480  * @QDF_MODULE_ID_MGMT_RX_REO: Management rx-reorder module ID
481  * @QDF_MODULE_ID_AFC: AFC module ID
482  * @QDF_MODULE_ID_WIFI_RADAR: WIFI RADAR module ID
483  * @QDF_MODULE_ID_TWT: TWT module ID
484  * @QDF_MODULE_ID_WLAN_PRE_CAC: WLAN PRE CAC module ID
485  * @QDF_MODULE_ID_T2LM: T2LM module ID
486  * @QDF_MODULE_ID_DP_SAWF: DP SAWF module ID
487  * @QDF_MODULE_ID_SCS: SCS module ID
488  * @QDF_MODULE_ID_COAP: Constrained Application Protocol module ID
489  * @QDF_MODULE_ID_QMI: QMI module ID
490  * @QDF_MODULE_ID_SOUNDING: txbf SOUNDING
491  * @QDF_MODULE_ID_SAWF: SAWF module ID
492  * @QDF_MODULE_ID_EPCS: EPCS module ID
493  * @QDF_MODULE_ID_LL_SAP: LL SAP module ID
494  * @QDF_MODULE_ID_ANY: anything
495  * @QDF_MODULE_ID_COHOSTED_BSS : Co-hosted BSS module ID
496  * @QDF_MODULE_ID_TELEMETRY_AGENT: Telemetry Agent Module ID
497  * @QDF_MODULE_ID_RF_PATH_SWITCH: RF path switch Module ID
498  * @QDF_MODULE_ID_MAX: Max place holder module ID
499  *
500  * New module ID needs to be added in qdf trace along with this enum.
501  */
502 typedef enum {
503 	QDF_MODULE_ID_MIN       = 0,
504 	QDF_MODULE_ID_TDLS      = QDF_MODULE_ID_MIN,
505 	QDF_MODULE_ID_ACS,
506 	QDF_MODULE_ID_SCAN_SM,
507 	QDF_MODULE_ID_SCANENTRY,
508 	QDF_MODULE_ID_WDS,
509 	QDF_MODULE_ID_ACTION,
510 	QDF_MODULE_ID_ROAM,
511 	QDF_MODULE_ID_INACT,
512 	QDF_MODULE_ID_DOTH      = 8,
513 	QDF_MODULE_ID_IQUE,
514 	QDF_MODULE_ID_WME,
515 	QDF_MODULE_ID_ACL,
516 	QDF_MODULE_ID_WPA,
517 	QDF_MODULE_ID_RADKEYS,
518 	QDF_MODULE_ID_RADDUMP,
519 	QDF_MODULE_ID_RADIUS,
520 	QDF_MODULE_ID_DOT1XSM   = 16,
521 	QDF_MODULE_ID_DOT1X,
522 	QDF_MODULE_ID_POWER,
523 	QDF_MODULE_ID_STATE,
524 	QDF_MODULE_ID_OUTPUT,
525 	QDF_MODULE_ID_SCAN,
526 	QDF_MODULE_ID_AUTH,
527 	QDF_MODULE_ID_ASSOC,
528 	QDF_MODULE_ID_NODE      = 24,
529 	QDF_MODULE_ID_ELEMID,
530 	QDF_MODULE_ID_XRATE,
531 	QDF_MODULE_ID_INPUT,
532 	QDF_MODULE_ID_CRYPTO,
533 	QDF_MODULE_ID_DUMPPKTS,
534 	QDF_MODULE_ID_DEBUG,
535 	QDF_MODULE_ID_MLME,
536 	QDF_MODULE_ID_RRM       = 32,
537 	QDF_MODULE_ID_WNM,
538 	QDF_MODULE_ID_P2P_PROT,
539 	QDF_MODULE_ID_PROXYARP,
540 	QDF_MODULE_ID_L2TIF,
541 	QDF_MODULE_ID_WIFIPOS,
542 	QDF_MODULE_ID_WRAP,
543 	QDF_MODULE_ID_DFS,
544 	QDF_MODULE_ID_ATF       = 40,
545 	QDF_MODULE_ID_SPLITMAC,
546 	QDF_MODULE_ID_IOCTL,
547 	QDF_MODULE_ID_NAC,
548 	QDF_MODULE_ID_MESH,
549 	QDF_MODULE_ID_MBO,
550 	QDF_MODULE_ID_EXTIOCTL_CHANSWITCH,
551 	QDF_MODULE_ID_EXTIOCTL_CHANSSCAN,
552 	QDF_MODULE_ID_TLSHIM    = 48,
553 	QDF_MODULE_ID_WMI,
554 	QDF_MODULE_ID_HTT,
555 	QDF_MODULE_ID_HDD,
556 	QDF_MODULE_ID_SME,
557 	QDF_MODULE_ID_PE,
558 	QDF_MODULE_ID_WMA,
559 	QDF_MODULE_ID_SYS,
560 	QDF_MODULE_ID_QDF       = 56,
561 	QDF_MODULE_ID_SAP,
562 	QDF_MODULE_ID_HDD_SOFTAP,
563 	QDF_MODULE_ID_HDD_DATA,
564 	QDF_MODULE_ID_HDD_SAP_DATA,
565 	QDF_MODULE_ID_HIF,
566 	QDF_MODULE_ID_HTC,
567 	QDF_MODULE_ID_TXRX,
568 	QDF_MODULE_ID_QDF_DEVICE = 64,
569 	QDF_MODULE_ID_CFG,
570 	QDF_MODULE_ID_BMI,
571 	QDF_MODULE_ID_EPPING,
572 	QDF_MODULE_ID_QVIT,
573 	QDF_MODULE_ID_DP,
574 	QDF_MODULE_ID_HAL,
575 	QDF_MODULE_ID_SOC,
576 	QDF_MODULE_ID_OS_IF = 72,
577 	QDF_MODULE_ID_TARGET_IF,
578 	QDF_MODULE_ID_SCHEDULER,
579 	QDF_MODULE_ID_MGMT_TXRX,
580 	QDF_MODULE_ID_SERIALIZATION,
581 	QDF_MODULE_ID_PMO,
582 	QDF_MODULE_ID_P2P,
583 	QDF_MODULE_ID_POLICY_MGR,
584 	QDF_MODULE_ID_CONFIG = 80,
585 	QDF_MODULE_ID_REGULATORY,
586 	QDF_MODULE_ID_SA_API,
587 	QDF_MODULE_ID_NAN,
588 	QDF_MODULE_ID_OFFCHAN_TXRX,
589 	QDF_MODULE_ID_SON,
590 	QDF_MODULE_ID_SPECTRAL,
591 	QDF_MODULE_ID_OBJ_MGR,
592 	QDF_MODULE_ID_NSS = 88,
593 	QDF_MODULE_ID_ROAM_DEBUG,
594 	QDF_MODULE_ID_CDP,
595 	QDF_MODULE_ID_DIRECT_BUF_RX,
596 	QDF_MODULE_ID_DISA,
597 	QDF_MODULE_ID_GREEN_AP,
598 	QDF_MODULE_ID_FTM,
599 	QDF_MODULE_ID_FD,
600 	QDF_MODULE_ID_OCB = 96,
601 	QDF_MODULE_ID_IPA,
602 	QDF_MODULE_ID_CP_STATS,
603 	QDF_MODULE_ID_ACTION_OUI,
604 	QDF_MODULE_ID_TARGET,
605 	QDF_MODULE_ID_MBSSIE,
606 	QDF_MODULE_ID_FWOL,
607 	QDF_MODULE_ID_SM_ENGINE,
608 	QDF_MODULE_ID_CMN_MLME = 104,
609 	QDF_MODULE_ID_BSSCOLOR,
610 	QDF_MODULE_ID_CFR,
611 	QDF_MODULE_ID_DP_TX_CAPTURE,
612 	QDF_MODULE_ID_INTEROP_ISSUES_AP,
613 	QDF_MODULE_ID_DENYLIST_MGR,
614 	QDF_MODULE_ID_QLD,
615 	QDF_MODULE_ID_DYNAMIC_MODE_CHG,
616 	QDF_MODULE_ID_COEX = 112,
617 	QDF_MODULE_ID_FTM_TIME_SYNC,
618 	QDF_MODULE_ID_PKT_CAPTURE,
619 	QDF_MODULE_ID_MON_FILTER,
620 	QDF_MODULE_ID_DCS,
621 	QDF_MODULE_ID_RPTR,
622 	QDF_MODULE_ID_6GHZ,
623 	QDF_MODULE_ID_IOT_SIM,
624 	QDF_MODULE_ID_IFMGR = 120,
625 	QDF_MODULE_ID_MSCS,
626 	QDF_MODULE_ID_GPIO,
627 	QDF_MODULE_ID_DIAG,
628 	QDF_MODULE_ID_DP_INIT,
629 	QDF_MODULE_ID_DP_TX,
630 	QDF_MODULE_ID_DP_RX,
631 	QDF_MODULE_ID_DP_STATS,
632 	QDF_MODULE_ID_DP_HTT = 128,
633 	QDF_MODULE_ID_DP_PEER,
634 	QDF_MODULE_ID_DP_RX_ERROR,
635 	QDF_MODULE_ID_DP_HTT_TX_STATS,
636 	QDF_MODULE_ID_DP_RX_MON_STATUS,
637 	QDF_MODULE_ID_DP_RX_MON_DEST,
638 	QDF_MODULE_ID_DP_REO,
639 	QDF_MODULE_ID_DP_TX_COMP,
640 	QDF_MODULE_ID_DP_VDEV = 136,
641 	QDF_MODULE_ID_DP_CDP,
642 	QDF_MODULE_ID_TSO,
643 	QDF_MODULE_ID_ME,
644 	QDF_MODULE_ID_QWRAP,
645 	QDF_MODULE_ID_DBDC_REP,
646 	QDF_MODULE_ID_EXT_AP,
647 	QDF_MODULE_ID_MLO,
648 	QDF_MODULE_ID_MLOIE = 144,
649 	QDF_MODULE_ID_MBSS,
650 	QDF_MODULE_ID_MON,
651 	QDF_MODULE_ID_MGMT_RX_REO,
652 	QDF_MODULE_ID_AFC,
653 	QDF_MODULE_ID_WIFI_RADAR,
654 	QDF_MODULE_ID_TWT,
655 	QDF_MODULE_ID_DP_UMAC_RESET,
656 	QDF_MODULE_ID_WLAN_PRE_CAC = 152,
657 	QDF_MODULE_ID_T2LM,
658 	QDF_MODULE_ID_DP_SAWF,
659 	QDF_MODULE_ID_SCS,
660 	QDF_MODULE_ID_COAP,
661 	QDF_MODULE_ID_QMI,
662 	QDF_MODULE_ID_SOUNDING,
663 	QDF_MODULE_ID_SAWF,
664 	QDF_MODULE_ID_EPCS = 160,
665 	QDF_MODULE_ID_LL_SAP,
666 	QDF_MODULE_ID_COHOSTED_BSS,
667 	QDF_MODULE_ID_TELEMETRY_AGENT,
668 	QDF_MODULE_ID_RF_PATH_SWITCH,
669 	QDF_MODULE_ID_ANY,
670 	QDF_MODULE_ID_MAX,
671 } QDF_MODULE_ID;
672 
673 /**
674  * typedef QDF_TRACE_LEVEL - Debug verbose level
675  * @QDF_TRACE_LEVEL_NONE: no trace will be logged. This value is in place
676  *			  for the qdf_trace_setlevel() to allow the user
677  *			  to turn off all traces
678  * @QDF_TRACE_LEVEL_FATAL: Indicates fatal error conditions
679  * @QDF_TRACE_LEVEL_ERROR: Indicates error conditions
680  * @QDF_TRACE_LEVEL_WARN: May indicate that an error will occur if action
681  *			  is not taken
682  * @QDF_TRACE_LEVEL_INFO: Normal operational messages that require no action
683  * @QDF_TRACE_LEVEL_INFO_HIGH: High level operational messages that require
684  *			       no action
685  * @QDF_TRACE_LEVEL_INFO_MED: Middle level operational messages that require
686  *			      no action
687  * @QDF_TRACE_LEVEL_INFO_LOW: Low level operational messages that require
688  *			      no action
689  * @QDF_TRACE_LEVEL_DEBUG: Information useful to developers for debugging
690  * @QDF_TRACE_LEVEL_TRACE: Indicates trace level for automation scripts,
691  *			whenever there is a context switch in driver, one
692  *			print using this trace level will be added with
693  *			the help of qdf_trace api.
694  * @QDF_TRACE_LEVEL_ALL: All trace levels
695  * @QDF_TRACE_LEVEL_MAX: Max trace level
696  */
697 typedef enum {
698 	QDF_TRACE_LEVEL_NONE,
699 	QDF_TRACE_LEVEL_FATAL,
700 	QDF_TRACE_LEVEL_ERROR,
701 	QDF_TRACE_LEVEL_WARN,
702 	QDF_TRACE_LEVEL_INFO,
703 	QDF_TRACE_LEVEL_INFO_HIGH,
704 	QDF_TRACE_LEVEL_INFO_MED,
705 	QDF_TRACE_LEVEL_INFO_LOW,
706 	QDF_TRACE_LEVEL_DEBUG,
707 	QDF_TRACE_LEVEL_TRACE,
708 	QDF_TRACE_LEVEL_ALL,
709 	QDF_TRACE_LEVEL_MAX
710 } QDF_TRACE_LEVEL;
711 
712 /**
713  * enum QDF_OPMODE - vdev operating mode
714  * @QDF_STA_MODE: STA mode
715  * @QDF_SAP_MODE: SAP mode
716  * @QDF_P2P_CLIENT_MODE: P2P client mode
717  * @QDF_P2P_GO_MODE: P2P GO mode
718  * @QDF_FTM_MODE: FTM mode
719  * @QDF_IBSS_MODE: IBSS mode
720  * @QDF_MONITOR_MODE: Monitor mode
721  * @QDF_P2P_DEVICE_MODE: P2P device mode
722  * @QDF_OCB_MODE: OCB device mode
723  * @QDF_EPPING_MODE: EPPING device mode
724  * @QDF_QVIT_MODE: QVIT device mode
725  * @QDF_NDI_MODE: NAN datapath mode
726  * @QDF_WDS_MODE: WDS mode
727  * @QDF_BTAMP_MODE: BTAMP mode
728  * @QDF_AHDEMO_MODE: AHDEMO mode
729  * @QDF_TDLS_MODE: TDLS device mode
730  * @QDF_NAN_DISC_MODE: NAN Discovery device mode
731  * @QDF_MAX_NO_OF_MODE: Max place holder
732  *
733  * These are generic IDs that identify the various roles
734  * in the software system
735  */
736 enum QDF_OPMODE {
737 	QDF_STA_MODE,
738 	QDF_SAP_MODE,
739 	QDF_P2P_CLIENT_MODE,
740 	QDF_P2P_GO_MODE,
741 	QDF_FTM_MODE,
742 	QDF_IBSS_MODE,
743 	QDF_MONITOR_MODE,
744 	QDF_P2P_DEVICE_MODE,
745 	QDF_OCB_MODE,
746 	QDF_EPPING_MODE,
747 	QDF_QVIT_MODE,
748 	QDF_NDI_MODE,
749 	QDF_WDS_MODE,
750 	QDF_BTAMP_MODE,
751 	QDF_AHDEMO_MODE,
752 	QDF_TDLS_MODE,
753 	QDF_NAN_DISC_MODE,
754 
755 	/* Add new OP Modes to qdf_opmode_str as well */
756 
757 	QDF_MAX_NO_OF_MODE
758 };
759 
760 /**
761  * qdf_opmode_str() - Return a human readable string representation of @opmode
762  * @opmode: The opmode to convert
763  *
764  * Return: string representation of @opmode
765  */
766 const char *qdf_opmode_str(const enum QDF_OPMODE opmode);
767 
768 /**
769  * enum QDF_GLOBAL_MODE - global mode when driver is loaded.
770  *
771  * @QDF_GLOBAL_MISSION_MODE: mission mode (STA, SAP...)
772  * @QDF_GLOBAL_WALTEST_MODE: WAL Test Mode
773  * @QDF_GLOBAL_MONITOR_MODE: Monitor Mode
774  * @QDF_GLOBAL_FTM_MODE: FTM mode
775  * @QDF_GLOBAL_IBSS_MODE: IBSS mode
776  * @QDF_GLOBAL_COLDBOOT_CALIB_MODE: Cold Boot Calibration Mode
777  * @QDF_GLOBAL_EPPING_MODE: EPPING mode
778  * @QDF_GLOBAL_QVIT_MODE: QVIT global mode
779  * @QDF_GLOBAL_FTM_COLDBOOT_CALIB_MODE: Cold Boot Calibration in FTM Mode
780  * @QDF_GLOBAL_MAX_MODE: Max place holder
781  */
782 enum QDF_GLOBAL_MODE {
783 	QDF_GLOBAL_MISSION_MODE,
784 	QDF_GLOBAL_WALTEST_MODE = 3,
785 	QDF_GLOBAL_MONITOR_MODE = 4,
786 	QDF_GLOBAL_FTM_MODE = 5,
787 	QDF_GLOBAL_IBSS_MODE = 6,
788 	QDF_GLOBAL_COLDBOOT_CALIB_MODE = 7,
789 	QDF_GLOBAL_EPPING_MODE = 8,
790 	QDF_GLOBAL_QVIT_MODE = 9,
791 	QDF_GLOBAL_FTM_COLDBOOT_CALIB_MODE = 10,
792 	QDF_GLOBAL_MAX_MODE
793 };
794 
795 #define  QDF_IS_EPPING_ENABLED(mode) (mode == QDF_GLOBAL_EPPING_MODE)
796 
797 #ifdef QDF_TRACE_PRINT_ENABLE
798 #define qdf_print(args...) QDF_TRACE_INFO(QDF_MODULE_ID_ANY, ## args)
799 #define qdf_alert(args...) QDF_TRACE_FATAL(QDF_MODULE_ID_ANY, ## args)
800 #define qdf_err(args...)   QDF_TRACE_ERROR(QDF_MODULE_ID_ANY, ## args)
801 #define qdf_warn(args...)  QDF_TRACE_WARN(QDF_MODULE_ID_ANY, ## args)
802 #define qdf_info(args...)  QDF_TRACE_INFO(QDF_MODULE_ID_ANY, ## args)
803 #define qdf_debug(args...) QDF_TRACE_DEBUG(QDF_MODULE_ID_ANY, ## args)
804 
805 #define qdf_nofl_print(params...) \
806 	QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_ANY, ## params)
807 #define qdf_nofl_alert(params...) \
808 	QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_ANY, ## params)
809 #define qdf_nofl_err(params...) \
810 	QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_ANY, ## params)
811 #define qdf_nofl_warn(params...) \
812 	QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_ANY, ## params)
813 #define qdf_nofl_info(params...) \
814 	QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_ANY, ## params)
815 #define qdf_nofl_debug(params...) \
816 	QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_ANY, ## params)
817 
818 #else /* QDF_TRACE_PRINT_ENABLE */
819 #define qdf_print(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_QDF, ## params)
820 #define qdf_alert(params...) QDF_TRACE_FATAL(QDF_MODULE_ID_QDF, ## params)
821 #define qdf_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_QDF, ## params)
822 #define qdf_warn(params...) QDF_TRACE_WARN(QDF_MODULE_ID_QDF, ## params)
823 #define qdf_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_QDF, ## params)
824 #define qdf_debug(params...) QDF_TRACE_DEBUG(QDF_MODULE_ID_QDF, ## params)
825 
826 #define qdf_nofl_alert(params...) \
827 	QDF_TRACE_FATAL_NO_FL(QDF_MODULE_ID_QDF, ## params)
828 #define qdf_nofl_err(params...) \
829 	QDF_TRACE_ERROR_NO_FL(QDF_MODULE_ID_QDF, ## params)
830 #define qdf_nofl_warn(params...) \
831 	QDF_TRACE_WARN_NO_FL(QDF_MODULE_ID_QDF, ## params)
832 #define qdf_nofl_info(params...) \
833 	QDF_TRACE_INFO_NO_FL(QDF_MODULE_ID_QDF, ## params)
834 #define qdf_nofl_debug(params...) \
835 	QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_QDF, ## params)
836 
837 #endif /* QDF_TRACE_PRINT_ENABLE */
838 
839 #define qdf_rl_alert(params...) QDF_TRACE_FATAL_RL(QDF_MODULE_ID_QDF, ## params)
840 #define qdf_rl_err(params...) QDF_TRACE_ERROR_RL(QDF_MODULE_ID_QDF, ## params)
841 #define qdf_rl_warn(params...) QDF_TRACE_WARN_RL(QDF_MODULE_ID_QDF, ## params)
842 #define qdf_rl_info(params...) QDF_TRACE_INFO_RL(QDF_MODULE_ID_QDF, ## params)
843 #define qdf_rl_debug(params...) QDF_TRACE_DEBUG_RL(QDF_MODULE_ID_QDF, ## params)
844 
845 #define qdf_rl_nofl_alert(params...) \
846 	QDF_TRACE_FATAL_RL_NO_FL(QDF_MODULE_ID_QDF, ## params)
847 #define qdf_rl_nofl_err(params...) \
848 	QDF_TRACE_ERROR_RL_NO_FL(QDF_MODULE_ID_QDF, ## params)
849 #define qdf_rl_nofl_warn(params...) \
850 	QDF_TRACE_WARN_RL_NO_FL(QDF_MODULE_ID_QDF, ## params)
851 #define qdf_rl_nofl_info(params...) \
852 	QDF_TRACE_INFO_RL_NO_FL(QDF_MODULE_ID_QDF, ## params)
853 #define qdf_rl_nofl_debug(params...) \
854 	QDF_TRACE_DEBUG_RL_NO_FL(QDF_MODULE_ID_QDF, ## params)
855 
856 #define qdf_snprint   __qdf_snprint
857 
858 #define qdf_kstrtoint __qdf_kstrtoint
859 #define qdf_kstrtouint __qdf_kstrtouint
860 
861 #ifdef WLAN_FEATURE_11BE_MLO
862 #define QDF_MAX_CONCURRENCY_PERSONA  (WLAN_MAX_VDEVS + 1)
863 #else
864 #ifdef WLAN_OPEN_P2P_INTERFACE
865 /* This should match with WLAN_MAX_INTERFACES */
866 #define QDF_MAX_CONCURRENCY_PERSONA  (WLAN_MAX_VDEVS)
867 #else
868 #define QDF_MAX_CONCURRENCY_PERSONA  (WLAN_MAX_VDEVS - 1)
869 #endif
870 #endif
871 
872 #define QDF_STA_MASK (1 << QDF_STA_MODE)
873 #define QDF_SAP_MASK (1 << QDF_SAP_MODE)
874 #define QDF_P2P_CLIENT_MASK (1 << QDF_P2P_CLIENT_MODE)
875 #define QDF_P2P_GO_MASK (1 << QDF_P2P_GO_MODE)
876 #define QDF_MONITOR_MASK (1 << QDF_MONITOR_MODE)
877 
878 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
879 
880 /**
881  * typedef tQDF_MCC_TO_SCC_SWITCH_MODE - MCC to SCC switch mode.
882  * @QDF_MCC_TO_SCC_SWITCH_DISABLE: Disable switch
883  * @QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION: Force switch without
884  * restart of SAP
885  * @QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL: Switch using fav channel(s)
886  * without SAP restart
887  * @QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION: Force switch
888  * without SAP restart. MCC is allowed only in below exception cases:
889  *	Exception Case-1: When STA is operating on DFS channel.
890  *	Exception Case-2: When STA is operating on LTE-CoEx channel.
891  *	Exception Case-3: When STA is operating on AP disabled channel.
892  * @QDF_MCC_TO_SCC_WITH_PREFERRED_BAND: Force SCC only in user preferred band.
893  * Allow MCC if STA is operating or comes up on other than user preferred band.
894  *
895  * @QDF_MCC_TO_SCC_SWITCH_MAX: max switch
896  */
897 typedef enum {
898 	QDF_MCC_TO_SCC_SWITCH_DISABLE = 0,
899 	QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION = 3,
900 	QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL,
901 	QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION,
902 	QDF_MCC_TO_SCC_WITH_PREFERRED_BAND,
903 	QDF_MCC_TO_SCC_SWITCH_MAX
904 } tQDF_MCC_TO_SCC_SWITCH_MODE;
905 #endif
906 
907 #if !defined(NULL)
908 #ifdef __cplusplus
909 #define NULL   0
910 #else
911 #define NULL   ((void *)0)
912 #endif
913 #endif
914 
915 /**
916  * qdf_bool_parse() - parse the given string as a boolean value
917  * @bool_str: the input boolean string to parse
918  * @out_bool: the output boolean value, populated on success
919  *
920  * 1, y, Y are mapped to true, 0, n, N are mapped to false.
921  * Leading/trailing whitespace is ignored.
922  *
923  * Return: QDF_STATUS
924  */
925 QDF_STATUS qdf_bool_parse(const char *bool_str, bool *out_bool);
926 
927 /**
928  * qdf_int32_parse() - parse the given string as a 32-bit signed integer
929  * @int_str: the input integer string to parse
930  * @out_int: the output integer value, populated on success
931  *
932  * Supports binary (0b), octal (0o), decimal (no prefix), and hexadecimal (0x)
933  * encodings via typical prefix notation. Leading/trailing whitespace is
934  * ignored.
935  *
936  * Return: QDF_STATUS
937  */
938 QDF_STATUS qdf_int32_parse(const char *int_str, int32_t *out_int);
939 
940 /**
941  * qdf_uint8_parse() - parse the given string as a 8-bit unsigned integer
942  * @int_str: the input integer string to parse
943  * @out_int: the output integer value, populated on success
944  *
945  * Supports binary (0b), octal (0o), decimal (no prefix), and hexadecimal (0x)
946  * encodings via typical prefix notation. Leading/trailing whitespace is
947  * ignored.
948  *
949  * Return: QDF_STATUS
950  */
951 QDF_STATUS qdf_uint8_parse(const char *int_str, uint8_t *out_int);
952 
953 /**
954  * qdf_uint16_parse() - parse the given string as a 16-bit unsigned integer
955  * @int_str: the input integer string to parse
956  * @out_int: the output integer value, populated on success
957  *
958  * Supports binary (0b), octal (0o), decimal (no prefix), and hexadecimal (0x)
959  * encodings via typical prefix notation. Leading/trailing whitespace is
960  * ignored.
961  *
962  * Return: QDF_STATUS
963  */
964 QDF_STATUS qdf_uint16_parse(const char *int_str, uint16_t *out_int);
965 
966 /**
967  * qdf_uint32_parse() - parse the given string as a 32-bit unsigned integer
968  * @int_str: the input integer string to parse
969  * @out_int: the output integer value, populated on success
970  *
971  * Supports binary (0b), octal (0o), decimal (no prefix), and hexadecimal (0x)
972  * encodings via typical prefix notation. Leading/trailing whitespace is
973  * ignored.
974  *
975  * Return: QDF_STATUS
976  */
977 QDF_STATUS qdf_uint32_parse(const char *int_str, uint32_t *out_int);
978 
979 /**
980  * qdf_int64_parse() - parse the given string as a 64-bit signed integer
981  * @int_str: the input integer string to parse
982  * @out_int: the output integer value, populated on success
983  *
984  * Supports binary (0b), octal (0o), decimal (no prefix), and hexadecimal (0x)
985  * encodings via typical prefix notation. Leading/trailing whitespace is
986  * ignored.
987  *
988  * Return: QDF_STATUS
989  */
990 QDF_STATUS qdf_int64_parse(const char *int_str, int64_t *out_int);
991 
992 /**
993  * qdf_uint64_parse() - parse the given string as a 64-bit unsigned integer
994  * @int_str: the input integer string to parse
995  * @out_int: the output integer value, populated on success
996  *
997  * Supports binary (0b), octal (0o), decimal (no prefix), and hexadecimal (0x)
998  * encodings via typical prefix notation. Leading/trailing whitespace is
999  * ignored.
1000  *
1001  * Return: QDF_STATUS
1002  */
1003 QDF_STATUS qdf_uint64_parse(const char *int_str, uint64_t *out_int);
1004 
1005 #define QDF_MAC_ADDR_SIZE 6
1006 
1007 /*
1008  * If the feature WLAN_TRACE_HIDE_MAC_ADDRESS is enabled,
1009  * then the requirement is to hide 4th and 5th octet of the
1010  * MAC address in the kernel logs and driver logs.
1011  *
1012  * Developers must use QDF_MAC_ADDR_FMT instead of "%pM",
1013  * as this macro helps avoid accidentally breaking the feature
1014  * WLAN_TRACE_HIDE_MAC_ADDRESS if enabled and code auditing
1015  * becomes easy.
1016  */
1017 
1018 #if defined(WLAN_TRACE_HIDE_MAC_ADDRESS)
1019 #define QDF_MAC_ADDR_FMT "%02x:%02x:%02x:**:**:%02x"
1020 
1021 /*
1022  * The input data type for QDF_MAC_ADDR_REF can be pointer or an array.
1023  * In case of array, compiler was throwing following warning
1024  * 'address of array will always evaluate as ‘true’
1025  * and if the pointer is NULL, zero is passed to the format specifier
1026  * which results in zero mac address (00:00:00:**:**:00)
1027  * For this reason, input data type is typecasted to (uintptr_t).
1028  */
1029 #define QDF_MAC_ADDR_REF(a) \
1030 	(((uintptr_t)NULL != (uintptr_t)(a)) ? (a)[0] : 0), \
1031 	(((uintptr_t)NULL != (uintptr_t)(a)) ? (a)[1] : 0), \
1032 	(((uintptr_t)NULL != (uintptr_t)(a)) ? (a)[2] : 0), \
1033 	(((uintptr_t)NULL != (uintptr_t)(a)) ? (a)[5] : 0)
1034 #else
1035 #define QDF_MAC_ADDR_FMT "%pM"
1036 #define QDF_MAC_ADDR_REF(a) (a)
1037 #endif /* WLAN_TRACE_HIDE_MAC_ADDRESS */
1038 
1039 #define QDF_SSID_FMT "%.*s"
1040 
1041 #if defined(WLAN_TRACE_HIDE_SSID)
1042 #define QDF_SSID_REF(_l, _s) 1, "*"
1043 #else
1044 #define QDF_SSID_REF(_l, _s) (_l), (_s)
1045 #endif /* WLAN_TRACE_HIDE_SSID */
1046 
1047 #define QDF_MAC_ADDR_BCAST_INIT { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }
1048 #define QDF_MAC_ADDR_ZERO_INIT { { 0, 0, 0, 0, 0, 0 } }
1049 
1050 /**
1051  * struct qdf_mac_addr - A MAC address
1052  * @bytes: the raw address bytes array
1053  */
1054 struct qdf_mac_addr {
1055 	uint8_t bytes[QDF_MAC_ADDR_SIZE];
1056 };
1057 
1058 /**
1059  * enum qdf_proto_subtype - subtype of packet
1060  * @QDF_PROTO_INVALID: invalid
1061  * @QDF_PROTO_EAPOL_M1: EAPOL 1/4
1062  * @QDF_PROTO_EAPOL_M2: EAPOL 2/4
1063  * @QDF_PROTO_EAPOL_M3: EAPOL 3/4
1064  * @QDF_PROTO_EAPOL_M4: EAPOL 4/4
1065  * @QDF_PROTO_DHCP_DISCOVER: discover
1066  * @QDF_PROTO_DHCP_REQUEST: request
1067  * @QDF_PROTO_DHCP_OFFER: offer
1068  * @QDF_PROTO_DHCP_ACK: ACK
1069  * @QDF_PROTO_DHCP_NACK: NACK
1070  * @QDF_PROTO_DHCP_RELEASE: release
1071  * @QDF_PROTO_DHCP_INFORM: inform
1072  * @QDF_PROTO_DHCP_DECLINE: decline
1073  * @QDF_PROTO_ARP_REQ: arp request
1074  * @QDF_PROTO_ARP_RES: arp response
1075  * @QDF_PROTO_ICMP_REQ: icmp request
1076  * @QDF_PROTO_ICMP_RES: icmp response
1077  * @QDF_PROTO_ICMPV6_REQ: icmpv6 request
1078  * @QDF_PROTO_ICMPV6_RES: icmpv6 response
1079  * @QDF_PROTO_ICMPV6_RS: icmpv6 rs packet
1080  * @QDF_PROTO_ICMPV6_RA: icmpv6 ra packet
1081  * @QDF_PROTO_ICMPV6_NS: icmpv6 ns packet
1082  * @QDF_PROTO_ICMPV6_NA: icmpv6 na packet
1083  * @QDF_PROTO_IPV4_UDP: ipv4 udp
1084  * @QDF_PROTO_IPV4_TCP: ipv4 tcp
1085  * @QDF_PROTO_IPV6_UDP: ipv6 udp
1086  * @QDF_PROTO_IPV6_TCP: ipv6 tcp
1087  * @QDF_PROTO_MGMT_ASSOC: assoc
1088  * @QDF_PROTO_MGMT_DISASSOC: disassoc
1089  * @QDF_PROTO_MGMT_AUTH: auth
1090  * @QDF_PROTO_MGMT_DEAUTH: deauth
1091  * @QDF_ROAM_SYNCH: roam synch indication from fw
1092  * @QDF_ROAM_COMPLETE: roam complete cmd to fw
1093  * @QDF_ROAM_EVENTID: roam eventid from fw
1094  * @QDF_PROTO_DNS_QUERY: dns query
1095  * @QDF_PROTO_DNS_RES: dns response
1096  * @QDF_PROTO_EAP_REQUEST: EAP Request
1097  * @QDF_PROTO_EAP_RESPONSE: EAP Response
1098  * @QDF_PROTO_EAP_SUCCESS: EAP Success
1099  * @QDF_PROTO_EAP_FAILURE: EAP Filure
1100  * @QDF_PROTO_EAP_INITIATE: EAP Initiate
1101  * @QDF_PROTO_EAP_FINISH: EAP Finish
1102  * @QDF_PROTO_EAPOL_START: EAPOL-Start message
1103  * @QDF_PROTO_EAPOL_LOGOFF: EAPOL Log Off message.
1104  * @QDF_PROTO_EAPOL_ASF: ASF Alert message
1105  * @QDF_PROTO_EAP_REQ_ID: EAP identify request
1106  * @QDF_PROTO_EAP_RSP_ID: EAP identify response
1107  * @QDF_PROTO_EAP_M1: EAP expanded type M1
1108  * @QDF_PROTO_EAP_M2: EAP expanded type M2
1109  * @QDF_PROTO_EAP_M3: EAP expanded type M3
1110  * @QDF_PROTO_EAP_M4: EAP expanded type M4
1111  * @QDF_PROTO_EAP_M5: EAP expanded type M5
1112  * @QDF_PROTO_EAP_M6: EAP expanded type M6
1113  * @QDF_PROTO_EAP_M7: EAP expanded type M7
1114  * @QDF_PROTO_EAP_M8: EAP expanded type M8
1115  * @QDF_PROTO_EAP_WSC_START: EAP expanded type WSC start
1116  * @QDF_PROTO_EAP_WSC_ACK: EAP expanded type WSC ACK
1117  * @QDF_PROTO_EAP_WSC_NACK: EAP expanded type WSC NACK
1118  * @QDF_PROTO_EAP_WSC_DONE: EAP expanded type WSC DONE
1119  * @QDF_PROTO_EAP_WSC_FRAG_ACK: EAP expanded type WSC frag ACK
1120  * @QDF_PROTO_SUBTYPE_MAX: subtype max
1121  */
1122 enum qdf_proto_subtype {
1123 	QDF_PROTO_INVALID,
1124 	QDF_PROTO_EAPOL_M1,
1125 	QDF_PROTO_EAPOL_M2,
1126 	QDF_PROTO_EAPOL_M3,
1127 	QDF_PROTO_EAPOL_M4,
1128 	QDF_PROTO_DHCP_DISCOVER,
1129 	QDF_PROTO_DHCP_REQUEST,
1130 	QDF_PROTO_DHCP_OFFER,
1131 	QDF_PROTO_DHCP_ACK,
1132 	QDF_PROTO_DHCP_NACK,
1133 	QDF_PROTO_DHCP_RELEASE,
1134 	QDF_PROTO_DHCP_INFORM,
1135 	QDF_PROTO_DHCP_DECLINE,
1136 	QDF_PROTO_ARP_REQ,
1137 	QDF_PROTO_ARP_RES,
1138 	QDF_PROTO_ICMP_REQ,
1139 	QDF_PROTO_ICMP_RES,
1140 	QDF_PROTO_ICMPV6_REQ,
1141 	QDF_PROTO_ICMPV6_RES,
1142 	QDF_PROTO_ICMPV6_RS,
1143 	QDF_PROTO_ICMPV6_RA,
1144 	QDF_PROTO_ICMPV6_NS,
1145 	QDF_PROTO_ICMPV6_NA,
1146 	QDF_PROTO_IPV4_UDP,
1147 	QDF_PROTO_IPV4_TCP,
1148 	QDF_PROTO_IPV6_UDP,
1149 	QDF_PROTO_IPV6_TCP,
1150 	QDF_PROTO_MGMT_ASSOC,
1151 	QDF_PROTO_MGMT_DISASSOC,
1152 	QDF_PROTO_MGMT_AUTH,
1153 	QDF_PROTO_MGMT_DEAUTH,
1154 	QDF_ROAM_SYNCH,
1155 	QDF_ROAM_COMPLETE,
1156 	QDF_ROAM_EVENTID,
1157 	QDF_PROTO_DNS_QUERY,
1158 	QDF_PROTO_DNS_RES,
1159 	QDF_PROTO_EAP_REQUEST,
1160 	QDF_PROTO_EAP_RESPONSE,
1161 	QDF_PROTO_EAP_SUCCESS,
1162 	QDF_PROTO_EAP_FAILURE,
1163 	QDF_PROTO_EAP_INITIATE,
1164 	QDF_PROTO_EAP_FINISH,
1165 	QDF_PROTO_EAPOL_START,
1166 	QDF_PROTO_EAPOL_LOGOFF,
1167 	QDF_PROTO_EAPOL_ASF,
1168 	QDF_PROTO_EAP_REQ_ID,
1169 	QDF_PROTO_EAP_RSP_ID,
1170 	QDF_PROTO_EAP_M1,
1171 	QDF_PROTO_EAP_M2,
1172 	QDF_PROTO_EAP_M3,
1173 	QDF_PROTO_EAP_M4,
1174 	QDF_PROTO_EAP_M5,
1175 	QDF_PROTO_EAP_M6,
1176 	QDF_PROTO_EAP_M7,
1177 	QDF_PROTO_EAP_M8,
1178 	QDF_PROTO_EAP_WSC_START,
1179 	QDF_PROTO_EAP_WSC_ACK,
1180 	QDF_PROTO_EAP_WSC_NACK,
1181 	QDF_PROTO_EAP_WSC_DONE,
1182 	QDF_PROTO_EAP_WSC_FRAG_ACK,
1183 	QDF_PROTO_SUBTYPE_MAX
1184 };
1185 
1186 /**
1187  * qdf_mac_parse() - parse the given string as a MAC address
1188  * @mac_str: the input MAC address string to parse
1189  * @out_addr: the output MAC address value, populated on success
1190  *
1191  * A MAC address is a set of 6, colon-delimited, hexadecimal encoded octets.
1192  *
1193  * E.g.
1194  *	00:00:00:00:00:00 (zero address)
1195  *	ff:ff:ff:ff:ff:ff (broadcast address)
1196  *	12:34:56:78:90:ab (an arbitrary address)
1197  *
1198  * This implementation also accepts MAC addresses without colons. Historically,
1199  * other delimiters and groupings have been used to represent MAC addresses, but
1200  * these are not supported here. Hexadecimal digits may be in either upper or
1201  * lower case.
1202  *
1203  * Return: QDF_STATUS
1204  */
1205 QDF_STATUS qdf_mac_parse(const char *mac_str, struct qdf_mac_addr *out_addr);
1206 
1207 #define QDF_IPV4_ADDR_SIZE 4
1208 #define QDF_IPV4_ADDR_STR "%d.%d.%d.%d"
1209 #define QDF_IPV4_ADDR_ARRAY(a) (a)[0], (a)[1], (a)[2], (a)[3]
1210 #define QDF_IPV4_ADDR_ZERO_INIT { { 0, 0, 0, 0 } }
1211 
1212 /**
1213  * struct qdf_ipv4_addr - An IPV4 address
1214  * @bytes: the raw address bytes array
1215  */
1216 struct qdf_ipv4_addr {
1217 	uint8_t bytes[QDF_IPV4_ADDR_SIZE];
1218 };
1219 
1220 /**
1221  * qdf_ipv4_parse() - parse the given string as an IPV4 address
1222  * @ipv4_str: the input IPV4 address string to parse
1223  * @out_addr: the output IPV4 address value, populated on success
1224  *
1225  * An IPV4 address is a set of 4, dot-delimited, decimal encoded octets.
1226  *
1227  * E.g.
1228  *	0.0.0.0 (wildcard address)
1229  *	127.0.0.1 (loopback address)
1230  *	255.255.255.255 (broadcast address)
1231  *	192.168.0.1 (an arbitrary address)
1232  *
1233  * Historically, non-decimal encodings have also been used to represent IPV4
1234  * addresses, but these are not supported here.
1235  *
1236  * Return: QDF_STATUS
1237  */
1238 QDF_STATUS qdf_ipv4_parse(const char *ipv4_str, struct qdf_ipv4_addr *out_addr);
1239 
1240 #define QDF_IPV6_ADDR_SIZE 16
1241 #define QDF_IPV6_ADDR_HEXTET_COUNT 8
1242 #define QDF_IPV6_ADDR_STR "%x:%x:%x:%x:%x:%x:%x:%x"
1243 #define QDF_IPV6_ADDR_ARRAY(a) \
1244 	((a)[0] << 8) + (a)[1], ((a)[2] << 8) + (a)[3], \
1245 	((a)[4] << 8) + (a)[5], ((a)[6] << 8) + (a)[7], \
1246 	((a)[8] << 8) + (a)[9], ((a)[10] << 8) + (a)[11], \
1247 	((a)[12] << 8) + (a)[13], ((a)[14] << 8) + (a)[15]
1248 #define QDF_IPV6_ADDR_ZERO_INIT \
1249 	{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
1250 
1251 /**
1252  * struct qdf_ipv6_addr - An IPV6 address
1253  * @bytes: the raw address bytes array
1254  */
1255 struct qdf_ipv6_addr {
1256 	uint8_t bytes[QDF_IPV6_ADDR_SIZE];
1257 };
1258 
1259 /**
1260  * qdf_ipv6_parse() - parse the given string as an IPV6 address
1261  * @ipv6_str: the input IPV6 address string to parse
1262  * @out_addr: the output IPV6 address value, populated on success
1263  *
1264  * A hextet is a pair of octets. An IPV6 address is a set of 8, colon-delimited,
1265  * hexadecimal encoded hextets. Each hextet may omit leading zeros. One or more
1266  * zero-hextets may be "compressed" using a pair of colons ("::"). Up to one
1267  * such zero-compression is allowed per address.
1268  *
1269  * E.g.
1270  *	0:0:0:0:0:0:0:0 (unspecified address)
1271  *	:: (also the unspecified address)
1272  *	0:0:0:0:0:0:0:1 (loopback address)
1273  *	::1 (also the loopback address)
1274  *	900a:ae7::6 (an arbitrary address)
1275  *	900a:ae7:0:0:0:0:0:6 (the same arbitrary address)
1276  *
1277  * Hexadecimal digits may be in either upper or lower case.
1278  *
1279  * Return: QDF_STATUS
1280  */
1281 QDF_STATUS qdf_ipv6_parse(const char *ipv6_str, struct qdf_ipv6_addr *out_addr);
1282 
1283 /**
1284  * qdf_int32_array_parse() - parse the given string as int32 array
1285  * @in_str: the input string to parse
1286  * @out_array: the output uint32 array, populated on success
1287  * @array_size: size of the array
1288  * @out_size: size of the populated array
1289  *
1290  * This API is called to convert string (each value separated by
1291  * a comma) into an uint32 array
1292  *
1293  * Return: QDF_STATUS
1294  */
1295 
1296 QDF_STATUS qdf_int32_array_parse(const char *in_str, int32_t *out_array,
1297 				 qdf_size_t array_size, qdf_size_t *out_size);
1298 
1299 /**
1300  * qdf_uint32_array_parse() - parse the given string as uint32 array
1301  * @in_str: the input string to parse
1302  * @out_array: the output uint32 array, populated on success
1303  * @array_size: size of the array
1304  * @out_size: size of the populated array
1305  *
1306  * This API is called to convert string (each value separated by
1307  * a comma) into an uint32 array
1308  *
1309  * Return: QDF_STATUS
1310  */
1311 
1312 QDF_STATUS qdf_uint32_array_parse(const char *in_str, uint32_t *out_array,
1313 				  qdf_size_t array_size, qdf_size_t *out_size);
1314 
1315 /**
1316  * qdf_uint16_array_parse() - parse the given string as uint16 array
1317  * @in_str: the input string to parse
1318  * @out_array: the output uint16 array, populated on success
1319  * @array_size: size of the array
1320  * @out_size: size of the populated array
1321  *
1322  * This API is called to convert string (each value separated by
1323  * a comma) into an uint16 array
1324  *
1325  * Return: QDF_STATUS
1326  */
1327 
1328 QDF_STATUS qdf_uint16_array_parse(const char *in_str, uint16_t *out_array,
1329 				  qdf_size_t array_size, qdf_size_t *out_size);
1330 
1331 /**
1332  * qdf_uint8_array_parse() - parse the given string as uint8 array
1333  * @in_str: the input string to parse
1334  * @out_array: the output uint8 array, populated on success
1335  * @array_size: size of the array
1336  * @out_size: size of the populated array
1337  *
1338  * This API is called to convert string (each byte separated by
1339  * a comma) into an u8 array
1340  *
1341  * Return: QDF_STATUS
1342  */
1343 QDF_STATUS qdf_uint8_array_parse(const char *in_str, uint8_t *out_array,
1344 				 qdf_size_t array_size, qdf_size_t *out_size);
1345 
1346 #define QDF_BCAST_MAC_ADDR (0xFF)
1347 #define QDF_MCAST_IPV4_MAC_ADDR (0x01)
1348 #define QDF_MCAST_IPV6_MAC_ADDR (0x33)
1349 
1350 /**
1351  * struct qdf_tso_frag_t - fragments of a single TCP segment
1352  * @paddr: physical address
1353  * @length: length of the buffer
1354  * @vaddr: virtual address
1355  *
1356  * This structure holds the fragments of a single TCP segment of a
1357  * given jumbo TSO network buffer
1358  */
1359 struct qdf_tso_frag_t {
1360 	uint16_t length;
1361 	unsigned char *vaddr;
1362 	qdf_dma_addr_t paddr;
1363 };
1364 
1365 #define FRAG_NUM_MAX 6
1366 #define TSO_SEG_MAGIC_COOKIE 0x1EED
1367 
1368 /**
1369  * struct qdf_tso_flags_t - TSO specific flags
1370  * @tso_enable: Enable transmit segmentation offload
1371  * @reserved_0a: rsvd
1372  * @fin: input bit
1373  * @syn: syn
1374  * @rst: reset
1375  * @psh: push
1376  * @ack: acknowledge
1377  * @urg: urg
1378  * @ece: ece
1379  * @cwr: cwr
1380  * @ns: ns
1381  * @reserved_0b: rsvd
1382  * @ipv4_checksum_en: Enable/Disable ipv4 checksum
1383  * @udp_ipv4_checksum_en: Enable/Disable udp ipv4 checksum
1384  * @udp_ipv6_checksum_en: Enable/Disable udp ipv6 checksum
1385  * @tcp_ipv4_checksum_en: Enable/Disable tcp ipv4 checksum
1386  * @tcp_ipv6_checksum_en: Enable/Disable tcp ipv6 checksum
1387  * @partial_checksum_en: Enable/Disable partial checksum
1388  * @reserved_3a: rsvd
1389  * @checksum_offset: checksum offset
1390  * @reserved_4a: rsvd
1391  * @payload_start_offset: payload start offset
1392  * @reserved_4b: rsvd
1393  * @payload_end_offset: payload end offset
1394  * @reserved_5: rsvd
1395  * @tcp_flags_mask: Tcp_flag is inserted into the header based
1396  * on the mask
1397  * @l2_len: L2 length for the msdu
1398  * @ip_len: IP length for the msdu
1399  * @tcp_seq_num: TCP sequence number
1400  * @ip_id: IP identification number
1401  *
1402  * This structure holds the TSO specific flags extracted from the TSO network
1403  * buffer for a given TCP segment
1404  */
1405 struct qdf_tso_flags_t {
1406 	uint32_t tso_enable:1,
1407 			reserved_0a:6,
1408 			fin:1,
1409 			syn:1,
1410 			rst:1,
1411 			psh:1,
1412 			ack:1,
1413 			urg:1,
1414 			ece:1,
1415 			cwr:1,
1416 			ns:1,
1417 			tcp_flags_mask:9,
1418 			reserved_0b:7;
1419 
1420 	uint32_t l2_len:16,
1421 			ip_len:16;
1422 
1423 	uint32_t tcp_seq_num;
1424 
1425 	uint32_t ip_id:16,
1426 			ipv4_checksum_en:1,
1427 			udp_ipv4_checksum_en:1,
1428 			udp_ipv6_checksum_en:1,
1429 			tcp_ipv4_checksum_en:1,
1430 			tcp_ipv6_checksum_en:1,
1431 			partial_checksum_en:1,
1432 			reserved_3a:10;
1433 
1434 	uint32_t checksum_offset:14,
1435 			reserved_4a:2,
1436 			payload_start_offset:14,
1437 			reserved_4b:2;
1438 
1439 	uint32_t payload_end_offset:14,
1440 			reserved_5:18;
1441 };
1442 
1443 /**
1444  * struct qdf_tso_seg_t - single TSO segment
1445  * @tso_flags: TSO flags
1446  * @num_frags: number of fragments
1447  * @total_len: total length of the packet
1448  * @tso_frags: array holding the fragments
1449  *
1450  * This structure holds the information of a single TSO segment of a jumbo
1451  * TSO network buffer
1452  */
1453 struct qdf_tso_seg_t {
1454 	struct qdf_tso_flags_t tso_flags;
1455 	uint32_t num_frags;
1456 	uint32_t total_len;
1457 	struct qdf_tso_frag_t tso_frags[FRAG_NUM_MAX];
1458 };
1459 
1460 /**
1461  * enum tsoseg_dbg_caller_e: TSO seg elem action caller locations
1462  * goes into dbg.history below.
1463  * Needed to be defined outside of the feature so that
1464  * callers can be coded without ifdefs (even if they get
1465  * resolved to nothing)
1466  * @TSOSEG_LOC_UNDEFINED: undefined
1467  * @TSOSEG_LOC_INIT1: init1
1468  * @TSOSEG_LOC_INIT2: inti2
1469  * @TSOSEG_LOC_FREE: free
1470  * @TSOSEG_LOC_ALLOC: alloc
1471  * @TSOSEG_LOC_DEINIT: deinit
1472  * @TSOSEG_LOC_GETINFO: get info
1473  * @TSOSEG_LOC_FILLHTTSEG: fill HTT segment
1474  * @TSOSEG_LOC_FILLCMNSEG: fill CMN segment
1475  * @TSOSEG_LOC_PREPARETSO: prepare TSO
1476  * @TSOSEG_LOC_TXPREPLLFAST: tx prep LL fast
1477  * @TSOSEG_LOC_UNMAPTSO: unmap TSO
1478  * @TSOSEG_LOC_UNMAPLAST: unmap last
1479  * @TSOSEG_LOC_FORCE_FREE: force free
1480  */
1481 enum tsoseg_dbg_caller_e {
1482 	TSOSEG_LOC_UNDEFINED,
1483 	TSOSEG_LOC_INIT1,
1484 	TSOSEG_LOC_INIT2,
1485 	TSOSEG_LOC_FREE,
1486 	TSOSEG_LOC_ALLOC,
1487 	TSOSEG_LOC_DEINIT,
1488 	TSOSEG_LOC_GETINFO,
1489 	TSOSEG_LOC_FILLHTTSEG,
1490 	TSOSEG_LOC_FILLCMNSEG,
1491 	TSOSEG_LOC_PREPARETSO,
1492 	TSOSEG_LOC_TXPREPLLFAST,
1493 	TSOSEG_LOC_UNMAPTSO,
1494 	TSOSEG_LOC_UNMAPLAST,
1495 	TSOSEG_LOC_FORCE_FREE,
1496 };
1497 
1498 #ifdef TSOSEG_DEBUG
1499 /*
1500  * WARNING: Don't change the history size without changing the wrap
1501  *  code in qdf_tso_seg_dbg_record function
1502  */
1503 #define MAX_TSO_SEG_ACT_HISTORY 16
1504 struct qdf_tso_seg_dbg_history_t {
1505 	uint64_t ts;
1506 	short    id;
1507 };
1508 struct qdf_tso_seg_dbg_t {
1509 	void    *txdesc;  /* owner - (ol_txrx_tx_desc_t *) */
1510 	qdf_atomic_t cur; /* index of last valid entry */
1511 	struct qdf_tso_seg_dbg_history_t h[MAX_TSO_SEG_ACT_HISTORY];
1512 };
1513 #endif /* TSOSEG_DEBUG */
1514 
1515 /**
1516  * struct qdf_tso_seg_elem_t - tso segment element
1517  * @next: pointer to the next segment
1518  * @seg: instance of segment
1519  * @cookie:
1520  * @on_freelist:
1521  * @sent_to_target:
1522  * @force_free:
1523  * @dbg: debug struct
1524  */
1525 struct qdf_tso_seg_elem_t {
1526 	struct qdf_tso_seg_elem_t *next;
1527 	struct qdf_tso_seg_t seg;
1528 	uint32_t cookie:13,
1529 		on_freelist:1,
1530 		sent_to_target:1,
1531 		force_free:1;
1532 #ifdef TSOSEG_DEBUG
1533 	struct qdf_tso_seg_dbg_t dbg;
1534 #endif /* TSOSEG_DEBUG */
1535 };
1536 
1537 /**
1538  * struct qdf_tso_num_seg_t - single element to count for num of seg
1539  * @tso_cmn_num_seg: num of seg in a jumbo skb
1540  *
1541  * This structure holds the information of num of segments of a jumbo
1542  * TSO network buffer.
1543  */
1544 struct qdf_tso_num_seg_t {
1545 	uint32_t tso_cmn_num_seg;
1546 };
1547 
1548 /**
1549  * struct qdf_tso_num_seg_elem_t - num of tso segment element for jumbo skb
1550  * @next: pointer to the next segment
1551  * @num_seg: instance of num of seg
1552  */
1553 struct qdf_tso_num_seg_elem_t {
1554 	struct qdf_tso_num_seg_elem_t *next;
1555 	struct qdf_tso_num_seg_t num_seg;
1556 };
1557 
1558 /**
1559  * struct qdf_tso_info_t - TSO information extracted
1560  * @is_tso: is this is a TSO frame
1561  * @num_segs: number of segments
1562  * @tso_seg_list: list of TSO segments for this jumbo packet
1563  * @curr_seg: segment that is currently being processed
1564  * @tso_num_seg_list: num of tso seg for this jumbo packet
1565  * @msdu_stats_idx: msdu index for tso stats
1566  *
1567  * This structure holds the TSO information extracted after parsing the TSO
1568  * jumbo network buffer. It contains a chain of the TSO segments belonging to
1569  * the jumbo packet
1570  */
1571 struct qdf_tso_info_t {
1572 	uint8_t is_tso;
1573 	uint32_t num_segs;
1574 	struct qdf_tso_seg_elem_t *tso_seg_list;
1575 	struct qdf_tso_seg_elem_t *curr_seg;
1576 	struct qdf_tso_num_seg_elem_t *tso_num_seg_list;
1577 	uint32_t msdu_stats_idx;
1578 };
1579 
1580 /**
1581  * enum qdf_suspend_type - type of suspend
1582  * @QDF_SYSTEM_SUSPEND: System suspend triggered wlan suspend
1583  * @QDF_RUNTIME_SUSPEND: Runtime pm inactivity timer triggered wlan suspend
1584  * @QDF_UNIT_TEST_WOW_SUSPEND: WoW unit test suspend
1585  */
1586 enum qdf_suspend_type {
1587 	QDF_SYSTEM_SUSPEND,
1588 	QDF_RUNTIME_SUSPEND,
1589 	QDF_UNIT_TEST_WOW_SUSPEND
1590 };
1591 
1592 /**
1593  * enum qdf_hang_reason - host hang/ssr reason
1594  * @QDF_REASON_UNSPECIFIED: Unspecified reason
1595  * @QDF_RX_HASH_NO_ENTRY_FOUND: No Map for the MAC entry for the received frame
1596  * @QDF_PEER_DELETION_TIMEDOUT: peer deletion timeout happened
1597  * @QDF_PEER_UNMAP_TIMEDOUT: peer unmap timeout
1598  * @QDF_SCAN_REQ_EXPIRED: Scan request timed out
1599  * @QDF_SCAN_ATTEMPT_FAILURES: Consecutive Scan attempt failures
1600  * @QDF_GET_MSG_BUFF_FAILURE: Unable to get the message buffer
1601  * @QDF_ACTIVE_LIST_TIMEOUT: Current command processing is timedout
1602  * @QDF_SUSPEND_TIMEOUT: Timeout for an ACK from FW for suspend request
1603  * @QDF_RESUME_TIMEOUT: Timeout for an ACK from FW for resume request
1604  * @QDF_WMI_EXCEED_MAX_PENDING_CMDS: wmi exceed max pending cmd
1605  * @QDF_AP_STA_CONNECT_REQ_TIMEOUT: SAP peer assoc timeout from FW
1606  * @QDF_STA_AP_CONNECT_REQ_TIMEOUT: STA peer assoc timeout from FW
1607  * @QDF_MAC_HW_MODE_CHANGE_TIMEOUT: HW mode change timeout from FW
1608  * @QDF_MAC_HW_MODE_CONFIG_TIMEOUT: HW dual mac cfg timeout from FW
1609  * @QDF_VDEV_START_RESPONSE_TIMED_OUT: Start response timeout from FW
1610  * @QDF_VDEV_RESTART_RESPONSE_TIMED_OUT: Restart response timeout from FW
1611  * @QDF_VDEV_STOP_RESPONSE_TIMED_OUT: Stop response timeout from FW
1612  * @QDF_VDEV_DELETE_RESPONSE_TIMED_OUT: Delete response timeout from FW
1613  * @QDF_VDEV_PEER_DELETE_ALL_RESPONSE_TIMED_OUT: Peer delete all resp timeout
1614  * @QDF_WMI_BUF_SEQUENCE_MISMATCH: WMI Tx completion buffer sequence mismatch
1615  * @QDF_HAL_REG_WRITE_FAILURE: HAL register writing failures
1616  * @QDF_SUSPEND_NO_CREDIT: host lack of credit after suspend
1617  * @QCA_HANG_BUS_FAILURE: Bus failure
1618  * @QDF_TASKLET_CREDIT_LATENCY_DETECT: tasklet or credit latency happened
1619  * @QDF_RX_REG_PKT_ROUTE_ERR: MSDU buf errors exceed thresh in REO err path
1620  * @QDF_VDEV_SM_OUT_OF_SYNC: Vdev SM is out of sync and connect req received
1621  * when already connected
1622  * @QDF_STATS_REQ_TIMEDOUT: Stats request timedout
1623  * @QDF_TX_DESC_LEAK: tx desc leak
1624  * @QDF_HOST_WAKEUP_REASON_PAGEFAULT: Host wakeup because of pagefault
1625  * @QDF_SCHED_TIMEOUT: Scheduler watchdog timedout
1626  * @QDF_SELF_PEER_DEL_FAILED: Failed to send self peer deletion cmd to fw
1627  * @QDF_DEL_SELF_STA_FAILED: Received del self sta without del bss
1628  * @QDF_FLUSH_LOGS : Recovery needed when sending flush completion to userspace
1629  * @QDF_VDEV_MAC_ADDR_UPDATE_RESPONSE_TIMED_OUT: VDEV MAC address update
1630  * request for Link switch timedout.
1631  * @QDF_MGMT_RX_REO_INCONSISTENT_SNAPSHOT: Inconsistent management Rx reorder
1632  * snapshots
1633  * @QDF_MGMT_RX_REO_OUT_OF_ORDER_PKT: Reception of management packet with out
1634  * of order packet counter values
1635  * @QDF_MGMT_RX_REO_ZERO_DURATION_PKT: Reception of management packet with zero
1636  * packet duration
1637  * @QDF_VDEV_ACTIVE_SER_CONNECT_TIMEOUT: Active connect cmd in serialization
1638  * timed out.
1639  * @QDF_VDEV_ACTIVE_SER_DISCONNECT_TIMEOUT: Active disconnect cmd in
1640  * serialization timed out.
1641  * @QDF_VDEV_ACTIVE_SER_REASSOC_TIMEOUT:  Active reassoc cmd in serialization
1642  * timed out.
1643  * @QDF_VDEV_ACTIVE_SER_LINK_SWITCH_TIMEOUT: Active link switch cmd in
1644  * serialization timed out.
1645  * @QDF_ENABLE_IRQ_FAILURE: Failed to enable IRQs
1646  */
1647 enum qdf_hang_reason {
1648 	QDF_REASON_UNSPECIFIED,
1649 	QDF_RX_HASH_NO_ENTRY_FOUND,
1650 	QDF_PEER_DELETION_TIMEDOUT,
1651 	QDF_PEER_UNMAP_TIMEDOUT,
1652 	QDF_SCAN_REQ_EXPIRED,
1653 	QDF_SCAN_ATTEMPT_FAILURES,
1654 	QDF_GET_MSG_BUFF_FAILURE,
1655 	QDF_ACTIVE_LIST_TIMEOUT,
1656 	QDF_SUSPEND_TIMEOUT,
1657 	QDF_RESUME_TIMEOUT,
1658 	QDF_WMI_EXCEED_MAX_PENDING_CMDS,
1659 	QDF_AP_STA_CONNECT_REQ_TIMEOUT,
1660 	QDF_STA_AP_CONNECT_REQ_TIMEOUT,
1661 	QDF_MAC_HW_MODE_CHANGE_TIMEOUT,
1662 	QDF_MAC_HW_MODE_CONFIG_TIMEOUT,
1663 	QDF_VDEV_START_RESPONSE_TIMED_OUT,
1664 	QDF_VDEV_RESTART_RESPONSE_TIMED_OUT,
1665 	QDF_VDEV_STOP_RESPONSE_TIMED_OUT,
1666 	QDF_VDEV_DELETE_RESPONSE_TIMED_OUT,
1667 	QDF_VDEV_PEER_DELETE_ALL_RESPONSE_TIMED_OUT,
1668 	QDF_WMI_BUF_SEQUENCE_MISMATCH,
1669 	QDF_HAL_REG_WRITE_FAILURE,
1670 	QDF_SUSPEND_NO_CREDIT,
1671 	QCA_HANG_BUS_FAILURE,
1672 	QDF_TASKLET_CREDIT_LATENCY_DETECT,
1673 	QDF_RX_REG_PKT_ROUTE_ERR,
1674 	QDF_VDEV_SM_OUT_OF_SYNC,
1675 	QDF_STATS_REQ_TIMEDOUT,
1676 	QDF_TX_DESC_LEAK,
1677 	QDF_HOST_WAKEUP_REASON_PAGEFAULT,
1678 	QDF_SCHED_TIMEOUT,
1679 	QDF_SELF_PEER_DEL_FAILED,
1680 	QDF_DEL_SELF_STA_FAILED,
1681 	QDF_FLUSH_LOGS,
1682 	QDF_VDEV_MAC_ADDR_UPDATE_RESPONSE_TIMED_OUT,
1683 	QDF_MGMT_RX_REO_INCONSISTENT_SNAPSHOT,
1684 	QDF_MGMT_RX_REO_OUT_OF_ORDER_PKT,
1685 	QDF_MGMT_RX_REO_ZERO_DURATION_PKT,
1686 	QDF_VDEV_ACTIVE_SER_CONNECT_TIMEOUT,
1687 	QDF_VDEV_ACTIVE_SER_DISCONNECT_TIMEOUT,
1688 	QDF_VDEV_ACTIVE_SER_REASSOC_TIMEOUT,
1689 	QDF_VDEV_ACTIVE_SER_LINK_SWITCH_TIMEOUT,
1690 	QDF_ENABLE_IRQ_FAILURE,
1691 };
1692 
1693 /**
1694  * enum qdf_stats_verbosity_level - Verbosity levels for stats
1695  * for which want to have different levels
1696  * @QDF_STATS_VERBOSITY_LEVEL_LOW: Stats verbosity level low
1697  * @QDF_STATS_VERBOSITY_LEVEL_HIGH: Stats verbosity level high
1698  */
1699 enum qdf_stats_verbosity_level {
1700 	QDF_STATS_VERBOSITY_LEVEL_LOW,
1701 	QDF_STATS_VERBOSITY_LEVEL_HIGH
1702 };
1703 
1704 /**
1705  * enum qdf_clock_id - The clock IDs of the various system clocks
1706  * @QDF_CLOCK_REALTIME: Clock is close to current time of day
1707  * @QDF_CLOCK_MONOTONIC: Clock is absolute elapsed time
1708  */
1709 enum qdf_clock_id {
1710 	QDF_CLOCK_REALTIME = __QDF_CLOCK_REALTIME,
1711 	QDF_CLOCK_MONOTONIC = __QDF_CLOCK_MONOTONIC
1712 };
1713 
1714 /**
1715  * enum qdf_hrtimer_mode - Mode arguments of qdf_hrtimer_data_t
1716  * related functions
1717  * @QDF_HRTIMER_MODE_ABS: Time value is absolute
1718  * @QDF_HRTIMER_MODE_REL: Time value is relative to now
1719  * @QDF_HRTIMER_MODE_PINNED: Timer is bound to CPU
1720  */
1721 enum qdf_hrtimer_mode {
1722 	QDF_HRTIMER_MODE_ABS = __QDF_HRTIMER_MODE_ABS,
1723 	QDF_HRTIMER_MODE_REL = __QDF_HRTIMER_MODE_REL,
1724 	QDF_HRTIMER_MODE_PINNED =  __QDF_HRTIMER_MODE_PINNED,
1725 };
1726 
1727 /**
1728  * enum qdf_hrtimer_restart_status - Return values for the
1729  * qdf_hrtimer_data_t callback function
1730  * @QDF_HRTIMER_NORESTART: Timer is not restarted
1731  * @QDF_HRTIMER_RESTART: Timer must be restarted
1732  */
1733 enum qdf_hrtimer_restart_status {
1734 	QDF_HRTIMER_NORESTART = __QDF_HRTIMER_NORESTART,
1735 	QDF_HRTIMER_RESTART = __QDF_HRTIMER_RESTART,
1736 };
1737 
1738 /**
1739  * enum qdf_context_mode - Values for the
1740  * hrtimer context
1741  * @QDF_CONTEXT_HARDWARE: Runs in hw interrupt context
1742  * @QDF_CONTEXT_TASKLET: Runs in tasklet context
1743  */
1744 enum qdf_context_mode {
1745 	QDF_CONTEXT_HARDWARE = 0,
1746 	QDF_CONTEXT_TASKLET = 1,
1747 };
1748 
1749 /**
1750  * enum qdf_dp_tx_rx_status - TX/RX packet status
1751  * @QDF_TX_RX_STATUS_INVALID: default invalid status
1752  * @QDF_TX_RX_STATUS_OK: successfully sent + acked
1753  * @QDF_TX_RX_STATUS_FW_DISCARD: queued but not sent over air
1754  * @QDF_TX_RX_STATUS_NO_ACK: packet sent but no ack received
1755  * @QDF_TX_RX_STATUS_DROP: packet dropped due to congestion
1756  * @QDF_TX_RX_STATUS_DOWNLOAD_SUCC: packet delivered to target
1757  * @QDF_TX_RX_STATUS_DEFAULT: default status
1758  * @QDF_TX_RX_STATUS_MAX:
1759  */
1760 enum qdf_dp_tx_rx_status {
1761 	QDF_TX_RX_STATUS_INVALID,
1762 	QDF_TX_RX_STATUS_OK,
1763 	QDF_TX_RX_STATUS_FW_DISCARD,
1764 	QDF_TX_RX_STATUS_NO_ACK,
1765 	QDF_TX_RX_STATUS_DROP,
1766 	QDF_TX_RX_STATUS_DOWNLOAD_SUCC,
1767 	QDF_TX_RX_STATUS_DEFAULT,
1768 	QDF_TX_RX_STATUS_MAX
1769 };
1770 
1771 /**
1772  * enum qdf_pkt_type - TX/RX packet type
1773  * @QDF_TX_MGMT_PKT: Tx Management Packet
1774  * @QDF_TX_DATA_PKT: Tx data Packet
1775  * @QDF_RX_MGMT_PKT: Rx Management Packet
1776  * @QDF_RX_DATA_PKT: Rx data Packet
1777  * @QDF_INVALID_PKT: Invalid Packet type
1778  */
1779 enum qdf_pkt_type {
1780 	QDF_TX_MGMT_PKT,
1781 	QDF_TX_DATA_PKT,
1782 	QDF_RX_MGMT_PKT,
1783 	QDF_RX_DATA_PKT,
1784 	QDF_INVALID_PKT
1785 };
1786 
1787 /**
1788  * enum qdf_dp_a_status - A_STATUS
1789  * @QDF_A_STATUS_ERROR: Generic error return
1790  * @QDF_A_STATUS_OK: success
1791  */
1792 enum qdf_dp_a_status {
1793 	QDF_A_STATUS_ERROR = -1,
1794 	QDF_A_STATUS_OK,
1795 };
1796 
1797 /**
1798  * enum qdf_iommu_attr- qdf iommu domain attribute
1799  * @QDF_DOMAIN_ATTR_GEOMETRY: Domain attribute geometry
1800  * @QDF_DOMAIN_ATTR_PAGING: Domain attribute paging
1801  * @QDF_DOMAIN_ATTR_WINDOWS: Domain attribute windows
1802  * @QDF_DOMAIN_ATTR_FSL_PAMU_STASH: Domain attribute fsl pamu stash
1803  * @QDF_DOMAIN_ATTR_FSL_PAMU_ENABLE: Domain attribute fsl pamu enable
1804  * @QDF_DOMAIN_ATTR_FSL_PAMUV1: Domain attribute fsl pamu v1
1805  * @QDF_DOMAIN_ATTR_NESTING: Domain attribute Nesting
1806  * @QDF_DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE: Domain attribute dma use flush queue
1807  * @QDF_DOMAIN_ATTR_CONTEXT_BANK: Domain attribute context bank
1808  * @QDF_DOMAIN_ATTR_NON_FATAL_FAULTS: Domain attribute non fatal faults
1809  * @QDF_DOMAIN_ATTR_S1_BYPASS: Domain attribute S1 bypass
1810  * @QDF_DOMAIN_ATTR_ATOMIC: Domain attribute atomic
1811  * @QDF_DOMAIN_ATTR_SECURE_VMID: Domain attribute secure cmid
1812  * @QDF_DOMAIN_ATTR_FAST: Domain attribute fast
1813  * @QDF_DOMAIN_ATTR_PGTBL_INFO: Domain attribute pgtbl info
1814  * @QDF_DOMAIN_ATTR_USE_UPSTREAM_HINT: Domain attribute use upstream hint
1815  * @QDF_DOMAIN_ATTR_EARLY_MAP: Domain attribute early map
1816  * @QDF_DOMAIN_ATTR_PAGE_TABLE_IS_COHERENT: Domain attribute page table
1817  * is coherrent
1818  * @QDF_DOMAIN_ATTR_PAGE_TABLE_FORCE_COHERENT: Domain attribute page table
1819  * force coherrent
1820  * @QDF_DOMAIN_ATTR_USE_LLC_NWA: Domain attribute use llc nwa
1821  * @QDF_DOMAIN_ATTR_SPLIT_TABLES: Domain attribute split tables
1822  * @QDF_DOMAIN_ATTR_FAULT_MODEL_NO_CFRE: Domain attribute fault model no cfre
1823  * @QDF_DOMAIN_ATTR_FAULT_MODEL_NO_STALL: Domain attribute fault model no stall
1824  * @QDF_DOMAIN_ATTR_FAULT_MODEL_HUPCF: Domain attribute fault model hupcf
1825  * @QDF_DOMAIN_ATTR_MAX: Domain attribute max
1826  */
1827 enum qdf_iommu_attr {
1828 	QDF_DOMAIN_ATTR_GEOMETRY,
1829 	QDF_DOMAIN_ATTR_PAGING,
1830 	QDF_DOMAIN_ATTR_WINDOWS,
1831 	QDF_DOMAIN_ATTR_FSL_PAMU_STASH,
1832 	QDF_DOMAIN_ATTR_FSL_PAMU_ENABLE,
1833 	QDF_DOMAIN_ATTR_FSL_PAMUV1,
1834 	QDF_DOMAIN_ATTR_NESTING,
1835 	QDF_DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE,
1836 	QDF_DOMAIN_ATTR_CONTEXT_BANK,
1837 	QDF_DOMAIN_ATTR_NON_FATAL_FAULTS,
1838 	QDF_DOMAIN_ATTR_S1_BYPASS,
1839 	QDF_DOMAIN_ATTR_ATOMIC,
1840 	QDF_DOMAIN_ATTR_SECURE_VMID,
1841 	QDF_DOMAIN_ATTR_FAST,
1842 	QDF_DOMAIN_ATTR_PGTBL_INFO,
1843 	QDF_DOMAIN_ATTR_USE_UPSTREAM_HINT,
1844 	QDF_DOMAIN_ATTR_EARLY_MAP,
1845 	QDF_DOMAIN_ATTR_PAGE_TABLE_IS_COHERENT,
1846 	QDF_DOMAIN_ATTR_PAGE_TABLE_FORCE_COHERENT,
1847 	QDF_DOMAIN_ATTR_USE_LLC_NWA,
1848 	QDF_DOMAIN_ATTR_SPLIT_TABLES,
1849 	QDF_DOMAIN_ATTR_FAULT_MODEL_NO_CFRE,
1850 	QDF_DOMAIN_ATTR_FAULT_MODEL_NO_STALL,
1851 	QDF_DOMAIN_ATTR_FAULT_MODEL_HUPCF,
1852 	QDF_DOMAIN_ATTR_MAX,
1853 };
1854 
1855 /**
1856  * enum qdf_dp_desc_type - source type for multiple pages allocation
1857  * @QDF_DP_TX_DESC_TYPE: DP SW TX descriptor
1858  * @QDF_DP_TX_SPCL_DESC_TYPE: DP SW TX special descriptor
1859  * @QDF_DP_TX_PPEDS_DESC_TYPE: DP PPE-DS Tx descriptor
1860  * @QDF_DP_TX_EXT_DESC_TYPE: DP TX msdu extension descriptor
1861  * @QDF_DP_TX_EXT_DESC_LINK_TYPE: DP link descriptor for msdu ext_desc
1862  * @QDF_DP_TX_TSO_DESC_TYPE: DP TX TSO descriptor
1863  * @QDF_DP_TX_TSO_NUM_SEG_TYPE: DP TX number of segments
1864  * @QDF_DP_RX_DESC_BUF_TYPE: DP RX SW descriptor
1865  * @QDF_DP_RX_DESC_STATUS_TYPE: DP RX SW descriptor for monitor status
1866  * @QDF_DP_HW_LINK_DESC_TYPE: DP HW link descriptor
1867  * @QDF_DP_HW_CC_SPT_PAGE_TYPE: DP pages for HW CC secondary page table
1868  * @QDF_DP_TX_TCL_DESC_TYPE: DP TCL descriptor
1869  * @QDF_DP_TX_DIRECT_LINK_CE_BUF_TYPE: DP tx direct link CE source ring buf
1870  *  pages
1871  * @QDF_DP_TX_DIRECT_LINK_BUF_TYPE: DP tx direct link buffer pages
1872  * @QDF_DP_RX_DIRECT_LINK_CE_BUF_TYPE: DP RX direct link CE dest ring buf pages
1873  * @QDF_DP_DESC_TYPE_MAX: DP max desc type
1874  */
1875 enum qdf_dp_desc_type {
1876 	QDF_DP_TX_DESC_TYPE,
1877 	QDF_DP_TX_SPCL_DESC_TYPE,
1878 	QDF_DP_TX_PPEDS_DESC_TYPE,
1879 	QDF_DP_TX_EXT_DESC_TYPE,
1880 	QDF_DP_TX_EXT_DESC_LINK_TYPE,
1881 	QDF_DP_TX_TSO_DESC_TYPE,
1882 	QDF_DP_TX_TSO_NUM_SEG_TYPE,
1883 	QDF_DP_RX_DESC_BUF_TYPE,
1884 	QDF_DP_RX_DESC_STATUS_TYPE,
1885 	QDF_DP_HW_LINK_DESC_TYPE,
1886 	QDF_DP_HW_CC_SPT_PAGE_TYPE,
1887 	QDF_DP_TX_TCL_DESC_TYPE,
1888 #ifdef FEATURE_DIRECT_LINK
1889 	QDF_DP_TX_DIRECT_LINK_CE_BUF_TYPE,
1890 	QDF_DP_TX_DIRECT_LINK_BUF_TYPE,
1891 	QDF_DP_RX_DIRECT_LINK_CE_BUF_TYPE,
1892 #endif
1893 	QDF_DP_DESC_TYPE_MAX
1894 };
1895 #endif /* __QDF_TYPES_H */
1896