GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / net / wireless / zd1211rw / zd_def.h
blob6ac597ffd3b9031e73b8229ef91b5e1f4520cc44
1 /* ZD1211 USB-WLAN driver for Linux
3 * Copyright (C) 2005-2007 Ulrich Kunitz <kune@deine-taler.de>
4 * Copyright (C) 2006-2007 Daniel Drake <dsd@gentoo.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef _ZD_DEF_H
22 #define _ZD_DEF_H
24 #include <linux/kernel.h>
25 #include <linux/stringify.h>
26 #include <linux/device.h>
28 typedef u16 __nocast zd_addr_t;
30 #define dev_printk_f(level, dev, fmt, args...) \
31 dev_printk(level, dev, "%s() " fmt, __func__, ##args)
33 #ifdef DEBUG
34 # define dev_dbg_f(dev, fmt, args...) \
35 dev_printk_f(KERN_DEBUG, dev, fmt, ## args)
36 # define dev_dbg_f_limit(dev, fmt, args...) do { \
37 if (net_ratelimit()) \
38 dev_printk_f(KERN_DEBUG, dev, fmt, ## args); \
39 } while (0)
40 #else
41 # define dev_dbg_f(dev, fmt, args...) do { (void)(dev); } while (0)
42 # define dev_dbg_f_limit(dev, fmt, args...) do { (void)(dev); } while (0)
43 #endif /* DEBUG */
45 #ifdef DEBUG
46 # define ZD_ASSERT(x) \
47 do { \
48 if (!(x)) { \
49 pr_debug("%s:%d ASSERT %s VIOLATED!\n", \
50 __FILE__, __LINE__, __stringify(x)); \
51 dump_stack(); \
52 } \
53 } while (0)
54 #else
55 # define ZD_ASSERT(x) do { } while (0)
56 #endif
58 #ifdef DEBUG
59 # define ZD_MEMCLEAR(pointer, size) memset((pointer), 0xff, (size))
60 #else
61 # define ZD_MEMCLEAR(pointer, size) do { } while (0)
62 #endif
64 #endif /* _ZD_DEF_H */