From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: Daniel Drake <dsd@gentoo.org>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] zd1211rw: do not ratelimit no-ops
Date: Fri, 06 Feb 2009 14:31:18 +0100 [thread overview]
Message-ID: <1233927078.4175.0.camel@johannes.local> (raw)
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>
---
drivers/net/wireless/zd1211rw/zd_def.h | 5 +++++
drivers/net/wireless/zd1211rw/zd_mac.c | 7 +++----
2 files changed, 8 insertions(+), 4 deletions(-)
--- wireless-testing.orig/drivers/net/wireless/zd1211rw/zd_def.h 2009-02-06 14:25:41.000000000 +0100
+++ wireless-testing/drivers/net/wireless/zd1211rw/zd_def.h 2009-02-06 14:26:42.000000000 +0100
@@ -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
--- wireless-testing.orig/drivers/net/wireless/zd1211rw/zd_mac.c 2009-02-06 14:25:27.000000000 +0100
+++ wireless-testing/drivers/net/wireless/zd1211rw/zd_mac.c 2009-02-06 14:26:57.000000000 +0100
@@ -793,10 +793,9 @@ static void zd_process_intr(struct work_
struct zd_mac *mac = container_of(work, struct zd_mac, process_intr);
int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer+4));
- if (int_status & INT_CFG_NEXT_BCN) {
- if (net_ratelimit())
- dev_dbg_f(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n");
- } else
+ if (int_status & INT_CFG_NEXT_BCN)
+ dev_dbg_f_limit(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n");
+ else
dev_dbg_f(zd_mac_dev(mac), "Unsupported interrupt\n");
zd_chip_enable_hwint(&mac->chip);
reply other threads:[~2009-02-06 14:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1233927078.4175.0.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=dsd@gentoo.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox