Subject: net80211 sysctl and wlanctl(8)
To: None <tech-net@netbsd.org>
From: David Young <dyoung@pobox.com>
List: tech-net
Date: 07/03/2004 12:53:06
--JWEK1jqKZ6MHAcjA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Here is something for people to test.  The kernel patches let userland
examine wireless cards' node tables with sysctl.  wlanctl(8) is a
demonstration utility that pretty-prints 802.11 nodes.

I am too lazy to take ieee80211_cdev.[ch] out of the .tgz: that is
a barely-begun work-in-progress to let an 802.11 daemon intervene in
(Re)Association and Authentication, monitor nodes' comings-and-goings,
and get asynchronous link-quality notifications from, say, rssadapt(9).
I intend for all this to happen through a character device.

(BTW, the net80211 character device project makes me add cloning character
devices to my wishlist---I don't know where to begin *that*, however.)

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933

--JWEK1jqKZ6MHAcjA
Content-Type: application/x-gzip
Content-Disposition: attachment; filename="ieee80211-sysctl.tgz"
Content-Transfer-Encoding: base64

H4sIAAAAAAAAA+098XviNrL91fwVanq7C5QQIJCkyW7uI+AkvCOQAtl2by+fz9gm8RewWduQ
pH37v7+ZkWwMtoHs2+7d9ayv3djSaDSaGUmj0Vi4z+6eZXhHpUq5vGcahkFPiqYb86L23ddJ
pXKpdFCtflcqlcqHtRL+LZX5O6bDSrX0HYDUyrXD/VoFy8s1APiu9JXaX5tmrqc60KT+bM+s
u3VwhuN+C4K+bdrLs790DO+s3/wLy+9l9vK7GZZnDXv67Jh39x7LajlWAdmwpjo3dfYBmVRk
rD4eMwJwmWMAZ+aGXoSKWLdn6KbrOeZw5pm2xVRLZ8A7ZlrMtWeOZlDO0LRU55mNbGfiFtij
6d0z28Ha+GjPPDaxdXNkairiKDDVMdjUcCam5xk6mzo20AIP3r3qwT8G4BmP7UfTukMUmm3p
JtZzqd7E8I4xu1xcIc1l9sinSbN1gARdgO54KtCKWNWhPcciwQtEAsmyPVMzCgBhumwM+BBN
uE1LX6aJQaPaWDUnhoM8YpUoIdBg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
/Wgx/gUQ232l0UaLz4FckrmQB4/3gO2+owoWhnvzzrAfF1mfF4cr7e5Fq1FvK792e1mYLp5z
LPt99om6/H32GU9WcAOAwd0kEcQeyAPxxv16XCAYbUSbv4VQX/P6+GcOf0AU/tL7fZgQhGKn
KDRtVESG0g9mBZ3lNfyiwFka2qXw5S5hz8YbXni7xTgJa2ZoIaTs/k2jAfM1H1erKyJSu+K3
DZGCXYVl8P9JzefFb8otE5T+ylSa0pSmNKUpTWlKU5rSlKY0pSlNaUpTmtKUpjSlKU1pSlOa
0pSmNKUpTWlKU5rSlKb/xPR/wsQ5LwCgAAA=

--JWEK1jqKZ6MHAcjA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=ieee80211-sysctl-patch

Index: distrib/sets/lists/base/mi
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/base/mi,v
retrieving revision 1.483
diff -u -r1.483 mi
--- distrib/sets/lists/base/mi	25 May 2004 10:31:46 -0000	1.483
+++ distrib/sets/lists/base/mi	17 Jun 2004 21:28:34 -0000
@@ -1146,6 +1146,7 @@
 ./usr/sbin/vnconfig				base-sysutil-bin
 ./usr/sbin/wiconfig				base-sysutil-bin
 ./usr/sbin/wire-test				base-netutil-bin
+./usr/sbin/wlanctl				base-sysutil-bin
 ./usr/sbin/wsconscfg				base-sysutil-bin
 ./usr/sbin/wsfontload				base-sysutil-bin
 ./usr/sbin/wsmoused				base-sysutil-bin
Index: distrib/sets/lists/comp/mi
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/comp/mi,v
retrieving revision 1.707
diff -u -r1.707 mi
--- distrib/sets/lists/comp/mi	13 Jun 2004 22:28:42 -0000	1.707
+++ distrib/sets/lists/comp/mi	17 Jun 2004 21:28:39 -0000
@@ -895,12 +895,14 @@
 ./usr/include/net/slip.h			comp-c-include
 ./usr/include/net/zlib.h			comp-c-include
 ./usr/include/net80211/ieee80211.h		comp-c-include
+./usr/include/net80211/ieee80211_channel.h	comp-c-include
 ./usr/include/net80211/ieee80211_compat.h	comp-c-include
 ./usr/include/net80211/ieee80211_crypto.h	comp-c-include
 ./usr/include/net80211/ieee80211_ioctl.h	comp-c-include
 ./usr/include/net80211/ieee80211_node.h		comp-c-include
 ./usr/include/net80211/ieee80211_proto.h	comp-c-include
 ./usr/include/net80211/ieee80211_radiotap.h	comp-c-include
+./usr/include/net80211/ieee80211_sysctl.h	comp-c-include
 ./usr/include/net80211/ieee80211_var.h		comp-c-include
 ./usr/include/netatalk/aarp.h			comp-c-include
 ./usr/include/netatalk/at.h			comp-c-include
Index: distrib/sets/lists/man/mi
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/man/mi,v
retrieving revision 1.699
diff -u -r1.699 mi
--- distrib/sets/lists/man/mi	31 May 2004 13:49:52 -0000	1.699
+++ distrib/sets/lists/man/mi	17 Jun 2004 21:28:42 -0000
@@ -2106,6 +2106,7 @@
 ./usr/share/man/cat8/wiconfig.0			man-netutil-catman	.cat
 ./usr/share/man/cat8/wire-test.0		man-netutil-catman	.cat
 ./usr/share/man/cat8/wizd.0			man-sysutil-catman	.cat
+./usr/share/man/cat8/wlanctl.0			man-netutil-catman	.cat
 ./usr/share/man/cat8/wsconscfg.0		man-sysutil-catman	.cat
 ./usr/share/man/cat8/wsconsctl.0		man-sysutil-catman	.cat
 ./usr/share/man/cat8/wsfontload.0		man-sysutil-catman	.cat
@@ -4213,6 +4214,7 @@
 ./usr/share/man/man8/wiconfig.8			man-netutil-man		.man
 ./usr/share/man/man8/wire-test.8		man-netutil-man		.man
 ./usr/share/man/man8/wizd.8			man-sysutil-man		.man
+./usr/share/man/man8/wlanctl.8			man-netutil-man		.man
 ./usr/share/man/man8/wsconscfg.8		man-sysutil-man		.man
 ./usr/share/man/man8/wsconsctl.8		man-sysutil-man		.man
 ./usr/share/man/man8/wsfontload.8		man-sysutil-man		.man
Index: sys/net80211/Makefile
===================================================================
RCS file: /cvsroot/src/sys/net80211/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- sys/net80211/Makefile	13 Oct 2003 04:29:31 -0000	1.1
+++ sys/net80211/Makefile	17 Jun 2004 21:31:36 -0000
@@ -2,7 +2,8 @@
 
 INCSDIR= /usr/include/net80211
 
-INCS=	ieee80211.h ieee80211_compat.h ieee80211_crypto.h ieee80211_ioctl.h \
-	ieee80211_node.h ieee80211_proto.h ieee80211_radiotap.h ieee80211_var.h
+INCS=	ieee80211.h ieee80211_channel.h ieee80211_compat.h ieee80211_crypto.h \
+	ieee80211_ioctl.h ieee80211_node.h ieee80211_proto.h \
+	ieee80211_radiotap.h ieee80211_sysctl.h ieee80211_var.h
 
 .include <bsd.kinc.mk>
Index: sys/net80211/ieee80211.c
===================================================================
RCS file: /cvsroot/src/sys/net80211/ieee80211.c,v
retrieving revision 1.19
diff -u -r1.19 ieee80211.c
--- sys/net80211/ieee80211.c	6 Jun 2004 05:45:29 -0000	1.19
+++ sys/net80211/ieee80211.c	17 Jun 2004 21:31:38 -0000
@@ -77,6 +77,7 @@
 
 #include <net80211/ieee80211_var.h>
 #include <net80211/ieee80211_compat.h>
+#include <net80211/ieee80211_sysctl.h>
 
 #include <net/bpf.h>
 
@@ -104,9 +105,25 @@
 int	ieee80211_inact_max = IEEE80211_INACT_MAX;
 static int ieee80211_inact_max_nodenum;
 
+struct ieee80211com_head ieee80211com_head =
+    LIST_HEAD_INITIALIZER(ieee80211com_head);
+
 static void ieee80211_set11gbasicrates(struct ieee80211_rateset *,
 		enum ieee80211_phymode);
 
+#ifdef __NetBSD__
+static void sysctl_ieee80211_fill_node(struct ieee80211_node *,
+    struct ieee80211_node_sysctl *, int, struct ieee80211_channel *, int);
+static struct ieee80211_node *ieee80211_node_walknext(
+    struct ieee80211_node_walk *);
+static struct ieee80211_node *ieee80211_node_walkfirst(
+    struct ieee80211_node_walk *, u_short);
+static int sysctl_ieee80211_verify(SYSCTLFN_ARGS);
+static int sysctl_ieee80211_node(SYSCTLFN_ARGS);
+#endif /* __NetBSD__ */
+
+#define	LOGICALLY_EQUAL(x, y)	(!(x) == !(y))
+
 static const char *ieee80211_phymode_name[] = {
 	"auto",		/* IEEE80211_MODE_AUTO */
 	"11a",		/* IEEE80211_MODE_11A */
@@ -177,6 +194,7 @@
 		ic->ic_lintval = 100;		/* default sleep */
 	ic->ic_bmisstimeout = 7*ic->ic_lintval;	/* default 7 beacons */
 
+	LIST_INSERT_HEAD(&ieee80211com_head, ic, ic_list);
 	ieee80211_node_attach(ifp);
 	ieee80211_proto_attach(ifp);
 }
@@ -189,6 +207,7 @@
 	ieee80211_proto_detach(ifp);
 	ieee80211_crypto_detach(ifp);
 	ieee80211_node_detach(ifp);
+	LIST_REMOVE(ic, ic_list);
 #ifdef __FreeBSD__
 	ifmedia_removeall(&ic->ic_media);
 #else
@@ -951,6 +970,205 @@
 }
 
 /*
+ * Pointers for testing:
+ *
+ *	If there are no interfaces, or else no 802.11 interfaces,
+ *	ieee80211_node_walkfirst must return NULL.
+ *
+ *	If there is any single 802.11 interface, ieee80211_node_walkfirst
+ *	must not return NULL.
+ */	
+static struct ieee80211_node *
+ieee80211_node_walkfirst(struct ieee80211_node_walk *nw,
+    u_short if_index)
+{
+	struct ieee80211com *ic;
+	(void)memset(nw, 0, sizeof(*nw));
+
+	nw->nw_ifindex = if_index;
+
+	LIST_FOREACH(ic, &ieee80211com_head, ic_list) {
+		IEEE80211_DPRINTF(("%s: visiting ic %p\n", __func__, ic));
+		if (if_index != 0 && ic->ic_if.if_index != if_index) {
+			IEEE80211_DPRINTF(("%s: wrong ifindex, "
+			    "skipping ic %p\n", __func__, ic));
+			continue;
+		}
+		nw->nw_ic = ic;
+		nw->nw_ni = ic->ic_bss;
+	}
+	IEEE80211_DPRINTF(("%s: ic %p ni %p\n", __func__, nw->nw_ic,
+	    nw->nw_ni));
+
+	KASSERT(LOGICALLY_EQUAL(nw->nw_ni == NULL, nw->nw_ic == NULL));
+
+	return nw->nw_ni;
+}
+
+static struct ieee80211_node *
+ieee80211_node_walknext(struct ieee80211_node_walk *nw)
+{
+	KASSERT(LOGICALLY_EQUAL(nw->nw_ni == NULL, nw->nw_ic == NULL));
+
+	if (nw->nw_ic == NULL && nw->nw_ni == NULL)
+		return NULL;
+
+	if (nw->nw_ni == nw->nw_ic->ic_bss)
+		nw->nw_ni = TAILQ_FIRST(&nw->nw_ic->ic_node);
+	else
+		nw->nw_ni = TAILQ_NEXT(nw->nw_ni, ni_list);
+
+	if (nw->nw_ni == NULL) {
+		if (nw->nw_ifindex != 0)
+			return NULL;
+
+		nw->nw_ic = LIST_NEXT(nw->nw_ic, ic_list);
+		if (nw->nw_ic == NULL)
+			return NULL;
+
+		nw->nw_ni = nw->nw_ic->ic_bss;
+	}
+
+	IEEE80211_DPRINTF(("%s: ic %p bss %p ni %p\n", __func__, nw->nw_ic,
+	    nw->nw_ic->ic_bss, nw->nw_ni));
+
+	KASSERT(LOGICALLY_EQUAL(nw->nw_ni == NULL, nw->nw_ic == NULL));
+
+	return nw->nw_ni;
+}
+
+static void
+sysctl_ieee80211_fill_node(struct ieee80211_node *ni,
+    struct ieee80211_node_sysctl *ns, int ifindex,
+    struct ieee80211_channel *chan0, int is_bss)
+{
+	ns->ns_ifindex = ifindex;
+	ns->ns_capinfo = ni->ni_capinfo;
+	ns->ns_flags = (is_bss) ? IEEE80211_NODE_SYSCTL_F_BSS : 0;
+	(void)memcpy(ns->ns_macaddr, ni->ni_macaddr, sizeof(ns->ns_macaddr));
+	(void)memcpy(ns->ns_bssid, ni->ni_bssid, sizeof(ns->ns_bssid));
+	if (ni->ni_chan != IEEE80211_CHAN_ANYC) {
+		ns->ns_freq = ni->ni_chan->ic_freq;
+		ns->ns_chanflags = ni->ni_chan->ic_flags;
+		ns->ns_chanidx = ni->ni_chan - chan0;
+	} else {
+		ns->ns_freq = ns->ns_chanflags = 0;
+		ns->ns_chanidx = 0;
+	}
+	ns->ns_rssi = ni->ni_rssi;
+	ns->ns_esslen = ni->ni_esslen;
+	(void)memcpy(ns->ns_essid, ni->ni_essid, sizeof(ns->ns_essid));
+	ns->ns_pwrsave = ni->ni_pwrsave;
+	ns->ns_erp = ni->ni_erp;
+	ns->ns_associd = ni->ni_associd;
+	ns->ns_inact = ni->ni_inact * IEEE80211_INACT_WAIT;
+	ns->ns_rstamp = ni->ni_rstamp;
+	ns->ns_rates = ni->ni_rates;
+	ns->ns_txrate = ni->ni_txrate;
+	ns->ns_intval = ni->ni_intval;
+	(void)memcpy(ns->ns_tstamp, ni->ni_tstamp, sizeof(ns->ns_tstamp));
+	ns->ns_txseq = ni->ni_txseq;
+	ns->ns_rxseq = ni->ni_rxseq;
+	ns->ns_fhdwell = ni->ni_fhdwell;
+	ns->ns_fhindex = ni->ni_fhindex;
+	ns->ns_fails = ni->ni_fails;
+}
+
+/* Between two examinations of the sysctl tree, I expect each
+ * interface to add no more than 5 nodes.
+ */
+#define IEEE80211_SYSCTL_NODE_GROWTH	5
+
+static int
+sysctl_ieee80211_node(SYSCTLFN_ARGS)
+{
+	struct ieee80211_node_walk nw;
+	struct ieee80211_node *ni;
+	struct ieee80211_node_sysctl ns;
+	char *dp;
+	u_int cur_ifindex, ifcount, ifindex, last_ifindex, op, arg, hdr_type;
+	size_t len, needed, eltsize, out_size;
+	int error, s, nelt;
+
+	if (namelen == 1 && name[0] == CTL_QUERY)
+		return (sysctl_query(SYSCTLFN_CALL(rnode)));
+
+	if (namelen != IEEE80211_SYSCTL_NODENAMELEN)
+		return (EINVAL);
+
+	/* ifindex.op.arg.header-type.eltsize.nelt */
+	dp = oldp;
+	len = (oldp != NULL) ? *oldlenp : 0;
+	ifindex = name[IEEE80211_SYSCTL_NODENAME_IF];
+	op = name[IEEE80211_SYSCTL_NODENAME_OP];
+	arg = name[IEEE80211_SYSCTL_NODENAME_ARG];
+	hdr_type = name[IEEE80211_SYSCTL_NODENAME_TYPE];
+	eltsize = name[IEEE80211_SYSCTL_NODENAME_ELTSIZE];
+	nelt = name[IEEE80211_SYSCTL_NODENAME_ELTCOUNT];
+	out_size = MIN(sizeof(ns), eltsize);
+
+	IEEE80211_DPRINTF(("%s: ifindex %u op %u arg %u hdr_type %u eltsize %u "
+	    "nelt %d out_size %u\n", __func__, ifindex, op, arg, hdr_type,
+	    eltsize, nelt, out_size));
+
+	if (op != IEEE80211_SYSCTL_OP_ALL || arg != 0 ||
+	    hdr_type != IEEE80211_SYSCTL_T_NODE || eltsize < 1 || nelt < 0)
+		return (EINVAL);
+
+	error = 0;
+	needed = 0;
+	ifcount = 0;
+	last_ifindex = 0;
+
+	s = splnet();
+
+	for (ni = ieee80211_node_walkfirst(&nw, ifindex); ni != NULL;
+	     ni = ieee80211_node_walknext(&nw)) {
+		struct ieee80211com *ic;
+
+		ic = nw.nw_ic;
+		cur_ifindex = ic->ic_if.if_index;
+
+		IEEE80211_DPRINTF(("%s: visit ic %p idx %u\n", __func__, ic,
+		    cur_ifindex));
+
+		if (cur_ifindex != last_ifindex) {
+			ifcount++;
+			last_ifindex = cur_ifindex;
+		}
+
+		IEEE80211_DPRINTF(("%s: ni %p dp %p len %u nelt %d\n",
+		    __func__, ni, dp, len, nelt));
+
+		if (nelt <= 0)
+			continue;
+
+		if (len >= eltsize) {
+			sysctl_ieee80211_fill_node(ni, &ns, cur_ifindex,
+			    &ic->ic_channels[0], ni == ic->ic_bss);
+			error = copyout(&ns, dp, out_size);
+			if (error)
+				goto cleanup;
+			dp += eltsize;
+			len -= eltsize;
+		}
+		needed += eltsize;
+		if (nelt != INT_MAX)
+			nelt--;
+		IEEE80211_DPRINTF(("%s: needed %u\n", __func__, needed));
+	}
+	IEEE80211_DPRINTF(("%s: %u interfaces\n", __func__, ifcount)); 
+cleanup:
+	splx(s);
+
+	*oldlenp = needed;
+	if (oldp == NULL)
+		*oldlenp += ifcount * IEEE80211_SYSCTL_NODE_GROWTH * eltsize;
+
+	return (error);
+}
+
+/*
  * Setup sysctl(3) MIB, net.ieee80211.*
  *
  * TBD condition CTLFLAG_PERMANENT on being an LKM or not
@@ -977,6 +1195,11 @@
 	    NULL, 0, NULL, 0, CTL_CREATE, CTL_EOL)) != 0)
 		goto err;
 
+	if ((rc = sysctl_createv(clog, 0, &rnode, NULL,
+	    CTLFLAG_PERMANENT, CTLTYPE_NODE, "nodes", "client/peer stations",
+	    sysctl_ieee80211_node, 0, NULL, 0, CTL_CREATE, CTL_EOL)) != 0)
+		goto err;
+
 #ifdef IEEE80211_DEBUG
 
 	/* control debugging printfs */
Index: sys/net80211/ieee80211_rssadapt.c
===================================================================
RCS file: /cvsroot/src/sys/net80211/ieee80211_rssadapt.c,v
retrieving revision 1.7
diff -u -r1.7 ieee80211_rssadapt.c
--- sys/net80211/ieee80211_rssadapt.c	25 May 2004 04:33:59 -0000	1.7
+++ sys/net80211/ieee80211_rssadapt.c	17 Jun 2004 21:31:38 -0000
@@ -127,16 +127,13 @@
 	    rc.rc_avgrssi_old, rc.rc_avgrssi_denom,
 	    node.sysctl_num, rnode->sysctl_num));
 
-	if (rc.rc_decay_old < 0 ||
-	    rc.rc_decay_denom < rc.rc_decay_old)
+	if (rc.rc_decay_denom < rc.rc_decay_old)
 		return (EINVAL);
 
-	if (rc.rc_thresh_old < 0 ||
-	    rc.rc_thresh_denom < rc.rc_thresh_old)
+	if (rc.rc_thresh_denom < rc.rc_thresh_old)
 		return (EINVAL);
 
-	if (rc.rc_avgrssi_old < 0 ||
-	    rc.rc_avgrssi_denom < rc.rc_avgrssi_old)
+	if (rc.rc_avgrssi_denom < rc.rc_avgrssi_old)
 		return (EINVAL);
 
 	*(struct ieee80211_rssadapt_expavgctl *)rnode->sysctl_data = rc;
@@ -206,7 +203,7 @@
     struct ieee80211_rateset *rs, struct ieee80211_frame *wh, u_int len,
     int fixed_rate, const char *dvname, int do_not_adapt)
 {
-	u_int16_t (*thrs)[IEEE80211_RATE_SIZE];
+	u_int16_t (*thrs)[IEEE80211_RATE_MAXSIZE];
 	int flags = 0, i, rateidx = 0, thridx, top;
 
 	if ((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) == IEEE80211_FC0_TYPE_CTL)
@@ -338,7 +335,7 @@
 ieee80211_rssadapt_raise_rate(struct ieee80211com *ic,
     struct ieee80211_rssadapt *ra, struct ieee80211_rssdesc *id)
 {
-	u_int16_t (*thrs)[IEEE80211_RATE_SIZE], newthr, oldthr;
+	u_int16_t (*thrs)[IEEE80211_RATE_MAXSIZE], newthr, oldthr;
 	struct ieee80211_node *ni = id->id_node;
 	struct ieee80211_rateset *rs = &ni->ni_rates;
 	int i, rate, top;
Index: sys/net80211/ieee80211_rssadapt.h
===================================================================
RCS file: /cvsroot/src/sys/net80211/ieee80211_rssadapt.h,v
retrieving revision 1.3
diff -u -r1.3 ieee80211_rssadapt.h
--- sys/net80211/ieee80211_rssadapt.h	6 May 2004 03:03:20 -0000	1.3
+++ sys/net80211/ieee80211_rssadapt.h	17 Jun 2004 21:31:38 -0000
@@ -46,17 +46,18 @@
 #define	ieee80211_rssadapt_avgrssi_new \
     (ieee80211_rssadapt_avgrssi_denom - ieee80211_rssadapt_avgrssi_old)
 
+/* These are exported using sysctl(9), so alignment matters. */
 struct ieee80211_rssadapt_expavgctl {
 	/* RSS threshold decay. */
-	u_int rc_decay_denom;
-	u_int rc_decay_old;
+	u_int16_t rc_decay_denom;
+	u_int16_t rc_decay_old;
 	/* RSS threshold update. */
-	u_int rc_thresh_denom;
-	u_int rc_thresh_old;
+	u_int16_t rc_thresh_denom;
+	u_int16_t rc_thresh_old;
 	/* RSS average update. */
-	u_int rc_avgrssi_denom;
-	u_int rc_avgrssi_old;
-};
+	u_int16_t rc_avgrssi_denom;
+	u_int16_t rc_avgrssi_old;
+} __attribute__((__packed__));
 
 struct ieee80211_rssadapt {
 	/* exponential average RSSI << 8 */
@@ -69,11 +70,30 @@
 	u_int32_t		ra_pktrate;
 	/* RSSI threshold for each Tx rate */
 	u_int16_t		ra_rate_thresh[IEEE80211_RSSADAPT_BKTS]
-					      [IEEE80211_RATE_SIZE];
+					      [IEEE80211_RATE_MAXSIZE];
 	struct timeval		ra_last_raise;
 	struct timeval		ra_raise_interval;
 };
 
+struct ieee80211_rssadapt_sysctl {
+	u_int8_t	ru_macaddr[IEEE80211_ADDR_LEN];
+	u_int8_t	ru_bssid[IEEE80211_ADDR_LEN];
+	/* Tx failures, successes in this update interval */
+	u_int32_t		ru_nfail;
+	u_int32_t		ru_nok;
+
+	/* exponential average packets/second */
+	u_int32_t		ru_pktrate;
+
+	/* exponential average RSSI << 8 */
+	u_int16_t		ru_avg_rssi;
+
+	/* RSSI threshold for each Tx rate */
+	u_int16_t		ru_nbucket;
+	u_int16_t		ru_rate_thresh[IEEE80211_RSSADAPT_BKTS]
+					      [IEEE80211_RATE_MAXSIZE];
+} __attribute__((__packed__));
+
 /* Properties of a Tx packet, for link adaptation. */  
 struct ieee80211_rssdesc {
 	u_int			 id_len;	/* Tx packet length */
Index: sys/net80211/ieee80211_var.h
===================================================================
RCS file: /cvsroot/src/sys/net80211/ieee80211_var.h,v
retrieving revision 1.7
diff -u -r1.7 ieee80211_var.h
--- sys/net80211/ieee80211_var.h	6 May 2004 03:07:10 -0000	1.7
+++ sys/net80211/ieee80211_var.h	17 Jun 2004 21:31:38 -0000
@@ -44,6 +44,7 @@
 #include <net80211/ieee80211_ioctl.h>		/* for ieee80211_stats */
 #include <net80211/ieee80211_node.h>
 #include <net80211/ieee80211_proto.h>
+#include <net80211/ieee80211_channel.h>
 
 #define	IEEE80211_CHAN_MAX	255
 #define	IEEE80211_CHAN_ANY	0xffff		/* token for ``any channel'' */
@@ -89,65 +90,6 @@
 	IEEE80211_PROT_RTSCTS	= 2,	/* RTS-CTS */
 };
 
-/*
- * Channels are specified by frequency and attributes.
- */
-struct ieee80211_channel {
-	u_int16_t	ic_freq;	/* setting in Mhz */
-	u_int16_t	ic_flags;	/* see below */
-};
-
-/* bits 0-3 are for private use by drivers */
-/* channel attributes */
-#define	IEEE80211_CHAN_TURBO	0x0010	/* Turbo channel */
-#define	IEEE80211_CHAN_CCK	0x0020	/* CCK channel */
-#define	IEEE80211_CHAN_OFDM	0x0040	/* OFDM channel */
-#define	IEEE80211_CHAN_2GHZ	0x0080	/* 2 GHz spectrum channel. */
-#define	IEEE80211_CHAN_5GHZ	0x0100	/* 5 GHz spectrum channel */
-#define	IEEE80211_CHAN_PASSIVE	0x0200	/* Only passive scan allowed */
-#define	IEEE80211_CHAN_DYN	0x0400	/* Dynamic CCK-OFDM channel */
-#define	IEEE80211_CHAN_GFSK	0x0800	/* GFSK channel (FHSS PHY) */
-
-/*
- * Useful combinations of channel characteristics.
- */
-#define	IEEE80211_CHAN_FHSS \
-	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_GFSK)
-#define	IEEE80211_CHAN_A \
-	(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)
-#define	IEEE80211_CHAN_B \
-	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK)
-#define	IEEE80211_CHAN_PUREG \
-	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM)
-#define	IEEE80211_CHAN_G \
-	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN)
-#define	IEEE80211_CHAN_T \
-	(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)
-
-#define	IEEE80211_IS_CHAN_FHSS(_c) \
-	(((_c)->ic_flags & IEEE80211_CHAN_FHSS) == IEEE80211_CHAN_FHSS)
-#define	IEEE80211_IS_CHAN_A(_c) \
-	(((_c)->ic_flags & IEEE80211_CHAN_A) == IEEE80211_CHAN_A)
-#define	IEEE80211_IS_CHAN_B(_c) \
-	(((_c)->ic_flags & IEEE80211_CHAN_B) == IEEE80211_CHAN_B)
-#define	IEEE80211_IS_CHAN_PUREG(_c) \
-	(((_c)->ic_flags & IEEE80211_CHAN_PUREG) == IEEE80211_CHAN_PUREG)
-#define	IEEE80211_IS_CHAN_G(_c) \
-	(((_c)->ic_flags & IEEE80211_CHAN_G) == IEEE80211_CHAN_G)
-#define	IEEE80211_IS_CHAN_T(_c) \
-	(((_c)->ic_flags & IEEE80211_CHAN_T) == IEEE80211_CHAN_T)
-
-#define	IEEE80211_IS_CHAN_2GHZ(_c) \
-	(((_c)->ic_flags & IEEE80211_CHAN_2GHZ) != 0)
-#define	IEEE80211_IS_CHAN_5GHZ(_c) \
-	(((_c)->ic_flags & IEEE80211_CHAN_5GHZ) != 0)
-#define	IEEE80211_IS_CHAN_OFDM(_c) \
-	(((_c)->ic_flags & IEEE80211_CHAN_OFDM) != 0)
-#define	IEEE80211_IS_CHAN_CCK(_c) \
-	(((_c)->ic_flags & IEEE80211_CHAN_CCK) != 0)
-#define	IEEE80211_IS_CHAN_GFSK(_c) \
-	(((_c)->ic_flags & IEEE80211_CHAN_GFSK) != 0)
-
 /* ni_chan encoding for FH phy */
 #define	IEEE80211_FH_CHANMOD	80
 #define	IEEE80211_FH_CHAN(set,pat)	(((set)-1)*IEEE80211_FH_CHANMOD+(pat))
@@ -164,6 +106,7 @@
 #else
 	struct arpcom		ic_ac;
 #endif
+	LIST_ENTRY(ieee80211com) ic_list;	/* chain of all ieee80211com */
 	void			(*ic_recv_mgmt)(struct ieee80211com *,
 				    struct mbuf *, struct ieee80211_node *,
 				    int, int, u_int32_t);
@@ -243,6 +186,10 @@
 #endif
 #define	ic_softc	ic_if.if_softc
 
+LIST_HEAD(ieee80211com_head, ieee80211com);
+
+extern struct ieee80211com_head ieee80211com_head;
+
 #define	IEEE80211_ADDR_EQ(a1,a2)	(memcmp(a1,a2,IEEE80211_ADDR_LEN) == 0)
 #define	IEEE80211_ADDR_COPY(dst,src)	memcpy(dst,src,IEEE80211_ADDR_LEN)
 
Index: usr.sbin/Makefile
===================================================================
RCS file: /cvsroot/src/usr.sbin/Makefile,v
retrieving revision 1.189
diff -u -r1.189 Makefile
--- usr.sbin/Makefile	3 Jan 2004 14:04:27 -0000	1.189
+++ usr.sbin/Makefile	17 Jun 2004 21:32:00 -0000
@@ -19,7 +19,7 @@
 	sliplogin slstats sntp \
 	spray sunlabel sup sushi syslogd tadpolectl tcpdchk \
 	tcpdmatch tcpdump timed tpctl traceroute trpt trsp unlink \
-	usbdevs user videomode vipw vnconfig wiconfig wsconscfg \
+	usbdevs user videomode vipw vnconfig wiconfig wlanctl wsconscfg \
 	wsfontload wsmoused wsmuxctl zdump zic
 
 .if (${MKKERBEROS} != "no")

--JWEK1jqKZ6MHAcjA--