1 /* ----------------------------------------------------------------------------- 2 * Copyright (c) 2011 Ozmo Inc 3 * Released under the GNU General Public License Version 2 (GPLv2). 4 * ----------------------------------------------------------------------------- 5 */ 6 #ifndef _OZTRACE_H_ 7 #define _OZTRACE_H_ 8 #include "ozconfig.h" 9 10 #define TRACE_PREFIX KERN_ALERT "OZWPAN: " 11 12 #ifdef WANT_TRACE 13 #define oz_trace(...) printk(TRACE_PREFIX __VA_ARGS__) 14 #ifdef WANT_VERBOSE_TRACE 15 extern unsigned long trace_flags; 16 #define oz_trace2(_flag, ...) \ 17 do { if (trace_flags & _flag) printk(TRACE_PREFIX __VA_ARGS__); \ 18 } while (0) 19 #else 20 #define oz_trace2(...) 21 #endif /* #ifdef WANT_VERBOSE_TRACE */ 22 #else 23 #define oz_trace(...) 24 #define oz_trace2(...) 25 #endif /* #ifdef WANT_TRACE */ 26 27 #define OZ_TRACE_STREAM 0x1 28 #define OZ_TRACE_URB 0x2 29 #define OZ_TRACE_CTRL_DETAIL 0x4 30 #define OZ_TRACE_HUB 0x8 31 #define OZ_TRACE_RX_FRAMES 0x10 32 #define OZ_TRACE_TX_FRAMES 0x20 33 34 #endif /* Sentry */ 35 36