Commit 570a0a7c authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

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: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 572e0012
...@@ -33,8 +33,13 @@ typedef u16 __nocast zd_addr_t; ...@@ -33,8 +33,13 @@ typedef u16 __nocast zd_addr_t;
#ifdef DEBUG #ifdef DEBUG
# define dev_dbg_f(dev, fmt, args...) \ # define dev_dbg_f(dev, fmt, args...) \
dev_printk_f(KERN_DEBUG, 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 #else
# define dev_dbg_f(dev, fmt, args...) do { (void)(dev); } while (0) # 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 */ #endif /* DEBUG */
#ifdef DEBUG #ifdef DEBUG
......
...@@ -793,10 +793,9 @@ static void zd_process_intr(struct work_struct *work) ...@@ -793,10 +793,9 @@ static void zd_process_intr(struct work_struct *work)
struct zd_mac *mac = container_of(work, struct zd_mac, process_intr); struct zd_mac *mac = container_of(work, struct zd_mac, process_intr);
int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer+4)); int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer+4));
if (int_status & INT_CFG_NEXT_BCN) { if (int_status & INT_CFG_NEXT_BCN)
if (net_ratelimit()) dev_dbg_f_limit(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n");
dev_dbg_f(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n"); else
} else
dev_dbg_f(zd_mac_dev(mac), "Unsupported interrupt\n"); dev_dbg_f(zd_mac_dev(mac), "Unsupported interrupt\n");
zd_chip_enable_hwint(&mac->chip); zd_chip_enable_hwint(&mac->chip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment