1 diff -ruN madwifi-ng-r1486-20060329/102-multicall_binary.patch madwifi-ng-r1486-20060329-patch/102-multicall_binary.patch
2 --- madwifi-ng-r1486-20060329/102-multicall_binary.patch 1969-12-31 19:00:00.000000000 -0500
3 +++ madwifi-ng-r1486-20060329-patch/102-multicall_binary.patch 2006-03-31 10:58:27.000000000 -0500
5 +diff -urN madwifi-ng-r1416-20060126/tools/80211debug.c madwifi-ng-r1416-20060126-owrt/tools/80211debug.c
6 +--- madwifi-ng-r1416-20060126/tools/80211debug.c 2005-11-23 22:23:20.000000000 +0100
7 ++++ madwifi-ng-r1416-20060126-owrt/tools/80211debug.c 2006-01-26 11:26:44.000000000 +0100
13 ++#include "do_multi.h"
16 + #define N(a) (sizeof(a)/sizeof(a[0]))
18 + const char *progname;
21 + #endif /* __linux__ */
26 ++a80211debug_init(int argc, char *argv[])
32 + main(int argc, char *argv[])
36 + const char *ifname = "ath0";
37 + const char *cp, *tp;
39 +diff -urN madwifi-ng-r1416-20060126/tools/80211stats.c madwifi-ng-r1416-20060126-owrt/tools/80211stats.c
40 +--- madwifi-ng-r1416-20060126/tools/80211stats.c 2005-11-23 22:52:24.000000000 +0100
41 ++++ madwifi-ng-r1416-20060126-owrt/tools/80211stats.c 2006-01-26 11:26:44.000000000 +0100
43 + #include "net80211/ieee80211_crypto.h"
44 + #include "net80211/ieee80211_ioctl.h"
47 ++#include "do_multi.h"
50 + #ifndef SIOCG80211STATS
51 + #define SIOCG80211STATS (SIOCDEVPRIVATE+2)
60 ++a80211stats_init(int argc, char *argv[])
66 + main(int argc, char *argv[])
71 + struct ieee80211req_sta_info *si;
72 + u_int8_t buf[24*1024], *cp;
73 +diff -urN madwifi-ng-r1416-20060126/tools/athchans.c madwifi-ng-r1416-20060126-owrt/tools/athchans.c
74 +--- madwifi-ng-r1416-20060126/tools/athchans.c 2005-11-24 00:07:30.000000000 +0100
75 ++++ madwifi-ng-r1416-20060126-owrt/tools/athchans.c 2006-01-26 11:26:44.000000000 +0100
77 + #include "net80211/ieee80211_crypto.h"
78 + #include "net80211/ieee80211_ioctl.h"
81 ++#include "do_multi.h"
85 + const char *progname;
90 + #define MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY))
95 ++athchans_init(int argc, char *argv[])
101 + main(int argc, char *argv[])
105 + const char *ifname = "wifi0";
106 + struct ieee80211req_chanlist chanlist;
108 +diff -urN madwifi-ng-r1416-20060126/tools/athctrl.c madwifi-ng-r1416-20060126-owrt/tools/athctrl.c
109 +--- madwifi-ng-r1416-20060126/tools/athctrl.c 2005-11-23 22:23:20.000000000 +0100
110 ++++ madwifi-ng-r1416-20060126-owrt/tools/athctrl.c 2006-01-26 11:26:44.000000000 +0100
113 + #include <net/if.h>
116 ++#include "do_multi.h"
120 + setsysctrl(const char *dev, const char *control , u_long value)
129 ++athctrl_init(int argc, char *argv[])
135 + main(int argc, char *argv[])
139 + char device[IFNAMSIZ + 1];
142 +diff -urN madwifi-ng-r1416-20060126/tools/athdebug.c madwifi-ng-r1416-20060126-owrt/tools/athdebug.c
143 +--- madwifi-ng-r1416-20060126/tools/athdebug.c 2005-11-23 22:23:20.000000000 +0100
144 ++++ madwifi-ng-r1416-20060126-owrt/tools/athdebug.c 2006-01-26 11:26:44.000000000 +0100
146 + #include <getopt.h>
150 ++#include "do_multi.h"
153 + #define N(a) (sizeof(a)/sizeof(a[0]))
155 + const char *progname;
156 +@@ -170,9 +174,20 @@
158 + #endif /* __linux__ */
163 ++athdebug_init(int argc, char *argv[])
169 + main(int argc, char *argv[])
175 + const char *ifname = "wifi0";
177 +diff -urN madwifi-ng-r1416-20060126/tools/athkey.c madwifi-ng-r1416-20060126-owrt/tools/athkey.c
178 +--- madwifi-ng-r1416-20060126/tools/athkey.c 2005-11-24 00:07:30.000000000 +0100
179 ++++ madwifi-ng-r1416-20060126-owrt/tools/athkey.c 2006-01-26 11:26:44.000000000 +0100
181 + #include "net80211/ieee80211_crypto.h"
182 + #include "net80211/ieee80211_ioctl.h"
185 ++#include "do_multi.h"
189 + const char *progname;
191 +@@ -207,9 +211,19 @@
198 ++athkey_init(int argc, char *argv[])
204 + main(int argc, char *argv[])
208 + const char *ifname = "wifi0";
209 + struct ieee80211req_key setkey;
210 + struct ieee80211req_del_key delkey;
211 +diff -urN madwifi-ng-r1416-20060126/tools/athstats.c madwifi-ng-r1416-20060126-owrt/tools/athstats.c
212 +--- madwifi-ng-r1416-20060126/tools/athstats.c 2006-01-16 09:59:07.000000000 +0100
213 ++++ madwifi-ng-r1416-20060126-owrt/tools/athstats.c 2006-01-26 11:26:44.000000000 +0100
215 + #include "ah_desc.h"
216 + #include "if_athioctl.h"
219 ++#include "do_multi.h"
222 + static const struct {
225 +@@ -242,9 +246,20 @@
232 ++athstats_init(int argc, char *argv[])
238 + main(int argc, char *argv[])
244 + const char *ifname = "wifi0";
246 +diff -urN madwifi-ng-r1416-20060126/tools/do_multi.c madwifi-ng-r1416-20060126-owrt/tools/do_multi.c
247 +--- madwifi-ng-r1416-20060126/tools/do_multi.c 1970-01-01 01:00:00.000000000 +0100
248 ++++ madwifi-ng-r1416-20060126-owrt/tools/do_multi.c 2006-01-26 11:26:44.000000000 +0100
250 ++#include <string.h>
251 ++#include "do_multi.h"
254 ++main(int argc, char *argv[])
259 ++ progname = basename(argv[0]);
261 ++ if(strcmp(progname, "80211debug") == 0)
262 ++ ret = a80211debug_init(argc, argv);
263 ++ if(strcmp(progname, "80211stats") == 0)
264 ++ ret = a80211stats_init(argc, argv);
265 ++ if(strcmp(progname, "athchans") == 0)
266 ++ ret = athchans_init(argc, argv);
267 ++ if(strcmp(progname, "athctrl") == 0)
268 ++ ret = athctrl_init(argc, argv);
269 ++ if(strcmp(progname, "athdebug") == 0)
270 ++ ret = athdebug_init(argc, argv);
271 ++ if(strcmp(progname, "athkey") == 0)
272 ++ ret = athkey_init(argc, argv);
273 ++ if(strcmp(progname, "athstats") == 0)
274 ++ ret = athstats_init(argc, argv);
275 ++ if(strcmp(progname, "wlanconfig") == 0)
276 ++ ret = wlanconfig_init(argc, argv);
280 +diff -urN madwifi-ng-r1416-20060126/tools/do_multi.h madwifi-ng-r1416-20060126-owrt/tools/do_multi.h
281 +--- madwifi-ng-r1416-20060126/tools/do_multi.h 1970-01-01 01:00:00.000000000 +0100
282 ++++ madwifi-ng-r1416-20060126-owrt/tools/do_multi.h 2006-01-26 11:26:44.000000000 +0100
285 ++int a80211debug_init(int argc, char *argv[]);
286 ++int a80211stats_init(int argc, char *argv[]);
287 ++int athchans_init(int argc, char *argv[]);
288 ++int athctrl_init(int argc, char *argv[]);
289 ++int athdebug_init(int argc, char *argv[]);
290 ++int athkey_init(int argc, char *argv[]);
291 ++int athstats_init(int argc, char *argv[]);
292 ++int wlanconfig_init(int argc, char *argv[]);
293 +diff -urN madwifi-ng-r1416-20060126/tools/Makefile madwifi-ng-r1416-20060126-owrt/tools/Makefile
294 +--- madwifi-ng-r1416-20060126/tools/Makefile 2006-01-04 09:16:11.000000000 +0100
295 ++++ madwifi-ng-r1416-20060126-owrt/tools/Makefile 2006-01-26 14:52:45.000000000 +0100
297 + ALL= athstats 80211stats athkey athchans athctrl \
298 + athdebug 80211debug wlanconfig
301 ++OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \
302 ++ athdebug.o 80211debug.o wlanconfig.o
303 ++ALL= ${OBJS} madwifi_multi
308 + INCS+= -I. -I${HAL} -I${DEPTH}
313 ++athstats.o: athstats.c
314 ++ ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c
315 ++80211stats.o: 80211stats.c
316 ++ ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c
318 ++ ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c
319 ++athchans.o: athchans.c
320 ++ ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c
321 ++athctrl.o: athctrl.c
322 ++ ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c
323 ++athdebug.o: athdebug.c
324 ++ ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c
325 ++wlanconfig.o: wlanconfig.c
326 ++ ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c
327 ++80211debug.o: 80211debug.c
328 ++ ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c
330 ++ ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS}
331 ++ for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \
332 ++ ln -s -f madwifi_multi $$i; \
335 + athstats: athstats.c
336 + ${CC} -o athstats ${ALL_CFLAGS} -I../ath ${LDFLAGS} athstats.c
337 + 80211stats: 80211stats.c
338 +diff -urN madwifi-ng-r1416-20060126/tools/wlanconfig.c madwifi-ng-r1416-20060126-owrt/tools/wlanconfig.c
339 +--- madwifi-ng-r1416-20060126/tools/wlanconfig.c 2006-01-22 10:58:31.000000000 +0100
340 ++++ madwifi-ng-r1416-20060126-owrt/tools/wlanconfig.c 2006-01-26 11:26:44.000000000 +0100
342 + #include "net80211/ieee80211_crypto.h"
343 + #include "net80211/ieee80211_ioctl.h"
346 ++#include "do_multi.h"
350 + * These are taken from ieee80211_node.h
359 ++wlanconfig_init(int argc, char *argv[])
365 + main(int argc, char *argv[])
369 + const char *ifname, *cmd;
372 diff -ruN madwifi-ng-r1486-20060329/tools/80211debug.c madwifi-ng-r1486-20060329-patch/tools/80211debug.c
373 --- madwifi-ng-r1486-20060329/tools/80211debug.c 2006-03-10 08:23:50.000000000 -0500
374 +++ madwifi-ng-r1486-20060329-patch/tools/80211debug.c 2006-03-31 10:58:27.000000000 -0500
380 +#include "do_multi.h"
383 #define N(a) (sizeof(a)/sizeof(a[0]))
385 const char *progname;
388 #endif /* __linux__ */
393 +a80211debug_init(int argc, char *argv[])
399 main(int argc, char *argv[])
403 const char *ifname = "ath0";
406 diff -ruN madwifi-ng-r1486-20060329/tools/80211stats.c madwifi-ng-r1486-20060329-patch/tools/80211stats.c
407 --- madwifi-ng-r1486-20060329/tools/80211stats.c 2006-03-10 08:23:50.000000000 -0500
408 +++ madwifi-ng-r1486-20060329-patch/tools/80211stats.c 2006-03-31 10:58:27.000000000 -0500
410 #include "net80211/ieee80211_crypto.h"
411 #include "net80211/ieee80211_ioctl.h"
414 +#include "do_multi.h"
417 #ifndef SIOCG80211STATS
418 #define SIOCG80211STATS (SIOCDEVPRIVATE + 2)
427 +a80211stats_init(int argc, char *argv[])
433 main(int argc, char *argv[])
438 struct ieee80211req_sta_info *si;
439 u_int8_t buf[24*1024], *cp;
440 diff -ruN madwifi-ng-r1486-20060329/tools/Makefile madwifi-ng-r1486-20060329-patch/tools/Makefile
441 --- madwifi-ng-r1486-20060329/tools/Makefile 2006-01-04 03:16:11.000000000 -0500
442 +++ madwifi-ng-r1486-20060329-patch/tools/Makefile 2006-03-31 10:58:27.000000000 -0500
444 ALL= athstats 80211stats athkey athchans athctrl \
445 athdebug 80211debug wlanconfig
448 +OBJS= do_multi.o athstats.o 80211stats.o athkey.o athchans.o athctrl.o \
449 + athdebug.o 80211debug.o wlanconfig.o
450 +ALL= ${OBJS} madwifi_multi
455 INCS+= -I. -I${HAL} -I${DEPTH}
460 +athstats.o: athstats.c
461 + ${CC} -c -o athstats.o -DDOMULTI=1 ${ALL_CFLAGS} -I../ath athstats.c
462 +80211stats.o: 80211stats.c
463 + ${CC} -c -o 80211stats.o -DDOMULTI=1 ${ALL_CFLAGS} 80211stats.c
465 + ${CC} -c -o athkey.o -DDOMULTI=1 ${ALL_CFLAGS} athkey.c
466 +athchans.o: athchans.c
467 + ${CC} -c -o athchans.o -DDOMULTI=1 ${ALL_CFLAGS} athchans.c
468 +athctrl.o: athctrl.c
469 + ${CC} -c -o athctrl.o -DDOMULTI=1 ${ALL_CFLAGS} athctrl.c
470 +athdebug.o: athdebug.c
471 + ${CC} -c -o athdebug.o -DDOMULTI=1 ${ALL_CFLAGS} athdebug.c
472 +wlanconfig.o: wlanconfig.c
473 + ${CC} -c -o wlanconfig.o -DDOMULTI=1 ${ALL_CFLAGS} wlanconfig.c
474 +80211debug.o: 80211debug.c
475 + ${CC} -c -o 80211debug.o -DDOMULTI=1 ${ALL_CFLAGS} 80211debug.c
476 +do_multi.o: do_multi.c
477 + ${CC} -c -o do_multi.o -DDOMULTI=1 ${ALL_CFLAGS} do_multi.c
479 + ${CC} -o madwifi_multi ${LDFLAGS} ${OBJS}
480 + for i in athstats 80211stats athkey athchans athctrl athdebug wlanconfig 80211debug; do \
481 + ln -s -f madwifi_multi $$i; \
485 ${CC} -o athstats ${ALL_CFLAGS} -I../ath ${LDFLAGS} athstats.c
486 80211stats: 80211stats.c
487 diff -ruN madwifi-ng-r1486-20060329/tools/athchans.c madwifi-ng-r1486-20060329-patch/tools/athchans.c
488 --- madwifi-ng-r1486-20060329/tools/athchans.c 2006-02-01 15:07:11.000000000 -0500
489 +++ madwifi-ng-r1486-20060329-patch/tools/athchans.c 2006-03-31 10:58:27.000000000 -0500
491 #include "net80211/ieee80211_crypto.h"
492 #include "net80211/ieee80211_ioctl.h"
495 +#include "do_multi.h"
499 const char *progname;
504 #define MAXCHAN ((int)(sizeof(struct ieee80211req_chanlist) * NBBY))
509 +athchans_init(int argc, char *argv[])
515 main(int argc, char *argv[])
519 const char *ifname = "wifi0";
520 struct ieee80211req_chanlist chanlist;
522 diff -ruN madwifi-ng-r1486-20060329/tools/athctrl.c madwifi-ng-r1486-20060329-patch/tools/athctrl.c
523 --- madwifi-ng-r1486-20060329/tools/athctrl.c 2006-02-03 07:03:03.000000000 -0500
524 +++ madwifi-ng-r1486-20060329-patch/tools/athctrl.c 2006-03-31 10:58:27.000000000 -0500
530 +#include "do_multi.h"
534 setsysctrl(const char *dev, const char *control , u_long value)
543 +athctrl_init(int argc, char *argv[])
549 main(int argc, char *argv[])
553 char device[IFNAMSIZ + 1];
556 diff -ruN madwifi-ng-r1486-20060329/tools/athdebug.c madwifi-ng-r1486-20060329-patch/tools/athdebug.c
557 --- madwifi-ng-r1486-20060329/tools/athdebug.c 2006-03-10 08:23:50.000000000 -0500
558 +++ madwifi-ng-r1486-20060329-patch/tools/athdebug.c 2006-03-31 10:58:27.000000000 -0500
564 +#include "do_multi.h"
567 #define N(a) (sizeof(a)/sizeof(a[0]))
569 const char *progname;
572 #endif /* __linux__ */
577 +athdebug_init(int argc, char *argv[])
583 main(int argc, char *argv[])
589 const char *ifname = "wifi0";
591 diff -ruN madwifi-ng-r1486-20060329/tools/athkey.c madwifi-ng-r1486-20060329-patch/tools/athkey.c
592 --- madwifi-ng-r1486-20060329/tools/athkey.c 2006-02-01 15:07:11.000000000 -0500
593 +++ madwifi-ng-r1486-20060329-patch/tools/athkey.c 2006-03-31 10:58:27.000000000 -0500
595 #include "net80211/ieee80211_crypto.h"
596 #include "net80211/ieee80211_ioctl.h"
599 +#include "do_multi.h"
603 const char *progname;
612 +athkey_init(int argc, char *argv[])
618 main(int argc, char *argv[])
622 const char *ifname = "wifi0";
623 struct ieee80211req_key setkey;
624 struct ieee80211req_del_key delkey;
625 diff -ruN madwifi-ng-r1486-20060329/tools/athstats.c madwifi-ng-r1486-20060329-patch/tools/athstats.c
626 --- madwifi-ng-r1486-20060329/tools/athstats.c 2006-02-01 15:07:11.000000000 -0500
627 +++ madwifi-ng-r1486-20060329-patch/tools/athstats.c 2006-03-31 10:58:27.000000000 -0500
630 #include "if_athioctl.h"
633 +#include "do_multi.h"
636 static const struct {
646 +athstats_init(int argc, char *argv[])
652 main(int argc, char *argv[])
658 const char *ifname = "wifi0";
660 diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.c madwifi-ng-r1486-20060329-patch/tools/do_multi.c
661 --- madwifi-ng-r1486-20060329/tools/do_multi.c 1969-12-31 19:00:00.000000000 -0500
662 +++ madwifi-ng-r1486-20060329-patch/tools/do_multi.c 2006-03-31 10:58:27.000000000 -0500
665 +#include "do_multi.h"
668 +main(int argc, char *argv[])
673 + progname = basename(argv[0]);
675 + if(strcmp(progname, "80211debug") == 0)
676 + ret = a80211debug_init(argc, argv);
677 + if(strcmp(progname, "80211stats") == 0)
678 + ret = a80211stats_init(argc, argv);
679 + if(strcmp(progname, "athchans") == 0)
680 + ret = athchans_init(argc, argv);
681 + if(strcmp(progname, "athctrl") == 0)
682 + ret = athctrl_init(argc, argv);
683 + if(strcmp(progname, "athdebug") == 0)
684 + ret = athdebug_init(argc, argv);
685 + if(strcmp(progname, "athkey") == 0)
686 + ret = athkey_init(argc, argv);
687 + if(strcmp(progname, "athstats") == 0)
688 + ret = athstats_init(argc, argv);
689 + if(strcmp(progname, "wlanconfig") == 0)
690 + ret = wlanconfig_init(argc, argv);
694 diff -ruN madwifi-ng-r1486-20060329/tools/do_multi.h madwifi-ng-r1486-20060329-patch/tools/do_multi.h
695 --- madwifi-ng-r1486-20060329/tools/do_multi.h 1969-12-31 19:00:00.000000000 -0500
696 +++ madwifi-ng-r1486-20060329-patch/tools/do_multi.h 2006-03-31 10:58:27.000000000 -0500
699 +int a80211debug_init(int argc, char *argv[]);
700 +int a80211stats_init(int argc, char *argv[]);
701 +int athchans_init(int argc, char *argv[]);
702 +int athctrl_init(int argc, char *argv[]);
703 +int athdebug_init(int argc, char *argv[]);
704 +int athkey_init(int argc, char *argv[]);
705 +int athstats_init(int argc, char *argv[]);
706 +int wlanconfig_init(int argc, char *argv[]);
707 diff -ruN madwifi-ng-r1486-20060329/tools/wlanconfig.c madwifi-ng-r1486-20060329-patch/tools/wlanconfig.c
708 --- madwifi-ng-r1486-20060329/tools/wlanconfig.c 2006-02-01 15:07:11.000000000 -0500
709 +++ madwifi-ng-r1486-20060329-patch/tools/wlanconfig.c 2006-03-31 10:58:27.000000000 -0500
711 #include "net80211/ieee80211_crypto.h"
712 #include "net80211/ieee80211_ioctl.h"
715 +#include "do_multi.h"
719 * These are taken from ieee80211_node.h
728 +wlanconfig_init(int argc, char *argv[])
734 main(int argc, char *argv[])
738 const char *ifname, *cmd;