fix a crash related to wep and mic handling (#1973)
[openwrt/svn-archive/archive.git] / package / madwifi / patches / 200-no_debug.patch
1 Index: madwifi-ng-r2420-20070602/ath/if_ath.c
2 ===================================================================
3 --- madwifi-ng-r2420-20070602.orig/ath/if_ath.c 2007-06-04 13:21:57.500235304 +0200
4 +++ madwifi-ng-r2420-20070602/ath/if_ath.c 2007-06-04 13:21:58.130139544 +0200
5 @@ -75,7 +75,7 @@
6 #include <net80211/if_llc.h>
7 #endif
8
9 -#define AR_DEBUG
10 +#undef AR_DEBUG
11
12 #include "net80211/if_athproto.h"
13 #include "if_athvar.h"
14 @@ -382,7 +382,7 @@
15 ath_keyprint(sc, __func__, ix, hk, mac); \
16 } while (0)
17 #else /* defined(AR_DEBUG) */
18 -#define IFF_DUMPPKTS(sc, _m) netif_msg_dumppkts(&sc->sc_ic)
19 +#define IFF_DUMPPKTS(sc, _m) 0
20 #define DPRINTF(sc, _m, _fmt, ...)
21 #define KEYPRINTF(sc, k, ix, mac)
22 #endif /* defined(AR_DEBUG) */
23 Index: madwifi-ng-r2420-20070602/ath_rate/amrr/amrr.c
24 ===================================================================
25 --- madwifi-ng-r2420-20070602.orig/ath_rate/amrr/amrr.c 2007-06-04 13:21:53.164894376 +0200
26 +++ madwifi-ng-r2420-20070602/ath_rate/amrr/amrr.c 2007-06-04 13:21:58.131139392 +0200
27 @@ -69,7 +69,7 @@
28
29 #include "amrr.h"
30
31 -#define AMRR_DEBUG
32 +#undef AMRR_DEBUG
33 #ifdef AMRR_DEBUG
34 #define DPRINTF(sc, _fmt, ...) do { \
35 if (sc->sc_debug & 0x10) \
36 Index: madwifi-ng-r2420-20070602/ath_rate/minstrel/minstrel.c
37 ===================================================================
38 --- madwifi-ng-r2420-20070602.orig/ath_rate/minstrel/minstrel.c 2007-06-04 13:21:57.115293824 +0200
39 +++ madwifi-ng-r2420-20070602/ath_rate/minstrel/minstrel.c 2007-06-04 13:21:58.132139240 +0200
40 @@ -116,7 +116,7 @@
41
42 #include "minstrel.h"
43
44 -#define MINSTREL_DEBUG
45 +#undef MINSTREL_DEBUG
46 #ifdef MINSTREL_DEBUG
47 enum {
48 ATH_DEBUG_RATE = 0x00000010 /* rate control */
49 Index: madwifi-ng-r2420-20070602/ath_rate/onoe/onoe.c
50 ===================================================================
51 --- madwifi-ng-r2420-20070602.orig/ath_rate/onoe/onoe.c 2007-06-04 13:21:53.176892552 +0200
52 +++ madwifi-ng-r2420-20070602/ath_rate/onoe/onoe.c 2007-06-04 13:21:58.132139240 +0200
53 @@ -65,7 +65,7 @@
54
55 #include "onoe.h"
56
57 -#define ONOE_DEBUG
58 +#undef ONOE_DEBUG
59 #ifdef ONOE_DEBUG
60 enum {
61 ATH_DEBUG_RATE = 0x00000010, /* rate control */
62 Index: madwifi-ng-r2420-20070602/ath_rate/sample/sample.c
63 ===================================================================
64 --- madwifi-ng-r2420-20070602.orig/ath_rate/sample/sample.c 2007-06-04 13:21:53.183891488 +0200
65 +++ madwifi-ng-r2420-20070602/ath_rate/sample/sample.c 2007-06-04 13:21:58.133139088 +0200
66 @@ -67,7 +67,7 @@
67
68 #include "sample.h"
69
70 -#define SAMPLE_DEBUG
71 +#undef SAMPLE_DEBUG
72 #ifdef SAMPLE_DEBUG
73 enum {
74 ATH_DEBUG_NODE = 0x00080000, /* node management */
75 Index: madwifi-ng-r2420-20070602/net80211/ieee80211_proto.c
76 ===================================================================
77 --- madwifi-ng-r2420-20070602.orig/net80211/ieee80211_proto.c 2007-06-04 13:21:53.189890576 +0200
78 +++ madwifi-ng-r2420-20070602/net80211/ieee80211_proto.c 2007-06-04 13:21:58.133139088 +0200
79 @@ -312,6 +312,7 @@
80 }
81 EXPORT_SYMBOL(ieee80211_print_essid);
82
83 +#ifdef IEEE80211_DEBUG
84 void
85 ieee80211_dump_pkt(struct ieee80211com *ic,
86 const u_int8_t *buf, int len, int rate, int rssi)
87 @@ -390,6 +391,7 @@
88 }
89 }
90 EXPORT_SYMBOL(ieee80211_dump_pkt);
91 +#endif /* IEEE80211_DEBUG */
92
93 int
94 ieee80211_fix_rate(struct ieee80211_node *ni, int flags)
95 Index: madwifi-ng-r2420-20070602/net80211/ieee80211_proto.h
96 ===================================================================
97 --- madwifi-ng-r2420-20070602.orig/net80211/ieee80211_proto.h 2007-06-04 13:21:53.194889816 +0200
98 +++ madwifi-ng-r2420-20070602/net80211/ieee80211_proto.h 2007-06-04 13:21:58.134138936 +0200
99 @@ -247,7 +247,11 @@
100 #endif
101 int ieee80211_new_state(struct ieee80211vap *, enum ieee80211_state, int);
102 void ieee80211_print_essid(const u_int8_t *, int);
103 +#ifdef IEEE80211_DEBUG
104 void ieee80211_dump_pkt(struct ieee80211com *, const u_int8_t *, int, int, int);
105 +#else
106 +#define ieee80211_dump_pkt(...)
107 +#endif
108 struct sk_buff *ieee80211_getcfframe(struct ieee80211vap *, int);
109
110 /*
111 Index: madwifi-ng-r2420-20070602/net80211/ieee80211_var.h
112 ===================================================================
113 --- madwifi-ng-r2420-20070602.orig/net80211/ieee80211_var.h 2007-06-04 13:21:53.201888752 +0200
114 +++ madwifi-ng-r2420-20070602/net80211/ieee80211_var.h 2007-06-04 13:21:58.134138936 +0200
115 @@ -35,8 +35,8 @@
116 #ifndef _NET80211_IEEE80211_VAR_H_
117 #define _NET80211_IEEE80211_VAR_H_
118
119 -#define IEEE80211_DEBUG
120 -#define IEEE80211_DEBUG_REFCNT /* Node reference count debugging */
121 +#undef IEEE80211_DEBUG
122 +#undef IEEE80211_DEBUG_REFCNT /* Node reference count debugging */
123
124 /* Definitions for IEEE 802.11 drivers. */
125 #include <net80211/ieee80211_linux.h>
126 Index: madwifi-ng-r2420-20070602/tools/do_multi.c
127 ===================================================================
128 --- madwifi-ng-r2420-20070602.orig/tools/do_multi.c 2007-06-04 13:21:54.000767304 +0200
129 +++ madwifi-ng-r2420-20070602/tools/do_multi.c 2007-06-04 13:21:58.134138936 +0200
130 @@ -9,16 +9,20 @@
131
132 progname = basename(argv[0]);
133
134 +#if 0
135 if(strcmp(progname, "80211debug") == 0)
136 ret = a80211debug_init(argc, argv);
137 +#endif
138 if(strcmp(progname, "80211stats") == 0)
139 ret = a80211stats_init(argc, argv);
140 if(strcmp(progname, "athchans") == 0)
141 ret = athchans_init(argc, argv);
142 if(strcmp(progname, "athctrl") == 0)
143 ret = athctrl_init(argc, argv);
144 +#if 0
145 if(strcmp(progname, "athdebug") == 0)
146 ret = athdebug_init(argc, argv);
147 +#endif
148 if(strcmp(progname, "athkey") == 0)
149 ret = athkey_init(argc, argv);
150 if(strcmp(progname, "athstats") == 0)
151 Index: madwifi-ng-r2420-20070602/tools/Makefile
152 ===================================================================
153 --- madwifi-ng-r2420-20070602.orig/tools/Makefile 2007-06-04 13:21:54.001767152 +0200
154 +++ madwifi-ng-r2420-20070602/tools/Makefile 2007-06-04 13:21:58.134138936 +0200
155 @@ -52,7 +52,7 @@
156
157 ifdef DOMULTI
158 OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \
159 - athdebug.o 80211debug.o wlanconfig.o
160 + wlanconfig.o
161 ALL= ${OBJS} madwifi_multi
162 endif
163
164 @@ -85,7 +85,7 @@
165 ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c
166 madwifi_multi:
167 ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS}
168 - for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \
169 + for i in athstats 80211stats athkey athchans athctrl wlanconfig; do \
170 ln -s -f madwifi_multi $$i; \
171 done
172