a37fd702f421208f8ff9e3a05b8d4b1c7fc75e04
[openwrt.git] / package / madwifi / patches / 200-no_debug.patch
1 Index: madwifi-trunk-r3314/ath/if_ath.c
2 ===================================================================
3 --- madwifi-trunk-r3314.orig/ath/if_ath.c 2008-02-20 18:10:48.567282084 +0100
4 +++ madwifi-trunk-r3314/ath/if_ath.c 2008-02-20 18:10:48.783294393 +0100
5 @@ -42,7 +42,6 @@
6 * This software is derived from work of Atsushi Onoe; his contribution
7 * is greatly appreciated.
8 */
9 -#define AR_DEBUG
10 #include "if_ath_debug.h"
11 #include "opt_ah.h"
12
13 @@ -520,9 +519,11 @@
14 u_int8_t csz;
15
16 sc->devid = devid;
17 +#ifdef AR_DEBUG
18 ath_debug_global = (ath_debug & ATH_DEBUG_GLOBAL);
19 sc->sc_debug = (ath_debug & ~ATH_DEBUG_GLOBAL);
20 DPRINTF(sc, ATH_DEBUG_ANY, "%s: devid 0x%x\n", __func__, devid);
21 +#endif
22
23 /* Allocate space for dynamically determined maximum VAP count */
24 sc->sc_bslot =
25 @@ -1297,12 +1298,14 @@
26 /* If no default VAP debug flags are passed, allow a few to
27 * transfer down from the driver to new VAPs so we can have load
28 * time debugging for VAPs too. */
29 +#ifdef AR_DEBUG
30 vap->iv_debug = 0 |
31 ((sc->sc_debug & ATH_DEBUG_RATE) ? IEEE80211_MSG_XRATE : 0) |
32 ((sc->sc_debug & ATH_DEBUG_XMIT) ? IEEE80211_MSG_OUTPUT : 0) |
33 ((sc->sc_debug & ATH_DEBUG_RECV) ? IEEE80211_MSG_INPUT : 0) |
34 0
35 ;
36 +#endif
37 }
38 ic->ic_debug = (sc->sc_default_ieee80211_debug & IEEE80211_MSG_IC);
39
40 @@ -10496,9 +10499,11 @@
41 /* XXX validate? */
42 sc->sc_ledpin = val;
43 break;
44 +#ifdef AR_DEBUG
45 case ATH_DEBUG:
46 sc->sc_debug = (val & ~ATH_DEBUG_GLOBAL);
47 ath_debug_global = (val & ATH_DEBUG_GLOBAL);
48 +#endif
49 break;
50 case ATH_TXANTENNA:
51 /*
52 @@ -10918,9 +10923,11 @@
53 }
54
55 /* initialize values */
56 +#ifdef AR_DEBUG
57 ath_debug_global = (ath_debug & ATH_DEBUG_GLOBAL);
58 sc->sc_debug = (ath_debug & ~ATH_DEBUG_GLOBAL);
59 sc->sc_default_ieee80211_debug = ieee80211_debug;
60 +#endif
61 sc->sc_txantenna = 0; /* default to auto-selection */
62 sc->sc_txintrperiod = ATH_TXQ_INTR_PERIOD;
63 }
64 Index: madwifi-trunk-r3314/ath_rate/amrr/amrr.c
65 ===================================================================
66 --- madwifi-trunk-r3314.orig/ath_rate/amrr/amrr.c 2008-02-20 18:10:45.875128667 +0100
67 +++ madwifi-trunk-r3314/ath_rate/amrr/amrr.c 2008-02-20 18:10:48.787294621 +0100
68 @@ -70,7 +70,9 @@
69
70 #include "amrr.h"
71
72 +#ifdef AR_DEBUG
73 #define AMRR_DEBUG
74 +#endif
75 #ifdef AMRR_DEBUG
76 #define DPRINTF(sc, _fmt, ...) do { \
77 if (sc->sc_debug & 0x10) \
78 Index: madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c
79 ===================================================================
80 --- madwifi-trunk-r3314.orig/ath_rate/minstrel/minstrel.c 2008-02-20 18:10:47.471219622 +0100
81 +++ madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c 2008-02-20 18:10:48.795295077 +0100
82 @@ -117,7 +117,9 @@
83
84 #include "minstrel.h"
85
86 +#ifdef AR_DEBUG
87 #define MINSTREL_DEBUG
88 +#endif
89 #ifdef MINSTREL_DEBUG
90 enum {
91 ATH_DEBUG_RATE = 0x00000010 /* rate control */
92 Index: madwifi-trunk-r3314/ath_rate/onoe/onoe.c
93 ===================================================================
94 --- madwifi-trunk-r3314.orig/ath_rate/onoe/onoe.c 2008-02-20 18:10:45.891129578 +0100
95 +++ madwifi-trunk-r3314/ath_rate/onoe/onoe.c 2008-02-20 18:10:48.799295306 +0100
96 @@ -66,7 +66,9 @@
97
98 #include "onoe.h"
99
100 +#ifdef AR_DEBUG
101 #define ONOE_DEBUG
102 +#endif
103 #ifdef ONOE_DEBUG
104 enum {
105 ATH_DEBUG_RATE = 0x00000010, /* rate control */
106 Index: madwifi-trunk-r3314/ath_rate/sample/sample.c
107 ===================================================================
108 --- madwifi-trunk-r3314.orig/ath_rate/sample/sample.c 2008-02-20 18:10:45.899130036 +0100
109 +++ madwifi-trunk-r3314/ath_rate/sample/sample.c 2008-02-20 18:10:48.803295532 +0100
110 @@ -68,7 +68,9 @@
111
112 #include "sample.h"
113
114 -#define SAMPLE_DEBUG
115 +#ifdef AR_DEBUG
116 +#define SAMPLE_DEBUG
117 +#endif
118 #ifdef SAMPLE_DEBUG
119 enum {
120 ATH_DEBUG_RATE = 0x00000010, /* rate control */
121 Index: madwifi-trunk-r3314/tools/do_multi.c
122 ===================================================================
123 --- madwifi-trunk-r3314.orig/tools/do_multi.c 2008-02-20 18:10:46.711176309 +0100
124 +++ madwifi-trunk-r3314/tools/do_multi.c 2008-02-20 18:10:48.807295761 +0100
125 @@ -9,16 +9,20 @@
126
127 progname = basename(argv[0]);
128
129 +#ifdef AR_DEBUG
130 if(strcmp(progname, "80211debug") == 0)
131 ret = a80211debug_init(argc, argv);
132 +#endif
133 if(strcmp(progname, "80211stats") == 0)
134 ret = a80211stats_init(argc, argv);
135 if(strcmp(progname, "athchans") == 0)
136 ret = athchans_init(argc, argv);
137 if(strcmp(progname, "athctrl") == 0)
138 ret = athctrl_init(argc, argv);
139 +#ifdef AR_DEBUG
140 if(strcmp(progname, "athdebug") == 0)
141 ret = athdebug_init(argc, argv);
142 +#endif
143 if(strcmp(progname, "athkey") == 0)
144 ret = athkey_init(argc, argv);
145 if(strcmp(progname, "athstats") == 0)
146 Index: madwifi-trunk-r3314/tools/Makefile
147 ===================================================================
148 --- madwifi-trunk-r3314.orig/tools/Makefile 2008-02-20 18:10:46.715176538 +0100
149 +++ madwifi-trunk-r3314/tools/Makefile 2008-02-20 18:10:48.807295761 +0100
150 @@ -46,9 +46,10 @@
151 HAL= $(TOP)/hal
152 endif
153
154 +DEBUG=-DAR_DEBUG
155
156 ALLPROGS= athstats 80211stats athkey athchans athctrl \
157 - athdebug 80211debug wlanconfig ath_info
158 + $(if $(DEBUG),80211debug athdebug) wlanconfig ath_info
159
160 OBJS= $(patsubst %,%.o,$(ALLPROGS) do_multi)
161 ALL= ${OBJS} madwifi_multi
162 @@ -57,7 +58,7 @@
163
164 INCS= -I. -I$(HAL) -I$(TOP) -I$(ATH_HAL)
165 CFLAGS= -g -O2 -Wall
166 -ALL_CFLAGS= $(CFLAGS) $(INCS)
167 +ALL_CFLAGS= $(CFLAGS) $(INCS) $(DEBUG)
168 LDFLAGS=
169
170 all: $(ALL)
171 @@ -84,7 +85,7 @@
172 ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c
173 madwifi_multi: $(OBJS)
174 ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS}
175 - for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \
176 + for i in $(ALLPROGS); do \
177 ln -s -f madwifi_multi $$i; \
178 done
179
180 Index: madwifi-trunk-r3314/net80211/ieee80211_linux.h
181 ===================================================================
182 --- madwifi-trunk-r3314.orig/net80211/ieee80211_linux.h 2008-02-20 18:10:45.919131175 +0100
183 +++ madwifi-trunk-r3314/net80211/ieee80211_linux.h 2008-02-20 18:10:48.807295761 +0100
184 @@ -29,8 +29,6 @@
185 #ifndef _NET80211_IEEE80211_LINUX_H_
186 #define _NET80211_IEEE80211_LINUX_H_
187
188 -#define IEEE80211_DEBUG
189 -#define IEEE80211_DEBUG_REFCNT /* Node reference count debugging */
190 /* #define ATH_DEBUG_SPINLOCKS */ /* announce before spinlocking */
191
192 #include <linux/wireless.h>
193 Index: madwifi-trunk-r3314/Makefile.inc
194 ===================================================================
195 --- madwifi-trunk-r3314.orig/Makefile.inc 2008-02-20 18:10:45.927131631 +0100
196 +++ madwifi-trunk-r3314/Makefile.inc 2008-02-20 18:10:48.807295761 +0100
197 @@ -148,7 +148,8 @@
198 TOOLS= $(TOP)/tools
199
200 WARNINGS = -Werror
201 -COPTS+= $(WARNINGS)
202 +DEBUG = -DAR_DEBUG -DIEEE80211_DEBUG
203 +COPTS+= $(WARNINGS) $(DEBUG)
204 INCS= -include $(TOP)/include/compat.h -I$(TOP)/include
205
206 # TARGET defines the target platform architecture. It must match one of
207 Index: madwifi-trunk-r3314/ath/if_ath_radar.c
208 ===================================================================
209 --- madwifi-trunk-r3314.orig/ath/if_ath_radar.c 2008-02-20 18:10:48.307267266 +0100
210 +++ madwifi-trunk-r3314/ath/if_ath_radar.c 2008-02-20 18:10:48.811295991 +0100
211 @@ -19,8 +19,6 @@
212 * $Id: if_ath_radar.c 2464 2007-06-15 22:51:56Z mtaylor $
213 */
214 #include "opt_ah.h"
215 -
216 -#define AR_DEBUG
217 #include "if_ath_debug.h"
218
219 #ifndef AUTOCONF_INCLUDED
This page took 0.052308 seconds and 3 git commands to generate.