From owner-p4-projects@FreeBSD.ORG Thu Sep 6 03:39:35 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4686216A468; Thu, 6 Sep 2007 03:39:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1187D16A420 for ; Thu, 6 Sep 2007 03:39:35 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0153813C46B for ; Thu, 6 Sep 2007 03:39:35 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l863dYmB049216 for ; Thu, 6 Sep 2007 03:39:34 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l863dYZZ049212 for perforce@freebsd.org; Thu, 6 Sep 2007 03:39:34 GMT (envelope-from kmacy@freebsd.org) Date: Thu, 6 Sep 2007 03:39:34 GMT Message-Id: <200709060339.l863dYZZ049212@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 126119 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2007 03:39:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=126119 Change 126119 by kmacy@kmacy:storage:toestack on 2007/09/06 03:39:28 IFC 126117 Affected files ... .. //depot/projects/toestack/lib/libc/net/getaddrinfo.c#2 integrate .. //depot/projects/toestack/lib/libutil/expand_number.3#2 integrate .. //depot/projects/toestack/lib/libutil/expand_number.c#2 integrate .. //depot/projects/toestack/lib/libutil/humanize_number.3#2 integrate .. //depot/projects/toestack/share/man/man9/Makefile#2 integrate .. //depot/projects/toestack/sys/amd64/conf/MULTIQ#1 branch .. //depot/projects/toestack/sys/dev/ath/if_ath.c#2 integrate .. //depot/projects/toestack/sys/dev/awi/awi.c#2 integrate .. //depot/projects/toestack/sys/dev/cxgb/common/cxgb_t3_cpl.h#2 integrate .. //depot/projects/toestack/sys/dev/cxgb/cxgb_adapter.h#2 integrate .. //depot/projects/toestack/sys/dev/cxgb/cxgb_main.c#2 integrate .. //depot/projects/toestack/sys/dev/ipw/if_ipw.c#2 integrate .. //depot/projects/toestack/sys/dev/iwi/if_iwi.c#2 integrate .. //depot/projects/toestack/sys/dev/ral/rt2560.c#2 integrate .. //depot/projects/toestack/sys/dev/ral/rt2661.c#2 integrate .. //depot/projects/toestack/sys/dev/ray/if_ray.c#2 integrate .. //depot/projects/toestack/sys/dev/usb/if_rum.c#2 integrate .. //depot/projects/toestack/sys/dev/usb/if_ural.c#2 integrate .. //depot/projects/toestack/sys/dev/usb/if_zyd.c#2 integrate .. //depot/projects/toestack/sys/dev/wi/if_wi.c#2 integrate .. //depot/projects/toestack/sys/kern/init_main.c#2 integrate .. //depot/projects/toestack/sys/modules/cxgb/Makefile#2 integrate .. //depot/projects/toestack/sys/net80211/_ieee80211.h#2 integrate .. //depot/projects/toestack/sys/net80211/ieee80211.h#2 integrate .. //depot/projects/toestack/sys/net80211/ieee80211_freebsd.h#2 integrate .. //depot/projects/toestack/sys/net80211/ieee80211_ht.c#2 integrate .. //depot/projects/toestack/sys/net80211/ieee80211_input.c#2 integrate .. //depot/projects/toestack/sys/net80211/ieee80211_ioctl.c#2 integrate .. //depot/projects/toestack/sys/net80211/ieee80211_ioctl.h#2 integrate .. //depot/projects/toestack/sys/net80211/ieee80211_node.c#2 integrate .. //depot/projects/toestack/sys/net80211/ieee80211_proto.c#2 integrate .. //depot/projects/toestack/sys/net80211/ieee80211_proto.h#2 integrate .. //depot/projects/toestack/sys/net80211/ieee80211_var.h#2 integrate .. //depot/projects/toestack/sys/netinet/in_pcb.c#2 integrate .. //depot/projects/toestack/sys/sys/kernel.h#2 integrate Differences ... ==== //depot/projects/toestack/lib/libc/net/getaddrinfo.c#2 (text+ko) ==== @@ -54,7 +54,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.85 2006/07/23 15:31:03 ume Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/net/getaddrinfo.c,v 1.86 2007/09/05 18:08:14 jinmei Exp $"); #include "namespace.h" #include @@ -575,11 +575,28 @@ * If the returned entry is for an active connection, * and the given name is not numeric, reorder the * list, so that the application would try the list - * in the most efficient order. + * in the most efficient order. Since the head entry + * of the original list may contain ai_canonname and + * that entry may be moved elsewhere in the new list, + * we keep the pointer and will restore it in the new + * head entry. (Note that RFC3493 requires the head + * entry store it when requested by the caller). */ if (hints == NULL || !(hints->ai_flags & AI_PASSIVE)) { - if (!numeric) + if (!numeric) { + char *canonname; + + canonname = + sentinel.ai_next->ai_canonname; + sentinel.ai_next->ai_canonname = NULL; (void)reorder(&sentinel); + if (sentinel.ai_next->ai_canonname == + NULL) { + sentinel.ai_next->ai_canonname + = canonname; + } else if (canonname != NULL) + free(canonname); + } } *res = sentinel.ai_next; return SUCCESS; ==== //depot/projects/toestack/lib/libutil/expand_number.3#2 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libutil/expand_number.3,v 1.1 2007/09/01 06:19:11 pjd Exp $ +.\" $FreeBSD: src/lib/libutil/expand_number.3,v 1.2 2007/09/05 14:25:16 pjd Exp $ .\" .Dd April 16, 2007 .Dt EXPAND_NUMBER 3 @@ -77,6 +77,8 @@ .It Bq Er ERANGE Result doesn't fit into 64 bits. .El +.Sh SEE ALSO +.Xr humanize_number 3 .Sh HISTORY The .Fn expand_number ==== //depot/projects/toestack/lib/libutil/expand_number.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libutil/expand_number.c,v 1.1 2007/09/01 06:19:11 pjd Exp $"); +__FBSDID("$FreeBSD: src/lib/libutil/expand_number.c,v 1.2 2007/09/05 14:27:13 pjd Exp $"); #include #include @@ -68,7 +68,22 @@ } s = tolower(*endptr); - for (i = 0; i < unit[i] != '\0'; i++) { + switch (s) { + case 'b': + case 'k': + case 'm': + case 'g': + case 't': + case 'p': + case 'e': + break; + default: + /* Unrecognized unit. */ + errno = EINVAL; + return (-1); + } + + for (i = 0; unit[i] != '\0'; i++) { if (s == unit[i]) break; if ((number < 0 && (number << 10) > number) || @@ -78,11 +93,6 @@ } number <<= 10; } - if (unit[i] == '\0') { - /* Unrecognized unit. */ - errno = EINVAL; - return (-1); - } *num = number; return (0); ==== //depot/projects/toestack/lib/libutil/humanize_number.3#2 (text+ko) ==== @@ -1,5 +1,5 @@ .\" $NetBSD: humanize_number.3,v 1.4 2003/04/16 13:34:37 wiz Exp $ -.\" $FreeBSD: src/lib/libutil/humanize_number.3,v 1.10 2006/09/17 21:27:35 ru Exp $ +.\" $FreeBSD: src/lib/libutil/humanize_number.3,v 1.11 2007/09/05 14:25:16 pjd Exp $ .\" .\" Copyright (c) 1999, 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -146,6 +146,8 @@ If .Dv HN_GETSCALE is specified, the prefix index number will be returned instead. +.Sh SEE ALSO +.Xr expand_number 3 .Sh HISTORY The .Fn humanize_number ==== //depot/projects/toestack/share/man/man9/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/man/man9/Makefile,v 1.308 2007/05/19 20:24:32 jhb Exp $ +# $FreeBSD: src/share/man/man9/Makefile,v 1.309 2007/09/05 19:46:23 rwatson Exp $ MAN= accept_filter.9 \ accf_data.9 \ @@ -1072,6 +1072,18 @@ sx.9 sx_xlock.9 \ sx.9 sx_xlocked.9 \ sx.9 sx_xunlock.9 +MLINKS+=sysctl.9 SYSCTL_DECL.9 \ + sysctl.9 SYSCTL_INT.9 \ + sysctl.9 SYSCTL_LONG.9 \ + sysctl.9 SYSCTL_NODE.9 \ + sysctl.9 SYSCTL_OPAQUE.9 \ + sysctl.9 SYSCTL_PROC.9 \ + sysctl.9 SYSCTL_STRING.9 \ + sysctl.9 SYSCTL_STRUCT.9 \ + sysctl.9 SYSCTL_UINT.9 \ + sysctl.9 SYSCTL_ULONG.9 \ + sysctl.9 SYSCTL_XINT.9 \ + sysctl.9 SYSCTL_XLONG.9 MLINKS+=sysctl_add_oid.9 SYSCTL_ADD_INT.9 \ sysctl_add_oid.9 SYSCTL_ADD_LONG.9 \ sysctl_add_oid.9 SYSCTL_ADD_NODE.9 \ ==== //depot/projects/toestack/sys/dev/ath/if_ath.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.173 2007/08/06 14:25:59 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.174 2007/09/05 23:00:26 sam Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -1579,6 +1579,12 @@ ATH_TXBUF_UNLOCK(sc); break; } + /* + * Cancel any background scan. + */ + if (ic->ic_flags & IEEE80211_F_SCAN) + ieee80211_cancel_scan(ic); + STAILQ_INIT(&frags); /* * Find the node for the destination so we can do @@ -1605,15 +1611,6 @@ * the frame back when the time is right. */ ieee80211_pwrsave(ni, m); - /* - * If we're in power save mode 'cuz of a bg - * scan cancel it so the traffic can flow. - * The packet we just queued will automatically - * get sent when we drop out of power save. - * XXX locking - */ - if (ic->ic_flags & IEEE80211_F_SCAN) - ieee80211_cancel_scan(ic); goto reclaim; } /* calculate priority so we can find the tx queue */ @@ -1752,6 +1749,7 @@ } ifp->if_timer = 5; + ic->ic_lastdata = ticks; #if 0 /* * Flush stale frames from the fast-frame staging queue. ==== //depot/projects/toestack/sys/dev/awi/awi.c#2 (text+ko) ==== @@ -89,7 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: awi.c,v 1.62 2004/01/16 14:13:15 onoe Exp $"); #endif #ifdef __FreeBSD__ -__FBSDID("$FreeBSD: src/sys/dev/awi/awi.c,v 1.44 2007/06/11 03:36:51 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/awi/awi.c,v 1.45 2007/09/05 21:31:31 sam Exp $"); #endif #include "opt_inet.h" @@ -1919,6 +1919,8 @@ else awi_drvstate(sc, AWI_DRV_INFASSOC); break; + default: + break; } if (nstate == IEEE80211_S_INIT) { @@ -1954,6 +1956,8 @@ case IEEE80211_S_SCAN: /* scan next */ break; + default: + break; } if (ic->ic_flags & IEEE80211_F_ASCAN) newmode = AWI_SCAN_ACTIVE; ==== //depot/projects/toestack/sys/dev/cxgb/common/cxgb_t3_cpl.h#2 (text+ko) ==== ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_adapter.h#2 (text+ko) ==== @@ -590,9 +590,10 @@ struct in6_addr *rip, uint16_t rport, int ipv6); void cxgb_pcpu_shutdown_threads(struct adapter *sc); void cxgb_pcpu_startup_threads(struct adapter *sc); -int cxgb_tx_common(struct ifnet *ifp, struct sge_qset *qs, uint32_t txmax); #endif +int process_responses(adapter_t *adap, struct sge_qset *qs, int budget); +int cxgb_tx_common(struct ifnet *ifp, struct sge_qset *qs, uint32_t txmax); void t3_free_qset(adapter_t *sc, struct sge_qset *q); int cxgb_dequeue_packet(struct ifnet *, struct sge_txq *, struct mbuf **); void cxgb_start(struct ifnet *ifp); ==== //depot/projects/toestack/sys/dev/cxgb/cxgb_main.c#2 (text+ko) ==== @@ -1456,7 +1456,7 @@ for (j = 0; j < pi->nqsets; ++j) send_pktsched_cmd(sc, 1, pi->first_qset + j, -1, - -1, i); + -1, pi->tx_chan); } } @@ -1998,11 +1998,11 @@ if (err == ENOMEM) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; IFQ_LOCK(&ifp->if_snd); - IFQ_DRV_PREPEND(&ifp->if_snd, m); + IFQ_DRV_PREPEND(&ifp->if_snd, m_vec[0]); IFQ_UNLOCK(&ifp->if_snd); } } - if (err == 0 && m == NULL) { + if (err == 0 && m_vec[0] == NULL) { err = ENOBUFS; } else if ((err == 0) && (txq->size <= txq->in_use + TX_MAX_DESC) && ==== //depot/projects/toestack/sys/dev/ipw/if_ipw.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.29 2007/07/05 15:06:49 avatar Exp $ */ +/* $FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.30 2007/09/05 21:31:31 sam Exp $ */ /*- * Copyright (c) 2004-2006 @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.29 2007/07/05 15:06:49 avatar Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.30 2007/09/05 21:31:31 sam Exp $"); /*- * Intel(R) PRO/Wireless 2100 MiniPCI driver @@ -839,6 +839,7 @@ case IEEE80211_S_SCAN: case IEEE80211_S_AUTH: case IEEE80211_S_ASSOC: + default: break; } ==== //depot/projects/toestack/sys/dev/iwi/if_iwi.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.56 2007/08/29 21:52:03 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.57 2007/09/05 23:00:26 sam Exp $"); /*- * Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver @@ -1917,6 +1917,11 @@ IFQ_DRV_DEQUEUE(&ifp->if_snd, m0); if (m0 == NULL) break; + /* + * Cancel any background scan. + */ + if (ic->ic_flags & IEEE80211_F_SCAN) + ieee80211_cancel_scan(ic); if (m0->m_len < sizeof (struct ether_header) && (m0 = m_pullup(m0, sizeof (struct ether_header))) == NULL) { @@ -1978,6 +1983,7 @@ } sc->sc_tx_timer = 5; + ic->ic_lastdata = ticks; } IWI_UNLOCK(sc); ==== //depot/projects/toestack/sys/dev/ral/rt2560.c#2 (text) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/ral/rt2560.c,v 1.14 2007/07/22 06:44:10 kevlo Exp $ */ +/* $FreeBSD: src/sys/dev/ral/rt2560.c,v 1.16 2007/09/05 23:00:27 sam Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -18,7 +18,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ral/rt2560.c,v 1.14 2007/07/22 06:44:10 kevlo Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ral/rt2560.c,v 1.16 2007/09/05 23:00:27 sam Exp $"); /*- * Ralink Technology RT2560 chipset driver @@ -807,6 +807,7 @@ case IEEE80211_S_SCAN: case IEEE80211_S_AUTH: case IEEE80211_S_ASSOC: + default: break; } @@ -2004,6 +2005,11 @@ ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } + /* + * Cancel any background scan. + */ + if (ic->ic_flags & IEEE80211_F_SCAN) + ieee80211_cancel_scan(ic); if (m0->m_len < sizeof (struct ether_header) && !(m0 = m_pullup(m0, sizeof (struct ether_header)))) @@ -2056,6 +2062,7 @@ } sc->sc_tx_timer = 5; + ic->ic_lastdata = ticks; callout_reset(&sc->watchdog_ch, hz, rt2560_watchdog, sc); } ==== //depot/projects/toestack/sys/dev/ral/rt2661.c#2 (text) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/ral/rt2661.c,v 1.14 2007/07/22 06:44:10 kevlo Exp $ */ +/* $FreeBSD: src/sys/dev/ral/rt2661.c,v 1.16 2007/09/05 23:00:27 sam Exp $ */ /*- * Copyright (c) 2006 @@ -18,7 +18,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ral/rt2661.c,v 1.14 2007/07/22 06:44:10 kevlo Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ral/rt2661.c,v 1.16 2007/09/05 23:00:27 sam Exp $"); /*- * Ralink Technology RT2561, RT2561S and RT2661 chipset driver @@ -821,6 +821,7 @@ case IEEE80211_S_SCAN: case IEEE80211_S_AUTH: case IEEE80211_S_ASSOC: + default: break; } @@ -1765,6 +1766,11 @@ IFQ_DRV_DEQUEUE(&ifp->if_snd, m0); if (m0 == NULL) break; + /* + * Cancel any background scan. + */ + if (ic->ic_flags & IEEE80211_F_SCAN) + ieee80211_cancel_scan(ic); if (m0->m_len < sizeof (struct ether_header) && !(m0 = m_pullup(m0, sizeof (struct ether_header)))) @@ -1818,6 +1824,7 @@ } sc->sc_tx_timer = 5; + ic->ic_lastdata = ticks; callout_reset(&sc->watchdog_ch, hz, rt2661_watchdog, sc); } ==== //depot/projects/toestack/sys/dev/ray/if_ray.c#2 (text+ko) ==== @@ -62,7 +62,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ray/if_ray.c,v 1.86 2007/02/23 12:18:51 piso Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ray/if_ray.c,v 1.87 2007/09/05 21:25:58 sam Exp $"); /* * Card configuration @@ -275,6 +275,16 @@ #include #include +typedef uint8_t *ieee80211_mgt_beacon_t; +typedef uint8_t *ieee80211_mgt_auth_t; + +#define IEEE80211_AUTH_ALGORITHM(auth) \ + ((auth)[0] | ((auth)[1] << 8)) +#define IEEE80211_AUTH_TRANSACTION(auth) \ + ((auth)[2] | ((auth)[3] << 8)) +#define IEEE80211_AUTH_STATUS(auth) \ + ((auth)[4] | ((auth)[5] << 8)) + static MALLOC_DEFINE(M_RAYCOM, "raycom", "Raylink command queue entry"); /* * Prototyping ==== //depot/projects/toestack/sys/dev/usb/if_rum.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/usb/if_rum.c,v 1.11 2007/06/21 14:42:33 imp Exp $ */ +/* $FreeBSD: src/sys/dev/usb/if_rum.c,v 1.12 2007/09/05 23:00:27 sam Exp $ */ /*- * Copyright (c) 2005-2007 Damien Bergamini @@ -18,7 +18,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/if_rum.c,v 1.11 2007/06/21 14:42:33 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/if_rum.c,v 1.12 2007/09/05 23:00:27 sam Exp $"); /*- * Ralink Technology RT2501USB/RT2601USB chipset driver @@ -1406,6 +1406,11 @@ ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } + /* + * Cancel any background scan. + */ + if (ic->ic_flags & IEEE80211_F_SCAN) + ieee80211_cancel_scan(ic); if (m0->m_len < sizeof (struct ether_header) && !(m0 = m_pullup(m0, sizeof (struct ether_header)))) @@ -1436,6 +1441,7 @@ } sc->sc_tx_timer = 5; + ic->ic_lastdata = ticks; callout_reset(&sc->watchdog_ch, hz, rum_watchdog, sc); } } ==== //depot/projects/toestack/sys/dev/usb/if_ural.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/usb/if_ural.c,v 1.67 2007/07/17 11:27:57 sephe Exp $ */ +/* $FreeBSD: src/sys/dev/usb/if_ural.c,v 1.68 2007/09/05 23:00:27 sam Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -18,7 +18,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/if_ural.c,v 1.67 2007/07/17 11:27:57 sephe Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/if_ural.c,v 1.68 2007/09/05 23:00:27 sam Exp $"); /*- * Ralink Technology RT2500USB chipset driver @@ -1472,6 +1472,11 @@ ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; } + /* + * Cancel any background scan. + */ + if (ic->ic_flags & IEEE80211_F_SCAN) + ieee80211_cancel_scan(ic); if (m0->m_len < sizeof (struct ether_header) && !(m0 = m_pullup(m0, sizeof (struct ether_header)))) @@ -1502,6 +1507,7 @@ } sc->sc_tx_timer = 5; + ic->ic_lastdata = ticks; callout_reset(&sc->watchdog_ch, hz, ural_watchdog, sc); } } ==== //depot/projects/toestack/sys/dev/usb/if_zyd.c#2 (text+ko) ==== @@ -1,6 +1,6 @@ /* $OpenBSD: if_zyd.c,v 1.52 2007/02/11 00:08:04 jsg Exp $ */ /* $NetBSD: if_zyd.c,v 1.7 2007/06/21 04:04:29 kiyohara Exp $ */ -/* $FreeBSD: src/sys/dev/usb/if_zyd.c,v 1.1 2007/08/29 21:16:50 imp Exp $ */ +/* $FreeBSD: src/sys/dev/usb/if_zyd.c,v 1.2 2007/09/05 23:40:59 sam Exp $ */ /*- * Copyright (c) 2006 by Damien Bergamini @@ -2300,6 +2300,11 @@ break; } IFQ_DEQUEUE(&ifp->if_snd, m0); + /* + * Cancel any background scan. + */ + if (ic->ic_flags & IEEE80211_F_SCAN) + ieee80211_cancel_scan(ic); if (m0->m_len < sizeof(struct ether_header) && !(m0 = m_pullup(m0, sizeof(struct ether_header)))) @@ -2328,6 +2333,7 @@ } sc->tx_timer = 5; + ic->ic_lastdata = ticks; callout_reset(&sc->sc_watchdog_ch, hz, zyd_watchdog, sc); } } ==== //depot/projects/toestack/sys/dev/wi/if_wi.c#2 (text+ko) ==== @@ -62,7 +62,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/wi/if_wi.c,v 1.212 2007/08/09 13:29:26 avatar Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/wi/if_wi.c,v 1.213 2007/09/05 21:31:32 sam Exp $"); #define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */ #define WI_HERMES_STATS_WAR /* Work around stats counter bug. */ @@ -3009,6 +3009,8 @@ memcpy(ni->ni_essid, ssid.wi_ssid, ni->ni_esslen); } return (*sc->sc_newstate)(ic, nstate, arg); + default: + break; } return 0; } ==== //depot/projects/toestack/sys/kern/init_main.c#2 (text+ko) ==== @@ -153,6 +153,21 @@ newsysinit_end = newset + count; } +int cursubsystem; + +int +check_subsystem(int subsystem) +{ + + if (subsystem < cursubsystem) + return (1); + else if (subsystem == cursubsystem) + return (0); + else + return (-1); +} + + /* * System startup; initialize the world, create process 0, mount root * filesystem, and fork to create init and pagedaemon. Most of the @@ -221,7 +236,9 @@ if ((*sipp)->subsystem == SI_SUB_DONE) continue; - + + cursubsystem = (*sipp)->subsystem; + #if defined(VERBOSE_SYSINIT) if ((*sipp)->subsystem > last) { verbose = 1; ==== //depot/projects/toestack/sys/modules/cxgb/Makefile#2 (text+ko) ==== @@ -10,10 +10,10 @@ SRCS+= device_if.h bus_if.h pci_if.h opt_zero.h SRCS+= uipc_mvec.c cxgb_multiq.c -CFLAGS+= -DCONFIG_CHELSIO_T3_CORE -g -DCONFIG_DEFINED -DDEFAULT_JUMBO -I${CXGB} +CFLAGS+= -DCONFIG_CHELSIO_T3_CORE -g -DCONFIG_DEFINED -DDEFAULT_JUMBO -I${CXGB} -DSMP #CFLAGS+= -DIFNET_MULTIQUEUE -CFLAGS+= -DINVARIANT_SUPPORT -DINVARIANTS -CFLAGS+= -DWITNESS +#CFLAGS+= -DINVARIANT_SUPPORT -DINVARIANTS +#CFLAGS+= -DWITNESS #CFLAGS+= -DDEBUG -DDEBUG_PRINT ==== //depot/projects/toestack/sys/net80211/_ieee80211.h#2 (text+ko) ==== @@ -23,7 +23,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.h,v 1.11 2007/06/30 21:23:23 thompsa Exp $ + * $FreeBSD: src/sys/net80211/_ieee80211.h,v 1.12 2007/09/05 20:37:39 sam Exp $ */ #ifndef _NET80211__IEEE80211_H_ #define _NET80211__IEEE80211_H_ @@ -109,7 +109,8 @@ int8_t ic_maxregpower; /* maximum regulatory tx power in dBm */ int8_t ic_maxpower; /* maximum tx power in .5 dBm */ int8_t ic_minpower; /* minimum tx power in .5 dBm */ - /* NB: hole, to be used for dfs */ + uint8_t ic_state; /* dynamic state */ + uint8_t ic_extieee; /* HT40 extension channel number */ }; #define IEEE80211_CHAN_MAX 255 @@ -120,21 +121,26 @@ /* bits 0-3 are for private use by drivers */ /* channel attributes */ -#define IEEE80211_CHAN_TURBO 0x00010 /* Turbo channel */ -#define IEEE80211_CHAN_CCK 0x00020 /* CCK channel */ -#define IEEE80211_CHAN_OFDM 0x00040 /* OFDM channel */ -#define IEEE80211_CHAN_2GHZ 0x00080 /* 2 GHz spectrum channel. */ -#define IEEE80211_CHAN_5GHZ 0x00100 /* 5 GHz spectrum channel */ -#define IEEE80211_CHAN_PASSIVE 0x00200 /* Only passive scan allowed */ -#define IEEE80211_CHAN_DYN 0x00400 /* Dynamic CCK-OFDM channel */ -#define IEEE80211_CHAN_GFSK 0x00800 /* GFSK channel (FHSS PHY) */ -#define IEEE80211_CHAN_GSM 0x01000 /* 900 MHz spectrum channel */ -#define IEEE80211_CHAN_STURBO 0x02000 /* 11a static turbo channel only */ -#define IEEE80211_CHAN_HALF 0x04000 /* Half rate channel */ -#define IEEE80211_CHAN_QUARTER 0x08000 /* Quarter rate channel */ -#define IEEE80211_CHAN_HT20 0x10000 /* HT 20 channel */ -#define IEEE80211_CHAN_HT40U 0x20000 /* HT 40 channel w/ ext above */ -#define IEEE80211_CHAN_HT40D 0x40000 /* HT 40 channel w/ ext below */ +#define IEEE80211_CHAN_TURBO 0x00000010 /* Turbo channel */ +#define IEEE80211_CHAN_CCK 0x00000020 /* CCK channel */ +#define IEEE80211_CHAN_OFDM 0x00000040 /* OFDM channel */ +#define IEEE80211_CHAN_2GHZ 0x00000080 /* 2 GHz spectrum channel. */ +#define IEEE80211_CHAN_5GHZ 0x00000100 /* 5 GHz spectrum channel */ +#define IEEE80211_CHAN_PASSIVE 0x00000200 /* Only passive scan allowed */ +#define IEEE80211_CHAN_DYN 0x00000400 /* Dynamic CCK-OFDM channel */ +#define IEEE80211_CHAN_GFSK 0x00000800 /* GFSK channel (FHSS PHY) */ +#define IEEE80211_CHAN_GSM 0x00001000 /* 900 MHz spectrum channel */ +#define IEEE80211_CHAN_STURBO 0x00002000 /* 11a static turbo channel only */ +#define IEEE80211_CHAN_HALF 0x00004000 /* Half rate channel */ +#define IEEE80211_CHAN_QUARTER 0x00008000 /* Quarter rate channel */ +#define IEEE80211_CHAN_HT20 0x00010000 /* HT 20 channel */ +#define IEEE80211_CHAN_HT40U 0x00020000 /* HT 40 channel w/ ext above */ +#define IEEE80211_CHAN_HT40D 0x00040000 /* HT 40 channel w/ ext below */ +#define IEEE80211_CHAN_DFS 0x00080000 /* DFS required */ +#define IEEE80211_CHAN_4MSXMIT 0x00100000 /* 4ms limit on frame length */ +#define IEEE80211_CHAN_NOADHOC 0x00200000 /* adhoc mode not allowed */ +#define IEEE80211_CHAN_NOHOSTAP 0x00400000 /* hostap mode not allowed */ +#define IEEE80211_CHAN_11D 0x00800000 /* 802.11d required */ #define IEEE80211_CHAN_HT40 (IEEE80211_CHAN_HT40U | IEEE80211_CHAN_HT40D) #define IEEE80211_CHAN_HT (IEEE80211_CHAN_HT20 | IEEE80211_CHAN_HT40) @@ -228,9 +234,27 @@ #define IEEE80211_IS_CHAN_HTG(_c) \ (IEEE80211_IS_CHAN_2GHZ(_c) && \ ((_c)->ic_flags & IEEE80211_CHAN_HT) != 0) +#define IEEE80211_IS_CHAN_DFS(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_DFS) != 0) +#define IEEE80211_IS_CHAN_NOADHOC(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_NOADHOC) != 0) +#define IEEE80211_IS_CHAN_NOHOSTAP(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_NOHOSTAP) != 0) +#define IEEE80211_IS_CHAN_11D(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_11D) != 0) #define IEEE80211_CHAN2IEEE(_c) (_c)->ic_ieee +/* dynamic state */ +#define IEEE80211_CHANSTATE_RADAR 0x01 /* radar detected */ +#define IEEE80211_CHANSTATE_CACDONE 0x02 /* CAC completed */ +#define IEEE80211_CHANSTATE_NORADAR 0x10 /* post notify on radar clear */ + +#define IEEE80211_IS_CHAN_RADAR(_c) \ + (((_c)->ic_state & IEEE80211_CHANSTATE_RADAR) != 0) +#define IEEE80211_IS_CHAN_CACDONE(_c) \ + (((_c)->ic_state & IEEE80211_CHANSTATE_CACDONE) != 0) + /* ni_chan encoding for FH phy */ #define IEEE80211_FH_CHANMOD 80 #define IEEE80211_FH_CHAN(set,pat) (((set)-1)*IEEE80211_FH_CHANMOD+(pat)) ==== //depot/projects/toestack/sys/net80211/ieee80211.h#2 (text+ko) ==== @@ -23,7 +23,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.h,v 1.14 2007/06/11 03:36:54 sam Exp $ + * $FreeBSD: src/sys/net80211/ieee80211.h,v 1.15 2007/09/05 20:29:51 sam Exp $ */ #ifndef _NET80211_IEEE80211_H_ #define _NET80211_IEEE80211_H_ @@ -273,7 +273,7 @@ uint8_t param_len; uint8_t param_oui[3]; uint8_t param_oui_type; - uint8_t param_oui_sybtype; + uint8_t param_oui_subtype; uint8_t param_version; uint8_t param_qosInfo; #define WME_QOSINFO_COUNT 0x0f /* Mask for param count field */ @@ -305,7 +305,7 @@ #define IEEE80211_ACTION_CAT_QOS 0 /* QoS */ #define IEEE80211_ACTION_CAT_BA 3 /* BA */ -#define IEEE80211_ACTION_CAT_HT 5 /* HT */ +#define IEEE80211_ACTION_CAT_HT 7 /* HT */ #define IEEE80211_ACTION_HT_TXCHWIDTH 0 /* recommended xmit chan width*/ #define IEEE80211_ACTION_HT_MIMOPWRSAVE 1 /* MIMO power save */ @@ -319,11 +319,11 @@ #define IEEE80211_A_HT_TXCHWIDTH_20 0 #define IEEE80211_A_HT_TXCHWIDTH_2040 1 -/* HT - MIMO Power Save */ +/* HT - MIMO Power Save (NB: D2.04) */ struct ieee80211_action_ht_mimopowersave { struct ieee80211_action am_header; - uint8_t am_enable; - uint8_t am_mode; + uint8_t am_enable; + uint8_t am_mode; } __packed; /* Block Ack actions */ @@ -462,8 +462,6 @@ * octet information[length] */ -typedef uint8_t *ieee80211_mgt_beacon_t; - #define IEEE80211_BEACON_INTERVAL(beacon) \ ((beacon)[8] | ((beacon)[9] << 8)) #define IEEE80211_BEACON_CAPABILITY(beacon) \ @@ -477,7 +475,8 @@ #define IEEE80211_CAPINFO_SHORT_PREAMBLE 0x0020 #define IEEE80211_CAPINFO_PBCC 0x0040 #define IEEE80211_CAPINFO_CHNL_AGILITY 0x0080 -/* bits 8-9 are reserved */ +#define IEEE80211_CAPINFO_SPECTRUM_MGMT 0x0100 +/* bit 9 is reserved */ #define IEEE80211_CAPINFO_SHORT_SLOTTIME 0x0400 #define IEEE80211_CAPINFO_RSN 0x0800 /* bit 12 is reserved */ @@ -587,9 +586,10 @@ uint8_t hi_len; /* length in bytes */ uint8_t hi_ctrlchannel; /* primary channel */ uint8_t hi_byte1; /* ht ie byte 1 */ - uint16_t hi_byte23; /* ht ie bytes 2+3 */ + uint8_t hi_byte2; /* ht ie byte 2 */ + uint8_t hi_byte3; /* ht ie byte 3 */ uint16_t hi_byte45; /* ht ie bytes 4+5 */ - uint8_t hi_basicmcsset[16]; /* basic MCS set */ + uint8_t hi_basicmcsset[16]; /* basic MCS set */ } __packed; /* byte1 */ @@ -615,9 +615,9 @@ #define IEEE80211_HTINFO_OPMODE 0x03 /* operating mode */ #define IEEE80211_HTINFO_OPMODE_S 0 #define IEEE80211_HTINFO_OPMODE_PURE 0x00 /* no protection */ -#define IEEE80211_HTINFO_OPMODE_MIXED 0x01 /* protection required */ -#define IEEE80211_HTINFO_OPMODE_PROTOPT 0x02 /* protection optional */ -#define IEEE80211_HTINFO_OPMODE_TBD 0x03 +#define IEEE80211_HTINFO_OPMODE_PROTOPT 0x01 /* protection optional */ +#define IEEE80211_HTINFO_OPMODE_HT20PR 0x02 /* protection for HT20 sta's */ +#define IEEE80211_HTINFO_OPMODE_MIXED 0x03 /* protection for legacy sta's*/ #define IEEE80211_HTINFO_NONGF_PRESENT 0x04 /* non-GF sta's present */ #define IEEE80211_HTINFO_TXBL 0x08 /* transmit burst limit */ #define IEEE80211_HTINFO_NONHT_PRESENT 0x10 /* non-HT sta's present */ @@ -690,6 +690,17 @@ } __packed; /* + * 802.11h Channel Switch Announcement (CSA). + */ +struct ieee80211_csa_ie { + uint8_t csa_ie; /* IEEE80211_ELEMID_CHANSWITCHANN */ + uint8_t csa_len; + uint8_t csa_mode; /* Channel Switch Mode */ + uint8_t csa_newchan; /* New Channel Number */ + uint8_t csa_count; /* Channel Switch Count */ +} __packed; + +/* * Atheros advanced capability information element. */ struct ieee80211_ath_ie { @@ -711,8 +722,7 @@ uint8_t ath_defkeyix[2]; } __packed; -#define IEEE80211_CHALLENGE_LEN 128 - +/* rate set entries are in .5 Mb/s units, and potentially marked as basic */ #define IEEE80211_RATE_BASIC 0x80 #define IEEE80211_RATE_VAL 0x7f @@ -780,18 +790,12 @@ * octet status[2] * octet chal.id * octet chal.length - * octet chal.text[253] + * octet chal.text[253] NB: 1-253 bytes */ -typedef uint8_t *ieee80211_mgt_auth_t; +/* challenge length for shared key auth */ +#define IEEE80211_CHALLENGE_LEN 128 -#define IEEE80211_AUTH_ALGORITHM(auth) \ - ((auth)[0] | ((auth)[1] << 8)) -#define IEEE80211_AUTH_TRANSACTION(auth) \ - ((auth)[2] | ((auth)[3] << 8)) -#define IEEE80211_AUTH_STATUS(auth) \ - ((auth)[4] | ((auth)[5] << 8)) - #define IEEE80211_AUTH_ALG_OPEN 0x0000 #define IEEE80211_AUTH_ALG_SHARED 0x0001 #define IEEE80211_AUTH_ALG_LEAP 0x0080 @@ -809,7 +813,11 @@ }; /* - * Reason codes + * Reason and status codes. + * + * Reason codes are used in management frames to indicate why an + * action took place (e.g. on disassociation). Status codes are + * used in management frames to indicate the result of an operation. * * Unlisted codes are reserved */ @@ -824,11 +832,20 @@ IEEE80211_REASON_NOT_ASSOCED = 7, IEEE80211_REASON_ASSOC_LEAVE = 8, IEEE80211_REASON_ASSOC_NOT_AUTHED = 9, - - IEEE80211_REASON_RSN_REQUIRED = 11, - IEEE80211_REASON_RSN_INCONSISTENT = 12, - IEEE80211_REASON_IE_INVALID = 13, - IEEE80211_REASON_MIC_FAILURE = 14, + IEEE80211_REASON_DISASSOC_PWRCAP_BAD = 10, /* 11h */ + IEEE80211_REASON_DISASSOC_SUPCHAN_BAD = 11, /* 11h */ + IEEE80211_REASON_IE_INVALID = 13, /* 11i */ + IEEE80211_REASON_MIC_FAILURE = 14, /* 11i */ + IEEE80211_REASON_4WAY_HANDSHAKE_TIMEOUT = 15, /* 11i */ + IEEE80211_REASON_GROUP_KEY_UPDATE_TIMEOUT = 16, /* 11i */ + IEEE80211_REASON_IE_IN_4WAY_DIFFERS = 17, /* 11i */ + IEEE80211_REASON_GROUP_CIPHER_INVALID = 18, /* 11i */ + IEEE80211_REASON_PAIRWISE_CIPHER_INVALID= 19, /* 11i */ + IEEE80211_REASON_AKMP_INVALID = 20, /* 11i */ + IEEE80211_REASON_UNSUPP_RSN_IE_VERSION = 21, /* 11i */ + IEEE80211_REASON_INVALID_RSN_IE_CAP = 22, /* 11i */ + IEEE80211_REASON_802_1X_AUTH_FAILED = 23, /* 11i */ + IEEE80211_REASON_CIPHER_SUITE_REJECTED = 24, /* 11i */ IEEE80211_STATUS_SUCCESS = 0, IEEE80211_STATUS_UNSPECIFIED = 1, @@ -841,13 +858,21 @@ IEEE80211_STATUS_TIMEOUT = 16, IEEE80211_STATUS_TOOMANY = 17, IEEE80211_STATUS_BASIC_RATE = 18, - IEEE80211_STATUS_SP_REQUIRED = 19, - IEEE80211_STATUS_PBCC_REQUIRED = 20, - IEEE80211_STATUS_CA_REQUIRED = 21, - IEEE80211_STATUS_TOO_MANY_STATIONS = 22, - IEEE80211_STATUS_RATES = 23, - IEEE80211_STATUS_SHORTSLOT_REQUIRED = 25, - IEEE80211_STATUS_DSSSOFDM_REQUIRED = 26, + IEEE80211_STATUS_SP_REQUIRED = 19, /* 11b */ + IEEE80211_STATUS_PBCC_REQUIRED = 20, /* 11b */ + IEEE80211_STATUS_CA_REQUIRED = 21, /* 11b */ + IEEE80211_STATUS_SPECMGMT_REQUIRED = 22, /* 11h */ + IEEE80211_STATUS_PWRCAP_REQUIRED = 23, /* 11h */ + IEEE80211_STATUS_SUPCHAN_REQUIRED = 24, /* 11h */ + IEEE80211_STATUS_SHORTSLOT_REQUIRED = 25, /* 11g */ + IEEE80211_STATUS_DSSSOFDM_REQUIRED = 26, /* 11g */ + IEEE80211_STATUS_INVALID_IE = 40, /* 11i */ + IEEE80211_STATUS_GROUP_CIPHER_INVALID = 41, /* 11i */ + IEEE80211_STATUS_PAIRWISE_CIPHER_INVALID = 42, /* 11i */ + IEEE80211_STATUS_AKMP_INVALID = 43, /* 11i */ + IEEE80211_STATUS_UNSUPP_RSN_IE_VERSION = 44, /* 11i */ + IEEE80211_STATUS_INVALID_RSN_IE_CAP = 45, /* 11i */ + IEEE80211_STATUS_CIPHER_SUITE_REJECTED = 46, /* 11i */ }; #define IEEE80211_WEP_KEYLEN 5 /* 40bit */ ==== //depot/projects/toestack/sys/net80211/ieee80211_freebsd.h#2 (text+ko) ==== @@ -22,7 +22,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_freebsd.h,v 1.14 2007/06/25 03:26:10 sam Exp $ + * $FreeBSD: src/sys/net80211/ieee80211_freebsd.h,v 1.15 2007/09/05 20:22:59 sam Exp $ */ #ifndef _NET80211_IEEE80211_FREEBSD_H_ #define _NET80211_IEEE80211_FREEBSD_H_ @@ -184,14 +184,19 @@ #define time_before_eq(a,b) time_after_eq(b,a) >>> TRUNCATED FOR MAIL (1000 lines) <<<