disable debugging stuff in madwifi - saves precious flash space :)
[openwrt.git] / package / madwifi / patches / 200-no_debug.patch
1 diff -Nur madwifi-0.9.2.1/ath/if_ath.c madwifi-0.9.2.1-nodebug/ath/if_ath.c
2 --- madwifi-0.9.2.1/ath/if_ath.c        2006-07-08 08:47:19.000000000 +0200
3 +++ madwifi-0.9.2.1-nodebug/ath/if_ath.c        2007-02-20 11:48:05.000000000 +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 diff -Nur madwifi-0.9.2.1/ath_rate/amrr/amrr.c madwifi-0.9.2.1-nodebug/ath_rate/amrr/amrr.c
14 --- madwifi-0.9.2.1/ath_rate/amrr/amrr.c        2006-07-04 12:23:35.000000000 +0200
15 +++ madwifi-0.9.2.1-nodebug/ath_rate/amrr/amrr.c        2007-02-20 11:49:10.000000000 +0100
16 @@ -67,7 +67,7 @@
17  
18  #include "amrr.h"
19  
20 -#define        AMRR_DEBUG
21 +#undef AMRR_DEBUG
22  #ifdef AMRR_DEBUG
23  #define        DPRINTF(sc, _fmt, ...) do {                                     \
24         if (sc->sc_debug & 0x10)                                        \
25 diff -Nur madwifi-0.9.2.1/ath_rate/onoe/onoe.c madwifi-0.9.2.1-nodebug/ath_rate/onoe/onoe.c
26 --- madwifi-0.9.2.1/ath_rate/onoe/onoe.c        2006-07-04 12:23:35.000000000 +0200
27 +++ madwifi-0.9.2.1-nodebug/ath_rate/onoe/onoe.c        2007-02-20 11:48:51.000000000 +0100
28 @@ -63,7 +63,7 @@
29  
30  #include "onoe.h"
31  
32 -#define        ONOE_DEBUG
33 +#undef ONOE_DEBUG
34  #ifdef ONOE_DEBUG
35  enum {
36         ATH_DEBUG_RATE  = 0x00000010,   /* rate control */
37 diff -Nur madwifi-0.9.2.1/ath_rate/sample/sample.c madwifi-0.9.2.1-nodebug/ath_rate/sample/sample.c
38 --- madwifi-0.9.2.1/ath_rate/sample/sample.c    2006-07-04 12:23:35.000000000 +0200
39 +++ madwifi-0.9.2.1-nodebug/ath_rate/sample/sample.c    2007-02-20 11:48:31.000000000 +0100
40 @@ -65,7 +65,7 @@
41  
42  #include "sample.h"
43  
44 -#define        SAMPLE_DEBUG
45 +#undef SAMPLE_DEBUG
46  #ifdef SAMPLE_DEBUG
47  enum {
48         ATH_DEBUG_RATE          = 0x00000010    /* rate control */
49 diff -Nur madwifi-0.9.2.1/net80211/ieee80211_var.h madwifi-0.9.2.1-nodebug/net80211/ieee80211_var.h
50 --- madwifi-0.9.2.1/net80211/ieee80211_var.h    2006-07-06 05:23:08.000000000 +0200
51 +++ madwifi-0.9.2.1-nodebug/net80211/ieee80211_var.h    2007-02-20 11:43:09.000000000 +0100
52 @@ -37,7 +37,7 @@
53  /*
54   * Definitions for IEEE 802.11 drivers.
55   */
56 -#define        IEEE80211_DEBUG
57 +#undef IEEE80211_DEBUG
58  #undef IEEE80211_DEBUG_REFCNT                  /* node refcnt stuff */
59  
60  #include <net80211/ieee80211_linux.h>
61 diff -Nur madwifi-0.9.2.1/tools/do_multi.c madwifi-0.9.2.1-nodebug/tools/do_multi.c
62 --- madwifi-0.9.2.1/tools/do_multi.c    2007-02-20 11:53:44.000000000 +0100
63 +++ madwifi-0.9.2.1-nodebug/tools/do_multi.c    2007-02-20 11:58:22.000000000 +0100
64 @@ -9,16 +9,20 @@
65  
66      progname = basename(argv[0]);
67  
68 +#if 0
69      if(strcmp(progname, "80211debug") == 0)
70         ret = a80211debug_init(argc, argv);
71 +#endif
72      if(strcmp(progname, "80211stats") == 0)
73         ret = a80211stats_init(argc, argv);
74      if(strcmp(progname, "athchans") == 0)
75         ret = athchans_init(argc, argv);
76      if(strcmp(progname, "athctrl") == 0)
77         ret =  athctrl_init(argc, argv);
78 +#if 0
79      if(strcmp(progname, "athdebug") == 0)
80         ret =  athdebug_init(argc, argv);
81 +#endif
82      if(strcmp(progname, "athkey") == 0)
83         ret =  athkey_init(argc, argv);
84      if(strcmp(progname, "athstats") == 0)
85 diff -Nur madwifi-0.9.2.1/tools/Makefile madwifi-0.9.2.1-nodebug/tools/Makefile
86 --- madwifi-0.9.2.1/tools/Makefile      2007-02-20 11:53:44.000000000 +0100
87 +++ madwifi-0.9.2.1-nodebug/tools/Makefile      2007-02-20 11:57:23.000000000 +0100
88 @@ -52,7 +52,7 @@
89         
90  ifdef DOMULTI
91  OBJS=  do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \
92 -       athdebug.o 80211debug.o wlanconfig.o 
93 +       wlanconfig.o 
94  ALL=   ${OBJS} madwifi_multi
95  endif
96  
97 @@ -85,7 +85,7 @@
98         ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c
99  madwifi_multi:
100         ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS}
101 -       for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \
102 +       for i in athstats 80211stats athkey athchans athctrl wlanconfig; do \
103         ln -s -f madwifi_multi $$i; \
104         done
105