c7aeaae0eaf3157704e86d7e27dae0b3af0f39d0
[openwrt/staging/yousong.git] / package / madwifi / patches / 200-no_debug.patch
1 Index: madwifi-dfs-r2996/ath/if_ath.c
2 ===================================================================
3 --- madwifi-dfs-r2996.orig/ath/if_ath.c 2007-12-01 18:53:03.204271791 +0100
4 +++ madwifi-dfs-r2996/ath/if_ath.c 2007-12-01 18:53:28.557716602 +0100
5 @@ -42,7 +42,7 @@
6 * This software is derived from work of Atsushi Onoe; his contribution
7 * is greatly appreciated.
8 */
9 -#define AR_DEBUG
10 +#undef AR_DEBUG
11 #include "if_ath_debug.h"
12 #include "opt_ah.h"
13
14 @@ -515,9 +515,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 @@ -1283,12 +1285,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 @@ -10290,9 +10294,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 @@ -10703,9 +10709,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-dfs-r2996/ath_rate/amrr/amrr.c
66 ===================================================================
67 --- madwifi-dfs-r2996.orig/ath_rate/amrr/amrr.c 2007-12-01 18:45:14.000000000 +0100
68 +++ madwifi-dfs-r2996/ath_rate/amrr/amrr.c 2007-12-01 18:53:06.076435466 +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-dfs-r2996/ath_rate/minstrel/minstrel.c
79 ===================================================================
80 --- madwifi-dfs-r2996.orig/ath_rate/minstrel/minstrel.c 2007-12-01 18:47:14.336390946 +0100
81 +++ madwifi-dfs-r2996/ath_rate/minstrel/minstrel.c 2007-12-01 18:53:06.080435695 +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-dfs-r2996/ath_rate/onoe/onoe.c
92 ===================================================================
93 --- madwifi-dfs-r2996.orig/ath_rate/onoe/onoe.c 2007-12-01 18:45:14.000000000 +0100
94 +++ madwifi-dfs-r2996/ath_rate/onoe/onoe.c 2007-12-01 18:53:06.080435695 +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-dfs-r2996/ath_rate/sample/sample.c
105 ===================================================================
106 --- madwifi-dfs-r2996.orig/ath_rate/sample/sample.c 2007-12-01 18:45:14.000000000 +0100
107 +++ madwifi-dfs-r2996/ath_rate/sample/sample.c 2007-12-01 18:53:06.080435695 +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-dfs-r2996/tools/do_multi.c
118 ===================================================================
119 --- madwifi-dfs-r2996.orig/tools/do_multi.c 2007-12-01 18:45:51.063645501 +0100
120 +++ madwifi-dfs-r2996/tools/do_multi.c 2007-12-01 18:53:06.080435695 +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-dfs-r2996/tools/Makefile
143 ===================================================================
144 --- madwifi-dfs-r2996.orig/tools/Makefile 2007-12-01 18:45:51.067645730 +0100
145 +++ madwifi-dfs-r2996/tools/Makefile 2007-12-01 18:53:06.084435926 +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-dfs-r2996/net80211/ieee80211_linux.h
165 ===================================================================
166 --- madwifi-dfs-r2996.orig/net80211/ieee80211_linux.h 2007-12-01 18:45:14.000000000 +0100
167 +++ madwifi-dfs-r2996/net80211/ieee80211_linux.h 2007-12-01 18:53:06.084435926 +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>