diff mbox

[3/3] mac80211: don't spam mesh probe response messages

Message ID 1361045050.1948.4.camel@joe-AO722 (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Joe Perches Feb. 16, 2013, 8:04 p.m. UTC
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(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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);
 }