upload tizen1.0 source
[kernel/linux-2.6.36.git] / drivers / net / wireless / bcm4330 / src / wl / sys / wl_dbg.h
1 /*
2  * Minimal debug/trace/assert driver definitions for
3  * Broadcom 802.11 Networking Adapter.
4  *
5  * Copyright (C) 1999-2011, Broadcom Corporation
6  * 
7  *         Unless you and Broadcom execute a separate written software license
8  * agreement governing use of this software, this software is licensed to you
9  * under the terms of the GNU General Public License version 2 (the "GPL"),
10  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
11  * following added to such license:
12  * 
13  *      As a special exception, the copyright holders of this software give you
14  * permission to link this software with independent modules, and to copy and
15  * distribute the resulting executable under terms of your choice, provided that
16  * you also meet, for each linked independent module, the terms and conditions of
17  * the license of that module.  An independent module is a module which is not
18  * derived from this software.  The special exception does not apply to any
19  * modifications of the software.
20  * 
21  *      Notwithstanding the above, under no circumstances may you combine this
22  * software in any way with any other Broadcom software provided under a license
23  * other than the GPL, without Broadcom's express prior written consent.
24  *
25  * $Id: wl_dbg.h,v 1.115.6.3 2010-12-15 21:42:23 $
26  */
27
28
29 #ifndef _wl_dbg_h_
30 #define _wl_dbg_h_
31
32 /* wl_msg_level is a bit vector with defs in wlioctl.h */
33 extern uint32 wl_msg_level;
34 extern uint32 wl_msg_level2;
35
36 #define WL_PRINT(args)      printf args
37
38
39 /* To disable a message completely ... until you need it again */
40 #define WL_NONE(args)
41
42 #define WL_ERROR(args)
43 #define WL_TRACE(args)
44 #ifndef LINUX_POSTMOGRIFY_REMOVAL
45 #ifdef WLMSG_PRHDRS
46 #define WL_PRHDRS(i, p, f, t, r, l) wlc_print_hdrs(i, p, f, t, r, l)
47 #else
48 #define WL_PRHDRS(i, p, f, t, r, l)
49 #endif
50 #ifdef WLMSG_PRPKT
51 #define WL_PRPKT(m, b, n)   prhex(m, b, n)
52 #else
53 #define WL_PRPKT(m, b, n)
54 #endif
55 #ifdef WLMSG_INFORM
56 #define WL_INFORM(args)     WL_PRINT(args)
57 #else
58 #define WL_INFORM(args)
59 #endif
60 #define WL_TMP(args)
61 #ifdef WLMSG_OID
62 #define WL_OID(args)        WL_PRINT(args)
63 #else
64 #define WL_OID(args)
65 #endif
66 #define WL_RATE(args)
67 #ifdef WLMSG_ASSOC
68 #define WL_ASSOC(args)      WL_PRINT(args)
69 #else
70 #define WL_ASSOC(args)
71 #endif
72 #define WL_PRUSR(m, b, n)
73 #ifdef WLMSG_PS
74 #define WL_PS(args)     WL_PRINT(args)
75 #else
76 #define WL_PS(args)
77 #endif
78
79 #define WL_PORT(args)
80 #define WL_DUAL(args)
81 #ifdef WLMSG_WSEC
82 #define WL_WSEC(args)       WL_PRINT(args)
83 #define WL_WSEC_DUMP(args)  WL_PRINT(args)
84 #else
85 #define WL_WSEC(args)
86 #define WL_WSEC_DUMP(args)
87 #endif
88
89 #define WL_REGULATORY(args)
90
91 #ifdef WLMSG_MPC
92 #define WL_MPC(args)        WL_PRINT(args)
93 #else
94 #define WL_MPC(args)
95 #endif
96 #define WL_APSTA(args)
97 #define WL_APSTA_UPDN(args)
98 #define WL_APSTA_BCN(args)
99 #define WL_APSTA_TX(args)
100 #define WL_APSTA_RX(args)
101 #define WL_APSTA_TSF(args)
102 #define WL_APSTA_BSSID(args)
103 #define WL_BA(args)
104 #define WL_MBSS(args)
105 #define WL_PROTO(args)
106
107 #define WL_CAC(args)
108 #define WL_AMSDU(args)
109 #define WL_AMPDU(args)
110 #define WL_FFPLD(args)
111 #define WL_MCHAN(args)
112
113 /* Define WLMSG_DFS automatically for WLTEST builds */
114
115 #ifdef WLMSG_DFS
116 #define WL_DFS(args)        do {if (wl_msg_level & WL_DFS_VAL) WL_PRINT(args);} while (0)
117 #else /* WLMSG_DFS */
118 #define WL_DFS(args)
119 #endif /* WLMSG_DFS */
120 #define WL_WOWL(args)
121 #define WL_DPT(args)
122 #define WL_ASSOC_OR_DPT(args)
123 #ifdef WLMSG_SCAN
124 #define WL_SCAN(args)       WL_PRINT(args)
125 #else
126 #define WL_SCAN(args)
127 #endif
128 #define WL_COEX(args)
129 #define WL_RTDC(w, s, i, j)
130 #define WL_RTDC2(w, s, i, j)
131 #define WL_CHANINT(args)
132 #ifdef WLMSG_BTA
133 #define WL_BTA(args)        WL_PRINT(args)
134 #else
135 #define WL_BTA(args)
136 #endif
137 #define WL_P2P(args)
138
139 #define WL_ERROR_ON()       0
140 #define WL_TRACE_ON()       0
141 #ifdef WLMSG_PRHDRS
142 #define WL_PRHDRS_ON()      1
143 #else
144 #define WL_PRHDRS_ON()      0
145 #endif
146 #ifdef WLMSG_PRPKT
147 #define WL_PRPKT_ON()       1
148 #else
149 #define WL_PRPKT_ON()       0
150 #endif
151 #ifdef WLMSG_INFORM
152 #define WL_INFORM_ON()      1
153 #else
154 #define WL_INFORM_ON()      0
155 #endif
156 #ifdef WLMSG_OID
157 #define WL_OID_ON()     1
158 #else
159 #define WL_OID_ON()     0
160 #endif
161 #define WL_TMP_ON()     0
162 #define WL_RATE_ON()        0
163 #ifdef WLMSG_ASSOC
164 #define WL_ASSOC_ON()       1
165 #else
166 #define WL_ASSOC_ON()       0
167 #endif
168 #define WL_PORT_ON()        0
169 #ifdef WLMSG_WSEC
170 #define WL_WSEC_ON()        1
171 #define WL_WSEC_DUMP_ON()   1
172 #else
173 #define WL_WSEC_ON()        0
174 #define WL_WSEC_DUMP_ON()   0
175 #endif
176 #ifdef WLMSG_MPC
177 #define WL_MPC_ON()     1
178 #else
179 #define WL_MPC_ON()     0
180 #endif
181 #define WL_REGULATORY_ON()  0
182
183 #define WL_APSTA_ON()       0
184 #define WL_BA_ON()      0
185 #define WL_MBSS_ON()        0
186 #ifdef WLMSG_DFS
187 #define WL_DFS_ON()     1
188 #else /* WLMSG_DFS */
189 #define WL_DFS_ON()     0
190 #endif /* WLMSG_DFS */
191 #define WL_DPT_ON()     0
192 #ifdef WLMSG_SCAN
193 #define WL_SCAN_ON()            1
194 #else
195 #define WL_SCAN_ON()            0
196 #endif
197 #ifdef WLMSG_BTA
198 #define WL_BTA_ON()     1
199 #else
200 #define WL_BTA_ON()     0
201 #endif
202 #define WL_P2P_ON()     0
203 #define WL_MCHAN_ON()       0
204
205 #define WL_AMPDU_UPDN(args)
206 #define WL_AMPDU_RX(args)
207 #define WL_AMPDU_ERR(args)
208 #define WL_AMPDU_TX(args)
209 #define WL_AMPDU_CTL(args)
210 #define WL_AMPDU_HW(args)
211 #define WL_AMPDU_HWTXS(args)
212 #define WL_AMPDU_HWDBG(args)
213 #define WL_AMPDU_ERR_ON()       0
214 #define WL_AMPDU_HW_ON()        0
215 #define WL_AMPDU_HWTXS_ON()     0
216
217 #endif /* LINUX_POSTMOGRIFY_REMOVAL */
218
219
220 extern uint32 wl_msg_level;
221 extern uint32 wl_msg_level2;
222 #endif /* _wl_dbg_h_ */