PERFORCE change 39940 for review

Sam Leffler sam at FreeBSD.org
Sat Oct 18 15:48:21 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=39940

Change 39940 by sam at sam_ebb on 2003/10/18 15:47:50

	IFC

Affected files ...

.. //depot/projects/netperf/sys/contrib/ipfilter/netinet/ip_fil.c#6 integrate
.. //depot/projects/netperf/sys/dev/aac/aac.c#7 integrate
.. //depot/projects/netperf/sys/dev/aac/aacreg.h#2 integrate
.. //depot/projects/netperf/sys/dev/ath/if_ath.c#26 integrate
.. //depot/projects/netperf/sys/kern/kern_switch.c#3 integrate
.. //depot/projects/netperf/sys/kern/tty_cons.c#5 integrate
.. //depot/projects/netperf/sys/net80211/ieee80211_crypto.c#3 integrate
.. //depot/projects/netperf/sys/net80211/ieee80211_input.c#12 edit
.. //depot/projects/netperf/sys/net80211/ieee80211_ioctl.c#5 integrate
.. //depot/projects/netperf/sys/net80211/ieee80211_ioctl.h#4 integrate
.. //depot/projects/netperf/sys/net80211/ieee80211_node.c#13 integrate
.. //depot/projects/netperf/sys/net80211/ieee80211_node.h#10 integrate
.. //depot/projects/netperf/sys/net80211/ieee80211_output.c#10 integrate
.. //depot/projects/netperf/sys/net80211/ieee80211_proto.c#6 integrate
.. //depot/projects/netperf/sys/net80211/ieee80211_var.h#9 integrate
.. //depot/projects/netperf/sys/sys/cons.h#4 integrate

Differences ...

==== //depot/projects/netperf/sys/contrib/ipfilter/netinet/ip_fil.c#6 (text+ko) ====

@@ -131,7 +131,7 @@
 #if !defined(lint)
 static const char sccsid[] = "@(#)ip_fil.c	2.41 6/5/96 (C) 1993-2000 Darren Reed";
 /* static const char rcsid[] = "@(#)$Id: ip_fil.c,v 2.42.2.34 2001/07/23 13:49:57 darrenr Exp $"; */
-static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.40 2003/09/24 05:08:58 sam Exp $";
+static const char rcsid[] = "@(#)$FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.41 2003/10/17 20:20:14 ume Exp $";
 #endif
 
 extern	struct	protosw	inetsw[];
@@ -2018,8 +2018,12 @@
 		error = ip6_getpmtu(ro_pmtu, ro, ifp, &finaldst, &mtu);
 		if (error == 0) {
 #else
+#ifdef ND_IFINFO
+			mtu = ND_IFINFO(ifp)->linkmtu;
+#else
 			mtu = nd_ifinfo[ifp->if_index].linkmtu;
 #endif
+#endif
 			if (m0->m_pkthdr.len <= mtu)
 				error = nd6_output(ifp, fin->fin_ifp, m0,
 						   dst6, ro->ro_rt);

==== //depot/projects/netperf/sys/dev/aac/aac.c#7 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/aac/aac.c,v 1.79 2003/09/29 14:10:04 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/aac/aac.c,v 1.80 2003/10/17 21:44:06 scottl Exp $");
 
 /*
  * Driver for the Adaptec 'FSA' family of PCI/SCSI RAID adapters.
@@ -241,6 +241,8 @@
 	AAC_LOCK_INIT(&sc->aac_container_lock, "AAC container lock");
 	TAILQ_INIT(&sc->aac_container_tqh);
 
+	/* Initialize the local AIF queue pointers */
+	sc->aac_aifq_head = sc->aac_aifq_tail = AAC_AIFQ_LENGTH;
 
 	/*
 	 * Initialise the adapter.
@@ -2803,23 +2805,25 @@
 static int
 aac_return_aif(struct aac_softc *sc, caddr_t uptr)
 {
-	int error;
+	int next, error;
 
 	debug_called(2);
 
 	AAC_LOCK_ACQUIRE(&sc->aac_aifq_lock);
 	if (sc->aac_aifq_tail == sc->aac_aifq_head) {
-		error = EAGAIN;
-	} else {
-		error = copyout(&sc->aac_aifq[sc->aac_aifq_tail], uptr,
-				sizeof(struct aac_aif_command));
-		if (error)
-			device_printf(sc->aac_dev,
-			    "aac_return_aif: copyout returned %d\n", error);
-		if (!error)
-			sc->aac_aifq_tail = (sc->aac_aifq_tail + 1) %
-					    AAC_AIFQ_LENGTH;
+		AAC_LOCK_RELEASE(&sc->aac_aifq_lock);
+		return (EAGAIN);
 	}
+
+	next = (sc->aac_aifq_tail + 1) % AAC_AIFQ_LENGTH;
+	error = copyout(&sc->aac_aifq[next], uptr,
+			sizeof(struct aac_aif_command));
+	if (error)
+		device_printf(sc->aac_dev,
+		    "aac_return_aif: copyout returned %d\n", error);
+	else
+		sc->aac_aifq_tail = next;
+
 	AAC_LOCK_RELEASE(&sc->aac_aifq_lock);
 	return(error);
 }

==== //depot/projects/netperf/sys/dev/aac/aacreg.h#2 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/aac/aacreg.h,v 1.16 2003/03/26 17:50:11 scottl Exp $
+ *	$FreeBSD: src/sys/dev/aac/aacreg.h,v 1.17 2003/10/17 21:44:06 scottl Exp $
  */
 
 /*
@@ -851,9 +851,10 @@
 	u_int32_t	seqNumber;	/* To allow ordering of
 					 * reports (if necessary) */
 	union {
-	struct aac_AifEventNotify	EN;	/* Event notify structure */
-	struct aac_AifJobProgressReport	PR[1];	/* Progress report */
-	u_int8_t			AR[AAC_AIF_REPORT_MAX_SIZE];
+		struct aac_AifEventNotify	EN;	/* Event notify */
+		struct aac_AifJobProgressReport	PR[1];	/* Progress report */
+		u_int8_t			AR[AAC_AIF_REPORT_MAX_SIZE];
+		u_int8_t			data[AAC_FIB_DATASIZE - 8];
 	} data;
 } __packed;
 

==== //depot/projects/netperf/sys/dev/ath/if_ath.c#26 (text+ko) ====

@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.26 2003/10/16 16:13:11 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.28 2003/10/17 21:58:39 sam Exp $");
 
 /*
  * Driver for the Atheros Wireless LAN controller.

==== //depot/projects/netperf/sys/kern/kern_switch.c#3 (text+ko) ====

@@ -86,7 +86,7 @@
 ***/
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.61 2003/10/16 08:39:15 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.62 2003/10/17 20:53:04 jeff Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -356,11 +356,11 @@
 			 * None free, but there is one we can commandeer.
 			 */
 			ke = tda->td_kse;
+			sched_rem(tda);
 			tda->td_kse = NULL;
 			ke->ke_thread = NULL;
 			tda = kg->kg_last_assigned =
 		    	    TAILQ_PREV(tda, threadqueue, td_runq);
-			sched_rem(td);
 		}
 	} else {
 		/* 

==== //depot/projects/netperf/sys/kern/tty_cons.c#5 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/tty_cons.c,v 1.115 2003/09/26 19:35:50 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/tty_cons.c,v 1.117 2003/10/18 02:23:57 rwatson Exp $");
 
 #include "opt_ddb.h"
 
@@ -538,10 +538,16 @@
 		return (-1);
 	STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) {
 		cn = cnd->cnd_cn;
-		c = cn->cn_checkc(cn);
-		if (c != -1) {
-			return (c);
+#ifdef DDB
+		if (!db_active || (cn->cn_flags & CN_FLAG_NODEBUG)) {
+#endif
+			c = cn->cn_checkc(cn);
+			if (c != -1) {
+				return (c);
+			}
+#ifdef DDB
 		}
+#endif
 	}
 	return (-1);
 }
@@ -557,9 +563,15 @@
 		return;
 	STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) {
 		cn = cnd->cnd_cn;
-		if (c == '\n')
-			cn->cn_putc(cn, '\r');
-		cn->cn_putc(cn, c);
+#ifdef DDB
+		if (!db_active || (cn->cn_flags & CN_FLAG_NODEBUG)) {
+#endif
+			if (c == '\n')
+				cn->cn_putc(cn, '\r');
+			cn->cn_putc(cn, c);
+#ifdef DDB
+		}
+#endif
 	}
 #ifdef DDB
 	if (console_pausing && !db_active && (c == '\n')) {

==== //depot/projects/netperf/sys/net80211/ieee80211_crypto.c#3 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto.c,v 1.2 2003/06/27 05:13:52 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto.c,v 1.3 2003/10/17 23:15:30 sam Exp $");
 
 #include "opt_inet.h"
 
@@ -114,7 +114,7 @@
 	if ((ctx = ic->ic_wep_ctx) == NULL) {
 		ctx = malloc(arc4_ctxlen(), M_DEVBUF, M_NOWAIT);
 		if (ctx == NULL) {
-			/* XXX statistic */
+			ic->ic_stats.is_crypto_nomem++;
 			goto fail;
 		}
 		ic->ic_wep_ctx = ctx;

==== //depot/projects/netperf/sys/net80211/ieee80211_input.c#12 (text+ko) ====

@@ -1,4 +1,4 @@
-/*-
+/*	$NetBSD: ieee80211_input.c,v 1.8 2003/10/18 03:33:51 onoe Exp $	*/
  * Copyright (c) 2001 Atsushi Onoe
  * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.9 2003/09/15 19:38:29 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.12 2003/10/17 23:59:11 sam Exp $");
 
 #include "opt_inet.h"
 
@@ -317,7 +317,7 @@
 			goto err;
 		}
 		if (ic->ic_opmode == IEEE80211_M_AHDEMO) {
-			/* XXX statistic */
+			ic->ic_stats.is_rx_ahdemo_mgt++;
 			goto out;
 		}
 		subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
@@ -914,8 +914,12 @@
 		switch (ic->ic_opmode) {
 		case IEEE80211_M_IBSS:
 			if (ic->ic_state != IEEE80211_S_RUN || seq != 1) {
-				/* XXX statistic */
-				return;
+				IEEE80211_DPRINTF(("%s: discard auth from %s; "
+					"state %u, seq %u\n", __func__,
+					ether_sprintf(wh->i_addr2),
+					ic->ic_state, seq));
+				ic->ic_stats.is_rx_bad_auth++;
+				break;
 			}
 			ieee80211_new_state(ic, IEEE80211_S_AUTH,
 			    wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK);
@@ -926,8 +930,14 @@
 			break;
 
 		case IEEE80211_M_HOSTAP:
-			if (ic->ic_state != IEEE80211_S_RUN || seq != 1)
-				return;
+			if (ic->ic_state != IEEE80211_S_RUN || seq != 1) {
+				IEEE80211_DPRINTF(("%s: discard auth from %s; "
+					"state %u, seq %u\n", __func__,
+					ether_sprintf(wh->i_addr2),
+					ic->ic_state, seq));
+				ic->ic_stats.is_rx_bad_auth++;
+				break;
+			}
 			if (ni == ic->ic_bss) {
 				ni = ieee80211_alloc_node(ic, wh->i_addr2);
 				if (ni == NULL) {
@@ -951,8 +961,12 @@
 
 		case IEEE80211_M_STA:
 			if (ic->ic_state != IEEE80211_S_AUTH || seq != 2) {
-				/* XXX statistic */
-				return;
+				IEEE80211_DPRINTF(("%s: discard auth from %s; "
+					"state %u, seq %u\n", __func__,
+					ether_sprintf(wh->i_addr2),
+					ic->ic_state, seq));
+				ic->ic_stats.is_rx_bad_auth++;
+				break;
 			}
 			if (status != 0) {
 				if_printf(&ic->ic_if,

==== //depot/projects/netperf/sys/net80211/ieee80211_ioctl.c#5 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.6 2003/09/26 16:48:39 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.7 2003/10/17 23:15:30 sam Exp $");
 
 /*
  * IEEE 802.11 ioctl support (FreeBSD-specific)

==== //depot/projects/netperf/sys/net80211/ieee80211_ioctl.h#4 (text+ko) ====

@@ -29,7 +29,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.3 2003/09/26 16:48:39 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.4 2003/10/17 23:15:30 sam Exp $
  */
 #ifndef _NET80211_IEEE80211_IOCTL_H_
 #define _NET80211_IEEE80211_IOCTL_H_
@@ -38,6 +38,50 @@
  * IEEE 802.11 ioctls.
  */
 
+struct ieee80211_stats {
+	u_int32_t	is_rx_badversion;	/* rx frame with bad version */
+	u_int32_t	is_rx_tooshort;		/* rx frame too short */
+	u_int32_t	is_rx_wrongbss;		/* rx from wrong bssid */
+	u_int32_t	is_rx_dup;		/* rx discard 'cuz dup */
+	u_int32_t	is_rx_wrongdir;		/* rx w/ wrong direction */
+	u_int32_t	is_rx_mcastecho;	/* rx discard 'cuz mcast echo */
+	u_int32_t	is_rx_notassoc;		/* rx discard 'cuz sta !assoc */
+	u_int32_t	is_rx_nowep;		/* rx w/ wep but wep !config */
+	u_int32_t	is_rx_wepfail;		/* rx wep processing failed */
+	u_int32_t	is_rx_decap;		/* rx decapsulation failed */
+	u_int32_t	is_rx_mgtdiscard;	/* rx discard mgt frames */
+	u_int32_t	is_rx_ctl;		/* rx discard ctrl frames */
+	u_int32_t	is_rx_rstoobig;		/* rx rate set truncated */
+	u_int32_t	is_rx_elem_missing;	/* rx required element missing*/
+	u_int32_t	is_rx_elem_toobig;	/* rx element too big */
+	u_int32_t	is_rx_elem_toosmall;	/* rx element too small */
+	u_int32_t	is_rx_elem_unknown;	/* rx element unknown */
+	u_int32_t	is_rx_badchan;		/* rx frame w/ invalid chan */
+	u_int32_t	is_rx_chanmismatch;	/* rx frame chan mismatch */
+	u_int32_t	is_rx_nodealloc;	/* rx frame dropped */
+	u_int32_t	is_rx_ssidmismatch;	/* rx frame ssid mismatch  */
+	u_int32_t	is_rx_auth_unsupported;	/* rx w/ unsupported auth alg */
+	u_int32_t	is_rx_auth_fail;	/* rx sta auth failure */
+	u_int32_t	is_rx_assoc_bss;	/* rx assoc from wrong bssid */
+	u_int32_t	is_rx_assoc_notauth;	/* rx assoc w/o auth */
+	u_int32_t	is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */
+	u_int32_t	is_rx_assoc_norate;	/* rx assoc w/ no rate match */
+	u_int32_t	is_rx_deauth;		/* rx deauthentication */
+	u_int32_t	is_rx_disassoc;		/* rx disassociation */
+	u_int32_t	is_rx_badsubtype;	/* rx frame w/ unknown subtype*/
+	u_int32_t	is_rx_nombuf;		/* rx failed for lack of mbuf */
+	u_int32_t	is_rx_decryptcrc;	/* rx decrypt failed on crc */
+	u_int32_t	is_rx_ahdemo_mgt;	/* rx discard ahdemo mgt frame*/
+	u_int32_t	is_rx_bad_auth;		/* rx bad auth request */
+	u_int32_t	is_tx_nombuf;		/* tx failed for lack of mbuf */
+	u_int32_t	is_tx_nonode;		/* tx failed for no node */
+	u_int32_t	is_tx_unknownmgt;	/* tx of unknown mgt frame */
+	u_int32_t	is_scan_active;		/* active scans started */
+	u_int32_t	is_scan_passive;	/* passive scans started */
+	u_int32_t	is_node_timeout;	/* nodes timed out inactivity */
+	u_int32_t	is_crypto_nomem;	/* no memory for crypto ctx */
+};
+
 #ifdef __FreeBSD__
 /*
  * FreeBSD-style ioctls.
@@ -80,47 +124,6 @@
 #define	IEEE80211_CHAN_ANY	0xffff		/* token for ``any channel'' */
 #endif
 
-struct ieee80211_stats {
-	u_int32_t	is_rx_badversion;	/* rx frame with bad version */
-	u_int32_t	is_rx_tooshort;		/* rx frame too short */
-	u_int32_t	is_rx_wrongbss;		/* rx from wrong bssid */
-	u_int32_t	is_rx_dup;		/* rx discard 'cuz dup */
-	u_int32_t	is_rx_wrongdir;		/* rx w/ wrong direction */
-	u_int32_t	is_rx_mcastecho;	/* rx discard 'cuz mcast echo */
-	u_int32_t	is_rx_notassoc;		/* rx discard 'cuz sta !assoc */
-	u_int32_t	is_rx_nowep;		/* rx w/ wep but wep !config */
-	u_int32_t	is_rx_wepfail;		/* rx wep processing failed */
-	u_int32_t	is_rx_decap;		/* rx decapsulation failed */
-	u_int32_t	is_rx_mgtdiscard;	/* rx discard mgt frames */
-	u_int32_t	is_rx_ctl;		/* rx discard ctrl frames */
-	u_int32_t	is_rx_rstoobig;		/* rx rate set truncated */
-	u_int32_t	is_rx_elem_missing;	/* rx required element missing*/
-	u_int32_t	is_rx_elem_toobig;	/* rx element too big */
-	u_int32_t	is_rx_elem_toosmall;	/* rx element too small */
-	u_int32_t	is_rx_elem_unknown;	/* rx element unknown */
-	u_int32_t	is_rx_badchan;		/* rx frame w/ invalid chan */
-	u_int32_t	is_rx_chanmismatch;	/* rx frame chan mismatch */
-	u_int32_t	is_rx_nodealloc;	/* rx frame dropped */
-	u_int32_t	is_rx_ssidmismatch;	/* rx frame ssid mismatch  */
-	u_int32_t	is_rx_auth_unsupported;	/* rx w/ unsupported auth alg */
-	u_int32_t	is_rx_auth_fail;	/* rx sta auth failure */
-	u_int32_t	is_rx_assoc_bss;	/* rx assoc from wrong bssid */
-	u_int32_t	is_rx_assoc_notauth;	/* rx assoc w/o auth */
-	u_int32_t	is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */
-	u_int32_t	is_rx_assoc_norate;	/* rx assoc w/ no rate match */
-	u_int32_t	is_rx_deauth;		/* rx deauthentication */
-	u_int32_t	is_rx_disassoc;		/* rx disassociation */
-	u_int32_t	is_rx_badsubtype;	/* rx frame w/ unknown subtype*/
-	u_int32_t	is_rx_nombuf;		/* rx failed for lack of mbuf */
-	u_int32_t	is_rx_decryptcrc;	/* rx decrypt failed on crc */
-	u_int32_t	is_tx_nombuf;		/* tx failed for lack of mbuf */
-	u_int32_t	is_tx_nonode;		/* tx failed for no node */
-	u_int32_t	is_tx_unknownmgt;	/* tx of unknown mgt frame */
-	u_int32_t	is_scan_active;		/* active scans started */
-	u_int32_t	is_scan_passive;	/* passive scans started */
-	u_int32_t	is_node_timeout;	/* nodes timed out inactivity */
-};
-
 #define	SIOCG80211STATS		_IOWR('i', 236, struct ifreq)
 #endif /* __FreeBSD__ */
 

==== //depot/projects/netperf/sys/net80211/ieee80211_node.c#13 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.9 2003/09/26 17:00:44 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.11 2003/10/17 23:15:30 sam Exp $");
 
 #include "opt_inet.h"
 

==== //depot/projects/netperf/sys/net80211/ieee80211_node.h#10 (text+ko) ====

@@ -29,7 +29,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net80211/ieee80211_node.h,v 1.6 2003/09/26 17:00:44 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_node.h,v 1.7 2003/10/17 21:41:52 sam Exp $
  */
 #ifndef _NET80211_IEEE80211_NODE_H_
 #define _NET80211_IEEE80211_NODE_H_

==== //depot/projects/netperf/sys/net80211/ieee80211_output.c#10 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.6 2003/09/14 22:34:24 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.9 2003/10/17 23:15:30 sam Exp $");
 
 #include "opt_inet.h"
 
@@ -167,7 +167,7 @@
 			/*
 			 * When not in station mode the destination
 			 * address should always be in the node table
-			 * if the device sends management frames to us,
+			 * if the device sends management frames to us;
 			 * unless this is a multicast/broadcast frame.
 			 * For devices that don't send management frames
 			 * to the host we have to cheat; use the bss
@@ -366,7 +366,7 @@
 		 *	[2] cabability information
 		 *	[tlv] ssid
 		 *	[tlv] supported rates
-		 *	[tlv] parameter set (DS)
+		 *	[tlv] parameter set (FH/DS)
 		 *	[tlv] parameter set (IBSS)
 		 *	[tlv] extended supported rates
 		 */
@@ -374,7 +374,7 @@
 			 8 + 2 + 2 + 2
 		       + 2 + ni->ni_esslen
 		       + 2 + IEEE80211_RATE_SIZE
-		       + (ic->ic_phytype != IEEE80211_T_FH ? 3 : 0)
+		       + (ic->ic_phytype == IEEE80211_T_FH ? 7 : 3)
 		       + 6
 		       + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE));
 		if (m == NULL)
@@ -402,8 +402,17 @@
 				ic->ic_bss->ni_esslen);
 		frm = ieee80211_add_rates(frm, &ic->ic_bss->ni_rates);
 
-		/* XXX insert FH parameter set */
-		if (ic->ic_phytype != IEEE80211_T_FH) {
+		if (ic->ic_phytype == IEEE80211_T_FH) {
+                        *frm++ = IEEE80211_ELEMID_FHPARMS;
+                        *frm++ = 5;
+                        *frm++ = ni->ni_fhdwell & 0x00ff;
+                        *frm++ = (ni->ni_fhdwell >> 8) & 0x00ff;
+                        *frm++ = IEEE80211_FH_CHANSET(
+			    ieee80211_chan2ieee(ic, ni->ni_chan));
+                        *frm++ = IEEE80211_FH_CHANPAT(
+			    ieee80211_chan2ieee(ic, ni->ni_chan));
+                        *frm++ = ni->ni_fhindex;
+		} else {
 			*frm++ = IEEE80211_ELEMID_DSPARMS;
 			*frm++ = 1;
 			*frm++ = ieee80211_chan2ieee(ic, ni->ni_chan);

==== //depot/projects/netperf/sys/net80211/ieee80211_proto.c#6 (text+ko) ====

@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_proto.c,v 1.4 2003/09/26 16:54:55 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_proto.c,v 1.5 2003/10/17 21:41:52 sam Exp $");
 
 /*
  * IEEE 802.11 protocol support.

==== //depot/projects/netperf/sys/net80211/ieee80211_var.h#9 (text+ko) ====

@@ -29,7 +29,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net80211/ieee80211_var.h,v 1.7 2003/09/26 17:00:44 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_var.h,v 1.10 2003/10/17 23:15:30 sam Exp $
  */
 #ifndef _NET80211_IEEE80211_VAR_H_
 #define _NET80211_IEEE80211_VAR_H_

==== //depot/projects/netperf/sys/sys/cons.h#4 (text+ko) ====

@@ -36,7 +36,7 @@
  * SUCH DAMAGE.
  *
  *	from: @(#)cons.h	7.2 (Berkeley) 5/9/91
- * $FreeBSD: src/sys/sys/cons.h,v 1.32 2003/09/28 05:36:30 jake Exp $
+ * $FreeBSD: src/sys/sys/cons.h,v 1.33 2003/10/18 02:13:39 rwatson Exp $
  */
 
 #ifndef _MACHINE_CONS_H_
@@ -70,6 +70,7 @@
 	short	cn_pri;		/* pecking order; the higher the better */
 	void	*cn_arg;	/* drivers method argument */
 	int	cn_unit;	/* some drivers prefer this */
+	int	cn_flags;	/* capabilities of this console */
 	char	cn_name[SPECNAMELEN + 1];	/* console (device) name */
 };
 
@@ -80,6 +81,9 @@
 #define CN_INTERNAL	3	/* "internal" bit-mapped display */
 #define CN_REMOTE	4	/* serial interface with remote bit set */
 
+/* Values for cn_flags. */
+#define	CN_FLAG_NODEBUG	0x00000001	/* Not supported with debugger. */
+
 #ifdef _KERNEL
 extern int cons_unavail;
 


More information about the p4-projects mailing list