xref: /wlan-dirver/qca-wifi-host-cmn/qdf/inc/qdf_types.h (revision 3149adf58a329e17232a4c0e58d460d025edd55a)
1 /*
2  * Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
3  *
4  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5  *
6  *
7  * Permission to use, copy, modify, and/or distribute this software for
8  * any purpose with or without fee is hereby granted, provided that the
9  * above copyright notice and this permission notice appear in all
10  * copies.
11  *
12  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19  * PERFORMANCE OF THIS SOFTWARE.
20  */
21 
22 /*
23  * This file was originally distributed by Qualcomm Atheros, Inc.
24  * under proprietary terms before Copyright ownership was assigned
25  * to the Linux Foundation.
26  */
27 
28 /**
29  * DOC: qdf_types.h
30  * QCA driver framework (QDF) basic type definitions
31  */
32 
33 #if !defined(__QDF_TYPES_H)
34 #define __QDF_TYPES_H
35 
36 #ifndef CONFIG_MCL
37 #if !defined(__printf)
38 #define __printf(a, b)
39 #endif
40 #endif
41 
42 
43 /* Include Files */
44 #include <i_qdf_types.h>
45 #include <stdarg.h>
46 
47 /* Preprocessor definitions and constants */
48 #define QDF_MAX_SGLIST 4
49 
50 /**
51  * struct qdf_sglist - scatter-gather list
52  * @nsegs: total number of segments
53  * struct __sg_segs - scatter-gather segment list
54  * @vaddr: Virtual address of the segment
55  * @len: Length of the segment
56  */
57 typedef struct qdf_sglist {
58 	uint32_t nsegs;
59 	struct __sg_segs {
60 		uint8_t  *vaddr;
61 		uint32_t len;
62 	} sg_segs[QDF_MAX_SGLIST];
63 } qdf_sglist_t;
64 
65 #define QDF_MAX_SCATTER __QDF_MAX_SCATTER
66 
67 /**
68  * QDF_SWAP_U16 - swap input u16 value
69  * @_x: variable to swap
70  */
71 #define QDF_SWAP_U16(_x) \
72 	((((_x) << 8) & 0xFF00) | (((_x) >> 8) & 0x00FF))
73 
74 /**
75  * QDF_SWAP_U32 - swap input u32 value
76  * @_x: variable to swap
77  */
78 #define QDF_SWAP_U32(_x) \
79 	(((((_x) << 24) & 0xFF000000) | (((_x) >> 24) & 0x000000FF)) | \
80 	 ((((_x) << 8) & 0x00FF0000) | (((_x) >> 8) & 0x0000FF00)))
81 
82 /* ticks per second */
83 #define QDF_TICKS_PER_SECOND (1000)
84 
85 /**
86  * QDF_ARRAY_SIZE - get array size
87  * @_arr: array variable name
88  */
89 #define QDF_ARRAY_SIZE(_arr) (sizeof(_arr) / sizeof((_arr)[0]))
90 
91 #define QDF_MAX_SCATTER __QDF_MAX_SCATTER
92 
93 /**
94  * qdf_packed - denotes structure is packed.
95  */
96 #define qdf_packed __qdf_packed
97 
98 /**
99  * qdf_toupper - char lower to upper.
100  */
101 #define qdf_toupper __qdf_toupper
102 
103 typedef void *qdf_net_handle_t;
104 
105 typedef void *qdf_netlink_handle_t;
106 typedef void *qdf_drv_handle_t;
107 typedef void *qdf_os_handle_t;
108 typedef void *qdf_pm_t;
109 
110 
111 /**
112  * typedef qdf_handle_t - handles opaque to each other
113  */
114 typedef void *qdf_handle_t;
115 
116 /**
117  * typedef qdf_device_t - Platform/bus generic handle.
118  * Used for bus specific functions.
119  */
120 typedef __qdf_device_t qdf_device_t;
121 
122 /* Byte order identifiers */
123 typedef __qdf_le16_t qdf_le16_t;
124 typedef __qdf_le32_t qdf_le32_t;
125 typedef __qdf_le64_t qdf_le64_t;
126 typedef __qdf_be16_t qdf_be16_t;
127 typedef __qdf_be32_t qdf_be32_t;
128 typedef __qdf_be64_t qdf_be64_t;
129 
130 /**
131  * typedef qdf_size_t - size of an object
132  */
133 typedef __qdf_size_t qdf_size_t;
134 
135 /**
136  * typedef __qdf_off_t - offset for API's that need them.
137  */
138 typedef __qdf_off_t      qdf_off_t;
139 
140 /**
141  * typedef qdf_dma_map_t - DMA mapping object.
142  */
143 typedef __qdf_dma_map_t qdf_dma_map_t;
144 
145 /**
146  * tyepdef qdf_dma_addr_t - DMA address.
147  */
148 typedef __qdf_dma_addr_t qdf_dma_addr_t;
149 
150 /**
151  * typedef __qdf_dma_size_t - DMA size.
152  */
153 typedef __qdf_dma_size_t     qdf_dma_size_t;
154 
155 /**
156  * tyepdef qdf_dma_context_t - DMA context.
157  */
158 typedef __qdf_dma_context_t qdf_dma_context_t;
159 
160 /**
161  * pointer to net device
162  */
163 typedef __qdf_netdev_t qdf_netdev_t;
164 
165 /**
166  * struct qdf_dma_map_info - Information inside a DMA map.
167  * @nsegs: total number mapped segments
168  * struct __dma_segs - Information of physical address.
169  * @paddr: physical(dam'able) address of the segment
170  * @len: length of the segment
171  */
172 typedef struct qdf_dma_map_info {
173 	uint32_t nsegs;
174 	struct __dma_segs {
175 		qdf_dma_addr_t paddr;
176 		qdf_dma_size_t len;
177 	} dma_segs[QDF_MAX_SCATTER];
178 } qdf_dmamap_info_t;
179 
180 #define qdf_iomem_t __qdf_iomem_t;
181 
182 /**
183  * typedef enum QDF_TIMER_TYPE - QDF timer type
184  * @QDF_TIMER_TYPE_SW: Deferrable SW timer it will not cause CPU to wake up
185  * on expiry
186  * @QDF_TIMER_TYPE_WAKE_APPS: Non deferrable timer which will cause CPU to
187  * wake up on expiry
188  */
189 typedef enum {
190 	QDF_TIMER_TYPE_SW,
191 	QDF_TIMER_TYPE_WAKE_APPS
192 } QDF_TIMER_TYPE;
193 
194 /**
195  * tyepdef qdf_resource_type_t - hw resources
196  * @QDF_RESOURCE_TYPE_MEM: memory resource
197  * @QDF_RESOURCE_TYPE_IO: io resource
198  * Define the hw resources the OS has allocated for the device
199  * Note that start defines a mapped area.
200  */
201 typedef enum {
202 	QDF_RESOURCE_TYPE_MEM,
203 	QDF_RESOURCE_TYPE_IO,
204 } qdf_resource_type_t;
205 
206 /**
207  * tyepdef qdf_resource_t - representation of a h/w resource.
208  * @start: start
209  * @end: end
210  * @type: resource type
211  */
212 typedef struct {
213 	uint64_t start;
214 	uint64_t end;
215 	qdf_resource_type_t type;
216 } qdf_resource_t;
217 
218 /**
219  * typedef qdf_dma_dir_t - DMA directions
220  * @QDF_DMA_BIDIRECTIONAL: bidirectional data
221  * @QDF_DMA_TO_DEVICE: data going from device to memory
222  * @QDF_DMA_FROM_DEVICE: data going from memory to device
223  */
224 typedef enum {
225 	QDF_DMA_BIDIRECTIONAL = __QDF_DMA_BIDIRECTIONAL,
226 	QDF_DMA_TO_DEVICE = __QDF_DMA_TO_DEVICE,
227 	QDF_DMA_FROM_DEVICE = __QDF_DMA_FROM_DEVICE,
228 } qdf_dma_dir_t;
229 
230 /**
231  * enum qdf_driver_type - Indicate the driver type and based on this
232  * do appropriate initialization.
233  *
234  * @QDF_DRIVER_TYPE_PRODUCTION: Driver used in the production
235  * @QDF_DRIVER_TYPE_MFG: Driver used in the Factory
236  * @QDF_DRIVER_TYPE_INVALID: Invalid and unrecognized type
237  *
238  */
239 enum qdf_driver_type {
240 	QDF_DRIVER_TYPE_PRODUCTION = 0,
241 	QDF_DRIVER_TYPE_MFG = 1,
242 	QDF_DRIVER_TYPE_INVALID = 0x7FFFFFFF
243 };
244 
245 /* work queue(kernel thread)/DPC function callback */
246 typedef void (*qdf_defer_fn_t)(void *);
247 
248 /*
249  * Prototype of the critical region function that is to be
250  * executed with spinlock held and interrupt disalbed
251  */
252 typedef bool (*qdf_irqlocked_func_t)(void *);
253 
254 /* Prototype of timer function */
255 typedef void (*qdf_timer_func_t)(void *);
256 
257 #define qdf_offsetof(type, field) offsetof(type, field)
258 
259 /**
260  * typedef enum QDF_MODULE_ID  - Debug category level
261  * @QDF_MODULE_ID_TDLS: TDLS
262  * @QDF_MODULE_ID_ACS: auto channel selection
263  * @QDF_MODULE_ID_SCAN_SM: scan state machine
264  * @QDF_MODULE_ID_SCANENTRY: scan entry
265  * @QDF_MODULE_ID_WDS: WDS handling
266  * @QDF_MODULE_ID_ACTION: action management frames
267  * @QDF_MODULE_ID_ROAM: sta mode roaming
268  * @QDF_MODULE_ID_INACT: inactivity handling
269  * @QDF_MODULE_ID_DOTH: 11.h
270  * @QDF_MODULE_ID_IQUE: IQUE features
271  * @QDF_MODULE_ID_WME: WME protocol
272  * @QDF_MODULE_ID_ACL: ACL handling
273  * @QDF_MODULE_ID_WPA: WPA/RSN protocol
274  * @QDF_MODULE_ID_RADKEYS: dump 802.1x keys
275  * @QDF_MODULE_ID_RADDUMP: dump 802.1x radius packets
276  * @QDF_MODULE_ID_RADIUS: 802.1x radius client
277  * @QDF_MODULE_ID_DOT1XSM: 802.1x state machine
278  * @QDF_MODULE_ID_DOT1X: 802.1x authenticator
279  * @QDF_MODULE_ID_POWER: power save handling
280  * @QDF_MODULE_ID_STATS: state machine
281  * @QDF_MODULE_ID_OUTPUT: output handling
282  * @QDF_MODULE_ID_SCAN: scanning
283  * @QDF_MODULE_ID_AUTH: authentication handling
284  * @QDF_MODULE_ID_ASSOC: association handling
285  * @QDF_MODULE_ID_NODE: node handling
286  * @QDF_MODULE_ID_ELEMID: element id parsing
287  * @QDF_MODULE_ID_XRATE: rate set handling
288  * @QDF_MODULE_ID_INPUT: input handling
289  * @QDF_MODULE_ID_CRYPTO: crypto work
290  * @QDF_MODULE_ID_DUMPPKTS: IFF_LINK2 equivalant
291  * @QDF_MODULE_ID_DEBUG: IFF_DEBUG equivalent
292  * @QDF_MODULE_ID_MLME: MLME
293  * @QDF_MODULE_ID_RRM: Radio resource measurement
294  * @QDF_MODULE_ID_WNM: Wireless Network Management
295  * @QDF_MODULE_ID_P2P_PROT: P2P Protocol driver
296  * @QDF_MODULE_ID_PROXYARP: 11v Proxy ARP
297  * @QDF_MODULE_ID_L2TIF: Hotspot 2.0 L2 TIF
298  * @QDF_MODULE_ID_WIFIPOS: WifiPositioning Feature
299  * @QDF_MODULE_ID_WRAP: WRAP or Wireless ProxySTA
300  * @QDF_MODULE_ID_DFS: DFS debug mesg
301  * @QDF_MODULE_ID_TLSHIM: TLSHIM module ID
302  * @QDF_MODULE_ID_WMI: WMI module ID
303  * @QDF_MODULE_ID_HTT: HTT module ID
304  * @QDF_MODULE_ID_HDD: HDD module ID
305  * @QDF_MODULE_ID_SME: SME module ID
306  * @QDF_MODULE_ID_PE: PE module ID
307  * @QDF_MODULE_ID_WMA: WMA module ID
308  * @QDF_MODULE_ID_SYS: SYS module ID
309  * @QDF_MODULE_ID_QDF: QDF module ID
310  * @QDF_MODULE_ID_SAP: SAP module ID
311  * @QDF_MODULE_ID_HDD_SOFTAP: HDD SAP module ID
312  * @QDF_MODULE_ID_HDD_DATA: HDD DATA module ID
313  * @QDF_MODULE_ID_HDD_SAP_DATA: HDD SAP DATA module ID
314  * @QDF_MODULE_ID_HIF: HIF module ID
315  * @QDF_MODULE_ID_HTC: HTC module ID
316  * @QDF_MODULE_ID_TXRX: TXRX module ID
317  * @QDF_MODULE_ID_QDF_DEVICE: QDF DEVICE module ID
318  * @QDF_MODULE_ID_CFG: CFG module ID
319  * @QDF_MODULE_ID_BMI: BMI module ID
320  * @QDF_MODULE_ID_EPPING: EPPING module ID
321  * @QDF_MODULE_ID_QVIT: QVIT module ID
322  * @QDF_MODULE_ID_DP: Data-path module ID
323  * @QDF_MODULE_ID_SOC: SOC module ID
324  * @QDF_MODULE_ID_OS_IF: OS-interface module ID
325  * @QDF_MODULE_ID_TARGET_IF: targer interface module ID
326  * @QDF_MODULE_ID_SCHEDULER: schduler module ID
327  * @QDF_MODULE_ID_MGMT_TXRX: management TX/RX module ID
328  * @QDF_MODULE_ID_SERIALIZATION: serialization module ID
329  * @QDF_MODULE_ID_PMO: PMO (power manager and offloads) Module ID
330  * @QDF_MODULE_ID_P2P: P2P module ID
331  * @QDF_MODULE_ID_POLICY_MGR: Policy Manager module ID
332  * @QDF_MODULE_ID_CONFIG: CFG (configuration) component ID
333  * @QDF_MODULE_ID_REGULATORY: REGULATORY module ID
334  * @QDF_MODULE_ID_NAN: NAN module ID
335  * @QDF_MODULE_ID_SPECTRAL: Spectral module ID
336  * @QDF_MODULE_ID_ROAM_DEBUG: Roam Debug logging
337  * @QDF_MODULE_ID_CDP: Converged Data Path module ID
338  * @QDF_MODULE_ID_DIRECT_BUF_RX: Direct Buffer Receive module ID
339  * @QDF_MODULE_ID_DISA: DISA (encryption test) module ID
340  * @QDF_MODULE_ID_GREEN_AP: Green AP related logging
341  * @QDF_MODULE_ID_FTM: FTM module ID
342  * @QDF_MODULE_ID_EXTAP: Extender AP module ID
343  * @QDF_MODULE_ID_FD: FILS discovery logging
344  * @QDF_MODULE_ID_OCB: OCB module ID
345  * @QDF_MODULE_ID_ANY: anything
346  * @QDF_MODULE_ID_MAX: Max place holder module ID
347  */
348 typedef enum {
349 	QDF_MODULE_ID_TDLS      = 0,
350 	QDF_MODULE_ID_ACS,
351 	QDF_MODULE_ID_SCAN_SM,
352 	QDF_MODULE_ID_SCANENTRY,
353 	QDF_MODULE_ID_WDS,
354 	QDF_MODULE_ID_ACTION,
355 	QDF_MODULE_ID_ROAM,
356 	QDF_MODULE_ID_INACT,
357 	QDF_MODULE_ID_DOTH      = 8,
358 	QDF_MODULE_ID_IQUE,
359 	QDF_MODULE_ID_WME,
360 	QDF_MODULE_ID_ACL,
361 	QDF_MODULE_ID_WPA,
362 	QDF_MODULE_ID_RADKEYS,
363 	QDF_MODULE_ID_RADDUMP,
364 	QDF_MODULE_ID_RADIUS,
365 	QDF_MODULE_ID_DOT1XSM   = 16,
366 	QDF_MODULE_ID_DOT1X,
367 	QDF_MODULE_ID_POWER,
368 	QDF_MODULE_ID_STATE,
369 	QDF_MODULE_ID_OUTPUT,
370 	QDF_MODULE_ID_SCAN,
371 	QDF_MODULE_ID_AUTH,
372 	QDF_MODULE_ID_ASSOC,
373 	QDF_MODULE_ID_NODE      = 24,
374 	QDF_MODULE_ID_ELEMID,
375 	QDF_MODULE_ID_XRATE,
376 	QDF_MODULE_ID_INPUT,
377 	QDF_MODULE_ID_CRYPTO,
378 	QDF_MODULE_ID_DUMPPKTS,
379 	QDF_MODULE_ID_DEBUG,
380 	QDF_MODULE_ID_MLME,
381 	QDF_MODULE_ID_RRM       = 32,
382 	QDF_MODULE_ID_WNM,
383 	QDF_MODULE_ID_P2P_PROT,
384 	QDF_MODULE_ID_PROXYARP,
385 	QDF_MODULE_ID_L2TIF,
386 	QDF_MODULE_ID_WIFIPOS,
387 	QDF_MODULE_ID_WRAP,
388 	QDF_MODULE_ID_DFS,
389 	QDF_MODULE_ID_ATF       = 40,
390 	QDF_MODULE_ID_SPLITMAC,
391 	QDF_MODULE_ID_IOCTL,
392 	QDF_MODULE_ID_NAC,
393 	QDF_MODULE_ID_MESH,
394 	QDF_MODULE_ID_MBO,
395 	QDF_MODULE_ID_EXTIOCTL_CHANSWITCH,
396 	QDF_MODULE_ID_EXTIOCTL_CHANSSCAN,
397 	QDF_MODULE_ID_TLSHIM    = 48,
398 	QDF_MODULE_ID_WMI,
399 	QDF_MODULE_ID_HTT,
400 	QDF_MODULE_ID_HDD,
401 	QDF_MODULE_ID_SME,
402 	QDF_MODULE_ID_PE,
403 	QDF_MODULE_ID_WMA,
404 	QDF_MODULE_ID_SYS,
405 	QDF_MODULE_ID_QDF       = 56,
406 	QDF_MODULE_ID_SAP,
407 	QDF_MODULE_ID_HDD_SOFTAP,
408 	QDF_MODULE_ID_HDD_DATA,
409 	QDF_MODULE_ID_HDD_SAP_DATA,
410 	QDF_MODULE_ID_HIF,
411 	QDF_MODULE_ID_HTC,
412 	QDF_MODULE_ID_TXRX,
413 	QDF_MODULE_ID_QDF_DEVICE = 64,
414 	QDF_MODULE_ID_CFG,
415 	QDF_MODULE_ID_BMI,
416 	QDF_MODULE_ID_EPPING,
417 	QDF_MODULE_ID_QVIT,
418 	QDF_MODULE_ID_DP,
419 	QDF_MODULE_ID_SOC,
420 	QDF_MODULE_ID_OS_IF,
421 	QDF_MODULE_ID_TARGET_IF,
422 	QDF_MODULE_ID_SCHEDULER,
423 	QDF_MODULE_ID_MGMT_TXRX,
424 	QDF_MODULE_ID_SERIALIZATION,
425 	QDF_MODULE_ID_PMO,
426 	QDF_MODULE_ID_P2P,
427 	QDF_MODULE_ID_POLICY_MGR,
428 	QDF_MODULE_ID_CONFIG,
429 	QDF_MODULE_ID_REGULATORY,
430 	QDF_MODULE_ID_SA_API,
431 	QDF_MODULE_ID_NAN,
432 	QDF_MODULE_ID_OFFCHAN_TXRX,
433 	QDF_MODULE_ID_SON,
434 	QDF_MODULE_ID_SPECTRAL,
435 	QDF_MODULE_ID_OBJ_MGR,
436 	QDF_MODULE_ID_NSS,
437 	QDF_MODULE_ID_ROAM_DEBUG,
438 	QDF_MODULE_ID_CDP,
439 	QDF_MODULE_ID_DIRECT_BUF_RX,
440 	QDF_MODULE_ID_DISA,
441 	QDF_MODULE_ID_GREEN_AP,
442 	QDF_MODULE_ID_FTM,
443 	QDF_MODULE_ID_EXTAP,
444 	QDF_MODULE_ID_FD,
445 	QDF_MODULE_ID_OCB,
446 	QDF_MODULE_ID_ANY,
447 	QDF_MODULE_ID_MAX,
448 } QDF_MODULE_ID;
449 
450 /**
451  * typedef enum QDF_TRACE_LEVEL - Debug verbose level
452  * @QDF_TRACE_LEVEL_NONE: no trace will be logged. This value is in place
453  *			  for the qdf_trace_setlevel() to allow the user
454  *			  to turn off all traces
455  * @QDF_TRACE_LEVEL_FATAL: Indicates fatal error conditions
456  * @QDF_TRACE_LEVEL_ERROR: Indicates error conditions
457  * @QDF_TRACE_LEVEL_WARN: May indicate that an error will occur if action
458  *			  is not taken
459  * @QDF_TRACE_LEVEL_INFO: Normal operational messages that require no action
460  * @QDF_TRACE_LEVEL_INFO_HIGH: High level operational messages that require
461  *			       no action
462  * @QDF_TRACE_LEVEL_INFO_MED: Middle level operational messages that require
463  *			      no action
464  * @QDF_TRACE_LEVEL_INFO_LOW: Low level operational messages that require
465  *			      no action
466  * @QDF_TRACE_LEVEL_DEBUG: Information useful to developers for debugging
467  * @QDF_TRACE_LEVEL_ALL: All trace levels
468  * @QDF_TRACE_LEVEL_MAX: Max trace level
469  */
470 typedef enum {
471 	QDF_TRACE_LEVEL_NONE,
472 	QDF_TRACE_LEVEL_FATAL,
473 	QDF_TRACE_LEVEL_ERROR,
474 	QDF_TRACE_LEVEL_WARN,
475 	QDF_TRACE_LEVEL_INFO,
476 	QDF_TRACE_LEVEL_INFO_HIGH,
477 	QDF_TRACE_LEVEL_INFO_MED,
478 	QDF_TRACE_LEVEL_INFO_LOW,
479 	QDF_TRACE_LEVEL_DEBUG,
480 	QDF_TRACE_LEVEL_ALL,
481 	QDF_TRACE_LEVEL_MAX
482 } QDF_TRACE_LEVEL;
483 
484 /**
485  * enum QDF_OPMODE - vdev operating mode
486  * @QDF_STA_MODE: STA mode
487  * @QDF_SAP_MODE: SAP mode
488  * @QDF_P2P_CLIENT_MODE: P2P client mode
489  * @QDF_P2P_GO_MODE: P2P GO mode
490  * @QDF_FTM_MODE: FTM mode
491  * @QDF_IBSS_MODE: IBSS mode
492  * @QDF_MONITOR_MODE: Monitor mode
493  * @QDF_P2P_DEVICE_MODE: P2P device mode
494  * @QDF_OCB_MODE: OCB device mode
495  * @QDF_EPPING_MODE: EPPING device mode
496  * @QDF_QVIT_MODE: QVIT device mode
497  * @QDF_NDI_MODE: NAN datapath mode
498  * @QDF_WDS_MODE: WDS mode
499  * @QDF_BTAMP_MODE: BTAMP mode
500  * @QDF_AHDEMO_MODE: AHDEMO mode
501  * @QDF_MAX_NO_OF_MODE: Max place holder
502  *
503  * These are generic IDs that identify the various roles
504  * in the software system
505  */
506 enum QDF_OPMODE {
507 	QDF_STA_MODE,
508 	QDF_SAP_MODE,
509 	QDF_P2P_CLIENT_MODE,
510 	QDF_P2P_GO_MODE,
511 	QDF_FTM_MODE,
512 	QDF_IBSS_MODE,
513 	QDF_MONITOR_MODE,
514 	QDF_P2P_DEVICE_MODE,
515 	QDF_OCB_MODE,
516 	QDF_EPPING_MODE,
517 	QDF_QVIT_MODE,
518 	QDF_NDI_MODE,
519 	QDF_WDS_MODE,
520 	QDF_BTAMP_MODE,
521 	QDF_AHDEMO_MODE,
522 	QDF_MAX_NO_OF_MODE
523 };
524 
525 /* for backward compatibility with the legacy definition */
526 #define tQDF_ADAPTER_MODE QDF_OPMODE
527 
528 /**
529  * enum QDF_GLOBAL_MODE - global mode when driver is loaded.
530  *
531  * @QDF_GLOBAL_MISSION_MODE: mission mode (STA, SAP...)
532  * @QDF_GLOBAL_MONITOR_MODE: Monitor Mode
533  * @QDF_GLOBAL_FTM_MODE: FTM mode
534  * @QDF_GLOBAL_IBSS_MODE: IBSS mode
535  * @QDF_GLOBAL_EPPING_MODE: EPPING mode
536  * @QDF_GLOBAL_QVIT_MODE: QVIT global mode
537  * @QDF_GLOBAL_MAX_MODE: Max place holder
538  */
539 enum QDF_GLOBAL_MODE {
540 	QDF_GLOBAL_MISSION_MODE,
541 	QDF_GLOBAL_MONITOR_MODE = 4,
542 	QDF_GLOBAL_FTM_MODE = 5,
543 	QDF_GLOBAL_IBSS_MODE = 6,
544 	QDF_GLOBAL_COLDBOOT_CALIB_MODE = 7,
545 	QDF_GLOBAL_EPPING_MODE = 8,
546 	QDF_GLOBAL_QVIT_MODE = 9,
547 	QDF_GLOBAL_MAX_MODE
548 };
549 
550 /* for backward compatibility with the legacy definition */
551 #define tQDF_GLOBAL_CON_MODE QDF_GLOBAL_MODE
552 
553 #define  QDF_IS_EPPING_ENABLED(mode) (mode == QDF_GLOBAL_EPPING_MODE)
554 
555 
556 /**
557  * qdf_trace_msg()- logging API
558  * @module: Module identifier. A member of the QDF_MODULE_ID enumeration that
559  *	    identifies the module issuing the trace message.
560  * @level: Trace level. A member of the QDF_TRACE_LEVEL enumeration indicating
561  *	   the severity of the condition causing the trace message to be issued.
562  *	   More severe conditions are more likely to be logged.
563  * @str_format: Format string. The message to be logged. This format string
564  *	       contains printf-like replacement parameters, which follow this
565  *	       parameter in the variable argument list.
566  *
567  * Users wishing to add tracing information to their code should use
568  * QDF_TRACE.  QDF_TRACE() will compile into a call to qdf_trace_msg() when
569  * tracing is enabled.
570  *
571  * Return: nothing
572  *
573  * implemented in qdf_trace.c
574  */
575 void __printf(3, 4) qdf_trace_msg(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
576 		   char *str_format, ...);
577 /**
578  * qdf_vtrace_msg() - the va_list version of qdf_trace_msg
579  * @module: the calling module's Id
580  * @level: the logging level to log using
581  * @str_format: the log format string
582  * @val: the va_list containing the values to format according to str_format
583  *
584  * Return: None
585  */
586 void qdf_vtrace_msg(QDF_MODULE_ID module, QDF_TRACE_LEVEL level,
587 		    char *str_format, va_list val);
588 
589 #ifdef CONFIG_MCL
590 #define qdf_print(args...) \
591 	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, ## args)
592 
593 #define qdf_logfl(level, format, args...) \
594 	QDF_TRACE(QDF_MODULE_ID_QDF, level, FL(format), ## args)
595 
596 #define qdf_alert(format, args...) \
597 	qdf_logfl(QDF_TRACE_LEVEL_FATAL, format, ## args)
598 #define qdf_err(format, args...) \
599 	qdf_logfl(QDF_TRACE_LEVEL_ERROR, format, ## args)
600 #define qdf_warn(format, args...) \
601 	qdf_logfl(QDF_TRACE_LEVEL_WARN, format, ## args)
602 #define qdf_info(format, args...) \
603 	qdf_logfl(QDF_TRACE_LEVEL_INFO, format, ## args)
604 #define qdf_debug(format, args...) \
605 	qdf_logfl(QDF_TRACE_LEVEL_DEBUG, format, ## args)
606 
607 #else /* CONFIG_MCL */
608 
609 #define qdf_print printk
610 #define qdf_alert printk
611 #define qdf_err printk
612 #define qdf_warn printk
613 #define qdf_info printk
614 #define qdf_debug printk
615 
616 #endif /* CONFIG_MCL */
617 
618 #define qdf_vprint    __qdf_vprint
619 #define qdf_snprint   __qdf_snprint
620 
621 #ifdef WLAN_OPEN_P2P_INTERFACE
622 /* This should match with WLAN_MAX_INTERFACES */
623 #define QDF_MAX_CONCURRENCY_PERSONA  (4)
624 #else
625 #define QDF_MAX_CONCURRENCY_PERSONA  (3)
626 #endif
627 
628 #define QDF_STA_MASK (1 << QDF_STA_MODE)
629 #define QDF_SAP_MASK (1 << QDF_SAP_MODE)
630 #define QDF_P2P_CLIENT_MASK (1 << QDF_P2P_CLIENT_MODE)
631 #define QDF_P2P_GO_MASK (1 << QDF_P2P_GO_MODE)
632 
633 #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
634 
635 /**
636  * typedef tQDF_MCC_TO_SCC_SWITCH_MODE - MCC to SCC switch mode.
637  * @QDF_MCC_TO_SCC_SWITCH_DISABLE: Disable switch
638  * @QDF_MCC_TO_SCC_SWITCH_ENABLE: Enable switch
639  * @QDF_MCC_TO_SCC_SWITCH_FORCE: Force switch with SAP restart
640  * @QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION: Force switch without
641  * restart of SAP
642  * @QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL: Switch using fav channel(s)
643  * without SAP restart
644  * @QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION: Force switch
645  * without SAP restart. MCC is allowed only in below exception cases:
646  *	Exception Case-1: When STA is operating on DFS channel.
647  *	Exception Case-2: When STA is operating on LTE-CoEx channel.
648  *	Exception Case-3: When STA is operating on AP disabled channel.
649  *
650  * @QDF_MCC_TO_SCC_SWITCH_MAX: max switch
651  */
652 typedef enum {
653 	QDF_MCC_TO_SCC_SWITCH_DISABLE = 0,
654 	QDF_MCC_TO_SCC_SWITCH_ENABLE,
655 	QDF_MCC_TO_SCC_SWITCH_FORCE,
656 	QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION,
657 	QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL,
658 	QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION,
659 	QDF_MCC_TO_SCC_SWITCH_MAX
660 } tQDF_MCC_TO_SCC_SWITCH_MODE;
661 #endif
662 
663 #if !defined(NULL)
664 #ifdef __cplusplus
665 #define NULL   0
666 #else
667 #define NULL   ((void *)0)
668 #endif
669 #endif
670 
671 /**
672  * qdf_bool_parse() - parse the given string as a boolean value
673  * @bool_str: the input boolean string to parse
674  * @out_bool: the output boolean value, populated on success
675  *
676  * 1, y, Y are mapped to true, 0, n, N are mapped to false.
677  * Leading/trailing whitespace is ignored.
678  *
679  * Return: QDF_STATUS
680  */
681 QDF_STATUS qdf_bool_parse(const char *bool_str, bool *out_bool);
682 
683 /**
684  * qdf_int32_parse() - parse the given string as a 32-bit signed integer
685  * @int_str: the input integer string to parse
686  * @out_int: the output integer value, populated on success
687  *
688  * Supports binary (0b), octal (0o), decimal (no prefix), and hexadecimal (0x)
689  * encodings via typical prefix notation. Leading/trailing whitespace is
690  * ignored.
691  *
692  * Return: QDF_STATUS
693  */
694 QDF_STATUS qdf_int32_parse(const char *int_str, int32_t *out_int);
695 
696 /**
697  * qdf_uint32_parse() - parse the given string as a 32-bit unsigned integer
698  * @int_str: the input integer string to parse
699  * @out_int: the output integer value, populated on success
700  *
701  * Supports binary (0b), octal (0o), decimal (no prefix), and hexadecimal (0x)
702  * encodings via typical prefix notation. Leading/trailing whitespace is
703  * ignored.
704  *
705  * Return: QDF_STATUS
706  */
707 QDF_STATUS qdf_uint32_parse(const char *int_str, uint32_t *out_int);
708 
709 /**
710  * qdf_int64_parse() - parse the given string as a 64-bit signed integer
711  * @int_str: the input integer string to parse
712  * @out_int: the output integer value, populated on success
713  *
714  * Supports binary (0b), octal (0o), decimal (no prefix), and hexadecimal (0x)
715  * encodings via typical prefix notation. Leading/trailing whitespace is
716  * ignored.
717  *
718  * Return: QDF_STATUS
719  */
720 QDF_STATUS qdf_int64_parse(const char *int_str, int64_t *out_int);
721 
722 /**
723  * qdf_uint64_parse() - parse the given string as a 64-bit unsigned integer
724  * @int_str: the input integer string to parse
725  * @out_int: the output integer value, populated on success
726  *
727  * Supports binary (0b), octal (0o), decimal (no prefix), and hexadecimal (0x)
728  * encodings via typical prefix notation. Leading/trailing whitespace is
729  * ignored.
730  *
731  * Return: QDF_STATUS
732  */
733 QDF_STATUS qdf_uint64_parse(const char *int_str, uint64_t *out_int);
734 
735 #define QDF_MAC_ADDR_SIZE 6
736 #define QDF_MAC_ADDR_STR "%02x:%02x:%02x:%02x:%02x:%02x"
737 #define QDF_MAC_ADDR_ARRAY(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
738 #define QDF_MAC_ADDR_BCAST_INIT { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }
739 #define QDF_MAC_ADDR_ZERO_INIT { { 0, 0, 0, 0, 0, 0 } }
740 
741 /**
742  * struct qdf_mac_addr - A MAC address
743  * @bytes: the raw address bytes array
744  */
745 struct qdf_mac_addr {
746 	uint8_t bytes[QDF_MAC_ADDR_SIZE];
747 };
748 
749 /**
750  * qdf_mac_parse() - parse the given string as a MAC address
751  * @mac_str: the input MAC address string to parse
752  * @out_addr: the output MAC address value, populated on success
753  *
754  * A MAC address is a set of 6, colon-delimited, hexadecimal encoded octets.
755  *
756  * E.g.
757  *	00:00:00:00:00:00 (zero address)
758  *	ff:ff:ff:ff:ff:ff (broadcast address)
759  *	12:34:56:78:90:ab (an arbitrary address)
760  *
761  * This implementation also accepts MAC addresses without colons. Historically,
762  * other delimiters and groupings have been used to represent MAC addresses, but
763  * these are not supported here. Hexadecimal digits may be in either upper or
764  * lower case.
765  *
766  * Return: QDF_STATUS
767  */
768 QDF_STATUS qdf_mac_parse(const char *mac_str, struct qdf_mac_addr *out_addr);
769 
770 #define QDF_IPV4_ADDR_SIZE 4
771 #define QDF_IPV4_ADDR_STR "%d.%d.%d.%d"
772 #define QDF_IPV4_ADDR_ARRAY(a) (a)[0], (a)[1], (a)[2], (a)[3]
773 #define QDF_IPV4_ADDR_ZERO_INIT { { 0, 0, 0, 0 } }
774 
775 /**
776  * struct qdf_ipv4_addr - An IPV4 address
777  * @bytes: the raw address bytes array
778  */
779 struct qdf_ipv4_addr {
780 	uint8_t bytes[QDF_IPV4_ADDR_SIZE];
781 };
782 
783 /**
784  * qdf_ipv4_parse() - parse the given string as an IPV4 address
785  * @ipv4_str: the input IPV4 address string to parse
786  * @out_addr: the output IPV4 address value, populated on success
787  *
788  * An IPV4 address is a set of 4, dot-delimited, decimal encoded octets.
789  *
790  * E.g.
791  *	0.0.0.0 (wildcard address)
792  *	127.0.0.1 (loopback address)
793  *	255.255.255.255 (broadcast address)
794  *	192.168.0.1 (an arbitrary address)
795  *
796  * Historically, non-decimal encodings have also been used to represent IPV4
797  * addresses, but these are not supported here.
798  *
799  * Return: QDF_STATUS
800  */
801 QDF_STATUS qdf_ipv4_parse(const char *ipv4_str, struct qdf_ipv4_addr *out_addr);
802 
803 #define QDF_IPV6_ADDR_SIZE 16
804 #define QDF_IPV6_ADDR_HEXTET_COUNT 8
805 #define QDF_IPV6_ADDR_STR "%x:%x:%x:%x:%x:%x:%x:%x"
806 #define QDF_IPV6_ADDR_ARRAY(a) \
807 	((a)[0] << 8) + (a)[1], ((a)[2] << 8) + (a)[3], \
808 	((a)[4] << 8) + (a)[5], ((a)[6] << 8) + (a)[7], \
809 	((a)[8] << 8) + (a)[9], ((a)[10] << 8) + (a)[11], \
810 	((a)[12] << 8) + (a)[13], ((a)[14] << 8) + (a)[15]
811 #define QDF_IPV6_ADDR_ZERO_INIT \
812 	{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
813 
814 /**
815  * struct qdf_ipv6_addr - An IPV6 address
816  * @bytes: the raw address bytes array
817  */
818 struct qdf_ipv6_addr {
819 	uint8_t bytes[QDF_IPV6_ADDR_SIZE];
820 };
821 
822 /**
823  * qdf_ipv6_parse() - parse the given string as an IPV6 address
824  * @ipv6_str: the input IPV6 address string to parse
825  * @out_addr: the output IPV6 address value, populated on success
826  *
827  * A hextet is a pair of octets. An IPV6 address is a set of 8, colon-delimited,
828  * hexadecimal encoded hextets. Each hextet may omit leading zeros. One or more
829  * zero-hextets may be "compressed" using a pair of colons ("::"). Up to one
830  * such zero-compression is allowed per address.
831  *
832  * E.g.
833  *	0:0:0:0:0:0:0:0 (unspecified address)
834  *	:: (also the unspecified address)
835  *	0:0:0:0:0:0:0:1 (loopback address)
836  *	::1 (also the loopback address)
837  *	900a:ae7::6 (an arbitrary address)
838  *	900a:ae7:0:0:0:0:0:6 (the same arbitrary address)
839  *
840  * Hexadecimal digits may be in either upper or lower case.
841  *
842  * Return: QDF_STATUS
843  */
844 QDF_STATUS qdf_ipv6_parse(const char *ipv6_str, struct qdf_ipv6_addr *out_addr);
845 
846 #define QDF_MAX_NUM_CHAN   (128)
847 
848 /**
849  * struct qdf_tso_frag_t - fragments of a single TCP segment
850  * @paddr_low_32: Lower 32 bits of the buffer pointer
851  * @paddr_upper_16: upper 16 bits of the buffer pointer
852  * @length: length of the buffer
853  * @vaddr: virtual address
854  *
855  * This structure holds the fragments of a single TCP segment of a
856  * given jumbo TSO network buffer
857  */
858 struct qdf_tso_frag_t {
859 	uint16_t length;
860 	unsigned char *vaddr;
861 	qdf_dma_addr_t paddr;
862 };
863 
864 #define FRAG_NUM_MAX 6
865 #define TSO_SEG_MAGIC_COOKIE 0x7EED
866 
867 /**
868  * struct qdf_tso_flags_t - TSO specific flags
869  * @tso_enable: Enable transmit segmentation offload
870  * @tcp_flags_mask: Tcp_flag is inserted into the header based
871  * on the mask
872  * @l2_len: L2 length for the msdu
873  * @ip_len: IP length for the msdu
874  * @tcp_seq_num: TCP sequence number
875  * @ip_id: IP identification number
876  *
877  * This structure holds the TSO specific flags extracted from the TSO network
878  * buffer for a given TCP segment
879  */
880 struct qdf_tso_flags_t {
881 	uint32_t tso_enable:1,
882 			reserved_0a:6,
883 			fin:1,
884 			syn:1,
885 			rst:1,
886 			psh:1,
887 			ack:1,
888 			urg:1,
889 			ece:1,
890 			cwr:1,
891 			ns:1,
892 			tcp_flags_mask:9,
893 			reserved_0b:7;
894 
895 	uint32_t l2_len:16,
896 			ip_len:16;
897 
898 	uint32_t tcp_seq_num;
899 
900 	uint32_t ip_id:16,
901 			ipv4_checksum_en:1,
902 			udp_ipv4_checksum_en:1,
903 			udp_ipv6_checksum_en:1,
904 			tcp_ipv4_checksum_en:1,
905 			tcp_ipv6_checksum_en:1,
906 			partial_checksum_en:1,
907 			reserved_3a:10;
908 
909 	uint32_t checksum_offset:14,
910 			reserved_4a:2,
911 			payload_start_offset:14,
912 			reserved_4b:2;
913 
914 	uint32_t payload_end_offset:14,
915 			reserved_5:18;
916 };
917 
918 /**
919  * struct qdf_tso_seg_t - single TSO segment
920  * @tso_flags: TSO flags
921  * @num_frags: number of fragments
922  * @total_len: total length of the packet
923  * @tso_frags: array holding the fragments
924  *
925  * This structure holds the information of a single TSO segment of a jumbo
926  * TSO network buffer
927  */
928 struct qdf_tso_seg_t {
929 	struct qdf_tso_flags_t tso_flags;
930 	uint32_t num_frags;
931 	uint32_t total_len;
932 	struct qdf_tso_frag_t tso_frags[FRAG_NUM_MAX];
933 };
934 
935 /**
936  * TSO seg elem action caller locations: goes into dbg.history below.
937  * Needed to be defined outside of the feature so that
938  * callers can be coded without ifdefs (even if they get
939  * resolved to nothing)
940  */
941 enum tsoseg_dbg_caller_e {
942 	TSOSEG_LOC_UNDEFINED,
943 	TSOSEG_LOC_INIT1,
944 	TSOSEG_LOC_INIT2,
945 	TSOSEG_LOC_DEINIT,
946 	TSOSEG_LOC_PREPARETSO,
947 	TSOSEG_LOC_TXPREPLLFAST,
948 	TSOSEG_LOC_UNMAPTSO,
949 	TSOSEG_LOC_ALLOC,
950 	TSOSEG_LOC_FREE,
951 };
952 #ifdef TSOSEG_DEBUG
953 
954 #define MAX_TSO_SEG_ACT_HISTORY 16
955 struct qdf_tso_seg_dbg_t {
956 	void    *txdesc;  /* owner - (ol_txrx_tx_desc_t *) */
957 	int      cur;     /* index of last valid entry */
958 	uint16_t history[MAX_TSO_SEG_ACT_HISTORY];
959 };
960 #endif /* TSOSEG_DEBUG */
961 
962 /**
963  * qdf_tso_seg_elem_t - tso segment element
964  * @seg: instance of segment
965  * @next: pointer to the next segment
966  */
967 struct qdf_tso_seg_elem_t {
968 	struct qdf_tso_seg_t seg;
969 	uint16_t cookie:15,
970 		on_freelist:1;
971 	struct qdf_tso_seg_elem_t *next;
972 #ifdef TSOSEG_DEBUG
973 	struct qdf_tso_seg_dbg_t dbg;
974 #endif /* TSOSEG_DEBUG */
975 };
976 
977 /**
978  * struct qdf_tso_num_seg_t - single element to count for num of seg
979  * @tso_cmn_num_seg: num of seg in a jumbo skb
980  *
981  * This structure holds the information of num of segments of a jumbo
982  * TSO network buffer.
983  */
984 struct qdf_tso_num_seg_t {
985 	uint32_t tso_cmn_num_seg;
986 };
987 
988 /**
989  * qdf_tso_num_seg_elem_t - num of tso segment element for jumbo skb
990  * @num_seg: instance of num of seg
991  * @next: pointer to the next segment
992  */
993 struct qdf_tso_num_seg_elem_t {
994 	struct qdf_tso_num_seg_t num_seg;
995 	struct qdf_tso_num_seg_elem_t *next;
996 };
997 
998 /**
999  * struct qdf_tso_info_t - TSO information extracted
1000  * @is_tso: is this is a TSO frame
1001  * @num_segs: number of segments
1002  * @tso_seg_list: list of TSO segments for this jumbo packet
1003  * @curr_seg: segment that is currently being processed
1004  * @tso_num_seg_list: num of tso seg for this jumbo packet
1005  * @msdu_stats_idx: msdu index for tso stats
1006  *
1007  * This structure holds the TSO information extracted after parsing the TSO
1008  * jumbo network buffer. It contains a chain of the TSO segments belonging to
1009  * the jumbo packet
1010  */
1011 struct qdf_tso_info_t {
1012 	uint8_t is_tso;
1013 	uint32_t num_segs;
1014 	struct qdf_tso_seg_elem_t *tso_seg_list;
1015 	struct qdf_tso_seg_elem_t *curr_seg;
1016 	struct qdf_tso_num_seg_elem_t *tso_num_seg_list;
1017 	uint32_t msdu_stats_idx;
1018 };
1019 
1020 /**
1021  * Used to set classify bit in CE desc.
1022  */
1023 #define QDF_CE_TX_CLASSIFY_BIT_S   5
1024 
1025 /**
1026  * QDF_CE_TX_PKT_TYPE_BIT_S - 2 bits starting at bit 6 in CE desc.
1027  */
1028 #define QDF_CE_TX_PKT_TYPE_BIT_S   6
1029 
1030 /**
1031  * QDF_CE_TX_PKT_OFFSET_BIT_S - 12 bits --> 16-27, in the CE desciptor
1032  *  the length of HTT/HTC descriptor
1033  */
1034 #define QDF_CE_TX_PKT_OFFSET_BIT_S  16
1035 
1036 /**
1037  * QDF_CE_TX_PKT_OFFSET_BIT_M - Mask for packet offset in the CE descriptor.
1038  */
1039 #define QDF_CE_TX_PKT_OFFSET_BIT_M   0x0fff0000
1040 
1041 /**
1042  * enum qdf_suspend_type - type of suspend
1043  * @QDF_SYSTEM_SUSPEND: System suspend triggered wlan suspend
1044  * @QDF_RUNTIME_SUSPEND: Runtime pm inactivity timer triggered wlan suspend
1045  */
1046 enum qdf_suspend_type {
1047 	QDF_SYSTEM_SUSPEND,
1048 	QDF_RUNTIME_SUSPEND
1049 };
1050 
1051 /**
1052  * enum qdf_hang_reason - host hang/ssr reason
1053  * @CDS_REASON_UNSPECIFIED: Unspecified reason
1054  * @CDS_RX_HASH_NO_ENTRY_FOUND: No Map for the MAC entry for the received frame
1055  * @CDS_PEER_DELETION_TIMEDOUT: peer deletion timeout happened
1056  * @CDS_PEER_UNMAP_TIMEDOUT: peer unmap timeout
1057  * @CDS_SCAN_REQ_EXPIRED: Scan request timed out
1058  * @CDS_SCAN_ATTEMPT_FAILURES: Consecutive Scan attempt failures
1059  * @CDS_GET_MSG_BUFF_FAILURE: Unable to get the message buffer
1060  * @CDS_ACTIVE_LIST_TIMEOUT: Current command processing is timedout
1061  * @CDS_SUSPEND_TIMEOUT: Timeout for an ACK from FW for suspend request
1062  * @CDS_RESUME_TIMEOUT: Timeout for an ACK from FW for resume request
1063  */
1064 enum qdf_hang_reason {
1065 	QDF_REASON_UNSPECIFIED = 0,
1066 	QDF_RX_HASH_NO_ENTRY_FOUND = 1,
1067 	QDF_PEER_DELETION_TIMEDOUT = 2,
1068 	QDF_PEER_UNMAP_TIMEDOUT = 3,
1069 	QDF_SCAN_REQ_EXPIRED = 4,
1070 	QDF_SCAN_ATTEMPT_FAILURES = 5,
1071 	QDF_GET_MSG_BUFF_FAILURE = 6,
1072 	QDF_ACTIVE_LIST_TIMEOUT = 7,
1073 	QDF_SUSPEND_TIMEOUT = 8,
1074 	QDF_RESUME_TIMEOUT = 9,
1075 };
1076 
1077 /*
1078  * Verbosity levels for stats for which want to have different levels
1079  * @QDF_STATS_VERBOSITY_LEVEL_LOW: Stats verbosity level low
1080  * @QDF_STATS_VERBOSITY_LEVEL_HIGH: Stats verbosity level high
1081  */
1082 enum qdf_stats_verbosity_level {
1083 	QDF_STATS_VERBOSITY_LEVEL_LOW,
1084 	QDF_STATS_VERBOSITY_LEVEL_HIGH
1085 };
1086 
1087 #endif /* __QDF_TYPES_H */
1088