Package: broadcom-sta / 6.30.223.248-3

08-enable_error_traces.patch Patch series | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Description: enable error + add some traces
 .
 tested on: kernel 3.14
Author: Mickael MASSON <mmasson.dev@gmail.com>
Bug-Debian: https://bugs.debian.org/770327

Index: broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_dbg.h
===================================================================
--- broadcom-sta-6.30.223.248.orig/amd64/src/wl/sys/wl_dbg.h	2014-12-07 17:28:28.393534724 +0400
+++ broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_dbg.h	2014-12-07 17:28:28.389534724 +0400
@@ -55,10 +55,12 @@
 
 #define WL_NONE(args)
 
+#define FORCE_TRACE_LEVEL(fmt, ...) do { printk(KERN_ERR fmt, ## __VA_ARGS__); } while (0) /* ## is GCC specific syntax to remove comma when single arg */
+
 #ifdef BCMDBG_ERR
 #define	WL_ERROR(args)		WL_PRINT(args)
 #else
-#define	WL_ERROR(args)
+#define	WL_ERROR(args)		FORCE_TRACE_LEVEL args
 #endif 
 #define	WL_TRACE(args)
 #define WL_APSTA_UPDN(args)
Index: broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_linux.c
===================================================================
--- broadcom-sta-6.30.223.248.orig/amd64/src/wl/sys/wl_linux.c	2014-12-07 17:28:28.393534724 +0400
+++ broadcom-sta-6.30.223.248/amd64/src/wl/sys/wl_linux.c	2014-12-07 17:28:28.389534724 +0400
@@ -1272,6 +1272,7 @@
 		MFREE(wl->osh, wlif->dev, sizeof(struct net_device));
 #else
 		free_netdev(wlif->dev);
+		wlif->dev = NULL;
 #endif 
 	}
 
@@ -2456,8 +2457,10 @@
 		p80211msg_t *phdr;
 
 		len = sizeof(p80211msg_t) + oskb->len - D11_PHY_HDR_LEN;
-		if ((skb = dev_alloc_skb(len)) == NULL)
+		if ((skb = dev_alloc_skb(len)) == NULL) {
+			WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
 			return;
+		}
 
 		skb_put(skb, len);
 		phdr = (p80211msg_t*)skb->data;
@@ -2536,8 +2539,10 @@
 			rtap_len = sizeof(wl_radiotap_ht_brcm_2_t);
 
 		len = rtap_len + (oskb->len - D11_PHY_HDR_LEN);
-		if ((skb = dev_alloc_skb(len)) == NULL)
+		if ((skb = dev_alloc_skb(len)) == NULL) {
+			WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
 			return;
+		}
 
 		skb_put(skb, len);
 
@@ -2665,8 +2670,10 @@
 			len += amsdu_len;
 		}
 
-		if ((skb = dev_alloc_skb(len)) == NULL)
+		if ((skb = dev_alloc_skb(len)) == NULL) {
+			WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__));
 			return;
+		}
 
 		skb_put(skb, len);
 
@@ -2991,7 +2998,7 @@
 }
 
 void
-wl_set_monitor(wl_info_t *wl, int val)
+wl_set_monitor(wl_info_t *wl, int val) /* public => is called by wlc_hybrid.o_shipped */
 {
 	const char *devname;
 	wl_if_t *wlif;