1 Index: madwifi-trunk-r3314/ath/if_ath.c
2 ===================================================================
3 --- madwifi-trunk-r3314.orig/ath/if_ath.c
4 +++ madwifi-trunk-r3314/ath/if_ath.c
6 * This software is derived from work of Atsushi Onoe; his contribution
7 * is greatly appreciated.
10 #include "if_ath_debug.h"
14 static void ath_set_dfs_cac_time(struct ieee80211com *, unsigned int seconds);
16 static unsigned int ath_test_radar(struct ieee80211com *);
17 -static unsigned int ath_dump_hal_map(struct ieee80211com *ic);
20 +static unsigned int ath_dump_hal_map(struct ieee80211com *ic);
22 static u_int32_t ath_get_clamped_maxtxpower(struct ath_softc *sc);
23 static u_int32_t ath_set_clamped_maxtxpower(struct ath_softc *sc,
24 u_int32_t new_clamped_maxtxpower);
30 ath_debug_global = (ath_debug & ATH_DEBUG_GLOBAL);
31 sc->sc_debug = (ath_debug & ~ATH_DEBUG_GLOBAL);
32 DPRINTF(sc, ATH_DEBUG_ANY, "%s: devid 0x%x\n", __func__, devid);
35 /* Allocate space for dynamically determined maximum VAP count */
38 ic->ic_vap_delete = ath_vap_delete;
40 ic->ic_test_radar = ath_test_radar;
42 ic->ic_dump_hal_map = ath_dump_hal_map;
45 ic->ic_set_dfs_testmode = ath_set_dfs_testmode;
46 ic->ic_get_dfs_testmode = ath_get_dfs_testmode;
48 @@ -1297,12 +1301,14 @@
49 /* If no default VAP debug flags are passed, allow a few to
50 * transfer down from the driver to new VAPs so we can have load
51 * time debugging for VAPs too. */
54 ((sc->sc_debug & ATH_DEBUG_RATE) ? IEEE80211_MSG_XRATE : 0) |
55 ((sc->sc_debug & ATH_DEBUG_XMIT) ? IEEE80211_MSG_OUTPUT : 0) |
56 ((sc->sc_debug & ATH_DEBUG_RECV) ? IEEE80211_MSG_INPUT : 0) |
61 ic->ic_debug = (sc->sc_default_ieee80211_debug & IEEE80211_MSG_IC);
63 @@ -10496,9 +10502,11 @@
69 sc->sc_debug = (val & ~ATH_DEBUG_GLOBAL);
70 ath_debug_global = (val & ATH_DEBUG_GLOBAL);
75 @@ -10918,9 +10926,11 @@
78 /* initialize values */
80 ath_debug_global = (ath_debug & ATH_DEBUG_GLOBAL);
81 sc->sc_debug = (ath_debug & ~ATH_DEBUG_GLOBAL);
82 sc->sc_default_ieee80211_debug = ieee80211_debug;
84 sc->sc_txantenna = 0; /* default to auto-selection */
85 sc->sc_txintrperiod = ATH_TXQ_INTR_PERIOD;
87 @@ -11762,6 +11772,7 @@
90 /* This is called by a private ioctl (iwpriv) to dump the HAL obfuscation table */
93 ath_dump_hal_map(struct ieee80211com *ic)
95 @@ -11770,7 +11781,7 @@
96 ath_hal_dump_map(sc->sc_ah);
101 /* If we are shutting down or blowing off the DFS channel availability check
102 * then we call this to stop the behavior before we take the rest of the
103 * necessary actions (such as a DFS reaction to radar). */
104 Index: madwifi-trunk-r3314/ath_rate/amrr/amrr.c
105 ===================================================================
106 --- madwifi-trunk-r3314.orig/ath_rate/amrr/amrr.c
107 +++ madwifi-trunk-r3314/ath_rate/amrr/amrr.c
116 #define DPRINTF(sc, _fmt, ...) do { \
117 if (sc->sc_debug & 0x10) \
118 Index: madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c
119 ===================================================================
120 --- madwifi-trunk-r3314.orig/ath_rate/minstrel/minstrel.c
121 +++ madwifi-trunk-r3314/ath_rate/minstrel/minstrel.c
124 #include "minstrel.h"
127 #define MINSTREL_DEBUG
129 #ifdef MINSTREL_DEBUG
131 ATH_DEBUG_RATE = 0x00000010 /* rate control */
132 Index: madwifi-trunk-r3314/ath_rate/onoe/onoe.c
133 ===================================================================
134 --- madwifi-trunk-r3314.orig/ath_rate/onoe/onoe.c
135 +++ madwifi-trunk-r3314/ath_rate/onoe/onoe.c
145 ATH_DEBUG_RATE = 0x00000010, /* rate control */
146 Index: madwifi-trunk-r3314/ath_rate/sample/sample.c
147 ===================================================================
148 --- madwifi-trunk-r3314.orig/ath_rate/sample/sample.c
149 +++ madwifi-trunk-r3314/ath_rate/sample/sample.c
154 -#define SAMPLE_DEBUG
156 +#define SAMPLE_DEBUG
160 ATH_DEBUG_RATE = 0x00000010, /* rate control */
161 Index: madwifi-trunk-r3314/tools/do_multi.c
162 ===================================================================
163 --- madwifi-trunk-r3314.orig/tools/do_multi.c
164 +++ madwifi-trunk-r3314/tools/do_multi.c
167 progname = basename(argv[0]);
170 if(strcmp(progname, "80211debug") == 0)
171 ret = a80211debug_init(argc, argv);
173 if(strcmp(progname, "80211stats") == 0)
174 ret = a80211stats_init(argc, argv);
175 if(strcmp(progname, "athchans") == 0)
176 ret = athchans_init(argc, argv);
177 if(strcmp(progname, "athctrl") == 0)
178 ret = athctrl_init(argc, argv);
180 if(strcmp(progname, "athdebug") == 0)
181 ret = athdebug_init(argc, argv);
183 if(strcmp(progname, "athkey") == 0)
184 ret = athkey_init(argc, argv);
185 if(strcmp(progname, "athstats") == 0)
186 Index: madwifi-trunk-r3314/tools/Makefile
187 ===================================================================
188 --- madwifi-trunk-r3314.orig/tools/Makefile
189 +++ madwifi-trunk-r3314/tools/Makefile
196 ALLPROGS= athstats 80211stats athkey athchans athctrl \
197 athdebug 80211debug wlanconfig ath_info
201 INCS= -I. -I../ath -I$(HAL) -I$(TOP) -I$(ATH_HAL)
203 -ALL_CFLAGS= $(CFLAGS) $(INCS)
204 +ALL_CFLAGS= $(CFLAGS) $(INCS) $(DEBUG)
208 Index: madwifi-trunk-r3314/net80211/ieee80211_linux.h
209 ===================================================================
210 --- madwifi-trunk-r3314.orig/net80211/ieee80211_linux.h
211 +++ madwifi-trunk-r3314/net80211/ieee80211_linux.h
213 #ifndef _NET80211_IEEE80211_LINUX_H_
214 #define _NET80211_IEEE80211_LINUX_H_
216 -#define IEEE80211_DEBUG
217 -#define IEEE80211_DEBUG_REFCNT /* Node reference count debugging */
218 /* #define ATH_DEBUG_SPINLOCKS */ /* announce before spinlocking */
220 #include <linux/wireless.h>
221 Index: madwifi-trunk-r3314/Makefile.inc
222 ===================================================================
223 --- madwifi-trunk-r3314.orig/Makefile.inc
224 +++ madwifi-trunk-r3314/Makefile.inc
230 +DEBUG = -DAR_DEBUG -DIEEE80211_DEBUG
231 +COPTS+= $(WARNINGS) $(DEBUG)
232 INCS= -include $(TOP)/include/compat.h -I$(TOP)/include
234 # TARGET defines the target platform architecture. It must match one of
235 Index: madwifi-trunk-r3314/ath/if_ath_radar.c
236 ===================================================================
237 --- madwifi-trunk-r3314.orig/ath/if_ath_radar.c
238 +++ madwifi-trunk-r3314/ath/if_ath_radar.c
240 * $Id: if_ath_radar.c 2464 2007-06-15 22:51:56Z mtaylor $
245 #include "if_ath_debug.h"
247 #ifndef AUTOCONF_INCLUDED
249 #include <net80211/if_llc.h>
254 #include "net80211/if_athproto.h"
255 #include "if_athvar.h"
257 Index: madwifi-trunk-r3314/ath/if_ath_hal.h
258 ===================================================================
259 --- madwifi-trunk-r3314.orig/ath/if_ath_hal.h
260 +++ madwifi-trunk-r3314/ath/if_ath_hal.h
261 @@ -1081,6 +1081,7 @@
263 tail -f /var/log/messages | sed -f hal_unmangle.sed
266 static inline void ath_hal_dump_map(struct ath_hal *ah)
268 #ifdef CONFIG_KALLSYMS
269 @@ -1345,7 +1346,7 @@
270 #endif /* #ifndef CONFIG_KALLSYMS */
275 #include "if_ath_hal_wrappers.h"
277 #endif /* #ifndef _IF_ATH_HAL_H_ */
278 Index: madwifi-trunk-r3314/net80211/ieee80211_var.h
279 ===================================================================
280 --- madwifi-trunk-r3314.orig/net80211/ieee80211_var.h
281 +++ madwifi-trunk-r3314/net80211/ieee80211_var.h
283 /* inject a fake radar signal -- used while on a 802.11h DFS channels */
284 unsigned int (*ic_test_radar)(struct ieee80211com *);
288 unsigned int (*ic_dump_hal_map)(struct ieee80211com *);
291 /* DFS channel availability check time (in seconds) */
292 void (*ic_set_dfs_cac_time)(struct ieee80211com *, unsigned int);
293 unsigned int (*ic_get_dfs_cac_time)(struct ieee80211com *);
294 Index: madwifi-trunk-r3314/net80211/ieee80211_wireless.c
295 ===================================================================
296 --- madwifi-trunk-r3314.orig/net80211/ieee80211_wireless.c
297 +++ madwifi-trunk-r3314/net80211/ieee80211_wireless.c
298 @@ -1548,6 +1548,7 @@
304 ieee80211_ioctl_hal_map(struct net_device *dev, struct iw_request_info *info,
305 void *w, char *extra)
306 @@ -1558,7 +1559,7 @@
307 params[0] = ic->ic_dump_hal_map(ic);
314 ieee80211_ioctl_radar(struct net_device *dev, struct iw_request_info *info,
315 @@ -5258,8 +5259,10 @@
316 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getwmmparams" },
317 { IEEE80211_IOCTL_RADAR,
318 0, 0, "doth_radar" },
320 { IEEE80211_IOCTL_HALMAP,
321 0, 0, "dump_hal_map" },
324 * These depends on sub-ioctl support which added in version 12.
326 @@ -5695,7 +5698,9 @@
327 set_priv(IEEE80211_IOCTL_SETMLME, ieee80211_ioctl_setmlme),
328 set_priv(IEEE80211_IOCTL_SETKEY, ieee80211_ioctl_setkey),
329 set_priv(IEEE80211_IOCTL_DELKEY, ieee80211_ioctl_delkey),
331 set_priv(IEEE80211_IOCTL_HALMAP, ieee80211_ioctl_hal_map),
333 set_priv(IEEE80211_IOCTL_ADDMAC, ieee80211_ioctl_addmac),
334 set_priv(IEEE80211_IOCTL_DELMAC, ieee80211_ioctl_delmac),
335 set_priv(IEEE80211_IOCTL_WDSADDMAC, ieee80211_ioctl_wdsmac),
336 Index: madwifi-trunk-r3314/ath/if_ath_debug.h
337 ===================================================================
338 --- madwifi-trunk-r3314.orig/ath/if_ath_debug.h
339 +++ madwifi-trunk-r3314/ath/if_ath_debug.h
341 ath_keyprint((_sc), __func__, _ix, _hk, _mac); \
344 -#else /* #ifdef AR_DEBUG */
346 -#define DFLAG_ISSET(sc, _m) 0
347 -#define DPRINTF(sc, _m, _fmt, ...)
348 -#define KEYPRINTF(sc, k, ix, mac)
350 -#endif /* #ifdef AR_DEBUG */
352 #define IFF_DUMPPKTS(_sc, _m) DFLAG_ISSET((_sc), (_m))
355 #define IPRINTF(_sc, _fmt, ...) \
356 printk(KERN_INFO "%s: %s: " _fmt, \
357 SC_DEV_NAME(_sc), __func__, ## __VA_ARGS__)
359 +#define DFLAG_ISSET(sc, _m) 0
360 +#define DPRINTF(sc, _m, _fmt, ...)
361 +#define KEYPRINTF(sc, k, ix, mac)
362 +#define EPRINTF(...)
363 +#define WPRINTF(...)
364 +#define IPRINTF(...)
365 +#define IFF_DUMPPKTS(...) 0
369 #endif /* #ifndef _IF_ATH_DEBUG_H_ */
370 Index: madwifi-trunk-r3314/net80211/ieee80211_node.c
371 ===================================================================
372 --- madwifi-trunk-r3314.orig/net80211/ieee80211_node.c
373 +++ madwifi-trunk-r3314/net80211/ieee80211_node.c
378 +#ifndef IEEE80211_DEBUG
379 +#define node_print_message(...) do {} while(0)
381 static void node_print_message(
388 -EXPORT_SYMBOL(node_print_message);
392 #ifdef IEEE80211_DEBUG_REFCNT