• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Debug/trace/assert driver definitions for Dongle Host Driver.
3  *
4  * Copyright (C) 1999-2009, Broadcom Corporation
5  *
6  *      Unless you and Broadcom execute a separate written software license
7  * agreement governing use of this software, this software is licensed to you
8  * under the terms of the GNU General Public License version 2 (the "GPL"),
9  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10  * following added to such license:
11  *
12  *      As a special exception, the copyright holders of this software give you
13  * permission to link this software with independent modules, and to copy and
14  * distribute the resulting executable under terms of your choice, provided that
15  * you also meet, for each linked independent module, the terms and conditions of
16  * the license of that module.  An independent module is a module which is not
17  * derived from this software.  The special exception does not apply to any
18  * modifications of the software.
19  *
20  *      Notwithstanding the above, under no circumstances may you combine this
21  * software in any way with any other Broadcom software provided under a license
22  * other than the GPL, without Broadcom's express prior written consent.
23  *
24  * $Id: dhd_dbg.h,v 1.5.6.2.4.2.14.2 2009/05/20 19:41:53 Exp $
25  */
26 
27 #ifndef _dhd_dbg_
28 #define _dhd_dbg_
29 
30 #ifdef DHD_DEBUG
31 
32 #define DHD_ERROR(args)		do {if (dhd_msg_level & DHD_ERROR_VAL) printf args;} while (0)
33 #define DHD_TRACE(args)		do {if (dhd_msg_level & DHD_TRACE_VAL) printf args;} while (0)
34 #define DHD_INFO(args)		do {if (dhd_msg_level & DHD_INFO_VAL) printf args;} while (0)
35 #define DHD_DATA(args)		do {if (dhd_msg_level & DHD_DATA_VAL) printf args;} while (0)
36 #define DHD_CTL(args)		do {if (dhd_msg_level & DHD_CTL_VAL) printf args;} while (0)
37 #define DHD_TIMER(args)		do {if (dhd_msg_level & DHD_TIMER_VAL) printf args;} while (0)
38 #define DHD_HDRS(args)		do {if (dhd_msg_level & DHD_HDRS_VAL) printf args;} while (0)
39 #define DHD_BYTES(args)		do {if (dhd_msg_level & DHD_BYTES_VAL) printf args;} while (0)
40 #define DHD_INTR(args)		do {if (dhd_msg_level & DHD_INTR_VAL) printf args;} while (0)
41 #define DHD_GLOM(args)		do {if (dhd_msg_level & DHD_GLOM_VAL) printf args;} while (0)
42 #define DHD_EVENT(args)		do {if (dhd_msg_level & DHD_EVENT_VAL) printf args;} while (0)
43 #define DHD_BTA(args)		do {if (dhd_msg_level & DHD_BTA_VAL) printf args;} while (0)
44 
45 #define DHD_ERROR_ON()		(dhd_msg_level & DHD_ERROR_VAL)
46 #define DHD_TRACE_ON()		(dhd_msg_level & DHD_TRACE_VAL)
47 #define DHD_INFO_ON()		(dhd_msg_level & DHD_INFO_VAL)
48 #define DHD_DATA_ON()		(dhd_msg_level & DHD_DATA_VAL)
49 #define DHD_CTL_ON()		(dhd_msg_level & DHD_CTL_VAL)
50 #define DHD_TIMER_ON()		(dhd_msg_level & DHD_TIMER_VAL)
51 #define DHD_HDRS_ON()		(dhd_msg_level & DHD_HDRS_VAL)
52 #define DHD_BYTES_ON()		(dhd_msg_level & DHD_BYTES_VAL)
53 #define DHD_INTR_ON()		(dhd_msg_level & DHD_INTR_VAL)
54 #define DHD_GLOM_ON()		(dhd_msg_level & DHD_GLOM_VAL)
55 #define DHD_EVENT_ON()		(dhd_msg_level & DHD_EVENT_VAL)
56 #define DHD_BTA_ON()		(dhd_msg_level & DHD_BTA_VAL)
57 
58 #else /* DHD_DEBUG */
59 
60 #define DHD_ERROR(args)		printk args
61 #define DHD_TRACE(args)
62 #define DHD_INFO(args)
63 #define DHD_DATA(args)
64 #define DHD_CTL(args)
65 #define DHD_TIMER(args)
66 #define DHD_HDRS(args)
67 #define DHD_BYTES(args)
68 #define DHD_INTR(args)
69 #define DHD_GLOM(args)
70 #define DHD_EVENT(args)
71 #define DHD_BTA(args)
72 
73 #define DHD_ERROR_ON()		0
74 #define DHD_TRACE_ON()		0
75 #define DHD_INFO_ON()		0
76 #define DHD_DATA_ON()		0
77 #define DHD_CTL_ON()		0
78 #define DHD_TIMER_ON()		0
79 #define DHD_HDRS_ON()		0
80 #define DHD_BYTES_ON()		0
81 #define DHD_INTR_ON()		0
82 #define DHD_GLOM_ON()		0
83 #define DHD_EVENT_ON()		0
84 #define DHD_BTA_ON()		0
85 
86 #endif /* DHD_DEBUG */
87 
88 #define DHD_LOG(args)
89 
90 #define DHD_NONE(args)
91 extern int dhd_msg_level;
92 
93 /* Defines msg bits */
94 #include <dhdioctl.h>
95 
96 #endif /* _dhd_dbg_ */
97