From: Johannes Berg Date: Thu, 28 Jun 2012 13:15:18 +0000 (+0200) Subject: compat-wireless: add patch to fix message tracing in mac80211 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=684ab8565a70c14dd82a40c41c5951e7eec1bdcb;p=openwrt%2Fstaging%2Fblogic.git compat-wireless: add patch to fix message tracing in mac80211 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 Signed-off-by: Luis R. Rodriguez --- diff --git a/patches/56-mac80211-trace-fix.patch b/patches/56-mac80211-trace-fix.patch new file mode 100644 index 000000000000..1e82fb60bd5e --- /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); + }