PERFORCE change 68046 for review
Sam Leffler
sam at FreeBSD.org
Fri Dec 31 14:21:38 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=68046
Change 68046 by sam at sam_ebb on 2004/12/31 22:21:12
IFC @ 68045
Affected files ...
.. //depot/projects/wifi/sbin/ifconfig/af_link.c#4 integrate
.. //depot/projects/wifi/sbin/ifconfig/ifconfig.c#9 integrate
.. //depot/projects/wifi/sbin/ifconfig/ifconfig.h#8 integrate
.. //depot/projects/wifi/sbin/ifconfig/ifmac.c#7 integrate
.. //depot/projects/wifi/sbin/ifconfig/ifmedia.c#7 integrate
.. //depot/projects/wifi/sbin/ifconfig/ifvlan.c#7 integrate
.. //depot/projects/wifi/sys/dev/ath/if_ath.c#52 integrate
.. //depot/projects/wifi/sys/dev/ath/if_athvar.h#20 integrate
.. //depot/projects/wifi/sys/dev/pci/pci.c#6 integrate
.. //depot/projects/wifi/sys/kern/device_if.m#2 integrate
.. //depot/projects/wifi/sys/kern/subr_bus.c#5 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211.c#17 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_acl.c#4 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_crypto.c#9 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_crypto_ccmp.c#5 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_crypto_none.c#5 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_crypto_tkip.c#7 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_crypto_wep.c#5 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_freebsd.c#12 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_input.c#33 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#31 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#19 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_node.c#31 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_output.c#30 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_proto.h#13 integrate
.. //depot/projects/wifi/sys/net80211/ieee80211_var.h#20 integrate
.. //depot/projects/wifi/sys/sys/bus.h#3 integrate
.. //depot/projects/wifi/sys/tools/usbdevs2h.awk#3 integrate
.. //depot/projects/wifi/sys/vm/vm_page.c#7 integrate
Differences ...
==== //depot/projects/wifi/sbin/ifconfig/af_link.c#4 (text+ko) ====
@@ -29,7 +29,7 @@
#ifndef lint
static const char rcsid[] =
- "$FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.107 2004/09/01 18:22:14 brooks Exp $";
+ "$FreeBSD: src/sbin/ifconfig/af_link.c,v 1.2 2004/12/31 19:46:27 sam Exp $";
#endif /* not lint */
#include <sys/types.h>
==== //depot/projects/wifi/sbin/ifconfig/ifconfig.c#9 (text+ko) ====
@@ -38,7 +38,7 @@
static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
#endif
static const char rcsid[] =
- "$FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.109 2004/12/11 02:33:33 sam Exp $";
+ "$FreeBSD: src/sbin/ifconfig/ifconfig.c,v 1.110 2004/12/31 19:46:27 sam Exp $";
#endif /* not lint */
#include <sys/param.h>
==== //depot/projects/wifi/sbin/ifconfig/ifconfig.h#8 (text+ko) ====
@@ -31,7 +31,7 @@
*
* so there!
*
- * $FreeBSD: src/sbin/ifconfig/ifconfig.h,v 1.14 2004/12/11 02:33:33 sam Exp $
+ * $FreeBSD: src/sbin/ifconfig/ifconfig.h,v 1.15 2004/12/31 19:46:27 sam Exp $
*/
#define __constructor __attribute__((constructor))
==== //depot/projects/wifi/sbin/ifconfig/ifmac.c#7 (text+ko) ====
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sbin/ifconfig/ifmac.c,v 1.3 2004/12/08 19:18:07 sam Exp $
+ * $FreeBSD: src/sbin/ifconfig/ifmac.c,v 1.4 2004/12/31 19:46:27 sam Exp $
*/
#include <sys/param.h>
==== //depot/projects/wifi/sbin/ifconfig/ifmedia.c#7 (text+ko) ====
@@ -1,5 +1,5 @@
/* $NetBSD: ifconfig.c,v 1.34 1997/04/21 01:17:58 lukem Exp $ */
-/* $FreeBSD: src/sbin/ifconfig/ifmedia.c,v 1.17 2004/12/08 19:18:07 sam Exp $ */
+/* $FreeBSD: src/sbin/ifconfig/ifmedia.c,v 1.18 2004/12/31 19:46:27 sam Exp $ */
/*
* Copyright (c) 1997 Jason R. Thorpe.
==== //depot/projects/wifi/sbin/ifconfig/ifvlan.c#7 (text+ko) ====
@@ -56,7 +56,7 @@
#ifndef lint
static const char rcsid[] =
- "$FreeBSD: src/sbin/ifconfig/ifvlan.c,v 1.6 2004/12/08 19:18:07 sam Exp $";
+ "$FreeBSD: src/sbin/ifconfig/ifvlan.c,v 1.7 2004/12/31 19:46:27 sam Exp $";
#endif
static int __tag = 0;
static int __have_tag = 0;
==== //depot/projects/wifi/sys/dev/ath/if_ath.c#52 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.59 2004/12/15 02:25:20 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.65 2004/12/31 20:35:05 sam Exp $");
/*
* Driver for the Atheros Wireless LAN controller.
==== //depot/projects/wifi/sys/dev/ath/if_athvar.h#20 (text+ko) ====
@@ -33,7 +33,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGES.
*
- * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.15 2004/12/08 17:34:36 sam Exp $
+ * $FreeBSD: src/sys/dev/ath/if_athvar.h,v 1.16 2004/12/31 20:32:40 sam Exp $
*/
/*
==== //depot/projects/wifi/sys/dev/pci/pci.c#6 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.273 2004/12/08 04:35:19 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.274 2004/12/31 20:43:46 imp Exp $");
#include "opt_bus.h"
@@ -498,49 +498,66 @@
struct pci_devinfo *dinfo = device_get_ivars(child);
pcicfgregs *cfg = &dinfo->cfg;
uint16_t status;
- int result;
+ int result, oldstate, highest, delay;
+
+ if (cfg->pp.pp_cap == 0)
+ return (EOPNOTSUPP);
/*
- * Dx -> Dx is a nop always.
+ * Optimize a no state change request away. While it would be OK to
+ * write to the hardware in theory, some devices have shown odd
+ * behavior when going from D3 -> D3.
*/
- if (pci_get_powerstate(child) == state)
+ oldstate = pci_get_powerstate(child);
+ if (oldstate == state)
return (0);
- if (cfg->pp.pp_cap != 0) {
- status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_status, 2)
- & ~PCIM_PSTAT_DMASK;
- result = 0;
- switch (state) {
- case PCI_POWERSTATE_D0:
- status |= PCIM_PSTAT_D0;
- break;
- case PCI_POWERSTATE_D1:
- if (cfg->pp.pp_cap & PCIM_PCAP_D1SUPP) {
- status |= PCIM_PSTAT_D1;
- } else {
- result = EOPNOTSUPP;
- }
- break;
- case PCI_POWERSTATE_D2:
- if (cfg->pp.pp_cap & PCIM_PCAP_D2SUPP) {
- status |= PCIM_PSTAT_D2;
- } else {
- result = EOPNOTSUPP;
- }
- break;
- case PCI_POWERSTATE_D3:
- status |= PCIM_PSTAT_D3;
- break;
- default:
- result = EINVAL;
- }
- if (result == 0)
- PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_status, status,
- 2);
- } else {
- result = ENXIO;
+ /*
+ * The PCI power management specification states that after a state
+ * transition between PCI power states, system software must
+ * guarantee a minimal delay before the function accesses the device.
+ * Compute the worst case delay that we need to guarantee before we
+ * access the device. Many devices will be responsive much more
+ * quickly than this delay, but there are some that don't respond
+ * instantly to state changes. Transitions to/from D3 state require
+ * 10ms, while D2 requires 200us, and D0/1 require none. The delay
+ * is done below with DELAY rather than a sleeper function because
+ * this function can be called from contexts where we cannot sleep.
+ */
+ highest = (oldstate > state) ? oldstate : state;
+ if (highest == PCI_POWER_STATE_D3)
+ delay = 10000;
+ else if (highest == PCI_POWER_STATE_D2)
+ delay = 200;
+ else
+ delay = 0;
+ status = PCI_READ_CONFIG(dev, child, cfg->pp.pp_status, 2)
+ & ~PCIM_PSTAT_DMASK;
+ result = 0;
+ switch (state) {
+ case PCI_POWERSTATE_D0:
+ status |= PCIM_PSTAT_D0;
+ break;
+ case PCI_POWERSTATE_D1:
+ if ((cfg->pp.pp_cap & PCIM_PCAP_D1SUPP) == 0)
+ return (EOPNOTSUPP);
+ status |= PCIM_PSTAT_D1;
+ break;
+ case PCI_POWERSTATE_D2:
+ if ((cfg->pp.pp_cap & PCIM_PCAP_D2SUPP) == 0)
+ return (EOPNOTSUPP);
+ status |= PCIM_PSTAT_D2;
+ break;
+ case PCI_POWERSTATE_D3:
+ status |= PCIM_PSTAT_D3;
+ break;
+ default:
+ return (EINVAL);
}
- return(result);
+ PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_status, status, 2);
+ if (delay)
+ DELAY(delay);
+ return (0);
}
int
@@ -574,7 +591,7 @@
/* No support, device is always at D0 */
result = PCI_POWERSTATE_D0;
}
- return(result);
+ return (result);
}
/*
==== //depot/projects/wifi/sys/kern/device_if.m#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/sys/kern/device_if.m,v 1.10 2004/08/12 17:26:22 imp Exp $
+# $FreeBSD: src/sys/kern/device_if.m,v 1.11 2004/12/31 20:47:51 imp Exp $
#
#include <sys/bus.h>
@@ -57,6 +57,11 @@
{
return 0;
}
+
+ static int null_quiesce(device_t dev)
+ {
+ return EOPNOTSUPP;
+ }
};
/**
@@ -283,3 +288,29 @@
METHOD int resume {
device_t dev;
} DEFAULT null_resume;
+
+/**
+ * @brief This is called when the driver is asked to quiesce itself.
+ *
+ * The driver should arrange for the orderly shutdown of this device.
+ * All further access to the device should be curtailed. Soon there
+ * will be a request to detach, but there won't necessarily be one.
+ *
+ * To include this method in a device driver, use a line like this
+ * in the driver's method list:
+ *
+ * @code
+ * KOBJMETHOD(device_quiesce, foo_quiesce)
+ * @endcode
+ *
+ * @param dev the device being quiesced
+ *
+ * @retval 0 success
+ * @retval non-zero an error occurred while attempting to quiesce the
+ * device
+ *
+ * @see DEVICE_DETACH()
+ */
+METHOD int quiesce {
+ device_t dev;
+} DEFAULT null_quiesce;
==== //depot/projects/wifi/sys/kern/subr_bus.c#5 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.166 2004/12/08 02:39:56 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/subr_bus.c,v 1.167 2004/12/31 20:47:51 imp Exp $");
#include "opt_bus.h"
@@ -948,6 +948,71 @@
}
/**
+ * @brief Quiesces a set of device drivers from a device class
+ *
+ * Quiesce a device driver from a devclass. This is normally called
+ * automatically by DRIVER_MODULE().
+ *
+ * If the driver is currently attached to any devices,
+ * devclass_quiesece_driver() will first attempt to quiesce each
+ * device.
+ *
+ * @param dc the devclass to edit
+ * @param driver the driver to unregister
+ */
+int
+devclass_quiesce_driver(devclass_t busclass, driver_t *driver)
+{
+ devclass_t dc = devclass_find(driver->name);
+ driverlink_t dl;
+ device_t dev;
+ int i;
+ int error;
+
+ PDEBUG(("%s from devclass %s", driver->name, DEVCLANAME(busclass)));
+
+ if (!dc)
+ return (0);
+
+ /*
+ * Find the link structure in the bus' list of drivers.
+ */
+ TAILQ_FOREACH(dl, &busclass->drivers, link) {
+ if (dl->driver == driver)
+ break;
+ }
+
+ if (!dl) {
+ PDEBUG(("%s not found in %s list", driver->name,
+ busclass->name));
+ return (ENOENT);
+ }
+
+ /*
+ * Quiesce all devices. We iterate through all the devices in
+ * the devclass of the driver and quiesce any which are using
+ * the driver and which have a parent in the devclass which we
+ * are quiescing.
+ *
+ * Note that since a driver can be in multiple devclasses, we
+ * should not quiesce devices which are not children of
+ * devices in the affected devclass.
+ */
+ for (i = 0; i < dc->maxunit; i++) {
+ if (dc->devices[i]) {
+ dev = dc->devices[i];
+ if (dev->driver == driver && dev->parent &&
+ dev->parent->devclass == busclass) {
+ if ((error = device_quiesce(dev)) != 0)
+ return (error);
+ }
+ }
+ }
+
+ return (0);
+}
+
+/**
* @internal
*/
static driverlink_t
@@ -2314,6 +2379,32 @@
}
/**
+ * @brief Tells a driver to quiesce itself.
+ *
+ * This function is a wrapper around the DEVICE_QUIESCE() driver
+ * method. If the call to DEVICE_QUIESCE() succeeds.
+ *
+ * @param dev the device to quiesce
+ *
+ * @retval 0 success
+ * @retval ENXIO no driver was found
+ * @retval ENOMEM memory allocation failure
+ * @retval non-zero some other unix error code
+ */
+int
+device_quiesce(device_t dev)
+{
+
+ PDEBUG(("%s", DEVICENAME(dev)));
+ if (dev->state == DS_BUSY)
+ return (EBUSY);
+ if (dev->state != DS_ATTACHED)
+ return (0);
+
+ return (DEVICE_QUIESCE(dev));
+}
+
+/**
* @brief Notify a device of system shutdown
*
* This function calls the DEVICE_SHUTDOWN() driver method if the
@@ -3564,6 +3655,16 @@
if (!error && dmd->dmd_chainevh)
error = dmd->dmd_chainevh(mod,what,dmd->dmd_chainarg);
break;
+ case MOD_QUIESCE:
+ PDEBUG(("Quiesce module: driver %s from bus %s",
+ DRIVERNAME(dmd->dmd_driver),
+ dmd->dmd_busname));
+ error = devclass_quiesce_driver(bus_devclass,
+ dmd->dmd_driver);
+
+ if (!error && dmd->dmd_chainevh)
+ error = dmd->dmd_chainevh(mod,what,dmd->dmd_chainarg);
+ break;
default:
error = EOPNOTSUPP;
break;
==== //depot/projects/wifi/sys/net80211/ieee80211.c#17 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.14 2004/12/08 17:26:47 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.16 2004/12/31 21:48:15 sam Exp $");
/*
* IEEE 802.11 generic handler
@@ -158,13 +158,13 @@
if ((ic->ic_modecaps & (1<<ic->ic_curmode)) == 0)
ic->ic_curmode = IEEE80211_MODE_AUTO;
ic->ic_des_chan = IEEE80211_CHAN_ANYC; /* any channel is ok */
-
+#if 0
/*
* Enable WME by default if we're capable.
*/
if (ic->ic_caps & IEEE80211_C_WME)
ic->ic_flags |= IEEE80211_F_WME;
-
+#endif
(void) ieee80211_setmode(ic, ic->ic_curmode);
if (ic->ic_lintval == 0)
==== //depot/projects/wifi/sys/net80211/ieee80211_acl.c#4 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_acl.c,v 1.1 2004/12/08 17:26:47 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_acl.c,v 1.2 2004/12/31 20:39:41 sam Exp $");
/*
* IEEE 802.11 MAC ACL support.
==== //depot/projects/wifi/sys/net80211/ieee80211_crypto.c#9 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto.c,v 1.4 2004/12/08 17:26:47 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto.c,v 1.6 2004/12/31 20:44:15 sam Exp $");
/*
* IEEE 802.11 generic crypto support.
==== //depot/projects/wifi/sys/net80211/ieee80211_crypto_ccmp.c#5 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_ccmp.c,v 1.2 2004/12/13 18:26:13 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_ccmp.c,v 1.3 2004/12/31 20:51:41 sam Exp $");
/*
* IEEE 802.11i AES-CCMP crypto support.
==== //depot/projects/wifi/sys/net80211/ieee80211_crypto_none.c#5 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_none.c,v 1.1 2004/12/08 17:26:47 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_none.c,v 1.2 2004/12/31 20:58:06 sam Exp $");
/*
* IEEE 802.11 NULL crypto support.
==== //depot/projects/wifi/sys/net80211/ieee80211_crypto_tkip.c#7 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_tkip.c,v 1.3 2004/12/13 18:12:26 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_tkip.c,v 1.6 2004/12/31 20:59:03 sam Exp $");
/*
* IEEE 802.11i TKIP crypto support.
==== //depot/projects/wifi/sys/net80211/ieee80211_crypto_wep.c#5 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_wep.c,v 1.3 2004/12/12 00:28:41 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_crypto_wep.c,v 1.4 2004/12/31 20:51:41 sam Exp $");
/*
* IEEE 802.11 WEP crypto support.
==== //depot/projects/wifi/sys/net80211/ieee80211_freebsd.c#12 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_freebsd.c,v 1.3 2004/12/13 04:26:36 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_freebsd.c,v 1.4 2004/12/31 21:01:41 sam Exp $");
/*
* IEEE 802.11 support (FreeBSD-specific code)
==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#33 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.22 2004/12/08 17:26:47 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.27 2004/12/31 22:05:13 sam Exp $");
#include <sys/param.h>
#include <sys/systm.h>
==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#31 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.15 2004/12/10 16:35:37 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.16 2004/12/31 21:13:35 sam Exp $");
/*
* IEEE 802.11 ioctl support (FreeBSD-specific)
==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#19 (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.6 2004/12/08 17:26:47 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.7 2004/12/31 21:54:53 sam Exp $
*/
#ifndef _NET80211_IEEE80211_IOCTL_H_
#define _NET80211_IEEE80211_IOCTL_H_
==== //depot/projects/wifi/sys/net80211/ieee80211_node.c#31 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.23 2004/12/08 17:26:47 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.29 2004/12/31 22:05:13 sam Exp $");
#include <sys/param.h>
#include <sys/systm.h>
==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#30 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.13 2004/12/08 22:34:07 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_output.c,v 1.14 2004/12/31 21:54:53 sam Exp $");
#include "opt_inet.h"
@@ -468,10 +468,11 @@
key = NULL;
/* XXX 4-address format */
/*
- * XXX Atheros ap's don't handle QoS-encapsulated EAPOL
- * frames so suppress use. This may be an issue with
- * other ap's that support WME+WPA in which case we'll
- * need to make this configurable.
+ * XXX Some ap's don't handle QoS-encapsulated EAPOL
+ * frames so suppress use. This may be an issue if other
+ * ap's require all data frames to be QoS-encapsulated
+ * once negotiated in which case we'll need to make this
+ * configurable.
*/
addqos = (ni->ni_flags & IEEE80211_NODE_QOS) &&
eh.ether_type != htons(ETHERTYPE_PAE);
@@ -580,7 +581,6 @@
m_freem(m);
return NULL;
}
-#undef KEY_UNDEFINED
/*
* Add a supported rates element id to a frame.
@@ -1580,7 +1580,7 @@
ni->ni_savedq.ifq_drops, IEEE80211_PS_MAX_QUEUE);
#ifdef IEEE80211_DEBUG
if (ieee80211_msg_dumppkts(ic))
- ieee80211_dump_pkt(ic, mtod(m, caddr_t), m->m_len, -1, -1);
+ ieee80211_dump_pkt(mtod(m, caddr_t), m->m_len, -1, -1);
#endif
m_freem(m);
return;
==== //depot/projects/wifi/sys/net80211/ieee80211_proto.h#13 (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_proto.h,v 1.5 2004/12/08 17:26:47 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_proto.h,v 1.7 2004/12/31 21:30:42 sam Exp $
*/
#ifndef _NET80211_IEEE80211_PROTO_H_
#define _NET80211_IEEE80211_PROTO_H_
==== //depot/projects/wifi/sys/net80211/ieee80211_var.h#20 (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.16 2004/12/08 17:26:47 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_var.h,v 1.17 2004/12/31 20:56:32 sam Exp $
*/
#ifndef _NET80211_IEEE80211_VAR_H_
#define _NET80211_IEEE80211_VAR_H_
==== //depot/projects/wifi/sys/sys/bus.h#3 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/sys/bus.h,v 1.63 2004/12/08 02:39:56 njl Exp $
+ * $FreeBSD: src/sys/sys/bus.h,v 1.64 2004/12/31 20:47:51 imp Exp $
*/
#ifndef _SYS_BUS_H_
@@ -357,6 +357,7 @@
int device_print_prettyname(device_t dev);
int device_printf(device_t dev, const char *, ...) __printflike(2, 3);
int device_probe_and_attach(device_t dev);
+int device_quiesce(device_t dev);
void device_quiet(device_t dev);
void device_set_desc(device_t dev, const char* desc);
void device_set_desc_copy(device_t dev, const char* desc);
@@ -388,6 +389,7 @@
devclass_t devclass_get_parent(devclass_t dc);
struct sysctl_ctx_list *devclass_get_sysctl_ctx(devclass_t dc);
struct sysctl_oid *devclass_get_sysctl_tree(devclass_t dc);
+int devclass_quiesce_driver(devclass_t dc, kobj_class_t driver);
/*
* Access functions for device resources.
==== //depot/projects/wifi/sys/tools/usbdevs2h.awk#3 (text+ko) ====
@@ -1,6 +1,6 @@
#! /usr/bin/awk -f
# $NetBSD: usb/devlist2h.awk,v 1.9 2001/01/18 20:28:22 jdolecek Exp $
-# $FreeBSD: src/sys/tools/usbdevs2h.awk,v 1.4 2004/12/30 23:18:34 imp Exp $
+# $FreeBSD: src/sys/tools/usbdevs2h.awk,v 1.6 2004/12/31 21:12:17 imp Exp $
#
# Copyright (c) 1995, 1996 Christopher G. Demetriou
# All rights reserved.
@@ -30,74 +30,34 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
+
function usage()
{
print "usage: usbdevs2h.awk <srcfile> [-d|-h]";
exit 1;
}
-BEGIN {
-
-nproducts = nvendors = 0
-# Process the command line
-for (i = 1; i < ARGC; i++) {
- arg = ARGV[i];
- if (arg !~ /^-[dh]+$/ && arg !~ /devs$/)
- usage();
- if (arg ~ /^-.*d/)
- dfile="usbdevs_data.h"
- if (arg ~ /^-.*h/)
- hfile="usbdevs.h"
- if (arg ~ /devs$/)
- srcfile = arg;
+function header(file)
+{
+ if (os == "NetBSD")
+ printf("/*\t\$NetBSD\$\t*/\n\n") > file
+ else if (os == "FreeBSD")
+ printf("/* \$FreeBSD\$ */\n\n") > file
+ else if (os == "OpenBSD")
+ printf("/*\t\$OpenBSD\$\t*/\n\n") > file
+ else
+ printf("/* ??? */\n\n") > file
+ printf("/*\n") > file
+ printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \
+ > file
+ printf(" *\n") > file
+ printf(" * generated from:\n") > file
+ printf(" *\t%s\n", VERSION) > file
+ printf(" */\n") > file
}
-ARGC = 1;
-line=0;
-while ((getline < srcfile) > 0) {
- line++;
- if (line == 1) {
- VERSION = $0
- gsub("\\$", "", VERSION)
-
- if (dfile) {
- if (os == "NetBSD")
- printf("/*\t\$NetBSD\$\t*/\n\n") > dfile
- else if (os == "FreeBSD")
- printf("/* \$FreeBSD\$ */\n\n") > dfile
- else if (os == "OpenBSD")
- printf("/*\t\$OpenBSD\$\t*/\n\n") > dfile
- else
- printf("/* ??? */\n\n") > dfile
- printf("/*\n") > dfile
- printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \
- > dfile
- printf(" *\n") > dfile
- printf(" * generated from:\n") > dfile
- printf(" *\t%s\n", VERSION) > dfile
- printf(" */\n") > dfile
- }
-
- if (hfile) {
- if (os == "NetBSD")
- printf("/*\t\$NetBSD\$\t*/\n\n") > hfile
- else if (os == "FreeBSD")
- printf("/* \$FreeBSD\$ */\n\n") > hfile
- else if (os == "OpenBSD")
- printf("/*\t\$OpenBSD\$\t*/\n\n") > hfile
- else
- printf("/* ??? */\n\n") > hfile
- printf("/*\n") > hfile
- printf(" * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \
- > hfile
- printf(" *\n") > hfile
- printf(" * generated from:\n") > hfile
- printf(" *\t%s\n", VERSION) > hfile
- printf(" */\n") > hfile
- }
- continue;
- }
- if ($1 == "vendor") {
+function vendor(hfile)
+{
nvendors++
vendorindex[$2] = nvendors; # record index for this name, for later.
@@ -144,10 +104,10 @@
printf(" */") > hfile
if (hfile)
printf("\n") > hfile
+}
- continue;
- }
- if ($1 == "product") {
+function product(hfile)
+{
nproducts++
products[nproducts, 1] = $2; # vendor name
@@ -196,9 +156,105 @@
printf(" */") > hfile
if (hfile)
printf("\n") > hfile
+}
- continue;
- }
+function dump_dfile(dfile)
+{
+ printf("\n") > dfile
+ printf("const struct usb_knowndev usb_knowndevs[] = {\n") > dfile
+ for (i = 1; i <= nproducts; i++) {
+ printf("\t{\n") > dfile
+ printf("\t USB_VENDOR_%s, USB_PRODUCT_%s_%s,\n",
+ products[i, 1], products[i, 1], products[i, 2]) > dfile
+ printf("\t ") > dfile
+ printf("0") > dfile
+ printf(",\n") > dfile
+
+ vendi = vendorindex[products[i, 1]];
+ printf("\t \"") > dfile
+ j = 3;
+ needspace = 0;
+ while (vendors[vendi, j] != "") {
+ if (needspace)
+ printf(" ") > dfile
+ printf("%s", vendors[vendi, j]) > dfile
+ needspace = 1
+ j++
+ }
+ printf("\",\n") > dfile
+
+ printf("\t \"") > dfile
+ j = 4;
+ needspace = 0;
+ while (products[i, j] != "") {
+ if (needspace)
+ printf(" ") > dfile
+ printf("%s", products[i, j]) > dfile
+ needspace = 1
+ j++
+ }
+ printf("\",\n") > dfile
+ printf("\t},\n") > dfile
+ }
+ for (i = 1; i <= nvendors; i++) {
+ printf("\t{\n") > dfile
+ printf("\t USB_VENDOR_%s, 0,\n", vendors[i, 1]) > dfile
+ printf("\t USB_KNOWNDEV_NOPROD,\n") > dfile
+ printf("\t \"") > dfile
+ j = 3;
+ needspace = 0;
+ while (vendors[i, j] != "") {
+ if (needspace)
+ printf(" ") > dfile
+ printf("%s", vendors[i, j]) > dfile
+ needspace = 1
+ j++
+ }
+ printf("\",\n") > dfile
+ printf("\t NULL,\n") > dfile
+ printf("\t},\n") > dfile
+ }
+ printf("\t{ 0, 0, 0, NULL, NULL, }\n") > dfile
+ printf("};\n") > dfile
+}
+
+BEGIN {
+
+nproducts = nvendors = 0
+# Process the command line
+for (i = 1; i < ARGC; i++) {
+ arg = ARGV[i];
+ if (arg !~ /^-[dh]+$/ && arg !~ /devs$/)
+ usage();
+ if (arg ~ /^-.*d/)
+ dfile="usbdevs_data.h"
+ if (arg ~ /^-.*h/)
+ hfile="usbdevs.h"
+ if (arg ~ /devs$/)
+ srcfile = arg;
+}
+ARGC = 1;
+line=0;
+
+while ((getline < srcfile) > 0) {
+ line++;
+ if (line == 1) {
+ VERSION = $0
+ gsub("\\$", "", VERSION)
+ if (dfile)
+ header(dfile)
+ if (hfile)
+ header(hfile)
+ continue;
+ }
+ if ($1 == "vendor") {
+ vendor(hfile)
+ continue
+ }
+ if ($1 == "product") {
+ product(hfile)
+ continue
+ }
if ($0 == "")
blanklines++
if (hfile)
@@ -206,68 +262,9 @@
if (blanklines < 2 && dfile)
print $0 > dfile
}
- # print out the match tables
- if (dfile) {
- printf("\n") > dfile
+# print out the match tables
- printf("const struct usb_knowndev usb_knowndevs[] = {\n") > dfile
- for (i = 1; i <= nproducts; i++) {
- printf("\t{\n") > dfile
- printf("\t USB_VENDOR_%s, USB_PRODUCT_%s_%s,\n",
- products[i, 1], products[i, 1], products[i, 2]) \
- > dfile
- printf("\t ") > dfile
- printf("0") > dfile
- printf(",\n") > dfile
-
- vendi = vendorindex[products[i, 1]];
- printf("\t \"") > dfile
- j = 3;
- needspace = 0;
- while (vendors[vendi, j] != "") {
- if (needspace)
- printf(" ") > dfile
- printf("%s", vendors[vendi, j]) > dfile
- needspace = 1
- j++
- }
- printf("\",\n") > dfile
-
- printf("\t \"") > dfile
- j = 4;
- needspace = 0;
- while (products[i, j] != "") {
- if (needspace)
- printf(" ") > dfile
- printf("%s", products[i, j]) > dfile
- needspace = 1
- j++
- }
- printf("\",\n") > dfile
- printf("\t},\n") > dfile
- }
- for (i = 1; i <= nvendors; i++) {
- printf("\t{\n") > dfile
- printf("\t USB_VENDOR_%s, 0,\n", vendors[i, 1]) \
- > dfile
- printf("\t USB_KNOWNDEV_NOPROD,\n") \
- > dfile
- printf("\t \"") > dfile
- j = 3;
- needspace = 0;
- while (vendors[i, j] != "") {
- if (needspace)
- printf(" ") > dfile
- printf("%s", vendors[i, j]) > dfile
- needspace = 1
- j++
- }
- printf("\",\n") > dfile
- printf("\t NULL,\n") > dfile
- printf("\t},\n") > dfile
- }
- printf("\t{ 0, 0, 0, NULL, NULL, }\n") > dfile
- printf("};\n") > dfile
- }
+if (dfile)
+ dump_dfile(dfile)
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list