rk: temp revert rk change
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / bcmdhd / dhd_dbg.h
1 /*
2  * Debug/trace/assert driver definitions for Dongle Host Driver.
3  *
4  * Copyright (C) 1999-2011, 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 285933 2011-09-23 21:45:31Z $
25  */
26
27 #ifndef _dhd_dbg_
28 #define _dhd_dbg_
29
30 #if defined(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 #define DHD_ARPOE(args)         do {if (dhd_msg_level & DHD_ARPOE_VAL) printf args;} while (0)
47
48 #define DHD_ERROR_ON()          (dhd_msg_level & DHD_ERROR_VAL)
49 #define DHD_TRACE_ON()          (dhd_msg_level & DHD_TRACE_VAL)
50 #define DHD_INFO_ON()           (dhd_msg_level & DHD_INFO_VAL)
51 #define DHD_DATA_ON()           (dhd_msg_level & DHD_DATA_VAL)
52 #define DHD_CTL_ON()            (dhd_msg_level & DHD_CTL_VAL)
53 #define DHD_TIMER_ON()          (dhd_msg_level & DHD_TIMER_VAL)
54 #define DHD_HDRS_ON()           (dhd_msg_level & DHD_HDRS_VAL)
55 #define DHD_BYTES_ON()          (dhd_msg_level & DHD_BYTES_VAL)
56 #define DHD_INTR_ON()           (dhd_msg_level & DHD_INTR_VAL)
57 #define DHD_GLOM_ON()           (dhd_msg_level & DHD_GLOM_VAL)
58 #define DHD_EVENT_ON()          (dhd_msg_level & DHD_EVENT_VAL)
59 #define DHD_BTA_ON()            (dhd_msg_level & DHD_BTA_VAL)
60 #define DHD_ISCAN_ON()          (dhd_msg_level & DHD_ISCAN_VAL)
61 #define DHD_ARPOE_ON()          (dhd_msg_level & DHD_ARPOE_VAL)
62
63 #else /* defined(BCMDBG) || defined(DHD_DEBUG) */
64
65 #define DHD_ERROR(args)         do {if (net_ratelimit()) printf args;} while (0)
66 #define DHD_TRACE(args)
67 #define DHD_INFO(args)
68 #define DHD_DATA(args)
69 #define DHD_CTL(args)
70 #define DHD_TIMER(args)
71 #define DHD_HDRS(args)
72 #define DHD_BYTES(args)
73 #define DHD_INTR(args)
74 #define DHD_GLOM(args)
75 #define DHD_EVENT(args)
76 #define DHD_BTA(args)
77 #define DHD_ISCAN(args)
78 #define DHD_ARPOE(args)
79
80 #define DHD_ERROR_ON()          0
81 #define DHD_TRACE_ON()          0
82 #define DHD_INFO_ON()           0
83 #define DHD_DATA_ON()           0
84 #define DHD_CTL_ON()            0
85 #define DHD_TIMER_ON()          0
86 #define DHD_HDRS_ON()           0
87 #define DHD_BYTES_ON()          0
88 #define DHD_INTR_ON()           0
89 #define DHD_GLOM_ON()           0
90 #define DHD_EVENT_ON()          0
91 #define DHD_BTA_ON()            0
92 #define DHD_ISCAN_ON()          0
93 #define DHD_ARPOE_ON()          0
94 #endif 
95
96 #define DHD_LOG(args)
97
98 #define DHD_BLOG(cp, size)
99 #define DHD_NONE(args)
100 extern int dhd_msg_level;
101
102 /* Defines msg bits */
103 #include <dhdioctl.h>
104
105 #endif /* _dhd_dbg_ */