summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/zd1211rw/zd_def.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-02-10 21:25:37 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-02-13 13:45:19 -0500
commit570a0a7c3ba6e44b0fe7f1d42e69ba139b533737 (patch)
tree82b25c4475534ed337fdb5f2b4e82b8dae32f064 /drivers/net/wireless/zd1211rw/zd_def.h
parent572e00122190e3064fa19bd9780b146d2d0f1905 (diff)
zd1211rw: do not ratelimit no-ops
It is rather confusing to see this in the log: [ 695.606877] __ratelimit: 40 callbacks suppressed [ 700.726878] __ratelimit: 40 callbacks suppressed without ever seeing any actual message. This is because zd1211rw doesn't compile out the net_ratelimit() call properly if debugging is not enabled. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_def.h')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_def.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_def.h b/drivers/net/wireless/zd1211rw/zd_def.h
index 5200db405610..b68f7c02c512 100644
--- a/drivers/net/wireless/zd1211rw/zd_def.h
+++ b/drivers/net/wireless/zd1211rw/zd_def.h
@@ -33,8 +33,13 @@ typedef u16 __nocast zd_addr_t;
#ifdef DEBUG
# define dev_dbg_f(dev, fmt, args...) \
dev_printk_f(KERN_DEBUG, dev, fmt, ## args)
+# define dev_dbg_f_limit(dev, fmt, args...) do {\
+ if (net_ratelimit())
+ dev_printk_f(KERN_DEBUG, dev, fmt, ## args)
+} while (0)
#else
# define dev_dbg_f(dev, fmt, args...) do { (void)(dev); } while (0)
+# define dev_dbg_f_limit(dev, fmt, args...) do { (void)(dev); } while (0)
#endif /* DEBUG */
#ifdef DEBUG