From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: [PATCH] compat-wireless: add patch to fix message tracing in mac80211
Date: Thu, 28 Jun 2012 15:15:18 +0200 [thread overview]
Message-ID: <1340889318.4491.45.camel@jlt3.sipsolutions.net> (raw)
From: Johannes Berg <johannes.berg@intel.com>
Just like in iwlwifi, the tracing in mac80211 needs to
copy va_args as some old kernels don't do it for %pV.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
patches/56-mac80211-trace-fix.patch | 79 +++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
create mode 100644 patches/56-mac80211-trace-fix.patch
diff --git a/patches/56-mac80211-trace-fix.patch b/patches/56-mac80211-trace-fix.patch
new file mode 100644
index 0000000..1e82fb6
--- /dev/null
+++ b/patches/56-mac80211-trace-fix.patch
@@ -0,0 +1,79 @@
+--- a/net/mac80211/trace.c
++++ b/net/mac80211/trace.c
+@@ -15,12 +15,16 @@ void __sdata_info(const char *fmt, ...)
+ struct va_format vaf = {
+ .fmt = fmt,
+ };
+- va_list args;
++ va_list args, args2;
+
+ va_start(args, fmt);
+- vaf.va = &args;
+
++ va_copy(args2, args);
++ vaf.va = &args2;
+ pr_info("%pV", &vaf);
++ va_end(args2);
++
++ vaf.va = &args;
+ trace_mac80211_info(&vaf);
+ va_end(args);
+ }
+@@ -33,10 +37,16 @@ void __sdata_dbg(bool print, const char *fmt, ...)
+ va_list args;
+
+ va_start(args, fmt);
+- vaf.va = &args;
+
+- if (print)
++ if (print) {
++ va_list args2;
++
++ va_copy(args2, args);
++ vaf.va = &args2;
+ pr_debug("%pV", &vaf);
++ va_end(args2);
++ }
++ vaf.va = &args;
+ trace_mac80211_dbg(&vaf);
+ va_end(args);
+ }
+@@ -46,12 +56,16 @@ void __sdata_err(const char *fmt, ...)
+ struct va_format vaf = {
+ .fmt = fmt,
+ };
+- va_list args;
++ va_list args, args2;
+
+ va_start(args, fmt);
+- vaf.va = &args;
+
++ va_copy(args2, args);
++ vaf.va = &args2;
+ pr_err("%pV", &vaf);
++ va_end(args2);
++
++ vaf.va = &args;
+ trace_mac80211_err(&vaf);
+ va_end(args);
+ }
+@@ -64,10 +78,16 @@ void __wiphy_dbg(struct wiphy *wiphy, bool print, const char *fmt, ...)
+ va_list args;
+
+ va_start(args, fmt);
+- vaf.va = &args;
+
+- if (print)
+- wiphy_dbg(wiphy, "%pV", &vaf);
++ if (print) {
++ va_list args2;
++
++ va_copy(args2, args);
++ vaf.va = &args2;
++ pr_debug("%pV", &vaf);
++ va_end(args2);
++ }
++ vaf.va = &args;
+ trace_mac80211_dbg(&vaf);
+ va_end(args);
+ }
--
1.7.10
next reply other threads:[~2012-06-28 13:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-28 13:15 Johannes Berg [this message]
2012-06-28 17:32 ` [PATCH] compat-wireless: add patch to fix message tracing in mac80211 Luis R. Rodriguez
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=1340889318.4491.45.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@gmail.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;
as well as URLs for NNTP newsgroup(s).