xref: /wlan-driver/qcacld-3.0/core/mac/src/sys/legacy/src/utils/inc/dot11fdefs.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2011-2012, 2014-2017 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #ifndef DOT11FDEFS_H_82A7B72E_C36C_465D_82A7_139EA5322582
20 #define DOT11FDEFS_H_82A7B72E_C36C_465D_82A7_139EA5322582
21 /**
22  * \file dot11fdefs.h
23  *
24  * \brief C defines customizing our framesc-generated code
25  *
26  *
27  *
28  *
29  * 'framesc' generates code written in terms of a number of macros
30  * intended for customization.
31  *
32  *
33  */
34 
35 #include "parser_api.h"
36 
37 /* This controls how the "dot11f" code copies memory */
38 #define DOT11F_MEMCPY(ctx, dst, src, len) \
39 	qdf_mem_copy((uint8_t *)(dst), (uint8_t *)(src), (len))
40 
41 /* This controls how the "dot11f" code compares memory */
42 #define DOT11F_MEMCMP(ctx, lhs, rhs, len) \
43 	(qdf_mem_cmp((uint8_t *)(lhs), (uint8_t *)(rhs), (len)))
44 
45 #if defined(DBG) && (DBG != 0)
46 
47 #                               /* define DOT11F_ENABLE_LOGGING */
48 #                               /* define DOT11F_DUMP_FRAMES */
49 #define DOT11F_LOG_GATE (4)
50 #define FRAMES_SEV_FOR_FRAME(ctx, sig) \
51 	(DOT11F_ASSOCREQUEST == (sig) ? 3 : 5)
52 
53 #if defined(DOT11F_ENABLE_LOGGING)
54 
55 #define DOT11F_HAVE_LOG_MACROS
56 
57 #define FRAMES_LOG0(ctx, sev, fmt) \
58 	QDF_TRACE(QDF_MODULE_ID_PE, (sev), (fmt));
59 
60 #define FRAMES_LOG1(ctx, sev, fmt, p1) \
61 	QDF_TRACE(QDF_MODULE_ID_PE, (sev), (fmt), (p1));
62 
63 #define FRAMES_LOG2(ctx, sev, fmt, p1, p2) \
64 	QDF_TRACE(QDF_MODULE_ID_PE, (sev), (fmt), (p1), (p2));
65 
66 #define FRAMES_LOG3(ctx, sev, fmt, p1, p2, p3) \
67 	QDF_TRACE(QDF_MODULE_ID_PE, (sev), (fmt), (p1), (p2), (p3));
68 
69 #define FRAMES_DUMP(ctx, sev, p, n) \
70 	QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, (sev), (p), (n);
71 
72 #endif /* #if defined( DOT11F_ENABLE_LOGGING ) */
73 
74 #else
75 
76 #undef DOT11F_ENABLE_LOGGING
77 #undef DOT11F_DUMP_FRAMES
78 #define DOT11F_LOG_GATE (1)
79 
80 #endif
81 
82 /* #define DOT11F_ENABLE_DBG_BREAK ( 1 ) */
83 
84 /* Local Variables: */
85 /* fill-column: 72 */
86 /* indent-tabs-mode: nil */
87 /* show-trailing-whitespace: t */
88 /* End: */
89 
90 #endif /* DOT11FDEFS_H_82A7B72E_C36C_465D_82A7_139EA5322582 */
91