linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] compat-wireless: Fix ath9k debug log issue.
@ 2011-01-31 11:37 Senthil Balasubramanian
  2011-01-31 18:58 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Senthil Balasubramanian @ 2011-01-31 11:37 UTC (permalink / raw)
  To: Luis.rodriguez, mcgrof; +Cc: linux-wireless, Senthil Balasubramanian

ath9k debug logs are not shown as we are using recursive vsnprintf
which are supported in kernel 2.6.36 and above. use vprintk for older
kernels.

This patch has fixed the issue.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
---
 patches/37-vsnprintk.patch |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)
 create mode 100644 patches/37-vsnprintk.patch

diff --git a/patches/37-vsnprintk.patch b/patches/37-vsnprintk.patch
new file mode 100644
index 0000000..93d1a00
--- /dev/null
+++ b/patches/37-vsnprintk.patch
@@ -0,0 +1,28 @@
+diff --git a/drivers/net/wireless/ath/main.c b/drivers/net/wireless/ath/main.c
+index c325202..e3e60d4 100644
+--- a/drivers/net/wireless/ath/main.c
++++ b/drivers/net/wireless/ath/main.c
+@@ -60,16 +60,23 @@ EXPORT_SYMBOL(ath_rxbuf_alloc);
+ int ath_printk(const char *level, struct ath_common *common,
+ 	       const char *fmt, ...)
+ {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+ 	struct va_format vaf;
++#endif
+ 	va_list args;
+ 	int rtn;
+ 
+ 	va_start(args, fmt);
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+ 	vaf.fmt = fmt;
+ 	vaf.va = &args;
+ 
+ 	rtn = printk("%sath: %pV", level, &vaf);
++#else
++	printk("%sath: ", level);
++	rtn = vprintk(fmt, args);
++#endif
+ 
+ 	va_end(args);
+ 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-01 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-31 11:37 [PATCH 1/1] compat-wireless: Fix ath9k debug log issue Senthil Balasubramanian
2011-01-31 18:58 ` Joe Perches
2011-02-01 13:33   ` Senthil Balasubramanian

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).