nuke even more debug stuff
[openwrt/openwrt.git] / package / madwifi / patches / 200-no_debug.patch
1 diff -ur madwifi.old/ath/if_ath.c madwifi.dev/ath/if_ath.c
2 --- madwifi.old/ath/if_ath.c 2007-02-20 23:24:27.274770480 +0100
3 +++ madwifi.dev/ath/if_ath.c 2007-02-20 23:26:49.917085552 +0100
4 @@ -72,7 +72,7 @@
5 #include <net80211/if_llc.h>
6 #endif
7
8 -#define AR_DEBUG
9 +#undef AR_DEBUG
10
11 #include "if_athrate.h"
12 #include "net80211/if_athproto.h"
13 @@ -347,7 +347,7 @@
14 ath_keyprint(__func__, ix, hk, mac); \
15 } while (0)
16 #else /* defined(AR_DEBUG) */
17 -#define IFF_DUMPPKTS(sc, _m) netif_msg_dumppkts(&sc->sc_ic)
18 +#define IFF_DUMPPKTS(sc, _m) 0
19 #define DPRINTF(sc, _m, _fmt, ...)
20 #define KEYPRINTF(sc, k, ix, mac)
21 #endif /* defined(AR_DEBUG) */
22 diff -ur madwifi.old/ath_rate/amrr/amrr.c madwifi.dev/ath_rate/amrr/amrr.c
23 --- madwifi.old/ath_rate/amrr/amrr.c 2007-02-20 23:24:27.274770480 +0100
24 +++ madwifi.dev/ath_rate/amrr/amrr.c 2007-02-20 23:23:54.714720360 +0100
25 @@ -67,7 +67,7 @@
26
27 #include "amrr.h"
28
29 -#define AMRR_DEBUG
30 +#undef AMRR_DEBUG
31 #ifdef AMRR_DEBUG
32 #define DPRINTF(sc, _fmt, ...) do { \
33 if (sc->sc_debug & 0x10) \
34 diff -ur madwifi.old/ath_rate/onoe/onoe.c madwifi.dev/ath_rate/onoe/onoe.c
35 --- madwifi.old/ath_rate/onoe/onoe.c 2007-02-20 23:24:27.275770328 +0100
36 +++ madwifi.dev/ath_rate/onoe/onoe.c 2007-02-20 23:23:54.714720360 +0100
37 @@ -63,7 +63,7 @@
38
39 #include "onoe.h"
40
41 -#define ONOE_DEBUG
42 +#undef ONOE_DEBUG
43 #ifdef ONOE_DEBUG
44 enum {
45 ATH_DEBUG_RATE = 0x00000010, /* rate control */
46 diff -ur madwifi.old/ath_rate/sample/sample.c madwifi.dev/ath_rate/sample/sample.c
47 --- madwifi.old/ath_rate/sample/sample.c 2007-02-20 23:24:27.275770328 +0100
48 +++ madwifi.dev/ath_rate/sample/sample.c 2007-02-20 23:23:54.715720208 +0100
49 @@ -65,7 +65,7 @@
50
51 #include "sample.h"
52
53 -#define SAMPLE_DEBUG
54 +#undef SAMPLE_DEBUG
55 #ifdef SAMPLE_DEBUG
56 enum {
57 ATH_DEBUG_RATE = 0x00000010 /* rate control */
58 diff -ur madwifi.old/net80211/ieee80211_proto.c madwifi.dev/net80211/ieee80211_proto.c
59 --- madwifi.old/net80211/ieee80211_proto.c 2007-02-20 23:23:54.682725000 +0100
60 +++ madwifi.dev/net80211/ieee80211_proto.c 2007-02-20 23:26:03.244180912 +0100
61 @@ -307,6 +307,7 @@
62 }
63 EXPORT_SYMBOL(ieee80211_print_essid);
64
65 +#ifdef IEEE80211_DEBUG
66 void
67 ieee80211_dump_pkt(struct ieee80211com *ic,
68 const u_int8_t *buf, int len, int rate, int rssi)
69 @@ -385,6 +386,7 @@
70 }
71 }
72 EXPORT_SYMBOL(ieee80211_dump_pkt);
73 +#endif /* IEEE80211_DEBUG */
74
75 int
76 ieee80211_fix_rate(struct ieee80211_node *ni, int flags)
77 diff -ur madwifi.old/net80211/ieee80211_proto.h madwifi.dev/net80211/ieee80211_proto.h
78 --- madwifi.old/net80211/ieee80211_proto.h 2006-06-10 04:17:05.000000000 +0200
79 +++ madwifi.dev/net80211/ieee80211_proto.h 2007-02-20 23:27:28.791175792 +0100
80 @@ -246,7 +246,11 @@
81 #endif
82 int ieee80211_new_state(struct ieee80211vap *, enum ieee80211_state, int);
83 void ieee80211_print_essid(const u_int8_t *, int);
84 +#ifdef IEEE80211_DEBUG
85 void ieee80211_dump_pkt(struct ieee80211com *, const u_int8_t *, int, int, int);
86 +#else
87 +#define ieee80211_dump_pkt(...)
88 +#endif
89 struct sk_buff *ieee80211_getcfframe(struct ieee80211vap *, int);
90
91 /*
92 diff -ur madwifi.old/net80211/ieee80211_var.h madwifi.dev/net80211/ieee80211_var.h
93 --- madwifi.old/net80211/ieee80211_var.h 2007-02-20 23:24:27.276770176 +0100
94 +++ madwifi.dev/net80211/ieee80211_var.h 2007-02-20 23:23:54.715720208 +0100
95 @@ -37,7 +37,7 @@
96 /*
97 * Definitions for IEEE 802.11 drivers.
98 */
99 -#define IEEE80211_DEBUG
100 +#undef IEEE80211_DEBUG
101 #undef IEEE80211_DEBUG_REFCNT /* node refcnt stuff */
102
103 #include <net80211/ieee80211_linux.h>
104 diff -ur madwifi.old/tools/do_multi.c madwifi.dev/tools/do_multi.c
105 --- madwifi.old/tools/do_multi.c 2007-02-20 23:24:27.276770176 +0100
106 +++ madwifi.dev/tools/do_multi.c 2007-02-20 23:23:54.715720208 +0100
107 @@ -9,16 +9,20 @@
108
109 progname = basename(argv[0]);
110
111 +#if 0
112 if(strcmp(progname, "80211debug") == 0)
113 ret = a80211debug_init(argc, argv);
114 +#endif
115 if(strcmp(progname, "80211stats") == 0)
116 ret = a80211stats_init(argc, argv);
117 if(strcmp(progname, "athchans") == 0)
118 ret = athchans_init(argc, argv);
119 if(strcmp(progname, "athctrl") == 0)
120 ret = athctrl_init(argc, argv);
121 +#if 0
122 if(strcmp(progname, "athdebug") == 0)
123 ret = athdebug_init(argc, argv);
124 +#endif
125 if(strcmp(progname, "athkey") == 0)
126 ret = athkey_init(argc, argv);
127 if(strcmp(progname, "athstats") == 0)
128 diff -ur madwifi.old/tools/Makefile madwifi.dev/tools/Makefile
129 --- madwifi.old/tools/Makefile 2007-02-20 23:24:27.276770176 +0100
130 +++ madwifi.dev/tools/Makefile 2007-02-20 23:23:54.716720056 +0100
131 @@ -52,7 +52,7 @@
132
133 ifdef DOMULTI
134 OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \
135 - athdebug.o 80211debug.o wlanconfig.o
136 + wlanconfig.o
137 ALL= ${OBJS} madwifi_multi
138 endif
139
140 @@ -85,7 +85,7 @@
141 ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c
142 madwifi_multi:
143 ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS}
144 - for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \
145 + for i in athstats 80211stats athkey athchans athctrl wlanconfig; do \
146 ln -s -f madwifi_multi $$i; \
147 done
148