Resolved compiler warning
[ralink_drivers/rt2870_fbsd72.git] / rt2870_debug.h
bloba5fc3ee18998fd193fe97f7c9182a327003d6019
2 /*-
3 * Copyright (c) 2009-2010 Alexander Egorenkov <egorenar@gmail.com>
4 * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 #ifndef _RT2870_DEBUG_H_
20 #define _RT2870_DEBUG_H_
22 #ifdef RT2870_DEBUG
24 enum
26 RT2870_DEBUG_EEPROM = 0x00000001,
27 RT2870_DEBUG_RX = 0x00000002,
28 RT2870_DEBUG_TX = 0x00000004,
29 RT2870_DEBUG_INTR = 0x00000008,
30 RT2870_DEBUG_STATE = 0x00000010,
31 RT2870_DEBUG_CHAN = 0x00000020,
32 RT2870_DEBUG_NODE = 0x00000040,
33 RT2870_DEBUG_KEY = 0x00000080,
34 RT2870_DEBUG_PROT = 0x00000100,
35 RT2870_DEBUG_WME = 0x00000200,
36 RT2870_DEBUG_BEACON = 0x00000400,
37 RT2870_DEBUG_BA = 0x00000800,
38 RT2870_DEBUG_STATS = 0x00001000,
39 RT2870_DEBUG_RATE = 0x00002000,
40 RT2870_DEBUG_PERIODIC = 0x00004000,
41 RT2870_DEBUG_WATCHDOG = 0x00008000,
42 RT2870_DEBUG_ANY = 0xffffffff
45 #define RT2870_DPRINTF(sc, m, fmt, ...) do { if ((sc)->debug & (m)) printf(fmt, __VA_ARGS__); } while (0)
47 #else
49 #define RT2870_DPRINTF(sc, m, fmt, ...)
51 #endif /* #ifdef RT2870_DEBUG */
53 #endif /* #ifndef _RT2870_DEBUG_H_ */