From owner-svn-src-projects@FreeBSD.ORG Thu Jun 2 14:09:31 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB2AA106566B; Thu, 2 Jun 2011 14:09:31 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 987AA8FC17; Thu, 2 Jun 2011 14:09:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p52E9Vto020697; Thu, 2 Jun 2011 14:09:31 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p52E9V0V020662; Thu, 2 Jun 2011 14:09:31 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201106021409.p52E9V0V020662@svn.freebsd.org> From: Attilio Rao Date: Thu, 2 Jun 2011 14:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222612 - in projects/largeSMP: contrib/top lib/libc/iconv sbin/geom/class/part sbin/setkey share/man/man4 share/man/man9 share/misc share/mk sys/boot/forth sys/conf sys/dev/ath sys/dev... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2011 14:09:31 -0000 Author: attilio Date: Thu Jun 2 14:09:30 2011 New Revision: 222612 URL: http://svn.freebsd.org/changeset/base/222612 Log: MFC Added: projects/largeSMP/share/man/man4/umcs7840.4 - copied unchanged from r222610, head/share/man/man4/umcs7840.4 projects/largeSMP/sys/dev/ath/ath_dfs/ - copied from r222610, head/sys/dev/ath/ath_dfs/ projects/largeSMP/sys/dev/ath/if_athdfs.h - copied unchanged from r222610, head/sys/dev/ath/if_athdfs.h projects/largeSMP/sys/dev/usb/serial/umcs7840.c - copied unchanged from r222610, head/sys/dev/usb/serial/umcs7840.c projects/largeSMP/sys/dev/usb/serial/umcs7840.h - copied unchanged from r222610, head/sys/dev/usb/serial/umcs7840.h projects/largeSMP/sys/modules/usb/umcs7840/ - copied from r222610, head/sys/modules/usb/umcs7840/ Modified: projects/largeSMP/lib/libc/iconv/iconvctl.3 projects/largeSMP/sbin/geom/class/part/gpart.8 projects/largeSMP/sbin/setkey/setkey.8 projects/largeSMP/share/man/man4/Makefile projects/largeSMP/share/man/man4/bwn.4 projects/largeSMP/share/man/man4/em.4 projects/largeSMP/share/man/man4/igb.4 projects/largeSMP/share/man/man4/mps.4 projects/largeSMP/share/man/man4/ucom.4 projects/largeSMP/share/man/man4/uep.4 projects/largeSMP/share/man/man9/bus_adjust_resource.9 projects/largeSMP/share/misc/mdoc.template projects/largeSMP/sys/boot/forth/check-password.4th.8 projects/largeSMP/sys/conf/files projects/largeSMP/sys/dev/ath/ath_hal/ah.c projects/largeSMP/sys/dev/ath/ath_hal/ah.h projects/largeSMP/sys/dev/ath/ath_hal/ah_desc.h projects/largeSMP/sys/dev/ath/ath_hal/ah_internal.h projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416phy.h projects/largeSMP/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c projects/largeSMP/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c projects/largeSMP/sys/dev/ath/if_ath.c projects/largeSMP/sys/dev/ath/if_athvar.h projects/largeSMP/sys/dev/ixgbe/LICENSE projects/largeSMP/sys/dev/ixgbe/README projects/largeSMP/sys/dev/ixgbe/ixgbe.c projects/largeSMP/sys/dev/ixgbe/ixv.c projects/largeSMP/sys/dev/mfi/mfi.c projects/largeSMP/sys/dev/mfi/mfireg.h projects/largeSMP/sys/dev/usb/net/if_axe.c projects/largeSMP/sys/dev/usb/usb_process.c projects/largeSMP/sys/dev/usb/usbdevs projects/largeSMP/sys/fs/nfsclient/nfs_clbio.c projects/largeSMP/sys/fs/nwfs/nwfs_io.c projects/largeSMP/sys/fs/smbfs/smbfs_io.c projects/largeSMP/sys/geom/geom_dump.c projects/largeSMP/sys/modules/ath/Makefile projects/largeSMP/sys/modules/usb/Makefile projects/largeSMP/sys/net/if_ethersubr.c projects/largeSMP/sys/netinet/ipfw/ip_fw2.c projects/largeSMP/sys/netinet/tcp_usrreq.c projects/largeSMP/sys/nfsclient/nfs_bio.c projects/largeSMP/sys/teken/libteken/teken.3 projects/largeSMP/sys/vm/vm_object.c projects/largeSMP/sys/vm/vnode_pager.c projects/largeSMP/sys/vm/vnode_pager.h projects/largeSMP/usr.bin/fstat/fuser.1 projects/largeSMP/usr.bin/man/man.sh projects/largeSMP/usr.bin/rctl/rctl.8 projects/largeSMP/usr.sbin/bsdinstall/scripts/auto projects/largeSMP/usr.sbin/mfiutil/mfi_evt.c Directory Properties: projects/largeSMP/ (props changed) projects/largeSMP/cddl/contrib/opensolaris/ (props changed) projects/largeSMP/contrib/bind9/ (props changed) projects/largeSMP/contrib/binutils/ (props changed) projects/largeSMP/contrib/bzip2/ (props changed) projects/largeSMP/contrib/dialog/ (props changed) projects/largeSMP/contrib/ee/ (props changed) projects/largeSMP/contrib/expat/ (props changed) projects/largeSMP/contrib/file/ (props changed) projects/largeSMP/contrib/gcc/ (props changed) projects/largeSMP/contrib/gdb/ (props changed) projects/largeSMP/contrib/gdtoa/ (props changed) projects/largeSMP/contrib/gnu-sort/ (props changed) projects/largeSMP/contrib/groff/ (props changed) projects/largeSMP/contrib/less/ (props changed) projects/largeSMP/contrib/libpcap/ (props changed) projects/largeSMP/contrib/libstdc++/ (props changed) projects/largeSMP/contrib/llvm/ (props changed) projects/largeSMP/contrib/llvm/tools/clang/ (props changed) projects/largeSMP/contrib/ncurses/ (props changed) projects/largeSMP/contrib/netcat/ (props changed) projects/largeSMP/contrib/ntp/ (props changed) projects/largeSMP/contrib/one-true-awk/ (props changed) projects/largeSMP/contrib/openbsm/ (props changed) projects/largeSMP/contrib/openpam/ (props changed) projects/largeSMP/contrib/pf/ (props changed) projects/largeSMP/contrib/sendmail/ (props changed) projects/largeSMP/contrib/tcpdump/ (props changed) projects/largeSMP/contrib/tcsh/ (props changed) projects/largeSMP/contrib/top/ (props changed) projects/largeSMP/contrib/top/install-sh (props changed) projects/largeSMP/contrib/tzcode/stdtime/ (props changed) projects/largeSMP/contrib/tzcode/zic/ (props changed) projects/largeSMP/contrib/tzdata/ (props changed) projects/largeSMP/contrib/wpa/ (props changed) projects/largeSMP/contrib/xz/ (props changed) projects/largeSMP/crypto/openssh/ (props changed) projects/largeSMP/crypto/openssl/ (props changed) projects/largeSMP/gnu/lib/ (props changed) projects/largeSMP/gnu/usr.bin/binutils/ (props changed) projects/largeSMP/gnu/usr.bin/cc/cc_tools/ (props changed) projects/largeSMP/gnu/usr.bin/gdb/ (props changed) projects/largeSMP/lib/libc/ (props changed) projects/largeSMP/lib/libc/stdtime/ (props changed) projects/largeSMP/lib/libutil/ (props changed) projects/largeSMP/lib/libz/ (props changed) projects/largeSMP/sbin/ (props changed) projects/largeSMP/sbin/ipfw/ (props changed) projects/largeSMP/share/mk/bsd.arch.inc.mk (props changed) projects/largeSMP/share/zoneinfo/ (props changed) projects/largeSMP/sys/ (props changed) projects/largeSMP/sys/amd64/include/xen/ (props changed) projects/largeSMP/sys/boot/ (props changed) projects/largeSMP/sys/boot/i386/efi/ (props changed) projects/largeSMP/sys/boot/ia64/efi/ (props changed) projects/largeSMP/sys/boot/ia64/ski/ (props changed) projects/largeSMP/sys/boot/powerpc/boot1.chrp/ (props changed) projects/largeSMP/sys/boot/powerpc/ofw/ (props changed) projects/largeSMP/sys/cddl/contrib/opensolaris/ (props changed) projects/largeSMP/sys/conf/ (props changed) projects/largeSMP/sys/contrib/dev/acpica/ (props changed) projects/largeSMP/sys/contrib/octeon-sdk/ (props changed) projects/largeSMP/sys/contrib/pf/ (props changed) projects/largeSMP/sys/contrib/x86emu/ (props changed) projects/largeSMP/usr.bin/calendar/ (props changed) projects/largeSMP/usr.bin/csup/ (props changed) projects/largeSMP/usr.bin/procstat/ (props changed) projects/largeSMP/usr.sbin/ndiscvt/ (props changed) projects/largeSMP/usr.sbin/zic/ (props changed) Modified: projects/largeSMP/lib/libc/iconv/iconvctl.3 ============================================================================== --- projects/largeSMP/lib/libc/iconv/iconvctl.3 Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/lib/libc/iconv/iconvctl.3 Thu Jun 2 14:09:30 2011 (r222612) @@ -150,6 +150,9 @@ facility is a non-standard extension, wh the GNU implementation and was adopted in .Fx 9 for compatibility's sake. +.Sh AUTHORS +This manual page was written by +.An Gabor Kovesdan Aq gabor@FreeBSD.org . .Sh BUGS Transliteration is enabled in this implementation by default, so it is impossible by design to turn it off. @@ -157,6 +160,3 @@ Accordingly, trying to turn it off will returned. Getting the transliteration state will always succeed and indicate that it is turned on, though. -.Sh AUTHORS -This manual page was written by -.An Gabor Kovesdan Aq gabor@FreeBSD.org . Modified: projects/largeSMP/sbin/geom/class/part/gpart.8 ============================================================================== --- projects/largeSMP/sbin/geom/class/part/gpart.8 Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sbin/geom/class/part/gpart.8 Thu Jun 2 14:09:30 2011 (r222612) @@ -818,6 +818,7 @@ GEOM class verifies all generic partitio disk metadata. If some inconsistency is detected, partition table will be rejected with a diagnostic message: .Pa GEOM_PART: Integrity check failed (provider, scheme) . +.El .Sh EXIT STATUS Exit status is 0 on success, and 1 if the command fails. .Sh EXAMPLES Modified: projects/largeSMP/sbin/setkey/setkey.8 ============================================================================== --- projects/largeSMP/sbin/setkey/setkey.8 Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sbin/setkey/setkey.8 Thu Jun 2 14:09:30 2011 (r222612) @@ -441,13 +441,14 @@ protocols other than TCP, UDP and ICMP m .It Ar policy .Ar policy is expressed in one of the following three formats: -.Bd -ragged -offset indent +.Pp +.Bl -tag -compact .It Fl P Ar direction Li discard .It Fl P Ar direction Li none .It Xo Fl P Ar direction Li ipsec .Ar protocol/mode/src-dst/level Op ... .Xc -.Ed +.El .Pp The direction of a policy must be specified as one of: Modified: projects/largeSMP/share/man/man4/Makefile ============================================================================== --- projects/largeSMP/share/man/man4/Makefile Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/share/man/man4/Makefile Thu Jun 2 14:09:30 2011 (r222612) @@ -475,6 +475,7 @@ MAN= aac.4 \ ukbd.4 \ ulpt.4 \ umass.4 \ + umcs7840.4 \ umct.4 \ umodem.4 \ ums.4 \ Modified: projects/largeSMP/share/man/man4/bwn.4 ============================================================================== --- projects/largeSMP/share/man/man4/bwn.4 Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/share/man/man4/bwn.4 Thu Jun 2 14:09:30 2011 (r222612) @@ -142,9 +142,6 @@ The .Nm driver first appeared in .Fx 8.1 . -.Sh CAVEATS -Some LP PHY devices have DMA operation problems that in that case try to -use PIO mode. .Sh AUTHORS .An -nosplit The @@ -155,3 +152,6 @@ driver was written by .\".Sh BUGS .\"Some card based on the BCM4306 and BCM4309 chips do not work properly .\"on channel 1, 2 and 3. +.Sh CAVEATS +Some LP PHY devices have DMA operation problems that in that case try to +use PIO mode. Modified: projects/largeSMP/share/man/man4/em.4 ============================================================================== --- projects/largeSMP/share/man/man4/em.4 Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/share/man/man4/em.4 Thu Jun 2 14:09:30 2011 (r222612) @@ -227,6 +227,20 @@ If is non-zero, this tunable limits the maximum delay in which a transmit interrupt is generated. .El +.Sh FILES +.Bl -tag -width /dev/led/em* +.It Pa /dev/led/em* +identification LED device nodes +.El +.Sh EXAMPLES +Make the identification LED of em0 blink: +.Pp +.Dl "echo f2 > /dev/led/em0" +.Pp +Turn the identification LED of em0 off again: +.Pp +.Dl "echo 0 > /dev/led/em0" +.Pp .Sh DIAGNOSTICS .Bl -diag .It "em%d: Unable to allocate bus resource: memory" @@ -246,20 +260,6 @@ If an issue is identified with the relea with a supported adapter, email the specific information related to the issue to .Aq freebsdnic@mailbox.intel.com . -.Sh FILES -.Bl -tag -width /dev/led/em* -.It Pa /dev/led/em* -identification LED device nodes -.El -.Sh EXAMPLES -Make the identification LED of em0 blink: -.Pp -.Dl "echo f2 > /dev/led/em0" -.Pp -Turn the identification LED of em0 off again: -.Pp -.Dl "echo 0 > /dev/led/em0" -.Pp .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , Modified: projects/largeSMP/share/man/man4/igb.4 ============================================================================== --- projects/largeSMP/share/man/man4/igb.4 Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/share/man/man4/igb.4 Thu Jun 2 14:09:30 2011 (r222612) @@ -161,6 +161,20 @@ The minimum is 80, and the maximum is 40 If set to 1, enable Adaptive Interrupt Moderation. The default is to enable Adaptive Interrupt Moderation. .El +.Sh FILES +.Bl -tag -width /dev/led/igb* +.It Pa /dev/led/igb* +identification LED device nodes +.El +.Sh EXAMPLES +Make the identification LED of igb0 blink: +.Pp +.Dl "echo f2 > /dev/led/igb0" +.Pp +Turn the identification LED of igb0 off again: +.Pp +.Dl "echo 0 > /dev/led/igb0" +.Pp .Sh DIAGNOSTICS .Bl -diag .It "igb%d: Unable to allocate bus resource: memory" @@ -180,20 +194,6 @@ If an issue is identified with the relea with a supported adapter, email the specific information related to the issue to .Aq freebsdnic@mailbox.intel.com . -.Sh FILES -.Bl -tag -width /dev/led/igb* -.It Pa /dev/led/igb* -identification LED device nodes -.El -.Sh EXAMPLES -Make the identification LED of igb0 blink: -.Pp -.Dl "echo f2 > /dev/led/igb0" -.Pp -Turn the identification LED of igb0 off again: -.Pp -.Dl "echo 0 > /dev/led/igb0" -.Pp .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , Modified: projects/largeSMP/share/man/man4/mps.4 ============================================================================== --- projects/largeSMP/share/man/man4/mps.4 Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/share/man/man4/mps.4 Thu Jun 2 14:09:30 2011 (r222612) @@ -143,6 +143,19 @@ Enable prints for controller events. .Xr sa 4 , .Xr scsi 4 , .Xr targ 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 9.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was originally written by +.An Scott Long Aq scottl@FreeBSD.org . +This man page was written by +.An Ken Merry Aq ken@FreeBSD.org . .Sh BUGS This driver is still in development, it has only been tested on the amd64 architecture and has some known shortcomings: @@ -158,16 +171,3 @@ times, without user intervention. .It The error recovery code isn't complete. .El -.Sh HISTORY -The -.Nm -driver first appeared in -.Fx 9.0 . -.Sh AUTHORS -.An -nosplit -The -.Nm -driver was originally written by -.An Scott Long Aq scottl@FreeBSD.org . -This man page was written by -.An Ken Merry Aq ken@FreeBSD.org . Modified: projects/largeSMP/share/man/man4/ucom.4 ============================================================================== --- projects/largeSMP/share/man/man4/ucom.4 Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/share/man/man4/ucom.4 Thu Jun 2 14:09:30 2011 (r222612) @@ -78,6 +78,7 @@ multiple external ports. .Xr uark 4 , .Xr uchcom 4 , .Xr uftdi 4 , +.Xr umcs7840 4 , .Xr umct 4 , .Xr umodem 4 , .Xr uplcom 4 , Modified: projects/largeSMP/share/man/man4/uep.4 ============================================================================== --- projects/largeSMP/share/man/man4/uep.4 Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/share/man/man4/uep.4 Thu Jun 2 14:09:30 2011 (r222612) @@ -57,11 +57,6 @@ To get mouse working in .Xr X 7 , one needs to install .Pa ports/x11-drivers/xf86-input-egalax . -.Sh BUGS -.Nm -can't act like -.Xr sysmouse 4 , -since the latter does not support absolute motion events. .Sh FILES .Nm creates a blocking pseudo\-device file, @@ -77,3 +72,8 @@ The .Nm driver was written by .An Gleb Smirnoff Aq glebius@FreeBSD.org +.Sh BUGS +.Nm +can't act like +.Xr sysmouse 4 , +since the latter does not support absolute motion events. Copied: projects/largeSMP/share/man/man4/umcs7840.4 (from r222610, head/share/man/man4/umcs7840.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/largeSMP/share/man/man4/umcs7840.4 Thu Jun 2 14:09:30 2011 (r222612, copy of r222610, head/share/man/man4/umcs7840.4) @@ -0,0 +1,97 @@ +.\" +.\" Copyright (c) 2010 Lev Serebryakov . +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Lennart Augustsson. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (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$ +.\" +.Dd December 10, 2010 +.Dt UMCS7840 4 +.Os +.Sh NAME +.Nm umcs7840 +.Nd USB support for serial adapters based on the MCS7820 and MCS7840 chips +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device umcs7840" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +umcs7840_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for various multiport serial adapters based on the MosCom +MCS7820 and MCS7840 chips. They are 2- or 4-port adapters with full-featured +16550-compatible UARTs and very flexible baud generators. Also, these chips +support RS422/RS485 and IrDA oprations. +.Pp +The device is accessed through the +.Xr ucom 4 +driver which makes it behave like a +.Xr tty 4 . +.Pp +Different ports on device are presented as sub-units, like +.Pa /dev/ttyU0.1 +and +.Pa /dev/ttyU0.2 +.Sh HARDWARE +The +.Nm +driver was tested on the following adapters: +.Pp +.Bl -bullet -compact +.It +ST Lab U-360 two-port serial USB adapter +.It +ST Lab U-400 four-port serial USB adapter +.El +.Sh SEE ALSO +.Xr tty 4 , +.Xr ucom 4 , +.Xr usb 4 +.Sh HISTORY +The +.Nm +driver +appeared in ports since December of 2010. +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Lev Serebryakov +.Aq lev@FreeBSD.org . +.Sh BUGS +This driver doesn't support access to any fine tunes of +chip, like RS522/RS485 mode, non-standard baudrates, etc. Modified: projects/largeSMP/share/man/man9/bus_adjust_resource.9 ============================================================================== --- projects/largeSMP/share/man/man9/bus_adjust_resource.9 Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/share/man/man9/bus_adjust_resource.9 Thu Jun 2 14:09:30 2011 (r222612) @@ -67,6 +67,15 @@ It is the caller's responsibility to enf The .Fn bus_adjust_resource method returns zero on success or an error code on failure. +.Sh EXAMPLES +Grow an existing memory resource by 4096 bytes. +.Bd -literal + struct resource *res; + int error; + + error = bus_adjust_resource(dev, SYS_RES_MEMORY, res, + rman_get_start(res), rman_get_end(res) + 0x1000); +.Ed .Sh ERRORS .Fn bus_adjust_resource will fail if: @@ -85,15 +94,6 @@ The new address range does not overlap w .It Bq Er EBUSY The new address range conflicts with another allocated resource. .El -.Sh EXAMPLES -Grow an existing memory resource by 4096 bytes. -.Bd -literal - struct resource *res; - int error; - - error = bus_adjust_resource(dev, SYS_RES_MEMORY, res, - rman_get_start(res), rman_get_end(res) + 0x1000); -.Ed .Sh SEE ALSO .Xr bus_alloc_resource 9 , .Xr bus_release_resource 9 , Modified: projects/largeSMP/share/misc/mdoc.template ============================================================================== --- projects/largeSMP/share/misc/mdoc.template Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/share/misc/mdoc.template Thu Jun 2 14:09:30 2011 (r222612) @@ -33,3 +33,4 @@ .\" .Sh HISTORY .\" .Sh AUTHORS .\" .Sh BUGS +.\" .Sh SECURITY CONSIDERATIONS Modified: projects/largeSMP/sys/boot/forth/check-password.4th.8 ============================================================================== --- projects/largeSMP/sys/boot/forth/check-password.4th.8 Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/boot/forth/check-password.4th.8 Thu Jun 2 14:09:30 2011 (r222612) @@ -67,7 +67,7 @@ variable in .Pp Subsequent calls after a successful password has been entered will not cause reprompting -.Nd the function will silently return. +\(em the function will silently return. .El .Pp The environment variables that effect its behavior are: Modified: projects/largeSMP/sys/conf/files ============================================================================== --- projects/largeSMP/sys/conf/files Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/conf/files Thu Jun 2 14:09:30 2011 (r222612) @@ -846,7 +846,10 @@ dev/ath/ath_rate/onoe/onoe.c optional at compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_rate/sample/sample.c optional ath_rate_sample \ compile-with "${NORMAL_C} -I$S/dev/ath" -# +# ath DFS modules +dev/ath/ath_dfs/null/dfs_null.c optional ath \ + compile-with "${NORMAL_C} -I$S/dev/ath" +# dev/bce/if_bce.c optional bce dev/bfe/if_bfe.c optional bfe dev/bge/if_bge.c optional bge @@ -1955,6 +1958,7 @@ dev/usb/serial/uftdi.c optional uftdi dev/usb/serial/ugensa.c optional ugensa dev/usb/serial/uipaq.c optional uipaq dev/usb/serial/ulpt.c optional ulpt +dev/usb/serial/umcs7840.c optional umcs7840 dev/usb/serial/umct.c optional umct dev/usb/serial/umodem.c optional umodem dev/usb/serial/umoscom.c optional umoscom @@ -1964,7 +1968,7 @@ dev/usb/serial/uvisor.c optional uvisor dev/usb/serial/uvscom.c optional uvscom dev/usb/serial/usb_serial.c optional ucom | u3g | uark | ubsa | ubser | \ uchcom | ucycom | ufoma | uftdi | \ - ugensa | uipaq | umct | \ + ugensa | uipaq | umcs7840 | umct | \ umodem | umoscom | uplcom | uslcom | \ uvisor | uvscom # Modified: projects/largeSMP/sys/dev/ath/ath_hal/ah.c ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ah.c Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ah.c Thu Jun 2 14:09:30 2011 (r222612) @@ -610,6 +610,10 @@ ath_hal_getcapability(struct ath_hal *ah return HAL_OK; case HAL_CAP_4ADDR_AGGR: return pCap->hal4AddrAggrSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_EXT_CHAN_DFS: + return pCap->halExtChanDfsSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_COMBINED_RADAR_RSSI: + return pCap->halUseCombinedRadarRssi ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_AUTO_SLEEP: return pCap->halAutoSleepSupport ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_MBSSID_AGGR_SUPPORT: @@ -626,6 +630,8 @@ ath_hal_getcapability(struct ath_hal *ah case HAL_CAP_RXTSTAMP_PREC: /* rx desc tstamp precision (bits) */ *result = pCap->halTstampPrecision; return HAL_OK; + case HAL_CAP_ENHANCED_DFS_SUPPORT: + return pCap->halEnhancedDfsSupport ? HAL_OK : HAL_ENOTSUPP; /* FreeBSD-specific entries for now */ case HAL_CAP_RXORN_FATAL: /* HAL_INT_RXORN treated as fatal */ Modified: projects/largeSMP/sys/dev/ath/ath_hal/ah.h ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ah.h Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ah.h Thu Jun 2 14:09:30 2011 (r222612) @@ -121,6 +121,9 @@ typedef enum { HAL_CAP_RTS_AGGR_LIMIT = 42, /* aggregation limit with RTS */ HAL_CAP_4ADDR_AGGR = 43, /* hardware is capable of 4addr aggregation */ + HAL_CAP_DFS_DMN = 44, /* current DFS domain */ + HAL_CAP_EXT_CHAN_DFS = 45, /* DFS support for extension channel */ + HAL_CAP_COMBINED_RADAR_RSSI = 46, /* Is combined RSSI for radar accurate */ HAL_CAP_AUTO_SLEEP = 48, /* hardware can go to network sleep automatically after waking up to receive TIM */ @@ -133,6 +136,7 @@ typedef enum { HAL_CAP_HT20_SGI = 96, /* hardware supports HT20 short GI */ HAL_CAP_RXTSTAMP_PREC = 100, /* rx desc tstamp precision (bits) */ + HAL_CAP_ENHANCED_DFS_SUPPORT = 117, /* hardware supports enhanced DFS */ /* The following are private to the FreeBSD HAL (224 onward) */ @@ -703,6 +707,34 @@ typedef enum { HAL_CAP_INTMIT_SPUR_IMMUNITY_LEVEL = 6 } HAL_CAP_INTMIT_CMD; +typedef struct { + int32_t pe_firpwr; /* FIR pwr out threshold */ + int32_t pe_rrssi; /* Radar rssi thresh */ + int32_t pe_height; /* Pulse height thresh */ + int32_t pe_prssi; /* Pulse rssi thresh */ + int32_t pe_inband; /* Inband thresh */ + + /* The following params are only for AR5413 and later */ + u_int32_t pe_relpwr; /* Relative power threshold in 0.5dB steps */ + u_int32_t pe_relstep; /* Pulse Relative step threshold in 0.5dB steps */ + u_int32_t pe_maxlen; /* Max length of radar sign in 0.8us units */ + HAL_BOOL pe_usefir128; /* Use the average in-band power measured over 128 cycles */ + HAL_BOOL pe_blockradar; /* + * Enable to block radar check if pkt detect is done via OFDM + * weak signal detect or pkt is detected immediately after tx + * to rx transition + */ + HAL_BOOL pe_enmaxrssi; /* + * Enable to use the max rssi instead of the last rssi during + * fine gain changes for radar detection + */ + HAL_BOOL pe_extchannel; /* Enable DFS on ext channel */ +} HAL_PHYERR_PARAM; + +#define HAL_PHYERR_PARAM_NOVAL 65535 +#define HAL_PHYERR_PARAM_ENABLE 0x8000 /* Enable/Disable if applicable */ + + /* * Hardware Access Layer (HAL) API. * @@ -878,6 +910,12 @@ struct ath_hal { HAL_BOOL __ahdecl(*ah_setDecompMask)(struct ath_hal*, uint16_t, int); void __ahdecl(*ah_setCoverageClass)(struct ath_hal*, uint8_t, int); + /* DFS functions */ + void __ahdecl(*ah_enableDfs)(struct ath_hal *ah, + HAL_PHYERR_PARAM *pe); + void __ahdecl(*ah_getDfsThresh)(struct ath_hal *ah, + HAL_PHYERR_PARAM *pe); + /* Key Cache Functions */ uint32_t __ahdecl(*ah_getKeyCacheSize)(struct ath_hal*); HAL_BOOL __ahdecl(*ah_resetKeyCacheEntry)(struct ath_hal*, uint16_t); Modified: projects/largeSMP/sys/dev/ath/ath_hal/ah_desc.h ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ah_desc.h Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ah_desc.h Thu Jun 2 14:09:30 2011 (r222612) @@ -144,7 +144,7 @@ enum { HAL_PHYERR_RADAR = 5, /* Radar detect */ HAL_PHYERR_SERVICE = 6, /* Illegal service */ HAL_PHYERR_TOR = 7, /* Transmit override receive */ - /* NB: these are specific to the 5212 */ + /* NB: these are specific to the 5212 and later */ HAL_PHYERR_OFDM_TIMING = 17, /* */ HAL_PHYERR_OFDM_SIGNAL_PARITY = 18, /* */ HAL_PHYERR_OFDM_RATE_ILLEGAL = 19, /* */ @@ -152,6 +152,7 @@ enum { HAL_PHYERR_OFDM_POWER_DROP = 21, /* */ HAL_PHYERR_OFDM_SERVICE = 22, /* */ HAL_PHYERR_OFDM_RESTART = 23, /* */ + HAL_PHYERR_FALSE_RADAR_EXT = 24, /* */ HAL_PHYERR_CCK_TIMING = 25, /* */ HAL_PHYERR_CCK_HEADER_CRC = 26, /* */ HAL_PHYERR_CCK_RATE_ILLEGAL = 27, /* */ Modified: projects/largeSMP/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ah_internal.h Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ah_internal.h Thu Jun 2 14:09:30 2011 (r222612) @@ -200,8 +200,10 @@ typedef struct { halRifsTxSupport : 1, hal4AddrAggrSupport : 1, halExtChanDfsSupport : 1, + halUseCombinedRadarRssi : 1, halForcePpmSupport : 1, halEnhancedPmSupport : 1, + halEnhancedDfsSupport : 1, halMbssidAggrSupport : 1, halBssidMatchSupport : 1, hal4kbSplitTransSupport : 1, Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h Thu Jun 2 14:09:30 2011 (r222612) @@ -618,5 +618,7 @@ extern void ar5212AniReset(struct ath_ha extern HAL_BOOL ar5212IsNFCalInProgress(struct ath_hal *ah); extern HAL_BOOL ar5212WaitNFCalComplete(struct ath_hal *ah, int i); +extern void ar5212EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe); +extern void ar5212GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe); #endif /* _ATH_AR5212_H_ */ Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Thu Jun 2 14:09:30 2011 (r222612) @@ -128,6 +128,10 @@ static const struct ath_hal_private ar52 .ah_setDecompMask = ar5212SetDecompMask, .ah_setCoverageClass = ar5212SetCoverageClass, + /* DFS Functions */ + .ah_enableDfs = ar5212EnableDfs, + .ah_getDfsThresh = ar5212GetDfsThresh, + /* Key Cache Functions */ .ah_getKeyCacheSize = ar5212GetKeyCacheSize, .ah_resetKeyCacheEntry = ar5212ResetKeyCacheEntry, Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Jun 2 14:09:30 2011 (r222612) @@ -1115,3 +1115,54 @@ ar5212WaitNFCalComplete(struct ath_hal * } return AH_FALSE; } + +void +ar5212EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ + uint32_t val; + val = OS_REG_READ(ah, AR_PHY_RADAR_0); + + if (pe->pe_firpwr != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_FIRPWR; + val |= SM(pe->pe_firpwr, AR_PHY_RADAR_0_FIRPWR); + } + if (pe->pe_rrssi != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_RRSSI; + val |= SM(pe->pe_rrssi, AR_PHY_RADAR_0_RRSSI); + } + if (pe->pe_height != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_HEIGHT; + val |= SM(pe->pe_height, AR_PHY_RADAR_0_HEIGHT); + } + if (pe->pe_prssi != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_PRSSI; + val |= SM(pe->pe_prssi, AR_PHY_RADAR_0_PRSSI); + } + if (pe->pe_inband != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_INBAND; + val |= SM(pe->pe_inband, AR_PHY_RADAR_0_INBAND); + } + OS_REG_WRITE(ah, AR_PHY_RADAR_0, val | AR_PHY_RADAR_0_ENA); +} + +void +ar5212GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ + uint32_t val,temp; + + val = OS_REG_READ(ah, AR_PHY_RADAR_0); + + temp = MS(val,AR_PHY_RADAR_0_FIRPWR); + temp |= 0xFFFFFF80; + pe->pe_firpwr = temp; + pe->pe_rrssi = MS(val, AR_PHY_RADAR_0_RRSSI); + pe->pe_height = MS(val, AR_PHY_RADAR_0_HEIGHT); + pe->pe_prssi = MS(val, AR_PHY_RADAR_0_PRSSI); + pe->pe_inband = MS(val, AR_PHY_RADAR_0_INBAND); + + pe->pe_relpwr = 0; + pe->pe_relstep = 0; + pe->pe_maxlen = 0; + pe->pe_extchannel = AH_FALSE; +} + Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h Thu Jun 2 14:09:30 2011 (r222612) @@ -201,6 +201,8 @@ extern HAL_BOOL ar5416GetDiagState(struc void **result, uint32_t *resultsize); extern HAL_BOOL ar5416SetRifsDelay(struct ath_hal *ah, const struct ieee80211_channel *chan, HAL_BOOL enable); +extern void ar5416EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe); +extern void ar5416GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe); extern HAL_BOOL ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip); Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Thu Jun 2 14:09:30 2011 (r222612) @@ -143,6 +143,10 @@ ar5416InitState(struct ath_hal_5416 *ahp ah->ah_resetKeyCacheEntry = ar5416ResetKeyCacheEntry; ah->ah_setKeyCacheEntry = ar5416SetKeyCacheEntry; + /* DFS Functions */ + ah->ah_enableDfs = ar5416EnableDfs; + ah->ah_getDfsThresh = ar5416GetDfsThresh; + /* Power Management Functions */ ah->ah_setPowerMode = ar5416SetPowerMode; @@ -878,6 +882,7 @@ ar5416FillCapabilityInfo(struct ath_hal pCap->halBssidMatchSupport = AH_TRUE; pCap->halGTTSupport = AH_TRUE; pCap->halCSTSupport = AH_TRUE; + pCap->halEnhancedDfsSupport = AH_FALSE; if (ath_hal_eepromGetFlag(ah, AR_EEP_RFKILL) && ath_hal_eepromGet(ah, AR_EEP_RFSILENT, &ahpriv->ah_rfsilent) == HAL_OK) { Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Jun 2 14:09:30 2011 (r222612) @@ -560,3 +560,106 @@ ar5416DetectBBHang(struct ath_hal *ah) #undef N } #undef NUM_STATUS_READS + +/* + * Get the radar parameter values and return them in the pe + * structure + */ +void +ar5416GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ + uint32_t val, temp; + + val = OS_REG_READ(ah, AR_PHY_RADAR_0); + + temp = MS(val,AR_PHY_RADAR_0_FIRPWR); + temp |= 0xFFFFFF80; + pe->pe_firpwr = temp; + pe->pe_rrssi = MS(val, AR_PHY_RADAR_0_RRSSI); + pe->pe_height = MS(val, AR_PHY_RADAR_0_HEIGHT); + pe->pe_prssi = MS(val, AR_PHY_RADAR_0_PRSSI); + pe->pe_inband = MS(val, AR_PHY_RADAR_0_INBAND); + + val = OS_REG_READ(ah, AR_PHY_RADAR_1); + temp = val & AR_PHY_RADAR_1_RELPWR_ENA; + pe->pe_relpwr = MS(val, AR_PHY_RADAR_1_RELPWR_THRESH); + if (temp) + pe->pe_relpwr |= HAL_PHYERR_PARAM_ENABLE; + temp = val & AR_PHY_RADAR_1_RELSTEP_CHECK; + pe->pe_relstep = MS(val, AR_PHY_RADAR_1_RELSTEP_THRESH); + if (temp) + pe->pe_relstep |= HAL_PHYERR_PARAM_ENABLE; + pe->pe_maxlen = MS(val, AR_PHY_RADAR_1_MAXLEN); + pe->pe_extchannel = !! (OS_REG_READ(ah, AR_PHY_RADAR_EXT) & + AR_PHY_RADAR_EXT_ENA); +} + +/* + * Enable radar detection and set the radar parameters per the + * values in pe + */ +void +ar5416EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) +{ + uint32_t val; + + val = OS_REG_READ(ah, AR_PHY_RADAR_0); + + if (pe->pe_firpwr != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_FIRPWR; + val |= SM(pe->pe_firpwr, AR_PHY_RADAR_0_FIRPWR); + } + if (pe->pe_rrssi != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_RRSSI; + val |= SM(pe->pe_rrssi, AR_PHY_RADAR_0_RRSSI); + } + if (pe->pe_height != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_HEIGHT; + val |= SM(pe->pe_height, AR_PHY_RADAR_0_HEIGHT); + } + if (pe->pe_prssi != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_PRSSI; + val |= SM(pe->pe_prssi, AR_PHY_RADAR_0_PRSSI); + } + if (pe->pe_inband != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_0_INBAND; + val |= SM(pe->pe_inband, AR_PHY_RADAR_0_INBAND); + } + + /*Enable FFT data*/ + val |= AR_PHY_RADAR_0_FFT_ENA; + + OS_REG_WRITE(ah, AR_PHY_RADAR_0, val | AR_PHY_RADAR_0_ENA); + + val = OS_REG_READ(ah, AR_PHY_RADAR_1); + val |= (AR_PHY_RADAR_1_MAX_RRSSI | AR_PHY_RADAR_1_BLOCK_CHECK); + + if (pe->pe_maxlen != HAL_PHYERR_PARAM_NOVAL) { + val &= ~AR_PHY_RADAR_1_MAXLEN; + val |= SM(pe->pe_maxlen, AR_PHY_RADAR_1_MAXLEN); + } + OS_REG_WRITE(ah, AR_PHY_RADAR_1, val); + + /* + * Enable HT/40 if the upper layer asks; + * it should check the channel is HT/40 and HAL_CAP_EXT_CHAN_DFS + * is available. + */ + if (pe->pe_extchannel) + OS_REG_SET_BIT(ah, AR_PHY_RADAR_EXT, AR_PHY_RADAR_EXT_ENA); + else + OS_REG_CLR_BIT(ah, AR_PHY_RADAR_EXT, AR_PHY_RADAR_EXT_ENA); + + if (pe->pe_relstep != HAL_PHYERR_PARAM_NOVAL) { + val = OS_REG_READ(ah, AR_PHY_RADAR_1); + val &= ~AR_PHY_RADAR_1_RELSTEP_THRESH; + val |= SM(pe->pe_relstep, AR_PHY_RADAR_1_RELSTEP_THRESH); + OS_REG_WRITE(ah, AR_PHY_RADAR_1, val); + } + if (pe->pe_relpwr != HAL_PHYERR_PARAM_NOVAL) { + val = OS_REG_READ(ah, AR_PHY_RADAR_1); + val &= ~AR_PHY_RADAR_1_RELPWR_THRESH; + val |= SM(pe->pe_relpwr, AR_PHY_RADAR_1_RELPWR_THRESH); + OS_REG_WRITE(ah, AR_PHY_RADAR_1, val); + } +} Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416phy.h ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Thu Jun 2 14:09:30 2011 (r222612) @@ -21,6 +21,25 @@ #include "ar5212/ar5212phy.h" +/* For AR_PHY_RADAR0 */ +#define AR_PHY_RADAR_0_FFT_ENA 0x80000000 + +#define AR_PHY_RADAR_EXT 0x9940 +#define AR_PHY_RADAR_EXT_ENA 0x00004000 + +#define AR_PHY_RADAR_1 0x9958 +#define AR_PHY_RADAR_1_RELPWR_ENA 0x00800000 +#define AR_PHY_RADAR_1_USE_FIR128 0x00400000 +#define AR_PHY_RADAR_1_RELPWR_THRESH 0x003F0000 +#define AR_PHY_RADAR_1_RELPWR_THRESH_S 16 +#define AR_PHY_RADAR_1_BLOCK_CHECK 0x00008000 +#define AR_PHY_RADAR_1_MAX_RRSSI 0x00004000 +#define AR_PHY_RADAR_1_RELSTEP_CHECK 0x00002000 +#define AR_PHY_RADAR_1_RELSTEP_THRESH 0x00001F00 +#define AR_PHY_RADAR_1_RELSTEP_THRESH_S 8 +#define AR_PHY_RADAR_1_MAXLEN 0x000000FF +#define AR_PHY_RADAR_1_MAXLEN_S 0 + #define AR_PHY_CHIP_ID_REV_0 0x80 /* 5416 Rev 0 (owl 1.0) BB */ #define AR_PHY_CHIP_ID_REV_1 0x81 /* 5416 Rev 1 (owl 2.0) BB */ Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c Thu Jun 2 14:09:30 2011 (r222612) @@ -289,6 +289,7 @@ ar9130FillCapabilityInfo(struct ath_hal pCap->halRifsTxSupport = AH_TRUE; pCap->halRtsAggrLimit = 64*1024; /* 802.11n max */ pCap->halExtChanDfsSupport = AH_TRUE; + pCap->halUseCombinedRadarRssi = AH_TRUE; pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ /* * MBSSID aggregation is broken in Howl v1.1, v1.2, v1.3 Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar9001/ar9160_attach.c Thu Jun 2 14:09:30 2011 (r222612) @@ -293,6 +293,7 @@ ar9160FillCapabilityInfo(struct ath_hal pCap->halRifsTxSupport = AH_TRUE; pCap->halRtsAggrLimit = 64*1024; /* 802.11n max */ pCap->halExtChanDfsSupport = AH_TRUE; + pCap->halUseCombinedRadarRssi = AH_TRUE; pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ pCap->halMbssidAggrSupport = AH_TRUE; pCap->hal4AddrAggrSupport = AH_TRUE; Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Thu Jun 2 14:09:30 2011 (r222612) @@ -783,6 +783,7 @@ ar9280FillCapabilityInfo(struct ath_hal pCap->halRifsTxSupport = AH_TRUE; pCap->halRtsAggrLimit = 64*1024; /* 802.11n max */ pCap->halExtChanDfsSupport = AH_TRUE; + pCap->halUseCombinedRadarRssi = AH_TRUE; #if 0 /* XXX bluetooth */ pCap->halBtCoexSupport = AH_TRUE; @@ -804,6 +805,7 @@ ar9280FillCapabilityInfo(struct ath_hal } pCap->halRxStbcSupport = 1; pCap->halTxStbcSupport = 1; + pCap->halEnhancedDfsSupport = AH_TRUE; return AH_TRUE; } Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Thu Jun 2 14:09:30 2011 (r222612) @@ -414,6 +414,7 @@ ar9285FillCapabilityInfo(struct ath_hal pCap->halRifsTxSupport = AH_TRUE; pCap->halRtsAggrLimit = 64*1024; /* 802.11n max */ pCap->halExtChanDfsSupport = AH_TRUE; + pCap->halUseCombinedRadarRssi = AH_TRUE; #if 0 /* XXX bluetooth */ pCap->halBtCoexSupport = AH_TRUE; Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c ============================================================================== --- projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Thu Jun 2 14:09:30 2011 (r222612) @@ -430,6 +430,7 @@ ar9287FillCapabilityInfo(struct ath_hal pCap->halRifsTxSupport = AH_TRUE; pCap->halRtsAggrLimit = 64*1024; /* 802.11n max */ pCap->halExtChanDfsSupport = AH_TRUE; + pCap->halUseCombinedRadarRssi = AH_TRUE; #if 0 /* XXX bluetooth */ pCap->halBtCoexSupport = AH_TRUE; @@ -447,6 +448,8 @@ ar9287FillCapabilityInfo(struct ath_hal /* Hardware supports short-GI w/ 20MHz */ pCap->halHTSGI20Support = 1; + pCap->halEnhancedDfsSupport = AH_TRUE; + return AH_TRUE; } Modified: projects/largeSMP/sys/dev/ath/if_ath.c ============================================================================== --- projects/largeSMP/sys/dev/ath/if_ath.c Thu Jun 2 14:08:50 2011 (r222611) +++ projects/largeSMP/sys/dev/ath/if_ath.c Thu Jun 2 14:09:30 2011 (r222612) @@ -95,11 +95,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef ATH_TX99_DIAG #include #endif + /* * ATH_BCBUF determines the number of vap's that can transmit * beacons and also (currently) the number of vap's that can @@ -199,6 +201,8 @@ static void ath_setcurmode(struct ath_so static void ath_announce(struct ath_softc *); +static void ath_dfs_tasklet(void *, int); + #ifdef IEEE80211_SUPPORT_TDMA static void ath_tdma_settimers(struct ath_softc *sc, u_int32_t nexttbtt, u_int32_t bintval); @@ -471,6 +475,16 @@ ath_attach(u_int16_t devid, struct ath_s goto bad2; } + /* Attach DFS module */ + if (! ath_dfs_attach(sc)) { + device_printf(sc->sc_dev, "%s: unable to attach DFS\n", __func__); + error = EIO; + goto bad2; + } + + /* Start DFS processing tasklet */ + TASK_INIT(&sc->sc_dfstask, 0, ath_dfs_tasklet, sc); + sc->sc_blinking = 0; sc->sc_ledstate = 1; sc->sc_ledon = 0; /* low true */ @@ -771,6 +785,8 @@ ath_detach(struct ath_softc *sc) sc->sc_tx99->detach(sc->sc_tx99); #endif ath_rate_detach(sc->sc_rc); + + ath_dfs_detach(sc); ath_desc_free(sc); ath_tx_cleanup(sc); ath_hal_detach(sc->sc_ah); /* NB: sets chip in full sleep */ @@ -1554,6 +1570,9 @@ ath_init(void *arg) } ath_chan_change(sc, ic->ic_curchan); + /* Let DFS at it in case it's a DFS channel */ + ath_dfs_radar_enable(sc, ic->ic_curchan); + /* * Likewise this is set during reset so update * state cached in the driver. @@ -1699,6 +1718,10 @@ ath_reset(struct ifnet *ifp) if_printf(ifp, "%s: unable to reset hardware; hal status %u\n", __func__, status); sc->sc_diversity = ath_hal_getdiversity(ah); + + /* Let DFS at it in case it's a DFS channel */ + ath_dfs_radar_enable(sc, ic->ic_curchan); + if (ath_startrecv(sc) != 0) /* restart recv */ if_printf(ifp, "%s: unable to start recv logic\n", __func__); /* @@ -3441,6 +3464,9 @@ ath_rx_proc(void *arg, int npending) sc->sc_stats.ast_rx_fifoerr++; if (rs->rs_status & HAL_RXERR_PHY) { sc->sc_stats.ast_rx_phyerr++; + /* Process DFS radar events */ + ath_dfs_process_phy_err(sc, ds, tsf, rs); + /* Be suitably paranoid about receiving phy errors out of the stats array bounds */ if (rs->rs_phyerr < 64) sc->sc_stats.ast_rx_phy[rs->rs_phyerr]++; @@ -3682,6 +3708,10 @@ rx_next: if (ngood) sc->sc_lastrx = tsf; + /* Queue DFS tasklet if needed */ + if (ath_dfs_tasklet_needed(sc, sc->sc_curchan)) + taskqueue_enqueue(sc->sc_tq, &sc->sc_dfstask); + if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0) { #ifdef IEEE80211_SUPPORT_SUPERG ieee80211_ff_age_all(ic, 100); @@ -4399,6 +4429,9 @@ ath_chan_set(struct ath_softc *sc, struc } sc->sc_diversity = ath_hal_getdiversity(ah); + /* Let DFS at it in case it's a DFS channel */ + ath_dfs_radar_enable(sc, ic->ic_curchan); + /* * Re-enable rx framework. */ @@ -5665,5 +5698,23 @@ ath_tdma_beacon_send(struct ath_softc *s } #endif /* IEEE80211_SUPPORT_TDMA */ +static void +ath_dfs_tasklet(void *p, int npending) +{ + struct ath_softc *sc = (struct ath_softc *) p; + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + + /* + * If previous processing has found a radar event, + * signal this to the net80211 layer to begin DFS + * processing. + */ + if (ath_dfs_process_radar_event(sc, sc->sc_curchan)) { + /* DFS event found, initiate channel change */ + ieee80211_dfs_notify_radar(ic, sc->sc_curchan); + } +} + MODULE_VERSION(if_ath, 1); MODULE_DEPEND(if_ath, wlan, 1, 1, 1); /* 802.11 media layer */ Copied: projects/largeSMP/sys/dev/ath/if_athdfs.h (from r222610, head/sys/dev/ath/if_athdfs.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/largeSMP/sys/dev/ath/if_athdfs.h Thu Jun 2 14:09:30 2011 (r222612, copy of r222610, head/sys/dev/ath/if_athdfs.h) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2011 Adrian Chadd, Xenion Pty Ltd + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***