summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/37-vsnprintk/drivers_net_wireless_ath_main.patch
blob: b63faeebd5087f5b825b815b85edec612d02e306 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--- a/drivers/net/wireless/ath/main.c
+++ b/drivers/net/wireless/ath/main.c
@@ -67,6 +67,7 @@ bool ath_is_mybeacon(struct ath_common *
 }
 EXPORT_SYMBOL(ath_is_mybeacon);
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
 void ath_printk(const char *level, const struct ath_common* common,
 		const char *fmt, ...)
 {
@@ -86,4 +87,24 @@ void ath_printk(const char *level, const
 
 	va_end(args);
 }
+#else
+void ath_printk(const char *level, const struct ath_common* common,
+		const char *fmt, ...)
+{
+	va_list args;
+
+	va_start(args, fmt);
+
+	if (common && common->hw && common->hw->wiphy)
+		printk("%sath: %s: ",
+		       level, wiphy_name(common->hw->wiphy));
+	else
+		printk("%sath: ", level);
+
+	vprintk(fmt, args);
+
+	va_end(args);
+}
+#endif
+
 EXPORT_SYMBOL(ath_printk);