From owner-p4-projects@FreeBSD.ORG Tue Aug 17 16:41:53 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 020B51065698; Tue, 17 Aug 2010 16:41:53 +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 B7F591065696 for ; Tue, 17 Aug 2010 16:41:52 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id A3EE08FC20 for ; Tue, 17 Aug 2010 16:41:52 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id o7HGfqsW036071 for ; Tue, 17 Aug 2010 16:41:52 GMT (envelope-from anchie@FreeBSD.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id o7HGfqDO036068 for perforce@freebsd.org; Tue, 17 Aug 2010 16:41:52 GMT (envelope-from anchie@FreeBSD.org) Date: Tue, 17 Aug 2010 16:41:52 GMT Message-Id: <201008171641.o7HGfqDO036068@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to anchie@FreeBSD.org using -f From: Ana Kukec To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 182525 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2010 16:41:53 -0000 http://p4web.freebsd.org/@@182525?ac=10 Change 182525 by anchie@anchie_malimis on 2010/08/17 16:40:50 IFC @182524 Affected files ... .. //depot/projects/soc2009/anchie_send/src/sys/amd64/acpica/acpi_wakeup.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/mp_machdep.c#9 integrate .. //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/pmap.c#12 integrate .. //depot/projects/soc2009/anchie_send/src/sys/amd64/include/elf.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/arm/include/elf.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/compat/freebsd32/freebsd32_misc.c#10 integrate .. //depot/projects/soc2009/anchie_send/src/sys/conf/options.mips#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi.c#9 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcib.c#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcib_acpi.c#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcib_pci.c#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcibvar.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpivar.h#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/alc/if_alc.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/ath/ath_hal/ar5416/ar9160.ini#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/ath/if_ath.c#11 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/ath/if_athioctl.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/bwi/if_bwi.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/bwn/if_bwn.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/cxgb/common/cxgb_common.h#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/cxgb/common/cxgb_t3_hw.c#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/cxgb/common/cxgb_xgmac.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/cxgb/cxgb_main.c#12 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/flash/mx25l.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/iwn/if_iwn.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/pci/pci.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/pci/pci_pci.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/pci/pci_private.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/pci/pcib_if.m#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/ral/rt2560.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/ral/rt2661.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/usb/wlan/if_rum.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/usb/wlan/if_run.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/usb/wlan/if_ural.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/usb/wlan/if_zyd.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/wpi/if_wpi.c#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/fs/devfs/devfs.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/fs/devfs/devfs_devs.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/fs/devfs/devfs_vnops.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/i386/i386/mp_machdep.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/i386/i386/pmap.c#12 integrate .. //depot/projects/soc2009/anchie_send/src/sys/i386/include/elf.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/ia64/include/elf.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/imgact_elf.c#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/kern_exec.c#10 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/subr_autoconf.c#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/subr_bus.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/subr_rtc.c#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/subr_taskqueue.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/conf/XLR#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/conf/XLR64#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/conf/XLRN32#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/include/bus.h#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/include/elf.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/include/intr_machdep.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/exception.S#10 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/locore.S#9 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/machdep.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/mpboot.S#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/pm_machdep.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/mips/vm_machdep.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/mips/rmi/std.xlr#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/modules/Makefile#19 integrate .. //depot/projects/soc2009/anchie_send/src/sys/modules/em/Makefile#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/modules/igb/Makefile#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/modules/ixgbe/Makefile#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/modules/sem/Makefile#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/modules/tpm/Makefile#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net/if.c#12 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net/if_ethersubr.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net80211/ieee80211.c#9 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net80211/ieee80211_node.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net80211/ieee80211_sta.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net80211/ieee80211_var.h#9 integrate .. //depot/projects/soc2009/anchie_send/src/sys/netinet/ip_icmp.c#6 integrate .. //depot/projects/soc2009/anchie_send/src/sys/netinet/tcp_output.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/netinet/tcp_subr.c#8 integrate .. //depot/projects/soc2009/anchie_send/src/sys/netinet/tcp_syncache.c#7 integrate .. //depot/projects/soc2009/anchie_send/src/sys/netinet6/raw_ip6.c#16 integrate .. //depot/projects/soc2009/anchie_send/src/sys/powerpc/include/elf.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sparc64/include/elf.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sun4v/include/elf.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sys/cdefs.h#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sys/imgact.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/vm/memguard.c#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/vm/memguard.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/vm/uma.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/vm/uma_core.c#6 integrate Differences ... ==== //depot/projects/soc2009/anchie_send/src/sys/amd64/acpica/acpi_wakeup.c#8 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_wakeup.c,v 1.36 2010/08/12 00:20:46 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_wakeup.c,v 1.37 2010/08/13 22:08:42 jkim Exp $"); #include #include @@ -278,13 +278,13 @@ for (;;) ia32_pause(); } else { - acpi_resync_clock(sc); - PCPU_SET(switchtime, cpu_ticks()); + PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); #ifdef SMP if (wakeup_cpus != 0) acpi_wakeup_cpus(sc, wakeup_cpus); #endif + acpi_resync_clock(sc); ret = 0; } ==== //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/mp_machdep.c#9 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.328 2010/08/12 00:20:46 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.330 2010/08/13 22:08:42 jkim Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" @@ -1324,10 +1324,8 @@ cpumask_t cpumask; u_int cpu; - sched_pin(); cpu = PCPU_GET(cpuid); cpumask = PCPU_GET(cpumask); - sched_unpin(); savectx(&stoppcbs[cpu]); @@ -1358,10 +1356,8 @@ register_t cr3, rf; u_int cpu; - sched_pin(); cpu = PCPU_GET(cpuid); cpumask = PCPU_GET(cpumask); - sched_unpin(); rf = intr_disable(); cr3 = rcr3(); @@ -1370,7 +1366,7 @@ wbinvd(); atomic_set_int(&stopped_cpus, cpumask); } else { - PCPU_SET(switchtime, cpu_ticks()); + PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); } @@ -1542,14 +1538,10 @@ #endif int retval; + mask = PCPU_GET(cpumask); #ifdef MP_WATCHDOG - sched_pin(); - mask = PCPU_GET(cpumask); cpuid = PCPU_GET(cpuid); - sched_unpin(); ap_watchdog(cpuid); -#else - mask = PCPU_GET(cpumask); #endif retval = 0; ==== //depot/projects/soc2009/anchie_send/src/sys/amd64/amd64/pmap.c#12 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.710 2010/08/10 16:14:10 attilio Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.711 2010/08/17 12:17:24 gahr Exp $"); /* * Manages physical address maps. @@ -620,7 +620,8 @@ if (sysenv != NULL) { if (strncmp(sysenv, "MacBook5,1", 10) == 0 || strncmp(sysenv, "MacBookPro5,5", 13) == 0 || - strncmp(sysenv, "Macmini3,1", 10) == 0) + strncmp(sysenv, "Macmini3,1", 10) == 0 || + strncmp(sysenv, "iMac9,1", 7) == 0) pat_works = 0; freeenv(sysenv); } ==== //depot/projects/soc2009/anchie_send/src/sys/amd64/include/elf.h#4 (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/amd64/include/elf.h,v 1.23 2010/03/11 14:49:06 nwhitehorn Exp $ + * $FreeBSD: src/sys/amd64/include/elf.h,v 1.24 2010/08/17 08:55:45 kib Exp $ */ #ifndef _MACHINE_ELF_H_ @@ -88,8 +88,14 @@ #define AT_GID 13 /* Real gid. */ #define AT_EGID 14 /* Effective gid. */ #define AT_EXECPATH 15 /* Path to the executable. */ +#define AT_CANARY 16 /* Canary for SSP */ +#define AT_CANARYLEN 17 /* Length of the canary. */ +#define AT_OSRELDATE 18 /* OSRELDATE. */ +#define AT_NCPUS 19 /* Number of CPUs. */ +#define AT_PAGESIZES 20 /* Pagesizes. */ +#define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ -#define AT_COUNT 16 /* Count of defined aux entry types. */ +#define AT_COUNT 22 /* Count of defined aux entry types. */ /* * Relocation types. ==== //depot/projects/soc2009/anchie_send/src/sys/arm/include/elf.h#3 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/arm/include/elf.h,v 1.11 2009/10/10 15:31:24 kib Exp $ + * $FreeBSD: src/sys/arm/include/elf.h,v 1.12 2010/08/17 08:55:45 kib Exp $ */ #ifndef _MACHINE_ELF_H_ @@ -76,8 +76,14 @@ #define AT_GID 13 /* Real gid. */ #define AT_EGID 14 /* Effective gid. */ #define AT_EXECPATH 15 /* Path to the executable. */ +#define AT_CANARY 16 /* Canary for SSP */ +#define AT_CANARYLEN 17 /* Length of the canary. */ +#define AT_OSRELDATE 18 /* OSRELDATE. */ +#define AT_NCPUS 19 /* Number of CPUs. */ +#define AT_PAGESIZES 20 /* Pagesizes. */ +#define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ -#define AT_COUNT 16 /* Count of defined aux entry types. */ +#define AT_COUNT 22 /* Count of defined aux entry types. */ #define R_ARM_COUNT 33 /* Count of defined relocation types. */ ==== //depot/projects/soc2009/anchie_send/src/sys/compat/freebsd32/freebsd32_misc.c#10 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.114 2010/08/07 11:57:13 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/freebsd32/freebsd32_misc.c,v 1.115 2010/08/17 08:55:45 kib Exp $"); #include "opt_compat.h" #include "opt_inet.h" @@ -2525,11 +2525,13 @@ register_t * freebsd32_copyout_strings(struct image_params *imgp) { - int argc, envc; + int argc, envc, i; u_int32_t *vectp; char *stringp, *destp; u_int32_t *stack_base; struct freebsd32_ps_strings *arginfo; + char canary[sizeof(long) * 8]; + int32_t pagesizes32[MAXPAGESIZES]; size_t execpath_len; int szsigcode; @@ -2545,8 +2547,10 @@ sv_psstrings; szsigcode = *(imgp->proc->p_sysent->sv_szsigcode); destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - - roundup(execpath_len, sizeof(char *)) - - roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); + roundup(execpath_len, sizeof(char *)) - + roundup(sizeof(canary), sizeof(char *)) - + roundup(sizeof(pagesizes32), sizeof(char *)) - + roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); /* * install sigcode @@ -2565,6 +2569,25 @@ } /* + * Prepare the canary for SSP. + */ + arc4rand(canary, sizeof(canary), 0); + imgp->canary = (uintptr_t)arginfo - szsigcode - execpath_len - + sizeof(canary); + copyout(canary, (void *)imgp->canary, sizeof(canary)); + imgp->canarylen = sizeof(canary); + + /* + * Prepare the pagesizes array. + */ + for (i = 0; i < MAXPAGESIZES; i++) + pagesizes32[i] = (uint32_t)pagesizes[i]; + imgp->pagesizes = (uintptr_t)arginfo - szsigcode - execpath_len - + roundup(sizeof(canary), sizeof(char *)) - sizeof(pagesizes32); + copyout(pagesizes32, (void *)imgp->pagesizes, sizeof(pagesizes32)); + imgp->pagesizeslen = sizeof(pagesizes32); + + /* * If we have a valid auxargs ptr, prepare some room * on the stack. */ ==== //depot/projects/soc2009/anchie_send/src/sys/conf/options.mips#5 (text+ko) ==== @@ -26,7 +26,7 @@ # SUCH DAMAGE. # # JNPR: options.mips,v 1.2 2006/09/15 12:52:34 -# $FreeBSD: src/sys/conf/options.mips,v 1.8 2010/07/20 19:25:11 jmallett Exp $ +# $FreeBSD: src/sys/conf/options.mips,v 1.10 2010/08/15 19:07:44 imp Exp $ CPU_MIPS4KC opt_global.h CPU_MIPS32 opt_global.h @@ -35,6 +35,7 @@ CPU_HAVEFPU opt_global.h CPU_SB1 opt_global.h CPU_CNMIPS opt_global.h +CPU_RMI opt_global.h ISA_MIPS1 opt_cputype.h ISA_MIPS3 opt_cputype.h @@ -50,8 +51,6 @@ CFE_ENV_SIZE opt_global.h NOFPU opt_global.h -TARGET_EMULATOR opt_ddb.h -TARGET_XLR_XLS opt_global.h TICK_USE_YAMON_FREQ opt_global.h TICK_USE_MALTA_RTC opt_global.h ==== //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi.c#9 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.283 2010/07/15 23:24:06 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi.c,v 1.284 2010/08/17 15:44:52 jhb Exp $"); #include "opt_acpi.h" #include @@ -129,8 +129,6 @@ static ACPI_STATUS acpi_device_eval_obj(device_t bus, device_t dev, ACPI_STRING pathname, ACPI_OBJECT_LIST *parameters, ACPI_BUFFER *ret); -static int acpi_device_pwr_for_sleep(device_t bus, device_t dev, - int *dstate); static ACPI_STATUS acpi_device_scan_cb(ACPI_HANDLE h, UINT32 level, void *context, void **retval); static ACPI_STATUS acpi_device_scan_children(device_t bus, device_t dev, @@ -1415,7 +1413,7 @@ return (AcpiEvaluateObject(h, pathname, parameters, ret)); } -static int +int acpi_device_pwr_for_sleep(device_t bus, device_t dev, int *dstate) { struct acpi_softc *sc; ==== //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcib.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib.c,v 1.63 2010/08/05 16:10:12 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib.c,v 1.64 2010/08/17 15:44:52 jhb Exp $"); #include "opt_acpi.h" #include @@ -275,3 +275,14 @@ return_VALUE (interrupt); } + +int +acpi_pcib_power_for_sleep(device_t pcib, device_t dev, int *pstate) +{ + device_t acpi_dev; + + acpi_dev = devclass_get_device(devclass_find("acpi"), 0); + acpi_device_pwr_for_sleep(acpi_dev, dev, pstate); + return (0); +} + ==== //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcib_acpi.c#6 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.61 2010/08/05 16:10:12 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.62 2010/08/17 15:44:52 jhb Exp $"); #include "opt_acpi.h" #include @@ -116,6 +116,7 @@ DEVMETHOD(pcib_alloc_msix, acpi_pcib_alloc_msix), DEVMETHOD(pcib_release_msix, pcib_release_msix), DEVMETHOD(pcib_map_msi, acpi_pcib_map_msi), + DEVMETHOD(pcib_power_for_sleep, acpi_pcib_power_for_sleep), {0, 0} }; ==== //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcib_pci.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.19 2010/08/05 16:10:12 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.20 2010/08/17 15:44:52 jhb Exp $"); #include "opt_acpi.h" @@ -80,6 +80,7 @@ /* pcib interface */ DEVMETHOD(pcib_route_interrupt, acpi_pcib_pci_route_interrupt), + DEVMETHOD(pcib_power_for_sleep, acpi_pcib_power_for_sleep), {0, 0} }; ==== //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpi_pcibvar.h#3 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpi_pcibvar.h,v 1.7 2010/08/05 16:10:12 jhb Exp $ + * $FreeBSD: src/sys/dev/acpica/acpi_pcibvar.h,v 1.8 2010/08/17 15:44:52 jhb Exp $ */ #ifndef _ACPI_PCIBVAR_H_ @@ -38,6 +38,8 @@ int acpi_pcib_attach(device_t bus, ACPI_BUFFER *prt, int busno); int acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin, ACPI_BUFFER *prtbuf); +int acpi_pcib_power_for_sleep(device_t pcib, device_t dev, + int *pstate); #endif /* _KERNEL */ ==== //depot/projects/soc2009/anchie_send/src/sys/dev/acpica/acpivar.h#6 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.117 2010/05/23 07:53:22 mav Exp $ + * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.118 2010/08/17 15:44:52 jhb Exp $ */ #ifndef _ACPIVAR_H_ @@ -393,6 +393,8 @@ /* Device power control. */ ACPI_STATUS acpi_pwr_wake_enable(ACPI_HANDLE consumer, int enable); ACPI_STATUS acpi_pwr_switch_consumer(ACPI_HANDLE consumer, int state); +int acpi_device_pwr_for_sleep(device_t bus, device_t dev, + int *dstate); /* Misc. */ static __inline struct acpi_softc * ==== //depot/projects/soc2009/anchie_send/src/sys/dev/alc/if_alc.c#8 (text+ko) ==== @@ -28,7 +28,7 @@ /* Driver for Atheros AR813x/AR815x PCIe Ethernet. */ #include -__FBSDID("$FreeBSD: src/sys/dev/alc/if_alc.c,v 1.15 2010/08/09 17:28:08 yongari Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/alc/if_alc.c,v 1.16 2010/08/13 19:39:33 yongari Exp $"); #include #include @@ -3486,7 +3486,7 @@ /* Disable Rx/Tx MAC. */ reg = CSR_READ_4(sc, ALC_MAC_CFG); if ((reg & (MAC_CFG_TX_ENB | MAC_CFG_RX_ENB)) != 0) { - reg &= ~MAC_CFG_TX_ENB | MAC_CFG_RX_ENB; + reg &= ~(MAC_CFG_TX_ENB | MAC_CFG_RX_ENB); CSR_WRITE_4(sc, ALC_MAC_CFG, reg); } for (i = ALC_TIMEOUT; i > 0; i--) { ==== //depot/projects/soc2009/anchie_send/src/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c#4 (text+ko) ==== @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c,v 1.12 2010/08/12 08:39:54 adrian Exp $ + * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c,v 1.14 2010/08/15 11:40:53 adrian Exp $ */ #include "opt_ah.h" @@ -221,6 +221,7 @@ * higher than normal value if DC offset and noise floor cal are * triggered at the same time. */ + /* XXX this actually kicks off a NF calibration -adrian */ OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF); /* * Try to make sure the above NF cal completes, just so @@ -231,7 +232,7 @@ "not complete in time; noisy environment?\n", __func__); return AH_FALSE; } - + /* Initialize list pointers */ cal->cal_list = cal->cal_last = cal->cal_curr = AH_NULL; ==== //depot/projects/soc2009/anchie_send/src/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c#3 (text+ko) ==== @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c,v 1.2 2010/01/29 10:07:17 rpaulo Exp $ + * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c,v 1.3 2010/08/14 15:28:15 adrian Exp $ */ #include "opt_ah.h" @@ -115,7 +115,7 @@ if (qCoff > 15) qCoff = 15; else if (qCoff <= -16) - qCoff = 16; + qCoff = -16; HALDEBUG(ah, HAL_DEBUG_PERCAL, " : iCoff = 0x%x qCoff = 0x%x\n", iCoff, qCoff); ==== //depot/projects/soc2009/anchie_send/src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c#6 (text+ko) ==== @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c,v 1.18 2010/06/01 15:33:10 rpaulo Exp $ + * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c,v 1.19 2010/08/14 15:29:21 adrian Exp $ */ #include "opt_ah.h" @@ -2008,7 +2008,7 @@ * for last gain, pdGainBoundary == Pmax_t2, so will * have to extrapolate */ - if (tgtIndex > maxIndex) { /* need to extrapolate above */ + if (tgtIndex >= maxIndex) { /* need to extrapolate above */ while ((ss <= tgtIndex) && (k < (AR5416_NUM_PDADC_VALUES - 1))) { tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] + (ss - maxIndex +1) * vpdStep)); ==== //depot/projects/soc2009/anchie_send/src/sys/dev/ath/ath_hal/ar5416/ar9160.ini#2 (text+ko) ==== @@ -1,6 +1,6 @@ /* * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting - * Copyright (c) 2002-2008 Atheros Communications, Inc. + * Copyright (c) 2002-2009 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar9160.ini,v 1.2 2009/02/24 01:07:06 sam Exp $ + * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar9160.ini,v 1.4 2010/08/14 15:48:18 adrian Exp $ */ /* Auto Generated PCI Register Writes. Created: 05/22/08 */ @@ -35,22 +35,24 @@ { 0x00009848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68 }, { 0x0000a848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68 }, { 0x0000b848, 0x001a6a65, 0x001a6a65, 0x00197a68, 0x00197a68, 0x00197a68 }, - { 0x00009850, 0x6d48b4e2, 0x6d48b4e2, 0x6d48b0e2, 0x6d48b0e2, 0x6d48b0e2 }, + { 0x00009850, 0x6c48b4e2, 0x6c48b4e2, 0x6c48b0e2, 0x6c48b0e2, 0x6c48b0e2 }, { 0x00009858, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e, 0x7ec82d2e }, - { 0x0000985c, 0x3139605e, 0x3139605e, 0x3139605e, 0x3139605e, 0x3139605e }, + { 0x0000985c, 0x31395d5e, 0x31395d5e, 0x31395d5e, 0x31395d5e, 0x31395d5e }, { 0x00009860, 0x00048d18, 0x00048d18, 0x00048d20, 0x00048d20, 0x00048d18 }, + { 0x00009864, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00 }, { 0x0000c864, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00, 0x0001ce00 }, { 0x00009868, 0x409a40d0, 0x409a40d0, 0x409a40d0, 0x409a40d0, 0x409a40d0 }, { 0x0000986c, 0x050cb081, 0x050cb081, 0x050cb081, 0x050cb081, 0x050cb081 }, - { 0x00009914, 0x000007d0, 0x000007d0, 0x00000898, 0x00000898, 0x000007d0 }, + { 0x00009914, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898, 0x000007d0 }, { 0x00009918, 0x0000000a, 0x00000014, 0x00000016, 0x0000000b, 0x00000016 }, { 0x00009924, 0xd00a8a07, 0xd00a8a07, 0xd00a8a0d, 0xd00a8a0d, 0xd00a8a0d }, - { 0x00009944, 0xdfb81020, 0xdfb81020, 0xdfb81020, 0xdfb81020, 0xdfb81020 }, + { 0x00009944, 0xffb81020, 0xffb81020, 0xffb81020, 0xffb81020, 0xffb81020 }, { 0x00009960, 0x00009b40, 0x00009b40, 0x00009b40, 0x00009b40, 0x00009b40 }, { 0x0000a960, 0x00009b40, 0x00009b40, 0x00009b40, 0x00009b40, 0x00009b40 }, { 0x0000b960, 0x00009b40, 0x00009b40, 0x00009b40, 0x00009b40, 0x00009b40 }, { 0x00009964, 0x00001120, 0x00001120, 0x00001120, 0x00001120, 0x00001120 }, { 0x0000c968, 0x000003b5, 0x000003b5, 0x000003ce, 0x000003ce, 0x000003ce }, + { 0x000099bc, 0x001a0600, 0x001a0600, 0x001a0c00, 0x001a0c00, 0x001a0c00 }, { 0x0000c9bc, 0x001a0600, 0x001a0600, 0x001a0c00, 0x001a0c00, 0x001a0c00 }, { 0x000099c0, 0x038919be, 0x038919be, 0x038919be, 0x038919be, 0x038919be }, { 0x000099c4, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77, 0x06336f77 }, @@ -212,7 +214,7 @@ { 0x00008134, 0x00000000 }, { 0x00008138, 0x00000000 }, { 0x0000813c, 0x00000000 }, - { 0x00008144, 0x00000000 }, + { 0x00008144, 0xffffffff }, { 0x00008168, 0x00000000 }, { 0x0000816c, 0x00000000 }, { 0x00008170, 0x32143320 }, @@ -271,7 +273,7 @@ { 0x0000832c, 0x00000007 }, { 0x00008330, 0x00000302 }, { 0x00008334, 0x00000e00 }, - { 0x00008338, 0x00000000 }, + { 0x00008338, 0x00ff0000 }, { 0x0000833c, 0x00000000 }, { 0x00008340, 0x000107ff }, { 0x00009808, 0x00000000 }, @@ -326,6 +328,7 @@ { 0x000099e4, 0xaaaaaaaa }, { 0x000099e8, 0x3c466478 }, { 0x000099ec, 0x0cc80caa }, + { 0x000099f0, 0x00000000 }, /* XXX adrian's addition: AR_PHY_CALMODE == 0 */ { 0x000099fc, 0x00001042 }, { 0x00009b00, 0x00000000 }, { 0x00009b04, 0x00000001 }, @@ -405,7 +408,7 @@ { 0x0000a244, 0x00007bb6 }, { 0x0000a248, 0x0fff3ffc }, { 0x0000a24c, 0x00000001 }, - { 0x0000a250, 0x0000a000 }, + { 0x0000a250, 0x0000e000 }, { 0x0000a254, 0x00000000 }, { 0x0000a258, 0x0cc75380 }, { 0x0000a25c, 0x0f0f0f01 }, @@ -425,7 +428,7 @@ { 0x0000a34c, 0x3fffffff }, { 0x0000a350, 0x3fffffff }, { 0x0000a354, 0x0003ffff }, - { 0x0000a358, 0x79a8aa33 }, + { 0x0000a358, 0x79bfaa03 }, { 0x0000d35c, 0x07ffffef }, { 0x0000d360, 0x0fffffe7 }, { 0x0000d364, 0x17ffffe5 }, ==== //depot/projects/soc2009/anchie_send/src/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c#3 (text+ko) ==== @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c,v 1.3 2010/06/01 15:47:57 rpaulo Exp $ + * $FreeBSD: src/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c,v 1.4 2010/08/14 15:29:21 adrian Exp $ */ /* @@ -792,7 +792,7 @@ * for last gain, pdGainBoundary == Pmax_t2, so will * have to extrapolate */ - if (tgtIndex > maxIndex) { /* need to extrapolate above */ + if (tgtIndex >= maxIndex) { /* need to extrapolate above */ while ((ss <= tgtIndex) && (k < (AR5416_NUM_PDADC_VALUES - 1))) { tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] + (ss - maxIndex +1) * vpdStep)); ==== //depot/projects/soc2009/anchie_send/src/sys/dev/ath/if_ath.c#11 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.276 2010/08/10 07:56:56 adrian Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.278 2010/08/14 14:18:02 adrian Exp $"); /* * Driver for the Atheros Wireless LAN controller. @@ -215,6 +215,7 @@ static int ath_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); static void ath_announce(struct ath_softc *); +static void ath_sysctl_stats_attach(struct ath_softc *sc); #ifdef IEEE80211_SUPPORT_TDMA static void ath_tdma_settimers(struct ath_softc *sc, u_int32_t nexttbtt, @@ -733,6 +734,7 @@ * regdomain are available from the hal. */ ath_sysctlattach(sc); + ath_sysctl_stats_attach(sc); if (bootverbose) ieee80211_announce(ic); @@ -2824,6 +2826,7 @@ */ if (ath_hal_numtxpending(ah, sc->sc_bhalq) != 0) { sc->sc_bmisscount++; + sc->sc_stats.ast_be_missed++; DPRINTF(sc, ATH_DEBUG_BEACON, "%s: missed %u consecutive beacons\n", __func__, sc->sc_bmisscount); @@ -7327,3 +7330,189 @@ } } #endif /* IEEE80211_SUPPORT_TDMA */ + +static int +ath_sysctl_clearstats(SYSCTL_HANDLER_ARGS) +{ + struct ath_softc *sc = arg1; + int val = 0; + int error; + + error = sysctl_handle_int(oidp, &val, 0, req); + if (error || !req->newptr) + return error; + if (val == 0) + return 0; /* Not clearing the stats is still valid */ + memset(&sc->sc_stats, 0, sizeof(sc->sc_stats)); + val = 0; + return 0; +} + +static void +ath_sysctl_stats_attach(struct ath_softc *sc) +{ + struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); + struct sysctl_oid_list *child = SYSCTL_CHILDREN(tree); + + /* Create "clear" node */ + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "clear_stats", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + ath_sysctl_clearstats, "I", "clear stats"); + + /* Create stats node */ + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, + NULL, "Statistics"); + child = SYSCTL_CHILDREN(tree); + + /* This was generated from if_athioctl.h */ + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_watchdog", CTLFLAG_RD, + &sc->sc_stats.ast_watchdog, 0, "device reset by watchdog"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_hardware", CTLFLAG_RD, + &sc->sc_stats.ast_hardware, 0, "fatal hardware error interrupts"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_bmiss", CTLFLAG_RD, + &sc->sc_stats.ast_bmiss, 0, "beacon miss interrupts"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_bmiss_phantom", CTLFLAG_RD, + &sc->sc_stats.ast_bmiss_phantom, 0, "beacon miss interrupts"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_bstuck", CTLFLAG_RD, + &sc->sc_stats.ast_bstuck, 0, "beacon stuck interrupts"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rxorn", CTLFLAG_RD, + &sc->sc_stats.ast_rxorn, 0, "rx overrun interrupts"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rxeol", CTLFLAG_RD, + &sc->sc_stats.ast_rxeol, 0, "rx eol interrupts"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_txurn", CTLFLAG_RD, + &sc->sc_stats.ast_txurn, 0, "tx underrun interrupts"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_mib", CTLFLAG_RD, + &sc->sc_stats.ast_mib, 0, "mib interrupts"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_intrcoal", CTLFLAG_RD, + &sc->sc_stats.ast_intrcoal, 0, "interrupts coalesced"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_packets", CTLFLAG_RD, + &sc->sc_stats.ast_tx_packets, 0, "packet sent on the interface"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_mgmt", CTLFLAG_RD, + &sc->sc_stats.ast_tx_mgmt, 0, "management frames transmitted"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_discard", CTLFLAG_RD, + &sc->sc_stats.ast_tx_discard, 0, "frames discarded prior to assoc"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_qstop", CTLFLAG_RD, + &sc->sc_stats.ast_tx_qstop, 0, "output stopped 'cuz no buffer"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_encap", CTLFLAG_RD, + &sc->sc_stats.ast_tx_encap, 0, "tx encapsulation failed"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_nonode", CTLFLAG_RD, + &sc->sc_stats.ast_tx_nonode, 0, "tx failed 'cuz no node"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_nombuf", CTLFLAG_RD, + &sc->sc_stats.ast_tx_nombuf, 0, "tx failed 'cuz no mbuf"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_nomcl", CTLFLAG_RD, + &sc->sc_stats.ast_tx_nomcl, 0, "tx failed 'cuz no cluster"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_linear", CTLFLAG_RD, + &sc->sc_stats.ast_tx_linear, 0, "tx linearized to cluster"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_nodata", CTLFLAG_RD, + &sc->sc_stats.ast_tx_nodata, 0, "tx discarded empty frame"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_busdma", CTLFLAG_RD, + &sc->sc_stats.ast_tx_busdma, 0, "tx failed for dma resrcs"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_xretries", CTLFLAG_RD, + &sc->sc_stats.ast_tx_xretries, 0, "tx failed 'cuz too many retries"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_fifoerr", CTLFLAG_RD, + &sc->sc_stats.ast_tx_fifoerr, 0, "tx failed 'cuz FIFO underrun"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_filtered", CTLFLAG_RD, + &sc->sc_stats.ast_tx_filtered, 0, "tx failed 'cuz xmit filtered"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_shortretry", CTLFLAG_RD, + &sc->sc_stats.ast_tx_shortretry, 0, "tx on-chip retries (short)"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_longretry", CTLFLAG_RD, + &sc->sc_stats.ast_tx_longretry, 0, "tx on-chip retries (long)"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_badrate", CTLFLAG_RD, + &sc->sc_stats.ast_tx_badrate, 0, "tx failed 'cuz bogus xmit rate"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_noack", CTLFLAG_RD, + &sc->sc_stats.ast_tx_noack, 0, "tx frames with no ack marked"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_rts", CTLFLAG_RD, + &sc->sc_stats.ast_tx_rts, 0, "tx frames with rts enabled"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_cts", CTLFLAG_RD, + &sc->sc_stats.ast_tx_cts, 0, "tx frames with cts enabled"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_shortpre", CTLFLAG_RD, + &sc->sc_stats.ast_tx_shortpre, 0, "tx frames with short preamble"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_altrate", CTLFLAG_RD, + &sc->sc_stats.ast_tx_altrate, 0, "tx frames with alternate rate"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_protect", CTLFLAG_RD, + &sc->sc_stats.ast_tx_protect, 0, "tx frames with protection"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_ctsburst", CTLFLAG_RD, + &sc->sc_stats.ast_tx_ctsburst, 0, "tx frames with cts and bursting"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_ctsext", CTLFLAG_RD, + &sc->sc_stats.ast_tx_ctsext, 0, "tx frames with cts extension"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_nombuf", CTLFLAG_RD, + &sc->sc_stats.ast_rx_nombuf, 0, "rx setup failed 'cuz no mbuf"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_busdma", CTLFLAG_RD, + &sc->sc_stats.ast_rx_busdma, 0, "rx setup failed for dma resrcs"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_orn", CTLFLAG_RD, + &sc->sc_stats.ast_rx_orn, 0, "rx failed 'cuz of desc overrun"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_crcerr", CTLFLAG_RD, + &sc->sc_stats.ast_rx_crcerr, 0, "rx failed 'cuz of bad CRC"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_fifoerr", CTLFLAG_RD, + &sc->sc_stats.ast_rx_fifoerr, 0, "rx failed 'cuz of FIFO overrun"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_badcrypt", CTLFLAG_RD, + &sc->sc_stats.ast_rx_badcrypt, 0, "rx failed 'cuz decryption"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_badmic", CTLFLAG_RD, + &sc->sc_stats.ast_rx_badmic, 0, "rx failed 'cuz MIC failure"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_phyerr", CTLFLAG_RD, + &sc->sc_stats.ast_rx_phyerr, 0, "rx failed 'cuz of PHY err"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_tooshort", CTLFLAG_RD, + &sc->sc_stats.ast_rx_tooshort, 0, "rx discarded 'cuz frame too short"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_toobig", CTLFLAG_RD, + &sc->sc_stats.ast_rx_toobig, 0, "rx discarded 'cuz frame too large"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_packets", CTLFLAG_RD, + &sc->sc_stats.ast_rx_packets, 0, "packet recv on the interface"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_mgt", CTLFLAG_RD, + &sc->sc_stats.ast_rx_mgt, 0, "management frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_ctl", CTLFLAG_RD, + &sc->sc_stats.ast_rx_ctl, 0, "rx discarded 'cuz ctl frame"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_be_xmit", CTLFLAG_RD, + &sc->sc_stats.ast_be_xmit, 0, "beacons transmitted"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_be_nombuf", CTLFLAG_RD, + &sc->sc_stats.ast_be_nombuf, 0, "beacon setup failed 'cuz no mbuf"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_per_cal", CTLFLAG_RD, + &sc->sc_stats.ast_per_cal, 0, "periodic calibration calls"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_per_calfail", CTLFLAG_RD, + &sc->sc_stats.ast_per_calfail, 0, "periodic calibration failed"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_per_rfgain", CTLFLAG_RD, + &sc->sc_stats.ast_per_rfgain, 0, "periodic calibration rfgain reset"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rate_calls", CTLFLAG_RD, + &sc->sc_stats.ast_rate_calls, 0, "rate control checks"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rate_raise", CTLFLAG_RD, + &sc->sc_stats.ast_rate_raise, 0, "rate control raised xmit rate"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rate_drop", CTLFLAG_RD, + &sc->sc_stats.ast_rate_drop, 0, "rate control dropped xmit rate"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_ant_defswitch", CTLFLAG_RD, + &sc->sc_stats.ast_ant_defswitch, 0, "rx/default antenna switches"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_ant_txswitch", CTLFLAG_RD, + &sc->sc_stats.ast_ant_txswitch, 0, "tx antenna switches"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_cabq_xmit", CTLFLAG_RD, + &sc->sc_stats.ast_cabq_xmit, 0, "cabq frames transmitted"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_cabq_busy", CTLFLAG_RD, + &sc->sc_stats.ast_cabq_busy, 0, "cabq found busy"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_raw", CTLFLAG_RD, + &sc->sc_stats.ast_tx_raw, 0, "tx frames through raw api"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_ff_txok", CTLFLAG_RD, + &sc->sc_stats.ast_ff_txok, 0, "fast frames tx'd successfully"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_ff_txerr", CTLFLAG_RD, + &sc->sc_stats.ast_ff_txerr, 0, "fast frames tx'd w/ error"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_ff_rx", CTLFLAG_RD, + &sc->sc_stats.ast_ff_rx, 0, "fast frames rx'd"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_ff_flush", CTLFLAG_RD, + &sc->sc_stats.ast_ff_flush, 0, "fast frames flushed from staging q"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_qfull", CTLFLAG_RD, + &sc->sc_stats.ast_tx_qfull, 0, "tx dropped 'cuz of queue limit"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_nobuf", CTLFLAG_RD, + &sc->sc_stats.ast_tx_nobuf, 0, "tx dropped 'cuz no ath buffer"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tdma_update", CTLFLAG_RD, + &sc->sc_stats.ast_tdma_update, 0, "TDMA slot timing updates"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tdma_timers", CTLFLAG_RD, + &sc->sc_stats.ast_tdma_timers, 0, "TDMA slot update set beacon timers"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tdma_tsf", CTLFLAG_RD, + &sc->sc_stats.ast_tdma_tsf, 0, "TDMA slot update set TSF"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tdma_ack", CTLFLAG_RD, + &sc->sc_stats.ast_tdma_ack, 0, "TDMA tx failed 'cuz ACK required"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_raw_fail", CTLFLAG_RD, + &sc->sc_stats.ast_tx_raw_fail, 0, "raw tx failed 'cuz h/w down"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_nofrag", CTLFLAG_RD, + &sc->sc_stats.ast_tx_nofrag, 0, "tx dropped 'cuz no ath frag buffer"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_be_missed", CTLFLAG_RD, + &sc->sc_stats.ast_be_missed, 0, "number of -missed- beacons"); +} ==== //depot/projects/soc2009/anchie_send/src/sys/dev/ath/if_athioctl.h#2 (text+ko) ==== @@ -26,7 +26,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_athioctl.h,v 1.24 2009/02/13 05:38:03 sam Exp $ + * $FreeBSD: src/sys/dev/ath/if_athioctl.h,v 1.25 2010/08/14 14:01:12 adrian Exp $ */ /* @@ -118,7 +118,8 @@ u_int32_t ast_tdma_ack; /* TDMA tx failed 'cuz ACK required */ u_int32_t ast_tx_raw_fail;/* raw tx failed 'cuz h/w down */ u_int32_t ast_tx_nofrag; /* tx dropped 'cuz no ath frag buffer */ - u_int32_t ast_pad[14]; + u_int32_t ast_be_missed; /* missed beacons */ + u_int32_t ast_pad[13]; }; #define SIOCGATHSTATS _IOWR('i', 137, struct ifreq) ==== //depot/projects/soc2009/anchie_send/src/sys/dev/bwi/if_bwi.c#7 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bwi/if_bwi.c,v 1.14 2010/06/29 21:56:42 weongyo Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bwi/if_bwi.c,v 1.15 2010/08/14 20:12:10 bschmidt Exp $"); #include "opt_inet.h" #include "opt_bwi.h" @@ -511,7 +511,8 @@ IEEE80211_C_SHPREAMBLE | IEEE80211_C_WPA | IEEE80211_C_BGSCAN | - IEEE80211_C_MONITOR; + IEEE80211_C_MONITOR | + IEEE80211_C_RATECTL; ic->ic_opmode = IEEE80211_M_STA; ieee80211_ifattach(ic, macaddr); ==== //depot/projects/soc2009/anchie_send/src/sys/dev/bwn/if_bwn.c#8 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bwn/if_bwn.c,v 1.20 2010/07/22 20:08:02 weongyo Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bwn/if_bwn.c,v 1.21 2010/08/14 20:12:10 bschmidt Exp $"); /* * The Broadcom Wireless LAN controller driver. @@ -1070,6 +1070,7 @@ | IEEE80211_C_WPA /* capable of WPA1+WPA2 */ | IEEE80211_C_BGSCAN /* capable of bg scanning */ | IEEE80211_C_TXPMGT /* capable of txpow mgt */ + | IEEE80211_C_RATECTL /* use ratectl */ ; ic->ic_flags_ext |= IEEE80211_FEXT_SWBMISS; /* s/w bmiss */ ==== //depot/projects/soc2009/anchie_send/src/sys/dev/cxgb/common/cxgb_common.h#6 (text+ko) ==== @@ -25,7 +25,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE >>> TRUNCATED FOR MAIL (1000 lines) <<<