aboutsummaryrefslogtreecommitdiffstats
path: root/net/bsd-airtools
diff options
context:
space:
mode:
authorseanc <seanc@FreeBSD.org>2003-07-22 04:36:48 +0800
committerseanc <seanc@FreeBSD.org>2003-07-22 04:36:48 +0800
commitf5b8483bc5042e0c190edebbbf1c08fac49bbd24 (patch)
treed7034a8f9025fdd30d48f56d14c9e9ec7d92163e /net/bsd-airtools
parentaa02cbb65c19223f8dc85db2b9f6441d9b3a0ca8 (diff)
downloadfreebsd-ports-gnome-f5b8483bc5042e0c190edebbbf1c08fac49bbd24.tar.gz
freebsd-ports-gnome-f5b8483bc5042e0c190edebbbf1c08fac49bbd24.tar.zst
freebsd-ports-gnome-f5b8483bc5042e0c190edebbbf1c08fac49bbd24.zip
In an attempt to get dstumbler functioning on -CURRENT, I'm committing a few
patches that have been sent in thus far. dstumbler now reports the APs, but isn't able to monitor them on my Netgear 401, however, others have reported success so I'm committing them. Please keep me posted if things are or aren't working. I no longer have a -STABLE box to test these on and haven't tested this with sam's monitoring mode changes from last night, so, things may be working correctly now, and/or -STABLE may be broken. In either case, please let me know. Submitted by: sam, bms
Diffstat (limited to 'net/bsd-airtools')
-rw-r--r--net/bsd-airtools/files/patch-dstumbler::main.c50
-rw-r--r--net/bsd-airtools/files/patch-dstumbler::wistat.c38
2 files changed, 88 insertions, 0 deletions
diff --git a/net/bsd-airtools/files/patch-dstumbler::main.c b/net/bsd-airtools/files/patch-dstumbler::main.c
new file mode 100644
index 000000000000..abdeda1376e8
--- /dev/null
+++ b/net/bsd-airtools/files/patch-dstumbler::main.c
@@ -0,0 +1,50 @@
+--- dstumbler/main.c.orig Tue Feb 26 01:16:07 2002
++++ dstumbler/main.c Mon Jul 21 13:26:23 2003
+@@ -177,12 +177,24 @@
+ /*
+ * start the input/output handling loop
+ */
+-#define SETMONCHAN() \
+- if(monmode && chanlock && (apchange || apnew))\
+- {\
+- ch = aps[(aps_new && autosel) ? aps_new : aps_cur]->chan;\
+- setdebugchan(iface, ch);\
++
++static void __inline
++SETMONCHAN(const char *iface)
++{
++ if (monmode && chanlock && (apchange || apnew))
++ {
++ int apidx = (aps_new && autosel) ? aps_new : aps_cur;
++ /*
++ * Don't set the channel if no IBSS/ESSes have been
++ * discovered yet.
++ */
++ if (aps[apidx] != NULL) {
++ ch = aps[apidx]->chan;
++ setdebugchan(iface, ch);
++ }
+ }
++}
++
+ void
+ start_loop(const char *iface)
+ {
+@@ -271,7 +283,7 @@
+ */
+ if(monmode && mon_next(iface) == -1)
+ {
+- SETMONCHAN();
++ SETMONCHAN(iface);
+ smart_redraw();
+ continue;
+ }
+@@ -279,7 +291,7 @@
+ parse_ap(iface);
+ parse_node(iface);
+
+- SETMONCHAN();
++ SETMONCHAN(iface);
+ smart_redraw();
+
+ apchange = apnew = 0;
diff --git a/net/bsd-airtools/files/patch-dstumbler::wistat.c b/net/bsd-airtools/files/patch-dstumbler::wistat.c
new file mode 100644
index 000000000000..22be8692a365
--- /dev/null
+++ b/net/bsd-airtools/files/patch-dstumbler::wistat.c
@@ -0,0 +1,38 @@
+--- dstumbler/wistat.c.orig Fri Jan 11 07:05:43 2002
++++ dstumbler/wistat.c Mon Jul 21 13:27:51 2003
+@@ -468,17 +468,6 @@
+ return;
+ }
+
+- if(scanmode)
+- {
+- setscanreq(iface);
+-
+- /*
+- * some systems need the card to wait a bit before more config options are
+- * set, otherwise it could lock up the system.
+- */
+- usleep(POLLSPEED);
+- }
+-
+ /* first backup the current keys and encryption status */
+ getcryptkeys(iface, &backup.keys);
+ getcrypt(iface, &backup.crypt);
+@@ -503,6 +492,17 @@
+
+ /* set a null ssid for the default */
+ setdefaultssid(iface, "\0");
++
++ if(scanmode)
++ {
++ setscanreq(iface);
++
++ /*
++ * some systems need the card to wait a bit before more config options are
++ * set, otherwise it could lock up the system.
++ */
++ usleep(POLLSPEED);
++ }
+
+ backup.wi_started++;
+ }