update to latest madwifi snapshot - fixes some noderef bugs
[openwrt/openwrt.git] / package / madwifi / patches / 200-no_debug.patch
1 Index: madwifi-ng-r2978-20071127/ath/if_ath.c
2 ===================================================================
3 --- madwifi-ng-r2978-20071127.orig/ath/if_ath.c 2007-11-27 21:43:39.632991016 +0100
4 +++ madwifi-ng-r2978-20071127/ath/if_ath.c 2007-11-27 22:09:32.889506059 +0100
5 @@ -67,7 +67,7 @@
6 #include "if_media.h"
7 #include "if_llc.h"
8
9 -#define AR_DEBUG
10 +#undef AR_DEBUG
11
12 #include <net80211/ieee80211_var.h>
13 #include <net80211/ieee80211_radiotap.h>
14 @@ -535,9 +535,11 @@
15 u_int8_t csz;
16
17 sc->devid = devid;
18 +#ifdef AR_DEBUG
19 ath_debug_global = (ath_debug & ATH_DEBUG_GLOBAL);
20 sc->sc_debug = (ath_debug & ~ATH_DEBUG_GLOBAL);
21 DPRINTF(sc, ATH_DEBUG_ANY, "%s: devid 0x%x\n", __func__, devid);
22 +#endif
23
24 /*
25 * Cache line size is used to size and align various
26 @@ -1268,12 +1270,14 @@
27 /* If no default VAP debug flags are passed, allow a few to
28 * transfer down from the driver to new VAPs so we can have load
29 * time debugging for VAPs too. */
30 +#ifdef AR_DEBUG
31 vap->iv_debug = 0 |
32 ((sc->sc_debug & ATH_DEBUG_RATE) ? IEEE80211_MSG_XRATE : 0) |
33 ((sc->sc_debug & ATH_DEBUG_XMIT) ? IEEE80211_MSG_OUTPUT : 0) |
34 ((sc->sc_debug & ATH_DEBUG_RECV) ? IEEE80211_MSG_INPUT : 0) |
35 0
36 ;
37 +#endif
38 }
39 ic->ic_debug = (sc->sc_default_ieee80211_debug & IEEE80211_MSG_IC);
40
41 @@ -9872,9 +9876,11 @@
42 /* XXX validate? */
43 sc->sc_ledpin = val;
44 break;
45 +#ifdef AR_DEBUG
46 case ATH_DEBUG:
47 sc->sc_debug = (val & ~ATH_DEBUG_GLOBAL);
48 ath_debug_global = (val & ATH_DEBUG_GLOBAL);
49 +#endif
50 break;
51 case ATH_TXANTENNA:
52 /*
53 @@ -10183,9 +10189,11 @@
54 }
55
56 /* initialize values */
57 +#ifdef AR_DEBUG
58 ath_debug_global = (ath_debug & ATH_DEBUG_GLOBAL);
59 sc->sc_debug = (ath_debug & ~ATH_DEBUG_GLOBAL);
60 sc->sc_default_ieee80211_debug = ieee80211_debug;
61 +#endif
62 sc->sc_txantenna = 0; /* default to auto-selection */
63 sc->sc_txintrperiod = ATH_TXQ_INTR_PERIOD;
64 }
65 Index: madwifi-ng-r2978-20071127/ath_rate/amrr/amrr.c
66 ===================================================================
67 --- madwifi-ng-r2978-20071127.orig/ath_rate/amrr/amrr.c 2007-10-31 06:39:41.000000000 +0100
68 +++ madwifi-ng-r2978-20071127/ath_rate/amrr/amrr.c 2007-11-27 21:47:06.136758995 +0100
69 @@ -70,7 +70,7 @@
70
71 #include "amrr.h"
72
73 -#define AMRR_DEBUG
74 +#undef AMRR_DEBUG
75 #ifdef AMRR_DEBUG
76 #define DPRINTF(sc, _fmt, ...) do { \
77 if (sc->sc_debug & 0x10) \
78 Index: madwifi-ng-r2978-20071127/ath_rate/minstrel/minstrel.c
79 ===================================================================
80 --- madwifi-ng-r2978-20071127.orig/ath_rate/minstrel/minstrel.c 2007-11-27 21:18:24.882670317 +0100
81 +++ madwifi-ng-r2978-20071127/ath_rate/minstrel/minstrel.c 2007-11-27 21:47:06.140759225 +0100
82 @@ -117,7 +117,7 @@
83
84 #include "minstrel.h"
85
86 -#define MINSTREL_DEBUG
87 +#undef MINSTREL_DEBUG
88 #ifdef MINSTREL_DEBUG
89 enum {
90 ATH_DEBUG_RATE = 0x00000010 /* rate control */
91 Index: madwifi-ng-r2978-20071127/ath_rate/onoe/onoe.c
92 ===================================================================
93 --- madwifi-ng-r2978-20071127.orig/ath_rate/onoe/onoe.c 2007-10-31 06:39:41.000000000 +0100
94 +++ madwifi-ng-r2978-20071127/ath_rate/onoe/onoe.c 2007-11-27 21:47:06.144759451 +0100
95 @@ -66,7 +66,7 @@
96
97 #include "onoe.h"
98
99 -#define ONOE_DEBUG
100 +#undef ONOE_DEBUG
101 #ifdef ONOE_DEBUG
102 enum {
103 ATH_DEBUG_RATE = 0x00000010, /* rate control */
104 Index: madwifi-ng-r2978-20071127/ath_rate/sample/sample.c
105 ===================================================================
106 --- madwifi-ng-r2978-20071127.orig/ath_rate/sample/sample.c 2007-11-21 09:23:20.000000000 +0100
107 +++ madwifi-ng-r2978-20071127/ath_rate/sample/sample.c 2007-11-27 21:47:06.148759680 +0100
108 @@ -68,7 +68,7 @@
109
110 #include "sample.h"
111
112 -#define SAMPLE_DEBUG
113 +#undef SAMPLE_DEBUG
114 #ifdef SAMPLE_DEBUG
115 enum {
116 ATH_DEBUG_RATE = 0x00000010, /* rate control */
117 Index: madwifi-ng-r2978-20071127/tools/do_multi.c
118 ===================================================================
119 --- madwifi-ng-r2978-20071127.orig/tools/do_multi.c 2007-11-27 21:18:24.826667124 +0100
120 +++ madwifi-ng-r2978-20071127/tools/do_multi.c 2007-11-27 21:47:06.152759909 +0100
121 @@ -9,16 +9,20 @@
122
123 progname = basename(argv[0]);
124
125 +#if 0
126 if(strcmp(progname, "80211debug") == 0)
127 ret = a80211debug_init(argc, argv);
128 +#endif
129 if(strcmp(progname, "80211stats") == 0)
130 ret = a80211stats_init(argc, argv);
131 if(strcmp(progname, "athchans") == 0)
132 ret = athchans_init(argc, argv);
133 if(strcmp(progname, "athctrl") == 0)
134 ret = athctrl_init(argc, argv);
135 +#if 0
136 if(strcmp(progname, "athdebug") == 0)
137 ret = athdebug_init(argc, argv);
138 +#endif
139 if(strcmp(progname, "athkey") == 0)
140 ret = athkey_init(argc, argv);
141 if(strcmp(progname, "athstats") == 0)
142 Index: madwifi-ng-r2978-20071127/tools/Makefile
143 ===================================================================
144 --- madwifi-ng-r2978-20071127.orig/tools/Makefile 2007-11-27 21:18:24.826667124 +0100
145 +++ madwifi-ng-r2978-20071127/tools/Makefile 2007-11-27 21:47:06.152759909 +0100
146 @@ -48,7 +48,7 @@
147
148
149 ALLPROGS= athstats 80211stats athkey athchans athctrl \
150 - athdebug 80211debug wlanconfig ath_info
151 + wlanconfig ath_info
152
153 OBJS= $(patsubst %,%.o,$(ALLPROGS) do_multi)
154 ALL= ${OBJS} madwifi_multi
155 @@ -84,7 +84,7 @@
156 ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c
157 madwifi_multi: $(OBJS)
158 ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS}
159 - for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \
160 + for i in athstats 80211stats athkey athchans athctrl wlanconfig; do \
161 ln -s -f madwifi_multi $$i; \
162 done
163
164 Index: madwifi-ng-r2978-20071127/net80211/ieee80211_linux.h
165 ===================================================================
166 --- madwifi-ng-r2978-20071127.orig/net80211/ieee80211_linux.h 2007-11-27 21:47:46.371051817 +0100
167 +++ madwifi-ng-r2978-20071127/net80211/ieee80211_linux.h 2007-11-27 21:47:56.199611915 +0100
168 @@ -29,8 +29,8 @@
169 #ifndef _NET80211_IEEE80211_LINUX_H_
170 #define _NET80211_IEEE80211_LINUX_H_
171
172 -#define IEEE80211_DEBUG
173 -#define IEEE80211_DEBUG_REFCNT /* Node reference count debugging */
174 +#undef IEEE80211_DEBUG
175 +#undef IEEE80211_DEBUG_REFCNT /* Node reference count debugging */
176 /* #define ATH_DEBUG_SPINLOCKS */ /* announce before spinlocking */
177
178 #include <linux/wireless.h>