Linux wireless drivers development
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Thomas Pedersen <thomas@cozybit.com>
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org,
	devel@lists.open80211s.org
Subject: Re: [PATCH 3/3] mac80211: don't spam mesh probe response messages
Date: Sat, 16 Feb 2013 12:04:10 -0800	[thread overview]
Message-ID: <1361045050.1948.4.camel@joe-AO722> (raw)
In-Reply-To: <1361040066-5771-3-git-send-email-thomas@cozybit.com>

On Sat, 2013-02-16 at 10:41 -0800, Thomas Pedersen wrote:
> If mesh plink debugging is enabled, this gets annoying in
> a crowded environment, fast.
> 
> Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
> ---
>  net/mac80211/mesh.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
> index b022332..29ce2aa 100644
> --- a/net/mac80211/mesh.c
> +++ b/net/mac80211/mesh.c
> @@ -925,7 +925,6 @@ ieee80211_mesh_rx_probe_req(struct ieee80211_sub_if_data *sdata,
>  	hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
>  					 IEEE80211_STYPE_PROBE_RESP);
>  	memcpy(hdr->da, mgmt->sa, ETH_ALEN);
> -	mpl_dbg(sdata, "sending probe resp. to %pM\n", hdr->da);

I think the problem isn't here so much as
_sdata_dbg which doesn't allow per-site
control via dynamic_debug.

How about adding that instead or perhaps
using some ratelimit control?

Something like:

 net/mac80211/debug.h | 6 +++++-
 net/mac80211/trace.c | 2 --
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/net/mac80211/debug.h b/net/mac80211/debug.h
index 8f383a5..da102d6 100644
--- a/net/mac80211/debug.h
+++ b/net/mac80211/debug.h
@@ -72,7 +72,11 @@ void __wiphy_dbg(struct wiphy *wiphy, bool print, const char *fmt, ...)
 #define _sdata_info(sdata, fmt, ...)					\
 	__sdata_info("%s: " fmt, (sdata)->name, ##__VA_ARGS__)
 #define _sdata_dbg(print, sdata, fmt, ...)				\
-	__sdata_dbg(print, "%s: " fmt, (sdata)->name, ##__VA_ARGS__)
+do {									\
+	if (print)							\
+		pr_debug(fmt, ##__VA_ARGS__);				\
+	__sdata_dbg(print, "%s: " fmt, (sdata)->name, ##__VA_ARGS__);	\
+} while (0)
 #define _sdata_err(sdata, fmt, ...)					\
 	__sdata_err("%s: " fmt, (sdata)->name, ##__VA_ARGS__)
 #define _wiphy_dbg(print, wiphy, fmt, ...)				\
diff --git a/net/mac80211/trace.c b/net/mac80211/trace.c
index 386e45d..03a70fc 100644
--- a/net/mac80211/trace.c
+++ b/net/mac80211/trace.c
@@ -35,8 +35,6 @@ void __sdata_dbg(bool print, const char *fmt, ...)
 	va_start(args, fmt);
 	vaf.va = &args;
 
-	if (print)
-		pr_debug("%pV", &vaf);
 	trace_mac80211_dbg(&vaf);
 	va_end(args);
 }



  reply	other threads:[~2013-02-16 20:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-16 18:41 [PATCH 1/3] mac80211: clean up mesh HT operation Thomas Pedersen
2013-02-16 18:41 ` [PATCH 2/3] mac80211: stringify mesh peering events Thomas Pedersen
2013-02-16 18:41 ` [PATCH 3/3] mac80211: don't spam mesh probe response messages Thomas Pedersen
2013-02-16 20:04   ` Joe Perches [this message]
2013-02-18 14:26 ` [PATCH 1/3] mac80211: clean up mesh HT operation Johannes Berg

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=1361045050.1948.4.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=devel@lists.open80211s.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=thomas@cozybit.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