1 diff -urN madwifi-ng-r2377-20070526.old/tools/80211debug.c madwifi-ng-r2377-20070526.dev/tools/80211debug.c
2 --- madwifi-ng-r2377-20070526.old/tools/80211debug.c 2007-05-24 23:21:08.000000000 +0200
3 +++ madwifi-ng-r2377-20070526.dev/tools/80211debug.c 2007-05-26 18:51:08.119853136 +0200
12 #define N(a) (sizeof(a)/sizeof(a[0]))
17 #endif /* __linux__ */
22 +a80211debug_init(int argc, char *argv[])
28 main(int argc, char *argv[])
32 const char *ifname = "ath0";
35 diff -urN madwifi-ng-r2377-20070526.old/tools/80211stats.c madwifi-ng-r2377-20070526.dev/tools/80211stats.c
36 --- madwifi-ng-r2377-20070526.old/tools/80211stats.c 2007-02-07 04:18:49.000000000 +0100
37 +++ madwifi-ng-r2377-20070526.dev/tools/80211stats.c 2007-05-26 18:51:08.119853136 +0200
39 #include "net80211/ieee80211_crypto.h"
40 #include "net80211/ieee80211_ioctl.h"
43 +#include "do_multi.h"
46 #ifndef SIOCG80211STATS
47 #define SIOCG80211STATS (SIOCDEVPRIVATE + 2)
56 +a80211stats_init(int argc, char *argv[])
62 main(int argc, char *argv[])
67 struct ieee80211req_sta_info *si;
68 u_int8_t buf[24*1024], *cp;
69 diff -urN madwifi-ng-r2377-20070526.old/tools/athchans.c madwifi-ng-r2377-20070526.dev/tools/athchans.c
70 --- madwifi-ng-r2377-20070526.old/tools/athchans.c 2007-02-07 04:18:49.000000000 +0100
71 +++ madwifi-ng-r2377-20070526.dev/tools/athchans.c 2007-05-26 18:51:08.119853136 +0200
73 #include "net80211/ieee80211_crypto.h"
74 #include "net80211/ieee80211_ioctl.h"
77 +#include "do_multi.h"
86 #define MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY))
91 +athchans_init(int argc, char *argv[])
97 main(int argc, char *argv[])
101 const char *ifname = "wifi0";
102 struct ieee80211req_chanlist chanlist;
104 diff -urN madwifi-ng-r2377-20070526.old/tools/athctrl.c madwifi-ng-r2377-20070526.dev/tools/athctrl.c
105 --- madwifi-ng-r2377-20070526.old/tools/athctrl.c 2006-02-03 13:03:03.000000000 +0100
106 +++ madwifi-ng-r2377-20070526.dev/tools/athctrl.c 2007-05-26 18:51:08.120852984 +0200
112 +#include "do_multi.h"
116 setsysctrl(const char *dev, const char *control , u_long value)
125 +athctrl_init(int argc, char *argv[])
131 main(int argc, char *argv[])
135 char device[IFNAMSIZ + 1];
138 diff -urN madwifi-ng-r2377-20070526.old/tools/athdebug.c madwifi-ng-r2377-20070526.dev/tools/athdebug.c
139 --- madwifi-ng-r2377-20070526.old/tools/athdebug.c 2007-05-24 23:21:08.000000000 +0200
140 +++ madwifi-ng-r2377-20070526.dev/tools/athdebug.c 2007-05-26 18:51:08.120852984 +0200
146 +#include "do_multi.h"
149 #define N(a) (sizeof(a)/sizeof(a[0]))
151 const char *progname;
154 #endif /* __linux__ */
159 +athdebug_init(int argc, char *argv[])
165 main(int argc, char *argv[])
171 const char *ifname = "wifi0";
173 diff -urN madwifi-ng-r2377-20070526.old/tools/athkey.c madwifi-ng-r2377-20070526.dev/tools/athkey.c
174 --- madwifi-ng-r2377-20070526.old/tools/athkey.c 2007-02-07 04:18:49.000000000 +0100
175 +++ madwifi-ng-r2377-20070526.dev/tools/athkey.c 2007-05-26 18:51:08.121852832 +0200
177 #include "net80211/ieee80211_crypto.h"
178 #include "net80211/ieee80211_ioctl.h"
181 +#include "do_multi.h"
185 const char *progname;
194 +athkey_init(int argc, char *argv[])
200 main(int argc, char *argv[])
204 const char *ifname = "wifi0";
205 struct ieee80211req_key setkey;
206 struct ieee80211req_del_key delkey;
207 diff -urN madwifi-ng-r2377-20070526.old/tools/athstats.c madwifi-ng-r2377-20070526.dev/tools/athstats.c
208 --- madwifi-ng-r2377-20070526.old/tools/athstats.c 2007-03-27 03:45:42.000000000 +0200
209 +++ madwifi-ng-r2377-20070526.dev/tools/athstats.c 2007-05-26 18:51:08.121852832 +0200
211 #include "wireless_copy.h"
212 #include "if_athioctl.h"
215 +#include "do_multi.h"
218 static const struct {
228 +athstats_init(int argc, char *argv[])
234 main(int argc, char *argv[])
240 const char *ifname = "wifi0";
242 diff -urN madwifi-ng-r2377-20070526.old/tools/do_multi.c madwifi-ng-r2377-20070526.dev/tools/do_multi.c
243 --- madwifi-ng-r2377-20070526.old/tools/do_multi.c 1970-01-01 01:00:00.000000000 +0100
244 +++ madwifi-ng-r2377-20070526.dev/tools/do_multi.c 2007-05-26 18:51:08.121852832 +0200
247 +#include "do_multi.h"
250 +main(int argc, char *argv[])
255 + progname = basename(argv[0]);
257 + if(strcmp(progname, "80211debug") == 0)
258 + ret = a80211debug_init(argc, argv);
259 + if(strcmp(progname, "80211stats") == 0)
260 + ret = a80211stats_init(argc, argv);
261 + if(strcmp(progname, "athchans") == 0)
262 + ret = athchans_init(argc, argv);
263 + if(strcmp(progname, "athctrl") == 0)
264 + ret = athctrl_init(argc, argv);
265 + if(strcmp(progname, "athdebug") == 0)
266 + ret = athdebug_init(argc, argv);
267 + if(strcmp(progname, "athkey") == 0)
268 + ret = athkey_init(argc, argv);
269 + if(strcmp(progname, "athstats") == 0)
270 + ret = athstats_init(argc, argv);
271 + if(strcmp(progname, "wlanconfig") == 0)
272 + ret = wlanconfig_init(argc, argv);
276 diff -urN madwifi-ng-r2377-20070526.old/tools/do_multi.h madwifi-ng-r2377-20070526.dev/tools/do_multi.h
277 --- madwifi-ng-r2377-20070526.old/tools/do_multi.h 1970-01-01 01:00:00.000000000 +0100
278 +++ madwifi-ng-r2377-20070526.dev/tools/do_multi.h 2007-05-26 18:51:08.122852680 +0200
281 +int a80211debug_init(int argc, char *argv[]);
282 +int a80211stats_init(int argc, char *argv[]);
283 +int athchans_init(int argc, char *argv[]);
284 +int athctrl_init(int argc, char *argv[]);
285 +int athdebug_init(int argc, char *argv[]);
286 +int athkey_init(int argc, char *argv[]);
287 +int athstats_init(int argc, char *argv[]);
288 +int wlanconfig_init(int argc, char *argv[]);
289 diff -urN madwifi-ng-r2377-20070526.old/tools/Makefile madwifi-ng-r2377-20070526.dev/tools/Makefile
290 --- madwifi-ng-r2377-20070526.old/tools/Makefile 2007-03-27 03:45:42.000000000 +0200
291 +++ madwifi-ng-r2377-20070526.dev/tools/Makefile 2007-05-26 18:51:08.122852680 +0200
294 ALL= athstats 80211stats athkey athchans athctrl \
295 athdebug 80211debug wlanconfig
298 +OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \
299 + athdebug.o 80211debug.o wlanconfig.o
300 +ALL= ${OBJS} madwifi_multi
309 +athstats.o: athstats.c
310 + ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c
311 +80211stats.o: 80211stats.c
312 + ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c
314 + ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c
315 +athchans.o: athchans.c
316 + ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c
317 +athctrl.o: athctrl.c
318 + ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c
319 +athdebug.o: athdebug.c
320 + ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c
321 +wlanconfig.o: wlanconfig.c
322 + ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c
323 +80211debug.o: 80211debug.c
324 + ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c
325 +do_multi.o: do_multi.c
326 + ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c
328 + ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS}
329 + for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \
330 + ln -s -f madwifi_multi $$i; \
334 $(CC) -o athstats $(ALL_CFLAGS) -I$(TOP)/ath $(LDFLAGS) athstats.c
335 80211stats: 80211stats.c
336 diff -urN madwifi-ng-r2377-20070526.old/tools/wlanconfig.c madwifi-ng-r2377-20070526.dev/tools/wlanconfig.c
337 --- madwifi-ng-r2377-20070526.old/tools/wlanconfig.c 2007-04-29 19:35:25.000000000 +0200
338 +++ madwifi-ng-r2377-20070526.dev/tools/wlanconfig.c 2007-05-26 18:51:08.123852528 +0200
340 #include "net80211/ieee80211_crypto.h"
341 #include "net80211/ieee80211_ioctl.h"
344 +#include "do_multi.h"
348 * These are taken from ieee80211_node.h
357 +wlanconfig_init(int argc, char *argv[])
363 main(int argc, char *argv[])
367 const char *ifname, *cmd;
368 unsigned char bnounit = 0;
369 char *if_base = NULL;