aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcm4329/dhd_dbg.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/bcm4329/dhd_dbg.h')
-rw-r--r--drivers/net/wireless/bcm4329/dhd_dbg.h100
1 files changed, 100 insertions, 0 deletions
diff --git a/drivers/net/wireless/bcm4329/dhd_dbg.h b/drivers/net/wireless/bcm4329/dhd_dbg.h
new file mode 100644
index 00000000000..b48c1d70f14
--- /dev/null
+++ b/drivers/net/wireless/bcm4329/dhd_dbg.h
@@ -0,0 +1,100 @@
1/*
2 * Debug/trace/assert driver definitions for Dongle Host Driver.
3 *
4 * Copyright (C) 1999-2010, 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.10 2010/05/21 21:49:38 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) && (net_ratelimit())) \
33 printf args;} while (0)
34#define DHD_TRACE(args) do {if (dhd_msg_level & DHD_TRACE_VAL) printf args;} while (0)
35#define DHD_INFO(args) do {if (dhd_msg_level & DHD_INFO_VAL) printf args;} while (0)
36#define DHD_DATA(args) do {if (dhd_msg_level & DHD_DATA_VAL) printf args;} while (0)
37#define DHD_CTL(args) do {if (dhd_msg_level & DHD_CTL_VAL) printf args;} while (0)
38#define DHD_TIMER(args) do {if (dhd_msg_level & DHD_TIMER_VAL) printf args;} while (0)
39#define DHD_HDRS(args) do {if (dhd_msg_level & DHD_HDRS_VAL) printf args;} while (0)
40#define DHD_BYTES(args) do {if (dhd_msg_level & DHD_BYTES_VAL) printf args;} while (0)
41#define DHD_INTR(args) do {if (dhd_msg_level & DHD_INTR_VAL) printf args;} while (0)
42#define DHD_GLOM(args) do {if (dhd_msg_level & DHD_GLOM_VAL) printf args;} while (0)
43#define DHD_EVENT(args) do {if (dhd_msg_level & DHD_EVENT_VAL) printf args;} while (0)
44#define DHD_BTA(args) do {if (dhd_msg_level & DHD_BTA_VAL) printf args;} while (0)
45#define DHD_ISCAN(args) do {if (dhd_msg_level & DHD_ISCAN_VAL) printf args;} while (0)
46
47#define DHD_ERROR_ON() (dhd_msg_level & DHD_ERROR_VAL)
48#define DHD_TRACE_ON() (dhd_msg_level & DHD_TRACE_VAL)
49#define DHD_INFO_ON() (dhd_msg_level & DHD_INFO_VAL)
50#define DHD_DATA_ON() (dhd_msg_level & DHD_DATA_VAL)
51#define DHD_CTL_ON() (dhd_msg_level & DHD_CTL_VAL)
52#define DHD_TIMER_ON() (dhd_msg_level & DHD_TIMER_VAL)
53#define DHD_HDRS_ON() (dhd_msg_level & DHD_HDRS_VAL)
54#define DHD_BYTES_ON() (dhd_msg_level & DHD_BYTES_VAL)
55#define DHD_INTR_ON() (dhd_msg_level & DHD_INTR_VAL)
56#define DHD_GLOM_ON() (dhd_msg_level & DHD_GLOM_VAL)
57#define DHD_EVENT_ON() (dhd_msg_level & DHD_EVENT_VAL)
58#define DHD_BTA_ON() (dhd_msg_level & DHD_BTA_VAL)
59#define DHD_ISCAN_ON() (dhd_msg_level & DHD_ISCAN_VAL)
60
61#else /* DHD_DEBUG */
62
63#define DHD_ERROR(args) do {if (net_ratelimit()) printf args;} while (0)
64#define DHD_TRACE(args)
65#define DHD_INFO(args)
66#define DHD_DATA(args)
67#define DHD_CTL(args)
68#define DHD_TIMER(args)
69#define DHD_HDRS(args)
70#define DHD_BYTES(args)
71#define DHD_INTR(args)
72#define DHD_GLOM(args)
73#define DHD_EVENT(args)
74#define DHD_BTA(args)
75#define DHD_ISCAN(args)
76
77#define DHD_ERROR_ON() 0
78#define DHD_TRACE_ON() 0
79#define DHD_INFO_ON() 0
80#define DHD_DATA_ON() 0
81#define DHD_CTL_ON() 0
82#define DHD_TIMER_ON() 0
83#define DHD_HDRS_ON() 0
84#define DHD_BYTES_ON() 0
85#define DHD_INTR_ON() 0
86#define DHD_GLOM_ON() 0
87#define DHD_EVENT_ON() 0
88#define DHD_BTA_ON() 0
89#define DHD_ISCAN_ON() 0
90#endif /* DHD_DEBUG */
91
92#define DHD_LOG(args)
93
94#define DHD_NONE(args)
95extern int dhd_msg_level;
96
97/* Defines msg bits */
98#include <dhdioctl.h>
99
100#endif /* _dhd_dbg_ */