From owner-svn-src-user@FreeBSD.ORG Sun Jan 25 07:22:35 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B387106564A; Sun, 25 Jan 2009 07:22:35 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A37C8FC1B; Sun, 25 Jan 2009 07:22:35 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0P7MZ0e009573; Sun, 25 Jan 2009 07:22:35 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0P7MZVn009572; Sun, 25 Jan 2009 07:22:35 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200901250722.n0P7MZVn009572@svn.freebsd.org> From: Kip Macy Date: Sun, 25 Jan 2009 07:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187676 - user/kmacy/HEAD_fast_net/sys/amd64/conf X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2009 07:22:35 -0000 Author: kmacy Date: Sun Jan 25 07:22:34 2009 New Revision: 187676 URL: http://svn.freebsd.org/changeset/base/187676 Log: disable LOCK_PROFILING limit modules built Modified: user/kmacy/HEAD_fast_net/sys/amd64/conf/PERFTEST Modified: user/kmacy/HEAD_fast_net/sys/amd64/conf/PERFTEST ============================================================================== --- user/kmacy/HEAD_fast_net/sys/amd64/conf/PERFTEST Sun Jan 25 03:26:27 2009 (r187675) +++ user/kmacy/HEAD_fast_net/sys/amd64/conf/PERFTEST Sun Jan 25 07:22:34 2009 (r187676) @@ -25,6 +25,7 @@ ident GENERIC #hints "GENERIC.hints" # Default places to look for devices. makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions MODULES_OVERRIDE="hwpmc cxgb mxge" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption @@ -76,8 +77,11 @@ options ALT_BREAK_TO_DEBUGGER #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -options LOCK_PROFILING +#options LOCK_PROFILING options RADIX_MPATH +device cxgb +device cxgb_t3fw + # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel From owner-svn-src-user@FreeBSD.ORG Sun Jan 25 21:19:45 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6420106566B; Sun, 25 Jan 2009 21:19:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB9318FC17; Sun, 25 Jan 2009 21:19:45 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0PLJjkR027989; Sun, 25 Jan 2009 21:19:45 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0PLJjtG027988; Sun, 25 Jan 2009 21:19:45 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901252119.n0PLJjtG027988@svn.freebsd.org> From: Alan Cox Date: Sun, 25 Jan 2009 21:19:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187698 - user/alc X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2009 21:19:46 -0000 Author: alc Date: Sun Jan 25 21:19:45 2009 New Revision: 187698 URL: http://svn.freebsd.org/changeset/base/187698 Log: Add my sandbox. Added: user/alc/ From owner-svn-src-user@FreeBSD.ORG Sun Jan 25 21:27:32 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3109010656C0; Sun, 25 Jan 2009 21:27:32 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05F168FC14; Sun, 25 Jan 2009 21:27:32 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0PLRVAM028173; Sun, 25 Jan 2009 21:27:31 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0PLRVeF028172; Sun, 25 Jan 2009 21:27:31 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901252127.n0PLRVeF028172@svn.freebsd.org> From: Alan Cox Date: Sun, 25 Jan 2009 21:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187699 - in user/alc/zerocopy: . sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2009 21:27:32 -0000 Author: alc Date: Sun Jan 25 21:27:31 2009 New Revision: 187699 URL: http://svn.freebsd.org/changeset/base/187699 Log: Experimental changes to the zero-copy transmit mechanism. Added: user/alc/zerocopy/ user/alc/zerocopy/sys/ (props changed) - copied from r187698, head/sys/ From owner-svn-src-user@FreeBSD.ORG Mon Jan 26 00:52:10 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95CCC1065672; Mon, 26 Jan 2009 00:52:10 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83E238FC08; Mon, 26 Jan 2009 00:52:10 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0Q0qAUK031908; Mon, 26 Jan 2009 00:52:10 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0Q0qAWN031905; Mon, 26 Jan 2009 00:52:10 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901260052.n0Q0qAWN031905@svn.freebsd.org> From: Alan Cox Date: Mon, 26 Jan 2009 00:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187701 - user/alc/zerocopy/sys/vm X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 00:52:10 -0000 Author: alc Date: Mon Jan 26 00:52:09 2009 New Revision: 187701 URL: http://svn.freebsd.org/changeset/base/187701 Log: Retire the page-based copy-on-write mechanism. Modified: user/alc/zerocopy/sys/vm/vm_fault.c user/alc/zerocopy/sys/vm/vm_page.c user/alc/zerocopy/sys/vm/vm_page.h Modified: user/alc/zerocopy/sys/vm/vm_fault.c ============================================================================== --- user/alc/zerocopy/sys/vm/vm_fault.c Sun Jan 25 23:08:47 2009 (r187700) +++ user/alc/zerocopy/sys/vm/vm_fault.c Mon Jan 26 00:52:09 2009 (r187701) @@ -330,25 +330,6 @@ RetryFault:; */ fs.m = vm_page_lookup(fs.object, fs.pindex); if (fs.m != NULL) { - /* - * check for page-based copy on write. - * We check fs.object == fs.first_object so - * as to ensure the legacy COW mechanism is - * used when the page in question is part of - * a shadow object. Otherwise, vm_page_cowfault() - * removes the page from the backing object, - * which is not what we want. - */ - vm_page_lock_queues(); - if ((fs.m->cow) && - (fault_type & VM_PROT_WRITE) && - (fs.object == fs.first_object)) { - vm_page_cowfault(fs.m); - vm_page_unlock_queues(); - unlock_and_deallocate(&fs); - goto RetryFault; - } - /* * Wait/Retry if the page is busy. We have to do this * if the page is busy via either VPO_BUSY or @@ -366,7 +347,6 @@ RetryFault:; * to pmap it. */ if ((fs.m->oflags & VPO_BUSY) || fs.m->busy) { - vm_page_unlock_queues(); VM_OBJECT_UNLOCK(fs.object); if (fs.object != fs.first_object) { VM_OBJECT_LOCK(fs.first_object); @@ -398,6 +378,7 @@ RetryFault:; vm_object_deallocate(fs.first_object); goto RetryFault; } + vm_page_lock_queues(); vm_pageq_remove(fs.m); vm_page_unlock_queues(); Modified: user/alc/zerocopy/sys/vm/vm_page.c ============================================================================== --- user/alc/zerocopy/sys/vm/vm_page.c Sun Jan 25 23:08:47 2009 (r187700) +++ user/alc/zerocopy/sys/vm/vm_page.c Mon Jan 26 00:52:09 2009 (r187701) @@ -2033,98 +2033,6 @@ vm_page_test_dirty(vm_page_t m) } } -int so_zerocp_fullpage = 0; - -/* - * Replace the given page with a copy. The copied page assumes - * the portion of the given page's "wire_count" that is not the - * responsibility of this copy-on-write mechanism. - * - * The object containing the given page must have a non-zero - * paging-in-progress count and be locked. - */ -void -vm_page_cowfault(vm_page_t m) -{ - vm_page_t mnew; - vm_object_t object; - vm_pindex_t pindex; - - object = m->object; - VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); - KASSERT(object->paging_in_progress != 0, - ("vm_page_cowfault: object %p's paging-in-progress count is zero.", - object)); - pindex = m->pindex; - - retry_alloc: - pmap_remove_all(m); - vm_page_remove(m); - mnew = vm_page_alloc(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY); - if (mnew == NULL) { - vm_page_insert(m, object, pindex); - vm_page_unlock_queues(); - VM_OBJECT_UNLOCK(object); - VM_WAIT; - VM_OBJECT_LOCK(object); - if (m == vm_page_lookup(object, pindex)) { - vm_page_lock_queues(); - goto retry_alloc; - } else { - /* - * Page disappeared during the wait. - */ - vm_page_lock_queues(); - return; - } - } - - if (m->cow == 0) { - /* - * check to see if we raced with an xmit complete when - * waiting to allocate a page. If so, put things back - * the way they were - */ - vm_page_free(mnew); - vm_page_insert(m, object, pindex); - } else { /* clear COW & copy page */ - if (!so_zerocp_fullpage) - pmap_copy_page(m, mnew); - mnew->valid = VM_PAGE_BITS_ALL; - vm_page_dirty(mnew); - mnew->wire_count = m->wire_count - m->cow; - m->wire_count = m->cow; - } -} - -void -vm_page_cowclear(vm_page_t m) -{ - - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - if (m->cow) { - m->cow--; - /* - * let vm_fault add back write permission lazily - */ - } - /* - * sf_buf_free() will free the page, so we needn't do it here - */ -} - -int -vm_page_cowsetup(vm_page_t m) -{ - - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - if (m->cow == USHRT_MAX - 1) - return (EBUSY); - m->cow++; - pmap_remove_write(m); - return (0); -} - #include "opt_ddb.h" #ifdef DDB #include Modified: user/alc/zerocopy/sys/vm/vm_page.h ============================================================================== --- user/alc/zerocopy/sys/vm/vm_page.h Sun Jan 25 23:08:47 2009 (r187700) +++ user/alc/zerocopy/sys/vm/vm_page.h Mon Jan 26 00:52:09 2009 (r187701) @@ -115,7 +115,6 @@ struct vm_page { u_short flags; /* see below */ uint8_t order; /* index of the buddy queue */ uint8_t pool; - u_short cow; /* page cow mapping count */ u_int wire_count; /* wired down maps refs (P) */ short hold_count; /* page hold count */ u_short oflags; /* page flags (O) */ @@ -335,9 +334,6 @@ int vm_page_bits (int, int); void vm_page_zero_invalid(vm_page_t m, boolean_t setvalid); void vm_page_free_toq(vm_page_t m); void vm_page_zero_idle_wakeup(void); -void vm_page_cowfault (vm_page_t); -int vm_page_cowsetup(vm_page_t); -void vm_page_cowclear (vm_page_t); /* * vm_page_sleep_if_busy: From owner-svn-src-user@FreeBSD.ORG Mon Jan 26 03:47:28 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 995F51065676 for ; Mon, 26 Jan 2009 03:47:28 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.237]) by mx1.freebsd.org (Postfix) with ESMTP id 768C98FC20 for ; Mon, 26 Jan 2009 03:47:28 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: by rv-out-0506.google.com with SMTP id b25so5801819rvf.43 for ; Sun, 25 Jan 2009 19:47:28 -0800 (PST) Received: by 10.140.136.5 with SMTP id j5mr1805994rvd.39.1232940400055; Sun, 25 Jan 2009 19:26:40 -0800 (PST) Received: from ?10.0.1.199? (udp005586uds.hawaiiantel.net [72.234.105.237]) by mx.google.com with ESMTPS id b39sm12762371rvf.0.2009.01.25.19.26.37 (version=SSLv3 cipher=RC4-MD5); Sun, 25 Jan 2009 19:26:39 -0800 (PST) Date: Sun, 25 Jan 2009 17:24:04 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Alan Cox In-Reply-To: <200901260052.n0Q0qAWN031905@svn.freebsd.org> Message-ID: <20090125172049.R983@desktop> References: <200901260052.n0Q0qAWN031905@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r187701 - user/alc/zerocopy/sys/vm X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 03:47:28 -0000 On Mon, 26 Jan 2009, Alan Cox wrote: > Author: alc > Date: Mon Jan 26 00:52:09 2009 > New Revision: 187701 > URL: http://svn.freebsd.org/changeset/base/187701 > > Log: > Retire the page-based copy-on-write mechanism. Hey if we're doing this there are some mbuf fields I could axe too. :-) This isn't productive for anyone anyway eh? I've done page-flipping to kernel for nfs and custom protocols but to userland it just doesn't make sense without an api to support it. Thanks, Jeff > > Modified: > user/alc/zerocopy/sys/vm/vm_fault.c > user/alc/zerocopy/sys/vm/vm_page.c > user/alc/zerocopy/sys/vm/vm_page.h > > Modified: user/alc/zerocopy/sys/vm/vm_fault.c > ============================================================================== > --- user/alc/zerocopy/sys/vm/vm_fault.c Sun Jan 25 23:08:47 2009 (r187700) > +++ user/alc/zerocopy/sys/vm/vm_fault.c Mon Jan 26 00:52:09 2009 (r187701) > @@ -330,25 +330,6 @@ RetryFault:; > */ > fs.m = vm_page_lookup(fs.object, fs.pindex); > if (fs.m != NULL) { > - /* > - * check for page-based copy on write. > - * We check fs.object == fs.first_object so > - * as to ensure the legacy COW mechanism is > - * used when the page in question is part of > - * a shadow object. Otherwise, vm_page_cowfault() > - * removes the page from the backing object, > - * which is not what we want. > - */ > - vm_page_lock_queues(); > - if ((fs.m->cow) && > - (fault_type & VM_PROT_WRITE) && > - (fs.object == fs.first_object)) { > - vm_page_cowfault(fs.m); > - vm_page_unlock_queues(); > - unlock_and_deallocate(&fs); > - goto RetryFault; > - } > - > /* > * Wait/Retry if the page is busy. We have to do this > * if the page is busy via either VPO_BUSY or > @@ -366,7 +347,6 @@ RetryFault:; > * to pmap it. > */ > if ((fs.m->oflags & VPO_BUSY) || fs.m->busy) { > - vm_page_unlock_queues(); > VM_OBJECT_UNLOCK(fs.object); > if (fs.object != fs.first_object) { > VM_OBJECT_LOCK(fs.first_object); > @@ -398,6 +378,7 @@ RetryFault:; > vm_object_deallocate(fs.first_object); > goto RetryFault; > } > + vm_page_lock_queues(); > vm_pageq_remove(fs.m); > vm_page_unlock_queues(); > > > Modified: user/alc/zerocopy/sys/vm/vm_page.c > ============================================================================== > --- user/alc/zerocopy/sys/vm/vm_page.c Sun Jan 25 23:08:47 2009 (r187700) > +++ user/alc/zerocopy/sys/vm/vm_page.c Mon Jan 26 00:52:09 2009 (r187701) > @@ -2033,98 +2033,6 @@ vm_page_test_dirty(vm_page_t m) > } > } > > -int so_zerocp_fullpage = 0; > - > -/* > - * Replace the given page with a copy. The copied page assumes > - * the portion of the given page's "wire_count" that is not the > - * responsibility of this copy-on-write mechanism. > - * > - * The object containing the given page must have a non-zero > - * paging-in-progress count and be locked. > - */ > -void > -vm_page_cowfault(vm_page_t m) > -{ > - vm_page_t mnew; > - vm_object_t object; > - vm_pindex_t pindex; > - > - object = m->object; > - VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); > - KASSERT(object->paging_in_progress != 0, > - ("vm_page_cowfault: object %p's paging-in-progress count is zero.", > - object)); > - pindex = m->pindex; > - > - retry_alloc: > - pmap_remove_all(m); > - vm_page_remove(m); > - mnew = vm_page_alloc(object, pindex, VM_ALLOC_NORMAL | VM_ALLOC_NOBUSY); > - if (mnew == NULL) { > - vm_page_insert(m, object, pindex); > - vm_page_unlock_queues(); > - VM_OBJECT_UNLOCK(object); > - VM_WAIT; > - VM_OBJECT_LOCK(object); > - if (m == vm_page_lookup(object, pindex)) { > - vm_page_lock_queues(); > - goto retry_alloc; > - } else { > - /* > - * Page disappeared during the wait. > - */ > - vm_page_lock_queues(); > - return; > - } > - } > - > - if (m->cow == 0) { > - /* > - * check to see if we raced with an xmit complete when > - * waiting to allocate a page. If so, put things back > - * the way they were > - */ > - vm_page_free(mnew); > - vm_page_insert(m, object, pindex); > - } else { /* clear COW & copy page */ > - if (!so_zerocp_fullpage) > - pmap_copy_page(m, mnew); > - mnew->valid = VM_PAGE_BITS_ALL; > - vm_page_dirty(mnew); > - mnew->wire_count = m->wire_count - m->cow; > - m->wire_count = m->cow; > - } > -} > - > -void > -vm_page_cowclear(vm_page_t m) > -{ > - > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > - if (m->cow) { > - m->cow--; > - /* > - * let vm_fault add back write permission lazily > - */ > - } > - /* > - * sf_buf_free() will free the page, so we needn't do it here > - */ > -} > - > -int > -vm_page_cowsetup(vm_page_t m) > -{ > - > - mtx_assert(&vm_page_queue_mtx, MA_OWNED); > - if (m->cow == USHRT_MAX - 1) > - return (EBUSY); > - m->cow++; > - pmap_remove_write(m); > - return (0); > -} > - > #include "opt_ddb.h" > #ifdef DDB > #include > > Modified: user/alc/zerocopy/sys/vm/vm_page.h > ============================================================================== > --- user/alc/zerocopy/sys/vm/vm_page.h Sun Jan 25 23:08:47 2009 (r187700) > +++ user/alc/zerocopy/sys/vm/vm_page.h Mon Jan 26 00:52:09 2009 (r187701) > @@ -115,7 +115,6 @@ struct vm_page { > u_short flags; /* see below */ > uint8_t order; /* index of the buddy queue */ > uint8_t pool; > - u_short cow; /* page cow mapping count */ > u_int wire_count; /* wired down maps refs (P) */ > short hold_count; /* page hold count */ > u_short oflags; /* page flags (O) */ > @@ -335,9 +334,6 @@ int vm_page_bits (int, int); > void vm_page_zero_invalid(vm_page_t m, boolean_t setvalid); > void vm_page_free_toq(vm_page_t m); > void vm_page_zero_idle_wakeup(void); > -void vm_page_cowfault (vm_page_t); > -int vm_page_cowsetup(vm_page_t); > -void vm_page_cowclear (vm_page_t); > > /* > * vm_page_sleep_if_busy: > From owner-svn-src-user@FreeBSD.ORG Mon Jan 26 17:49:48 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA8AF1065757; Mon, 26 Jan 2009 17:49:48 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC3028FC16; Mon, 26 Jan 2009 17:49:48 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QHnmPS057750; Mon, 26 Jan 2009 17:49:48 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QHnmZA057749; Mon, 26 Jan 2009 17:49:48 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901261749.n0QHnmZA057749@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 26 Jan 2009 17:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187729 - user/luigi/ipfw X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 17:49:50 -0000 Author: luigi Date: Mon Jan 26 17:49:48 2009 New Revision: 187729 URL: http://svn.freebsd.org/changeset/base/187729 Log: workspace for splitting ipfw2.c in smaller components. Added: user/luigi/ipfw/ (props changed) - copied from r187728, head/ From owner-svn-src-user@FreeBSD.ORG Mon Jan 26 17:50:14 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57CB81065815 for ; Mon, 26 Jan 2009 17:50:14 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (mail.cs.rice.edu [128.42.1.31]) by mx1.freebsd.org (Postfix) with ESMTP id 0E0948FC08 for ; Mon, 26 Jan 2009 17:50:12 +0000 (UTC) (envelope-from alc@cs.rice.edu) Received: from mail.cs.rice.edu (localhost.localdomain [127.0.0.1]) by mail.cs.rice.edu (Postfix) with ESMTP id 5BDAA2C2A81; Mon, 26 Jan 2009 11:29:05 -0600 (CST) X-Virus-Scanned: by amavis-2.4.0 at mail.cs.rice.edu Received: from mail.cs.rice.edu ([127.0.0.1]) by mail.cs.rice.edu (mail.cs.rice.edu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qWBXNDsTDWG9; Mon, 26 Jan 2009 11:28:57 -0600 (CST) Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.rice.edu (Postfix) with ESMTP id 521452C2A8E; Mon, 26 Jan 2009 11:28:57 -0600 (CST) Message-ID: <497DF2D8.6040004@cs.rice.edu> Date: Mon, 26 Jan 2009 11:28:56 -0600 From: Alan Cox User-Agent: Thunderbird 2.0.0.19 (X11/20090124) MIME-Version: 1.0 To: Jeff Roberson References: <200901260052.n0Q0qAWN031905@svn.freebsd.org> <20090125172049.R983@desktop> In-Reply-To: <20090125172049.R983@desktop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alan Cox , src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r187701 - user/alc/zerocopy/sys/vm X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 17:50:18 -0000 Jeff Roberson wrote: > On Mon, 26 Jan 2009, Alan Cox wrote: > >> Author: alc >> Date: Mon Jan 26 00:52:09 2009 >> New Revision: 187701 >> URL: http://svn.freebsd.org/changeset/base/187701 >> >> Log: >> Retire the page-based copy-on-write mechanism. > Hey if we're doing this there are some mbuf fields I could axe too. :-) > > This isn't productive for anyone anyway eh? I've done page-flipping > to kernel for nfs and custom protocols but to userland it just doesn't > make sense without an api to support it. It's great for netperf. :-) More seriously, it works well for repeated transmission of the same immutable buffer. Otherwise, the overheads overwhelm the savings. For example, after transmission is complete, it requires a page fault on each page of the buffer to re-enable write access to the buffer. Need I say more ... That said, the real motivation for this work is that the page-based copy-on-write mechanism is still buggy. Specifically, it doesn't play nice with the buffer cache. I just don't see the point in investing any further effort in fixing it. Alan From owner-svn-src-user@FreeBSD.ORG Mon Jan 26 17:56:27 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFAA9106567F; Mon, 26 Jan 2009 17:56:27 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B1BF8FC17; Mon, 26 Jan 2009 17:56:27 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QHuRJI058037; Mon, 26 Jan 2009 17:56:27 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QHuR8R058034; Mon, 26 Jan 2009 17:56:27 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901261756.n0QHuR8R058034@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 26 Jan 2009 17:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187733 - user/luigi/ipfw/sbin/ipfw X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 17:56:29 -0000 Author: luigi Date: Mon Jan 26 17:56:27 2009 New Revision: 187733 URL: http://svn.freebsd.org/changeset/base/187733 Log: snapshot Added: user/luigi/ipfw/sbin/ipfw/compile.c user/luigi/ipfw/sbin/ipfw/ipfw2.h Modified: user/luigi/ipfw/sbin/ipfw/Makefile user/luigi/ipfw/sbin/ipfw/ipfw2.c Modified: user/luigi/ipfw/sbin/ipfw/Makefile ============================================================================== --- user/luigi/ipfw/sbin/ipfw/Makefile Mon Jan 26 17:55:07 2009 (r187732) +++ user/luigi/ipfw/sbin/ipfw/Makefile Mon Jan 26 17:56:27 2009 (r187733) @@ -1,8 +1,8 @@ # $FreeBSD$ PROG= ipfw -SRCS= ipfw2.c -WARNS?= 0 +SRCS= ipfw2.c compile.c +WARNS?= 2 MAN= ipfw.8 .include Added: user/luigi/ipfw/sbin/ipfw/compile.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/luigi/ipfw/sbin/ipfw/compile.c Mon Jan 26 17:56:27 2009 (r187733) @@ -0,0 +1,5577 @@ +/* + * Copyright (c) 2002-2003 Luigi Rizzo + * Copyright (c) 1996 Alex Nash, Paul Traina, Poul-Henning Kamp + * Copyright (c) 1994 Ugen J.S.Antsilevich + * + * Idea and grammar partially left from: + * Copyright (c) 1993 Daniel Boulet + * + * Redistribution and use in source forms, with and without modification, + * are permitted provided that this entire comment appears intact. + * + * Redistribution in binary form may occur without any restrictions. + * Obviously, it would be nice if you gave credit where credit is due + * but requiring it would be too onerous. + * + * This software is provided ``AS IS'' without any warranties of any kind. + * + * NEW command line interface for IP firewall facility + * + * $FreeBSD: head/sbin/ipfw/ipfw2.c 187716 2009-01-26 14:26:35Z luigi $ + */ + +#include "ipfw2.h" + +#if 0 +int + do_value_as_ip, /* show table value as IP */ + do_resolv, /* Would try to resolve all */ + do_time, /* Show time stamps */ + do_quiet, /* Be quiet in add and flush */ + do_pipe, /* this cmd refers to a pipe */ + do_nat, /* Nat configuration. */ + do_sort, /* field to sort results (0 = no) */ + do_dynamic, /* display dynamic rules */ + do_expired, /* display expired dynamic rules */ + do_compact, /* show rules in compact mode */ + do_force, /* do not ask for confirmation */ + use_set, /* work with specified set number */ + show_sets, /* display rule sets */ + test_only, /* only check syntax */ + comment_only, /* only print action and comment */ + verbose; + +static struct _s_x f_tcpflags[] = { + { "syn", TH_SYN }, + { "fin", TH_FIN }, + { "ack", TH_ACK }, + { "psh", TH_PUSH }, + { "rst", TH_RST }, + { "urg", TH_URG }, + { "tcp flag", 0 }, + { NULL, 0 } +}; + +static struct _s_x f_tcpopts[] = { + { "mss", IP_FW_TCPOPT_MSS }, + { "maxseg", IP_FW_TCPOPT_MSS }, + { "window", IP_FW_TCPOPT_WINDOW }, + { "sack", IP_FW_TCPOPT_SACK }, + { "ts", IP_FW_TCPOPT_TS }, + { "timestamp", IP_FW_TCPOPT_TS }, + { "cc", IP_FW_TCPOPT_CC }, + { "tcp option", 0 }, + { NULL, 0 } +}; + +/* + * IP options span the range 0 to 255 so we need to remap them + * (though in fact only the low 5 bits are significant). + */ +static struct _s_x f_ipopts[] = { + { "ssrr", IP_FW_IPOPT_SSRR}, + { "lsrr", IP_FW_IPOPT_LSRR}, + { "rr", IP_FW_IPOPT_RR}, + { "ts", IP_FW_IPOPT_TS}, + { "ip option", 0 }, + { NULL, 0 } +}; + +static struct _s_x f_iptos[] = { + { "lowdelay", IPTOS_LOWDELAY}, + { "throughput", IPTOS_THROUGHPUT}, + { "reliability", IPTOS_RELIABILITY}, + { "mincost", IPTOS_MINCOST}, + { "congestion", IPTOS_ECN_CE}, + { "ecntransport", IPTOS_ECN_ECT0}, + { "ip tos option", 0}, + { NULL, 0 } +}; + +static struct _s_x limit_masks[] = { + {"all", DYN_SRC_ADDR|DYN_SRC_PORT|DYN_DST_ADDR|DYN_DST_PORT}, + {"src-addr", DYN_SRC_ADDR}, + {"src-port", DYN_SRC_PORT}, + {"dst-addr", DYN_DST_ADDR}, + {"dst-port", DYN_DST_PORT}, + {NULL, 0} +}; + +/* + * we use IPPROTO_ETHERTYPE as a fake protocol id to call the print routines + * This is only used in this code. + */ +static struct _s_x ether_types[] = { + /* + * Note, we cannot use "-:&/" in the names because they are field + * separators in the type specifications. Also, we use s = NULL as + * end-delimiter, because a type of 0 can be legal. + */ + { "ip", 0x0800 }, + { "ipv4", 0x0800 }, + { "ipv6", 0x86dd }, + { "arp", 0x0806 }, + { "rarp", 0x8035 }, + { "vlan", 0x8100 }, + { "loop", 0x9000 }, + { "trail", 0x1000 }, + { "at", 0x809b }, + { "atalk", 0x809b }, + { "aarp", 0x80f3 }, + { "pppoe_disc", 0x8863 }, + { "pppoe_sess", 0x8864 }, + { "ipx_8022", 0x00E0 }, + { "ipx_8023", 0x0000 }, + { "ipx_ii", 0x8137 }, + { "ipx_snap", 0x8137 }, + { "ipx", 0x8137 }, + { "ns", 0x0600 }, + { NULL, 0 } +}; + +static void show_usage(void); + +struct _s_x dummynet_params[] = { + { "plr", TOK_PLR }, + { "noerror", TOK_NOERROR }, + { "buckets", TOK_BUCKETS }, + { "dst-ip", TOK_DSTIP }, + { "src-ip", TOK_SRCIP }, + { "dst-port", TOK_DSTPORT }, + { "src-port", TOK_SRCPORT }, + { "proto", TOK_PROTO }, + { "weight", TOK_WEIGHT }, + { "all", TOK_ALL }, + { "mask", TOK_MASK }, + { "droptail", TOK_DROPTAIL }, + { "red", TOK_RED }, + { "gred", TOK_GRED }, + { "bw", TOK_BW }, + { "bandwidth", TOK_BW }, + { "delay", TOK_DELAY }, + { "pipe", TOK_PIPE }, + { "queue", TOK_QUEUE }, + { "flow-id", TOK_FLOWID}, + { "dst-ipv6", TOK_DSTIP6}, + { "dst-ip6", TOK_DSTIP6}, + { "src-ipv6", TOK_SRCIP6}, + { "src-ip6", TOK_SRCIP6}, + { "dummynet-params", TOK_NULL }, + { NULL, 0 } /* terminator */ +}; + +struct _s_x nat_params[] = { + { "ip", TOK_IP }, + { "if", TOK_IF }, + { "log", TOK_ALOG }, + { "deny_in", TOK_DENY_INC }, + { "same_ports", TOK_SAME_PORTS }, + { "unreg_only", TOK_UNREG_ONLY }, + { "reset", TOK_RESET_ADDR }, + { "reverse", TOK_ALIAS_REV }, + { "proxy_only", TOK_PROXY_ONLY }, + { "redirect_addr", TOK_REDIR_ADDR }, + { "redirect_port", TOK_REDIR_PORT }, + { "redirect_proto", TOK_REDIR_PROTO }, + { NULL, 0 } /* terminator */ +}; +#endif + +static struct _s_x rule_actions[] = { + { "accept", TOK_ACCEPT }, + { "pass", TOK_ACCEPT }, + { "allow", TOK_ACCEPT }, + { "permit", TOK_ACCEPT }, + { "count", TOK_COUNT }, + { "pipe", TOK_PIPE }, + { "queue", TOK_QUEUE }, + { "divert", TOK_DIVERT }, + { "tee", TOK_TEE }, + { "netgraph", TOK_NETGRAPH }, + { "ngtee", TOK_NGTEE }, + { "fwd", TOK_FORWARD }, + { "forward", TOK_FORWARD }, + { "skipto", TOK_SKIPTO }, + { "deny", TOK_DENY }, + { "drop", TOK_DENY }, + { "reject", TOK_REJECT }, + { "reset6", TOK_RESET6 }, + { "reset", TOK_RESET }, + { "unreach6", TOK_UNREACH6 }, + { "unreach", TOK_UNREACH }, + { "check-state", TOK_CHECKSTATE }, + { "//", TOK_COMMENT }, + { "nat", TOK_NAT }, + { "setfib", TOK_SETFIB }, + { NULL, 0 } /* terminator */ +}; + +#if 0 +struct _s_x rule_action_params[] = { + { "altq", TOK_ALTQ }, + { "log", TOK_LOG }, + { "tag", TOK_TAG }, + { "untag", TOK_UNTAG }, + { NULL, 0 } /* terminator */ +}; + +struct _s_x rule_options[] = { + { "tagged", TOK_TAGGED }, + { "uid", TOK_UID }, + { "gid", TOK_GID }, + { "jail", TOK_JAIL }, + { "in", TOK_IN }, + { "limit", TOK_LIMIT }, + { "keep-state", TOK_KEEPSTATE }, + { "bridged", TOK_LAYER2 }, + { "layer2", TOK_LAYER2 }, + { "out", TOK_OUT }, + { "diverted", TOK_DIVERTED }, + { "diverted-loopback", TOK_DIVERTEDLOOPBACK }, + { "diverted-output", TOK_DIVERTEDOUTPUT }, + { "xmit", TOK_XMIT }, + { "recv", TOK_RECV }, + { "via", TOK_VIA }, + { "fragment", TOK_FRAG }, + { "frag", TOK_FRAG }, + { "fib", TOK_FIB }, + { "ipoptions", TOK_IPOPTS }, + { "ipopts", TOK_IPOPTS }, + { "iplen", TOK_IPLEN }, + { "ipid", TOK_IPID }, + { "ipprecedence", TOK_IPPRECEDENCE }, + { "iptos", TOK_IPTOS }, + { "ipttl", TOK_IPTTL }, + { "ipversion", TOK_IPVER }, + { "ipver", TOK_IPVER }, + { "estab", TOK_ESTAB }, + { "established", TOK_ESTAB }, + { "setup", TOK_SETUP }, + { "tcpdatalen", TOK_TCPDATALEN }, + { "tcpflags", TOK_TCPFLAGS }, + { "tcpflgs", TOK_TCPFLAGS }, + { "tcpoptions", TOK_TCPOPTS }, + { "tcpopts", TOK_TCPOPTS }, + { "tcpseq", TOK_TCPSEQ }, + { "tcpack", TOK_TCPACK }, + { "tcpwin", TOK_TCPWIN }, + { "icmptype", TOK_ICMPTYPES }, + { "icmptypes", TOK_ICMPTYPES }, + { "dst-ip", TOK_DSTIP }, + { "src-ip", TOK_SRCIP }, + { "dst-port", TOK_DSTPORT }, + { "src-port", TOK_SRCPORT }, + { "proto", TOK_PROTO }, + { "MAC", TOK_MAC }, + { "mac", TOK_MAC }, + { "mac-type", TOK_MACTYPE }, + { "verrevpath", TOK_VERREVPATH }, + { "versrcreach", TOK_VERSRCREACH }, + { "antispoof", TOK_ANTISPOOF }, + { "ipsec", TOK_IPSEC }, + { "icmp6type", TOK_ICMP6TYPES }, + { "icmp6types", TOK_ICMP6TYPES }, + { "ext6hdr", TOK_EXT6HDR}, + { "flow-id", TOK_FLOWID}, + { "ipv6", TOK_IPV6}, + { "ip6", TOK_IPV6}, + { "ipv4", TOK_IPV4}, + { "ip4", TOK_IPV4}, + { "dst-ipv6", TOK_DSTIP6}, + { "dst-ip6", TOK_DSTIP6}, + { "src-ipv6", TOK_SRCIP6}, + { "src-ip6", TOK_SRCIP6}, + { "//", TOK_COMMENT }, + + { "not", TOK_NOT }, /* pseudo option */ + { "!", /* escape ? */ TOK_NOT }, /* pseudo option */ + { "or", TOK_OR }, /* pseudo option */ + { "|", /* escape */ TOK_OR }, /* pseudo option */ + { "{", TOK_STARTBRACE }, /* pseudo option */ + { "(", TOK_STARTBRACE }, /* pseudo option */ + { "}", TOK_ENDBRACE }, /* pseudo option */ + { ")", TOK_ENDBRACE }, /* pseudo option */ + { NULL, 0 } /* terminator */ +}; + +#define TABLEARG "tablearg" + +static void * +safe_calloc(size_t number, size_t size) +{ + void *ret = calloc(number, size); + + if (ret == NULL) + err(EX_OSERR, "calloc"); + return ret; +} + +static void * +safe_realloc(void *ptr, size_t size) +{ + void *ret = realloc(ptr, size); + + if (ret == NULL) + err(EX_OSERR, "realloc"); + return ret; +} + +/* + * conditionally runs the command. + */ +static int +do_cmd(int optname, void *optval, uintptr_t optlen) +{ + static int s = -1; /* the socket */ + int i; + + if (test_only) + return 0; + + if (s == -1) + s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); + if (s < 0) + err(EX_UNAVAILABLE, "socket"); + + if (optname == IP_FW_GET || optname == IP_DUMMYNET_GET || + optname == IP_FW_ADD || optname == IP_FW_TABLE_LIST || + optname == IP_FW_TABLE_GETSIZE || + optname == IP_FW_NAT_GET_CONFIG || + optname == IP_FW_NAT_GET_LOG) + i = getsockopt(s, IPPROTO_IP, optname, optval, + (socklen_t *)optlen); + else + i = setsockopt(s, IPPROTO_IP, optname, optval, optlen); + return i; +} + +/** + * match_token takes a table and a string, returns the value associated + * with the string (-1 in case of failure). + */ +static int +match_token(struct _s_x *table, char *string) +{ + struct _s_x *pt; + uint i = strlen(string); + + for (pt = table ; i && pt->s != NULL ; pt++) + if (strlen(pt->s) == i && !bcmp(string, pt->s, i)) + return pt->x; + return -1; +} + +/** + * match_value takes a table and a value, returns the string associated + * with the value (NULL in case of failure). + */ +static char const * +match_value(struct _s_x *p, int value) +{ + for (; p->s != NULL; p++) + if (p->x == value) + return p->s; + return NULL; +} + +/* + * _substrcmp takes two strings and returns 1 if they do not match, + * and 0 if they match exactly or the first string is a sub-string + * of the second. A warning is printed to stderr in the case that the + * first string is a sub-string of the second. + * + * This function will be removed in the future through the usual + * deprecation process. + */ +static int +_substrcmp(const char *str1, const char* str2) +{ + + if (strncmp(str1, str2, strlen(str1)) != 0) + return 1; + + if (strlen(str1) != strlen(str2)) + warnx("DEPRECATED: '%s' matched '%s' as a sub-string", + str1, str2); + return 0; +} + +/* + * _substrcmp2 takes three strings and returns 1 if the first two do not match, + * and 0 if they match exactly or the second string is a sub-string + * of the first. A warning is printed to stderr in the case that the + * first string does not match the third. + * + * This function exists to warn about the bizzare construction + * strncmp(str, "by", 2) which is used to allow people to use a shotcut + * for "bytes". The problem is that in addition to accepting "by", + * "byt", "byte", and "bytes", it also excepts "by_rabid_dogs" and any + * other string beginning with "by". + * + * This function will be removed in the future through the usual + * deprecation process. + */ +static int +_substrcmp2(const char *str1, const char* str2, const char* str3) +{ + + if (strncmp(str1, str2, strlen(str2)) != 0) + return 1; + + if (strcmp(str1, str3) != 0) + warnx("DEPRECATED: '%s' matched '%s'", + str1, str3); + return 0; +} + +/* + * prints one port, symbolic or numeric + */ +static void +print_port(int proto, uint16_t port) +{ + + if (proto == IPPROTO_ETHERTYPE) { + char const *s; + + if (do_resolv && (s = match_value(ether_types, port)) ) + printf("%s", s); + else + printf("0x%04x", port); + } else { + struct servent *se = NULL; + if (do_resolv) { + struct protoent *pe = getprotobynumber(proto); + + se = getservbyport(htons(port), pe ? pe->p_name : NULL); + } + if (se) + printf("%s", se->s_name); + else + printf("%d", port); + } +} + +struct _s_x _port_name[] = { + {"dst-port", O_IP_DSTPORT}, + {"src-port", O_IP_SRCPORT}, + {"ipid", O_IPID}, + {"iplen", O_IPLEN}, + {"ipttl", O_IPTTL}, + {"mac-type", O_MAC_TYPE}, + {"tcpdatalen", O_TCPDATALEN}, + {"tagged", O_TAGGED}, + {NULL, 0} +}; + +/* + * Print the values in a list 16-bit items of the types above. + * XXX todo: add support for mask. + */ +static void +print_newports(ipfw_insn_u16 *cmd, int proto, int opcode) +{ + uint16_t *p = cmd->ports; + int i; + char const *sep; + + if (opcode != 0) { + sep = match_value(_port_name, opcode); + if (sep == NULL) + sep = "???"; + printf (" %s", sep); + } + sep = " "; + for (i = F_LEN((ipfw_insn *)cmd) - 1; i > 0; i--, p += 2) { + printf(sep); + print_port(proto, p[0]); + if (p[0] != p[1]) { + printf("-"); + print_port(proto, p[1]); + } + sep = ","; + } +} +#endif + +/* + * Like strtol, but also translates service names into port numbers + * for some protocols. + * In particular: + * proto == -1 disables the protocol check; + * proto == IPPROTO_ETHERTYPE looks up an internal table + * proto == matches the values there. + * Returns *end == s in case the parameter is not found. + */ +static int +strtoport(char *s, char **end, int base, int proto) +{ + char *p, *buf; + char *s1; + int i; + + *end = s; /* default - not found */ + if (*s == '\0') + return 0; /* not found */ + + if (isdigit(*s)) + return strtol(s, end, base); + + /* + * find separator. '\\' escapes the next char. + */ + for (s1 = s; *s1 && (isalnum(*s1) || *s1 == '\\') ; s1++) + if (*s1 == '\\' && s1[1] != '\0') + s1++; + + buf = safe_calloc(s1 - s + 1, 1); + + /* + * copy into a buffer skipping backslashes + */ + for (p = s, i = 0; p != s1 ; p++) + if (*p != '\\') + buf[i++] = *p; + buf[i++] = '\0'; + + if (proto == IPPROTO_ETHERTYPE) { + i = match_token(ether_types, buf); + free(buf); + if (i != -1) { /* found */ + *end = s1; + return i; + } + } else { + struct protoent *pe = NULL; + struct servent *se; + + if (proto != 0) + pe = getprotobynumber(proto); + setservent(1); + se = getservbyname(buf, pe ? pe->p_name : NULL); + free(buf); + if (se != NULL) { + *end = s1; + return ntohs(se->s_port); + } + } + return 0; /* not found */ +} + +/* + * Map between current altq queue id numbers and names. + */ +static int altq_fetched = 0; +static TAILQ_HEAD(, pf_altq) altq_entries = + TAILQ_HEAD_INITIALIZER(altq_entries); + +#if 0 +static void +altq_set_enabled(int enabled) +{ + int pffd; + + pffd = open("/dev/pf", O_RDWR); + if (pffd == -1) + err(EX_UNAVAILABLE, + "altq support opening pf(4) control device"); + if (enabled) { + if (ioctl(pffd, DIOCSTARTALTQ) != 0 && errno != EEXIST) + err(EX_UNAVAILABLE, "enabling altq"); + } else { + if (ioctl(pffd, DIOCSTOPALTQ) != 0 && errno != ENOENT) + err(EX_UNAVAILABLE, "disabling altq"); + } + close(pffd); +} +#endif + +static void +altq_fetch(void) +{ + struct pfioc_altq pfioc; + struct pf_altq *altq; + int pffd; + unsigned int mnr; + + if (altq_fetched) + return; + altq_fetched = 1; + pffd = open("/dev/pf", O_RDONLY); + if (pffd == -1) { + warn("altq support opening pf(4) control device"); + return; + } + bzero(&pfioc, sizeof(pfioc)); + if (ioctl(pffd, DIOCGETALTQS, &pfioc) != 0) { + warn("altq support getting queue list"); + close(pffd); + return; + } + mnr = pfioc.nr; + for (pfioc.nr = 0; pfioc.nr < mnr; pfioc.nr++) { + if (ioctl(pffd, DIOCGETALTQ, &pfioc) != 0) { + if (errno == EBUSY) + break; + warn("altq support getting queue list"); + close(pffd); + return; + } + if (pfioc.altq.qid == 0) + continue; + altq = safe_calloc(1, sizeof(*altq)); + *altq = pfioc.altq; + TAILQ_INSERT_TAIL(&altq_entries, altq, entries); + } + close(pffd); +} + +static u_int32_t +altq_name_to_qid(const char *name) +{ + struct pf_altq *altq; + + altq_fetch(); + TAILQ_FOREACH(altq, &altq_entries, entries) + if (strcmp(name, altq->qname) == 0) + break; + if (altq == NULL) + errx(EX_DATAERR, "altq has no queue named `%s'", name); + return altq->qid; +} + +#if 0 +static const char * +altq_qid_to_name(u_int32_t qid) +{ + struct pf_altq *altq; + + altq_fetch(); + TAILQ_FOREACH(altq, &altq_entries, entries) + if (qid == altq->qid) + break; + if (altq == NULL) + return NULL; + return altq->qname; +} +#endif + + +static void +fill_altq_qid(u_int32_t *qid, const char *av) +{ + *qid = altq_name_to_qid(av); +} + +/* + * Fill the body of the command with the list of port ranges. + */ +static int +fill_newports(ipfw_insn_u16 *cmd, char *av, int proto) +{ + uint16_t a, b, *p = cmd->ports; + int i = 0; + char *s = av; + + while (*s) { + a = strtoport(av, &s, 0, proto); + if (s == av) /* empty or invalid argument */ + return (0); + + switch (*s) { + case '-': /* a range */ + av = s + 1; + b = strtoport(av, &s, 0, proto); + /* Reject expressions like '1-abc' or '1-2-3'. */ + if (s == av || (*s != ',' && *s != '\0')) + return (0); + p[0] = a; + p[1] = b; + break; + case ',': /* comma separated list */ + case '\0': + p[0] = p[1] = a; + break; + default: + warnx("port list: invalid separator <%c> in <%s>", + *s, av); + return (0); + } + + i++; + p += 2; + av = s + 1; + } + if (i > 0) { + if (i + 1 > F_LEN_MASK) + errx(EX_DATAERR, "too many ports/ranges\n"); + cmd->o.len |= i + 1; /* leave F_NOT and F_OR untouched */ + } + return (i); +} + +#if 0 +static struct _s_x icmpcodes[] = { + { "net", ICMP_UNREACH_NET }, + { "host", ICMP_UNREACH_HOST }, + { "protocol", ICMP_UNREACH_PROTOCOL }, + { "port", ICMP_UNREACH_PORT }, + { "needfrag", ICMP_UNREACH_NEEDFRAG }, + { "srcfail", ICMP_UNREACH_SRCFAIL }, + { "net-unknown", ICMP_UNREACH_NET_UNKNOWN }, + { "host-unknown", ICMP_UNREACH_HOST_UNKNOWN }, + { "isolated", ICMP_UNREACH_ISOLATED }, + { "net-prohib", ICMP_UNREACH_NET_PROHIB }, + { "host-prohib", ICMP_UNREACH_HOST_PROHIB }, + { "tosnet", ICMP_UNREACH_TOSNET }, + { "toshost", ICMP_UNREACH_TOSHOST }, + { "filter-prohib", ICMP_UNREACH_FILTER_PROHIB }, + { "host-precedence", ICMP_UNREACH_HOST_PRECEDENCE }, + { "precedence-cutoff", ICMP_UNREACH_PRECEDENCE_CUTOFF }, + { NULL, 0 } +}; +#endif + +static void +fill_reject_code(u_short *codep, char *str) +{ + int val; + char *s; + + val = strtoul(str, &s, 0); + if (s == str || *s != '\0' || val >= 0x100) + val = match_token(icmpcodes, str); + if (val < 0) + errx(EX_DATAERR, "unknown ICMP unreachable code ``%s''", str); + *codep = val; + return; +} + +#if 0 +static void +print_reject_code(uint16_t code) +{ + char const *s = match_value(icmpcodes, code); + + if (s != NULL) + printf("unreach %s", s); + else + printf("unreach %u", code); +} + +static struct _s_x icmp6codes[] = { + { "no-route", ICMP6_DST_UNREACH_NOROUTE }, + { "admin-prohib", ICMP6_DST_UNREACH_ADMIN }, + { "address", ICMP6_DST_UNREACH_ADDR }, + { "port", ICMP6_DST_UNREACH_NOPORT }, + { NULL, 0 } +}; +#endif + +static void +fill_unreach6_code(u_short *codep, char *str) +{ + int val; + char *s; + + val = strtoul(str, &s, 0); + if (s == str || *s != '\0' || val >= 0x100) + val = match_token(icmp6codes, str); + if (val < 0) + errx(EX_DATAERR, "unknown ICMPv6 unreachable code ``%s''", str); + *codep = val; + return; +} + +#if 0 +static void +print_unreach6_code(uint16_t code) +{ + char const *s = match_value(icmp6codes, code); + + if (s != NULL) + printf("unreach6 %s", s); + else + printf("unreach6 %u", code); +} +#endif + +/* + * Returns the number of bits set (from left) in a contiguous bitmask, + * or -1 if the mask is not contiguous. + * XXX this needs a proper fix. + * This effectively works on masks in big-endian (network) format. + * when compiled on little endian architectures. + * + * First bit is bit 7 of the first byte -- note, for MAC addresses, + * the first bit on the wire is bit 0 of the first byte. + * len is the max length in bits. + */ +static int +contigmask(uint8_t *p, int len) +{ + int i, n; + + for (i=0; iarg1 & 0xff; + uint8_t clear = (cmd->arg1 >> 8) & 0xff; + + if (list == f_tcpflags && set == TH_SYN && clear == TH_ACK) { + printf(" setup"); + return; + } + + printf(" %s ", name); + for (i=0; list[i].x != 0; i++) { + if (set & list[i].x) { + set &= ~list[i].x; + printf("%s%s", comma, list[i].s); + comma = ","; + } + if (clear & list[i].x) { + clear &= ~list[i].x; + printf("%s!%s", comma, list[i].s); + comma = ","; + } + } +} + +/* + * Print the ip address contained in a command. + */ +static void +print_ip(ipfw_insn_ip *cmd, char const *s) +{ + struct hostent *he = NULL; + int len = F_LEN((ipfw_insn *)cmd); + uint32_t *a = ((ipfw_insn_u32 *)cmd)->d; + + printf("%s%s ", cmd->o.len & F_NOT ? " not": "", s); + + if (cmd->o.opcode == O_IP_SRC_ME || cmd->o.opcode == O_IP_DST_ME) { + printf("me"); + return; + } + if (cmd->o.opcode == O_IP_SRC_LOOKUP || + cmd->o.opcode == O_IP_DST_LOOKUP) { + printf("table(%u", ((ipfw_insn *)cmd)->arg1); + if (len == F_INSN_SIZE(ipfw_insn_u32)) + printf(",%u", *a); + printf(")"); + return; + } + if (cmd->o.opcode == O_IP_SRC_SET || cmd->o.opcode == O_IP_DST_SET) { + uint32_t x, *map = (uint32_t *)&(cmd->mask); + int i, j; + char comma = '{'; + + x = cmd->o.arg1 - 1; + x = htonl( ~x ); + cmd->addr.s_addr = htonl(cmd->addr.s_addr); + printf("%s/%d", inet_ntoa(cmd->addr), + contigmask((uint8_t *)&x, 32)); + x = cmd->addr.s_addr = htonl(cmd->addr.s_addr); + x &= 0xff; /* base */ + /* + * Print bits and ranges. + * Locate first bit set (i), then locate first bit unset (j). + * If we have 3+ consecutive bits set, then print them as a + * range, otherwise only print the initial bit and rescan. + */ + for (i=0; i < cmd->o.arg1; i++) + if (map[i/32] & (1<<(i & 31))) { + for (j=i+1; j < cmd->o.arg1; j++) + if (!(map[ j/32] & (1<<(j & 31)))) + break; + printf("%c%d", comma, i+x); + if (j>i+2) { /* range has at least 3 elements */ + printf("-%d", j-1+x); + i = j-1; + } + comma = ','; + } + printf("}"); + return; + } + /* + * len == 2 indicates a single IP, whereas lists of 1 or more + * addr/mask pairs have len = (2n+1). We convert len to n so we + * use that to count the number of entries. + */ + for (len = len / 2; len > 0; len--, a += 2) { + int mb = /* mask length */ + (cmd->o.opcode == O_IP_SRC || cmd->o.opcode == O_IP_DST) ? + 32 : contigmask((uint8_t *)&(a[1]), 32); + if (mb == 32 && do_resolv) + he = gethostbyaddr((char *)&(a[0]), sizeof(u_long), AF_INET); + if (he != NULL) /* resolved to name */ + printf("%s", he->h_name); + else if (mb == 0) /* any */ + printf("any"); + else { /* numeric IP followed by some kind of mask */ + printf("%s", inet_ntoa( *((struct in_addr *)&a[0]) ) ); + if (mb < 0) + printf(":%s", inet_ntoa( *((struct in_addr *)&a[1]) ) ); + else if (mb < 32) + printf("/%d", mb); + } + if (len > 1) + printf(","); + } +} + +/* + * prints a MAC address/mask pair + */ +static void +print_mac(uint8_t *addr, uint8_t *mask) +{ + int l = contigmask(mask, 48); + + if (l == 0) + printf(" any"); + else { + printf(" %02x:%02x:%02x:%02x:%02x:%02x", + addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); + if (l == -1) + printf("&%02x:%02x:%02x:%02x:%02x:%02x", + mask[0], mask[1], mask[2], + mask[3], mask[4], mask[5]); + else if (l < 48) + printf("/%d", l); + } +} +#endif + +static void +fill_icmptypes(ipfw_insn_u32 *cmd, char *av) +{ + uint8_t type; + + cmd->d[0] = 0; + while (*av) { + if (*av == ',') + av++; + + type = strtoul(av, &av, 0); + + if (*av != ',' && *av != '\0') + errx(EX_DATAERR, "invalid ICMP type"); + + if (type > 31) + errx(EX_DATAERR, "ICMP type out of range"); + + cmd->d[0] |= 1 << type; + } + cmd->o.opcode = O_ICMPTYPE; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Jan 26 18:37:23 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E34310656BC; Mon, 26 Jan 2009 18:37:23 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF21D8FC1C; Mon, 26 Jan 2009 18:37:22 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QIbMOV059087; Mon, 26 Jan 2009 18:37:22 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QIbMFl059082; Mon, 26 Jan 2009 18:37:22 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901261837.n0QIbMFl059082@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 26 Jan 2009 18:37:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187735 - user/luigi/ipfw/sbin/ipfw X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 18:37:23 -0000 Author: luigi Date: Mon Jan 26 18:37:22 2009 New Revision: 187735 URL: http://svn.freebsd.org/changeset/base/187735 Log: snapshot -- does not print yet Added: user/luigi/ipfw/sbin/ipfw/dummynet.c user/luigi/ipfw/sbin/ipfw/ipv6.c user/luigi/ipfw/sbin/ipfw/nat.c user/luigi/ipfw/sbin/ipfw/print.c Modified: user/luigi/ipfw/sbin/ipfw/Makefile user/luigi/ipfw/sbin/ipfw/compile.c user/luigi/ipfw/sbin/ipfw/ipfw2.c user/luigi/ipfw/sbin/ipfw/ipfw2.h Modified: user/luigi/ipfw/sbin/ipfw/Makefile ============================================================================== --- user/luigi/ipfw/sbin/ipfw/Makefile Mon Jan 26 18:14:21 2009 (r187734) +++ user/luigi/ipfw/sbin/ipfw/Makefile Mon Jan 26 18:37:22 2009 (r187735) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= ipfw -SRCS= ipfw2.c compile.c +SRCS= ipfw2.c compile.c ipv6.c dummynet.c nat.c print.c WARNS?= 2 MAN= ipfw.8 Modified: user/luigi/ipfw/sbin/ipfw/compile.c ============================================================================== --- user/luigi/ipfw/sbin/ipfw/compile.c Mon Jan 26 18:14:21 2009 (r187734) +++ user/luigi/ipfw/sbin/ipfw/compile.c Mon Jan 26 18:37:22 2009 (r187735) @@ -18,6 +18,8 @@ * NEW command line interface for IP firewall facility * * $FreeBSD: head/sbin/ipfw/ipfw2.c 187716 2009-01-26 14:26:35Z luigi $ + * + * main compiler functions */ #include "ipfw2.h" @@ -88,15 +90,6 @@ static struct _s_x f_iptos[] = { { NULL, 0 } }; -static struct _s_x limit_masks[] = { - {"all", DYN_SRC_ADDR|DYN_SRC_PORT|DYN_DST_ADDR|DYN_DST_PORT}, - {"src-addr", DYN_SRC_ADDR}, - {"src-port", DYN_SRC_PORT}, - {"dst-addr", DYN_DST_ADDR}, - {"dst-port", DYN_DST_PORT}, - {NULL, 0} -}; - /* * we use IPPROTO_ETHERTYPE as a fake protocol id to call the print routines * This is only used in this code. @@ -397,34 +390,6 @@ _substrcmp(const char *str1, const char* } /* - * _substrcmp2 takes three strings and returns 1 if the first two do not match, - * and 0 if they match exactly or the second string is a sub-string - * of the first. A warning is printed to stderr in the case that the - * first string does not match the third. - * - * This function exists to warn about the bizzare construction - * strncmp(str, "by", 2) which is used to allow people to use a shotcut - * for "bytes". The problem is that in addition to accepting "by", - * "byt", "byte", and "bytes", it also excepts "by_rabid_dogs" and any - * other string beginning with "by". - * - * This function will be removed in the future through the usual - * deprecation process. - */ -static int -_substrcmp2(const char *str1, const char* str2, const char* str3) -{ - - if (strncmp(str1, str2, strlen(str2)) != 0) - return 1; - - if (strcmp(str1, str3) != 0) - warnx("DEPRECATED: '%s' matched '%s'", - str1, str3); - return 0; -} - -/* * prints one port, symbolic or numeric */ static void @@ -766,7 +731,6 @@ static struct _s_x icmp6codes[] = { { "port", ICMP6_DST_UNREACH_NOPORT }, { NULL, 0 } }; -#endif static void fill_unreach6_code(u_short *codep, char *str) @@ -783,7 +747,6 @@ fill_unreach6_code(u_short *codep, char return; } -#if 0 static void print_unreach6_code(uint16_t code) { @@ -807,7 +770,7 @@ print_unreach6_code(uint16_t code) * the first bit on the wire is bit 0 of the first byte. * len is the max length in bits. */ -static int +int contigmask(uint8_t *p, int len) { int i, n; @@ -2788,26 +2751,6 @@ lookup_host6 (char *host, struct in6_add } -/* n2mask sets n bits of the mask */ -static void -n2mask(struct in6_addr *mask, int n) -{ - static int minimask[9] = - { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff }; - u_char *p; - - memset(mask, 0, sizeof(struct in6_addr)); - p = (u_char *) mask; - for (; n > 0; p++, n -= 8) { - if (n >= 8) - *p = 0xff; - else - *p = minimask[n]; - } - return; -} - - /* * fill the addr and mask fields in the instruction as appropriate from av. * Update length as appropriate. Added: user/luigi/ipfw/sbin/ipfw/dummynet.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/luigi/ipfw/sbin/ipfw/dummynet.c Mon Jan 26 18:37:22 2009 (r187735) @@ -0,0 +1,701 @@ +/* + * Copyright (c) 2002-2003 Luigi Rizzo + * Copyright (c) 1996 Alex Nash, Paul Traina, Poul-Henning Kamp + * Copyright (c) 1994 Ugen J.S.Antsilevich + * + * Idea and grammar partially left from: + * Copyright (c) 1993 Daniel Boulet + * + * Redistribution and use in source forms, with and without modification, + * are permitted provided that this entire comment appears intact. + * + * Redistribution in binary form may occur without any restrictions. + * Obviously, it would be nice if you gave credit where credit is due + * but requiring it would be too onerous. + * + * This software is provided ``AS IS'' without any warranties of any kind. + * + * NEW command line interface for IP firewall facility + * + * $FreeBSD: user/luigi/ipfw/sbin/ipfw/ipfw2.c 187733 2009-01-26 17:56:27Z luigi $ + * dummynet configuration + */ + +#include "ipfw2.h" + +struct _s_x dummynet_params[] = { + { "plr", TOK_PLR }, + { "noerror", TOK_NOERROR }, + { "buckets", TOK_BUCKETS }, + { "dst-ip", TOK_DSTIP }, + { "src-ip", TOK_SRCIP }, + { "dst-port", TOK_DSTPORT }, + { "src-port", TOK_SRCPORT }, + { "proto", TOK_PROTO }, + { "weight", TOK_WEIGHT }, + { "all", TOK_ALL }, + { "mask", TOK_MASK }, + { "droptail", TOK_DROPTAIL }, + { "red", TOK_RED }, + { "gred", TOK_GRED }, + { "bw", TOK_BW }, + { "bandwidth", TOK_BW }, + { "delay", TOK_DELAY }, + { "pipe", TOK_PIPE }, + { "queue", TOK_QUEUE }, + { "flow-id", TOK_FLOWID}, + { "dst-ipv6", TOK_DSTIP6}, + { "dst-ip6", TOK_DSTIP6}, + { "src-ipv6", TOK_SRCIP6}, + { "src-ip6", TOK_SRCIP6}, + { "dummynet-params", TOK_NULL }, + { NULL, 0 } /* terminator */ +}; + +static int +sort_q(const void *pa, const void *pb) +{ + int rev = (do_sort < 0); + int field = rev ? -do_sort : do_sort; + long long res = 0; + const struct dn_flow_queue *a = pa; + const struct dn_flow_queue *b = pb; + + switch (field) { + case 1: /* pkts */ + res = a->len - b->len; + break; + case 2: /* bytes */ + res = a->len_bytes - b->len_bytes; + break; + + case 3: /* tot pkts */ + res = a->tot_pkts - b->tot_pkts; + break; + + case 4: /* tot bytes */ + res = a->tot_bytes - b->tot_bytes; + break; + } + if (res < 0) + res = -1; + if (res > 0) + res = 1; + return (int)(rev ? res : -res); +} + +static void +list_queues(struct dn_flow_set *fs, struct dn_flow_queue *q) +{ + int l; + int index_printed, indexes = 0; + char buff[255]; + struct protoent *pe; + + if (fs->rq_elements == 0) + return; + + if (do_sort != 0) + heapsort(q, fs->rq_elements, sizeof *q, sort_q); + + /* Print IPv4 flows */ + index_printed = 0; + for (l = 0; l < fs->rq_elements; l++) { + struct in_addr ina; + + /* XXX: Should check for IPv4 flows */ + if (IS_IP6_FLOW_ID(&(q[l].id))) + continue; + + if (!index_printed) { + index_printed = 1; + if (indexes > 0) /* currently a no-op */ + printf("\n"); + indexes++; + printf(" " + "mask: 0x%02x 0x%08x/0x%04x -> 0x%08x/0x%04x\n", + fs->flow_mask.proto, + fs->flow_mask.src_ip, fs->flow_mask.src_port, + fs->flow_mask.dst_ip, fs->flow_mask.dst_port); + + printf("BKT Prot ___Source IP/port____ " + "____Dest. IP/port____ " + "Tot_pkt/bytes Pkt/Byte Drp\n"); + } + + printf("%3d ", q[l].hash_slot); + pe = getprotobynumber(q[l].id.proto); + if (pe) + printf("%-4s ", pe->p_name); + else + printf("%4u ", q[l].id.proto); + ina.s_addr = htonl(q[l].id.src_ip); + printf("%15s/%-5d ", + inet_ntoa(ina), q[l].id.src_port); + ina.s_addr = htonl(q[l].id.dst_ip); + printf("%15s/%-5d ", + inet_ntoa(ina), q[l].id.dst_port); + printf("%4qu %8qu %2u %4u %3u\n", + q[l].tot_pkts, q[l].tot_bytes, + q[l].len, q[l].len_bytes, q[l].drops); + if (verbose) + printf(" S %20qd F %20qd\n", + q[l].S, q[l].F); + } + + /* Print IPv6 flows */ + index_printed = 0; + for (l = 0; l < fs->rq_elements; l++) { + if (!IS_IP6_FLOW_ID(&(q[l].id))) + continue; + + if (!index_printed) { + index_printed = 1; + if (indexes > 0) + printf("\n"); + indexes++; + printf("\n mask: proto: 0x%02x, flow_id: 0x%08x, ", + fs->flow_mask.proto, fs->flow_mask.flow_id6); + inet_ntop(AF_INET6, &(fs->flow_mask.src_ip6), + buff, sizeof(buff)); + printf("%s/0x%04x -> ", buff, fs->flow_mask.src_port); + inet_ntop( AF_INET6, &(fs->flow_mask.dst_ip6), + buff, sizeof(buff) ); + printf("%s/0x%04x\n", buff, fs->flow_mask.dst_port); + + printf("BKT ___Prot___ _flow-id_ " + "______________Source IPv6/port_______________ " + "_______________Dest. IPv6/port_______________ " + "Tot_pkt/bytes Pkt/Byte Drp\n"); + } + printf("%3d ", q[l].hash_slot); + pe = getprotobynumber(q[l].id.proto); + if (pe != NULL) + printf("%9s ", pe->p_name); + else + printf("%9u ", q[l].id.proto); + printf("%7d %39s/%-5d ", q[l].id.flow_id6, + inet_ntop(AF_INET6, &(q[l].id.src_ip6), buff, sizeof(buff)), + q[l].id.src_port); + printf(" %39s/%-5d ", + inet_ntop(AF_INET6, &(q[l].id.dst_ip6), buff, sizeof(buff)), + q[l].id.dst_port); + printf(" %4qu %8qu %2u %4u %3u\n", + q[l].tot_pkts, q[l].tot_bytes, + q[l].len, q[l].len_bytes, q[l].drops); + if (verbose) + printf(" S %20qd F %20qd\n", q[l].S, q[l].F); + } +} + +static void +print_flowset_parms(struct dn_flow_set *fs, char *prefix) +{ + int l; + char qs[30]; + char plr[30]; + char red[90]; /* Display RED parameters */ + + l = fs->qsize; + if (fs->flags_fs & DN_QSIZE_IS_BYTES) { + if (l >= 8192) + sprintf(qs, "%d KB", l / 1024); + else + sprintf(qs, "%d B", l); + } else + sprintf(qs, "%3d sl.", l); + if (fs->plr) + sprintf(plr, "plr %f", 1.0 * fs->plr / (double)(0x7fffffff)); + else + plr[0] = '\0'; + if (fs->flags_fs & DN_IS_RED) /* RED parameters */ + sprintf(red, + "\n\t %cRED w_q %f min_th %d max_th %d max_p %f", + (fs->flags_fs & DN_IS_GENTLE_RED) ? 'G' : ' ', + 1.0 * fs->w_q / (double)(1 << SCALE_RED), + SCALE_VAL(fs->min_th), + SCALE_VAL(fs->max_th), + 1.0 * fs->max_p / (double)(1 << SCALE_RED)); + else + sprintf(red, "droptail"); + + printf("%s %s%s %d queues (%d buckets) %s\n", + prefix, qs, plr, fs->rq_elements, fs->rq_size, red); +} + +void +list_pipes(void *data, uint nbytes, int ac, char *av[]) +{ + int rulenum; + void *next = data; + struct dn_pipe *p = (struct dn_pipe *) data; + struct dn_flow_set *fs; + struct dn_flow_queue *q; + int l; + + if (ac > 0) + rulenum = strtoul(*av++, NULL, 10); + else + rulenum = 0; + for (; nbytes >= sizeof *p; p = (struct dn_pipe *)next) { + double b = p->bandwidth; + char buf[30]; + char prefix[80]; + + if (SLIST_NEXT(p, next) != (struct dn_pipe *)DN_IS_PIPE) + break; /* done with pipes, now queues */ + + /* + * compute length, as pipe have variable size + */ + l = sizeof(*p) + p->fs.rq_elements * sizeof(*q); + next = (char *)p + l; + nbytes -= l; + + if ((rulenum != 0 && rulenum != p->pipe_nr) || do_pipe == 2) + continue; + + /* + * Print rate (or clocking interface) + */ + if (p->if_name[0] != '\0') + sprintf(buf, "%s", p->if_name); + else if (b == 0) + sprintf(buf, "unlimited"); + else if (b >= 1000000) + sprintf(buf, "%7.3f Mbit/s", b/1000000); + else if (b >= 1000) + sprintf(buf, "%7.3f Kbit/s", b/1000); + else + sprintf(buf, "%7.3f bit/s ", b); + + sprintf(prefix, "%05d: %s %4d ms ", + p->pipe_nr, buf, p->delay); + print_flowset_parms(&(p->fs), prefix); + if (verbose) + printf(" V %20qd\n", p->V >> MY_M); + + q = (struct dn_flow_queue *)(p+1); + list_queues(&(p->fs), q); + } + for (fs = next; nbytes >= sizeof *fs; fs = next) { + char prefix[80]; + + if (SLIST_NEXT(fs, next) != (struct dn_flow_set *)DN_IS_QUEUE) + break; + l = sizeof(*fs) + fs->rq_elements * sizeof(*q); + next = (char *)fs + l; + nbytes -= l; + + if (rulenum != 0 && ((rulenum != fs->fs_nr && do_pipe == 2) || + (rulenum != fs->parent_nr && do_pipe == 1))) { + continue; + } + + q = (struct dn_flow_queue *)(fs+1); + sprintf(prefix, "q%05d: weight %d pipe %d ", + fs->fs_nr, fs->weight, fs->parent_nr); + print_flowset_parms(fs, prefix); + list_queues(fs, q); + } +} + +/* + * _substrcmp2 takes three strings and returns 1 if the first two do not match, + * and 0 if they match exactly or the second string is a sub-string + * of the first. A warning is printed to stderr in the case that the + * first string does not match the third. + * + * This function exists to warn about the bizzare construction + * strncmp(str, "by", 2) which is used to allow people to use a shotcut + * for "bytes". The problem is that in addition to accepting "by", + * "byt", "byte", and "bytes", it also excepts "by_rabid_dogs" and any + * other string beginning with "by". + * + * This function will be removed in the future through the usual + * deprecation process. + */ +static int +_substrcmp2(const char *str1, const char* str2, const char* str3) +{ + + if (strncmp(str1, str2, strlen(str2)) != 0) + return 1; + + if (strcmp(str1, str3) != 0) + warnx("DEPRECATED: '%s' matched '%s'", + str1, str3); + return 0; +} + +void +config_pipe(int ac, char **av) +{ + struct dn_pipe p; + int i; + char *end; + void *par = NULL; + + memset(&p, 0, sizeof p); + + av++; ac--; + /* Pipe number */ + if (ac && isdigit(**av)) { + i = atoi(*av); av++; ac--; + if (do_pipe == 1) + p.pipe_nr = i; + else + p.fs.fs_nr = i; + } + while (ac > 0) { + double d; + int tok = match_token(dummynet_params, *av); + ac--; av++; + + switch(tok) { + case TOK_NOERROR: + p.fs.flags_fs |= DN_NOERROR; + break; + + case TOK_PLR: + NEED1("plr needs argument 0..1\n"); + d = strtod(av[0], NULL); + if (d > 1) + d = 1; + else if (d < 0) + d = 0; + p.fs.plr = (int)(d*0x7fffffff); + ac--; av++; + break; + + case TOK_QUEUE: + NEED1("queue needs queue size\n"); + end = NULL; + p.fs.qsize = strtoul(av[0], &end, 0); + if (*end == 'K' || *end == 'k') { + p.fs.flags_fs |= DN_QSIZE_IS_BYTES; + p.fs.qsize *= 1024; + } else if (*end == 'B' || + _substrcmp2(end, "by", "bytes") == 0) { + p.fs.flags_fs |= DN_QSIZE_IS_BYTES; + } + ac--; av++; + break; + + case TOK_BUCKETS: + NEED1("buckets needs argument\n"); + p.fs.rq_size = strtoul(av[0], NULL, 0); + ac--; av++; + break; + + case TOK_MASK: + NEED1("mask needs mask specifier\n"); + /* + * per-flow queue, mask is dst_ip, dst_port, + * src_ip, src_port, proto measured in bits + */ + par = NULL; + + bzero(&p.fs.flow_mask, sizeof(p.fs.flow_mask)); + end = NULL; + + while (ac >= 1) { + uint32_t *p32 = NULL; + uint16_t *p16 = NULL; + uint32_t *p20 = NULL; + struct in6_addr *pa6 = NULL; + uint32_t a; + + tok = match_token(dummynet_params, *av); + ac--; av++; + switch(tok) { + case TOK_ALL: + /* + * special case, all bits significant + */ + p.fs.flow_mask.dst_ip = ~0; + p.fs.flow_mask.src_ip = ~0; + p.fs.flow_mask.dst_port = ~0; + p.fs.flow_mask.src_port = ~0; + p.fs.flow_mask.proto = ~0; + n2mask(&(p.fs.flow_mask.dst_ip6), 128); + n2mask(&(p.fs.flow_mask.src_ip6), 128); + p.fs.flow_mask.flow_id6 = ~0; + p.fs.flags_fs |= DN_HAVE_FLOW_MASK; + goto end_mask; + + case TOK_DSTIP: + p32 = &p.fs.flow_mask.dst_ip; + break; + + case TOK_SRCIP: + p32 = &p.fs.flow_mask.src_ip; + break; + + case TOK_DSTIP6: + pa6 = &(p.fs.flow_mask.dst_ip6); + break; + + case TOK_SRCIP6: + pa6 = &(p.fs.flow_mask.src_ip6); + break; + + case TOK_FLOWID: + p20 = &p.fs.flow_mask.flow_id6; + break; + + case TOK_DSTPORT: + p16 = &p.fs.flow_mask.dst_port; + break; + + case TOK_SRCPORT: + p16 = &p.fs.flow_mask.src_port; + break; + + case TOK_PROTO: + break; + + default: + ac++; av--; /* backtrack */ + goto end_mask; + } + if (ac < 1) + errx(EX_USAGE, "mask: value missing"); + if (*av[0] == '/') { + a = strtoul(av[0]+1, &end, 0); + if (pa6 == NULL) + a = (a == 32) ? ~0 : (1 << a) - 1; + } else + a = strtoul(av[0], &end, 0); + if (p32 != NULL) + *p32 = a; + else if (p16 != NULL) { + if (a > 0xFFFF) + errx(EX_DATAERR, + "port mask must be 16 bit"); + *p16 = (uint16_t)a; + } else if (p20 != NULL) { + if (a > 0xfffff) + errx(EX_DATAERR, + "flow_id mask must be 20 bit"); + *p20 = (uint32_t)a; + } else if (pa6 != NULL) { + if (a > 128) + errx(EX_DATAERR, + "in6addr invalid mask len"); + else + n2mask(pa6, a); + } else { + if (a > 0xFF) + errx(EX_DATAERR, + "proto mask must be 8 bit"); + p.fs.flow_mask.proto = (uint8_t)a; + } + if (a != 0) + p.fs.flags_fs |= DN_HAVE_FLOW_MASK; + ac--; av++; + } /* end while, config masks */ +end_mask: + break; + + case TOK_RED: + case TOK_GRED: + NEED1("red/gred needs w_q/min_th/max_th/max_p\n"); + p.fs.flags_fs |= DN_IS_RED; + if (tok == TOK_GRED) + p.fs.flags_fs |= DN_IS_GENTLE_RED; + /* + * the format for parameters is w_q/min_th/max_th/max_p + */ + if ((end = strsep(&av[0], "/"))) { + double w_q = strtod(end, NULL); + if (w_q > 1 || w_q <= 0) + errx(EX_DATAERR, "0 < w_q <= 1"); + p.fs.w_q = (int) (w_q * (1 << SCALE_RED)); + } + if ((end = strsep(&av[0], "/"))) { + p.fs.min_th = strtoul(end, &end, 0); + if (*end == 'K' || *end == 'k') + p.fs.min_th *= 1024; + } + if ((end = strsep(&av[0], "/"))) { + p.fs.max_th = strtoul(end, &end, 0); + if (*end == 'K' || *end == 'k') + p.fs.max_th *= 1024; + } + if ((end = strsep(&av[0], "/"))) { + double max_p = strtod(end, NULL); + if (max_p > 1 || max_p <= 0) + errx(EX_DATAERR, "0 < max_p <= 1"); + p.fs.max_p = (int)(max_p * (1 << SCALE_RED)); + } + ac--; av++; + break; + + case TOK_DROPTAIL: + p.fs.flags_fs &= ~(DN_IS_RED|DN_IS_GENTLE_RED); + break; + + case TOK_BW: + NEED1("bw needs bandwidth or interface\n"); + if (do_pipe != 1) + errx(EX_DATAERR, "bandwidth only valid for pipes"); + /* + * set clocking interface or bandwidth value + */ + if (av[0][0] >= 'a' && av[0][0] <= 'z') { + int l = sizeof(p.if_name)-1; + /* interface name */ + strncpy(p.if_name, av[0], l); + p.if_name[l] = '\0'; + p.bandwidth = 0; + } else { + p.if_name[0] = '\0'; + p.bandwidth = strtoul(av[0], &end, 0); + if (*end == 'K' || *end == 'k') { + end++; + p.bandwidth *= 1000; + } else if (*end == 'M') { + end++; + p.bandwidth *= 1000000; + } + if ((*end == 'B' && + _substrcmp2(end, "Bi", "Bit/s") != 0) || + _substrcmp2(end, "by", "bytes") == 0) + p.bandwidth *= 8; + if (p.bandwidth < 0) + errx(EX_DATAERR, "bandwidth too large"); + } + ac--; av++; + break; + + case TOK_DELAY: + if (do_pipe != 1) + errx(EX_DATAERR, "delay only valid for pipes"); + NEED1("delay needs argument 0..10000ms\n"); + p.delay = strtoul(av[0], NULL, 0); + ac--; av++; + break; + + case TOK_WEIGHT: + if (do_pipe == 1) + errx(EX_DATAERR,"weight only valid for queues"); + NEED1("weight needs argument 0..100\n"); + p.fs.weight = strtoul(av[0], &end, 0); + ac--; av++; + break; + + case TOK_PIPE: + if (do_pipe == 1) + errx(EX_DATAERR,"pipe only valid for queues"); + NEED1("pipe needs pipe_number\n"); + p.fs.parent_nr = strtoul(av[0], &end, 0); + ac--; av++; + break; + + default: + errx(EX_DATAERR, "unrecognised option ``%s''", av[-1]); + } + } + if (do_pipe == 1) { + if (p.pipe_nr == 0) + errx(EX_DATAERR, "pipe_nr must be > 0"); + if (p.delay > 10000) + errx(EX_DATAERR, "delay must be < 10000"); + } else { /* do_pipe == 2, queue */ + if (p.fs.parent_nr == 0) + errx(EX_DATAERR, "pipe must be > 0"); + if (p.fs.weight >100) + errx(EX_DATAERR, "weight must be <= 100"); + } + if (p.fs.flags_fs & DN_QSIZE_IS_BYTES) { + size_t len; + long limit; + + len = sizeof(limit); + if (sysctlbyname("net.inet.ip.dummynet.pipe_byte_limit", + &limit, &len, NULL, 0) == -1) + limit = 1024*1024; + if (p.fs.qsize > limit) + errx(EX_DATAERR, "queue size must be < %ldB", limit); + } else { + size_t len; + long limit; + + len = sizeof(limit); + if (sysctlbyname("net.inet.ip.dummynet.pipe_slot_limit", + &limit, &len, NULL, 0) == -1) + limit = 100; + if (p.fs.qsize > limit) + errx(EX_DATAERR, "2 <= queue size <= %ld", limit); + } + if (p.fs.flags_fs & DN_IS_RED) { + size_t len; + int lookup_depth, avg_pkt_size; + double s, idle, weight, w_q; + struct clockinfo ck; + int t; + + if (p.fs.min_th >= p.fs.max_th) + errx(EX_DATAERR, "min_th %d must be < than max_th %d", + p.fs.min_th, p.fs.max_th); + if (p.fs.max_th == 0) + errx(EX_DATAERR, "max_th must be > 0"); + + len = sizeof(int); + if (sysctlbyname("net.inet.ip.dummynet.red_lookup_depth", + &lookup_depth, &len, NULL, 0) == -1) + errx(1, "sysctlbyname(\"%s\")", + "net.inet.ip.dummynet.red_lookup_depth"); + if (lookup_depth == 0) + errx(EX_DATAERR, "net.inet.ip.dummynet.red_lookup_depth" + " must be greater than zero"); + + len = sizeof(int); + if (sysctlbyname("net.inet.ip.dummynet.red_avg_pkt_size", + &avg_pkt_size, &len, NULL, 0) == -1) + + errx(1, "sysctlbyname(\"%s\")", + "net.inet.ip.dummynet.red_avg_pkt_size"); + if (avg_pkt_size == 0) + errx(EX_DATAERR, + "net.inet.ip.dummynet.red_avg_pkt_size must" + " be greater than zero"); + + len = sizeof(struct clockinfo); + if (sysctlbyname("kern.clockrate", &ck, &len, NULL, 0) == -1) + errx(1, "sysctlbyname(\"%s\")", "kern.clockrate"); + + /* + * Ticks needed for sending a medium-sized packet. + * Unfortunately, when we are configuring a WF2Q+ queue, we + * do not have bandwidth information, because that is stored + * in the parent pipe, and also we have multiple queues + * competing for it. So we set s=0, which is not very + * correct. But on the other hand, why do we want RED with + * WF2Q+ ? + */ + if (p.bandwidth==0) /* this is a WF2Q+ queue */ + s = 0; + else + s = (double)ck.hz * avg_pkt_size * 8 / p.bandwidth; + + /* + * max idle time (in ticks) before avg queue size becomes 0. + * NOTA: (3/w_q) is approx the value x so that + * (1-w_q)^x < 10^-3. + */ + w_q = ((double)p.fs.w_q) / (1 << SCALE_RED); + idle = s * 3. / w_q; + p.fs.lookup_step = (int)idle / lookup_depth; + if (!p.fs.lookup_step) + p.fs.lookup_step = 1; + weight = 1 - w_q; + for (t = p.fs.lookup_step; t > 1; --t) + weight *= 1 - w_q; + p.fs.lookup_weight = (int)(weight * (1 << SCALE_RED)); + } + i = do_cmd(IP_DUMMYNET_CONFIGURE, &p, sizeof p); + if (i) + err(1, "setsockopt(%s)", "IP_DUMMYNET_CONFIGURE"); +} Modified: user/luigi/ipfw/sbin/ipfw/ipfw2.c ============================================================================== --- user/luigi/ipfw/sbin/ipfw/ipfw2.c Mon Jan 26 18:14:21 2009 (r187734) +++ user/luigi/ipfw/sbin/ipfw/ipfw2.c Mon Jan 26 18:37:22 2009 (r187735) @@ -130,51 +130,6 @@ struct _s_x ether_types[] = { static void show_usage(void); -struct _s_x dummynet_params[] = { - { "plr", TOK_PLR }, - { "noerror", TOK_NOERROR }, - { "buckets", TOK_BUCKETS }, - { "dst-ip", TOK_DSTIP }, - { "src-ip", TOK_SRCIP }, - { "dst-port", TOK_DSTPORT }, - { "src-port", TOK_SRCPORT }, - { "proto", TOK_PROTO }, - { "weight", TOK_WEIGHT }, - { "all", TOK_ALL }, - { "mask", TOK_MASK }, - { "droptail", TOK_DROPTAIL }, - { "red", TOK_RED }, - { "gred", TOK_GRED }, - { "bw", TOK_BW }, - { "bandwidth", TOK_BW }, - { "delay", TOK_DELAY }, - { "pipe", TOK_PIPE }, - { "queue", TOK_QUEUE }, - { "flow-id", TOK_FLOWID}, - { "dst-ipv6", TOK_DSTIP6}, - { "dst-ip6", TOK_DSTIP6}, - { "src-ipv6", TOK_SRCIP6}, - { "src-ip6", TOK_SRCIP6}, - { "dummynet-params", TOK_NULL }, - { NULL, 0 } /* terminator */ -}; - -struct _s_x nat_params[] = { - { "ip", TOK_IP }, - { "if", TOK_IF }, - { "log", TOK_ALOG }, - { "deny_in", TOK_DENY_INC }, - { "same_ports", TOK_SAME_PORTS }, - { "unreg_only", TOK_UNREG_ONLY }, - { "reset", TOK_RESET_ADDR }, - { "reverse", TOK_ALIAS_REV }, - { "proxy_only", TOK_PROXY_ONLY }, - { "redirect_addr", TOK_REDIR_ADDR }, - { "redirect_port", TOK_REDIR_PORT }, - { "redirect_proto", TOK_REDIR_PROTO }, - { NULL, 0 } /* terminator */ -}; - struct _s_x rule_actions[] = { { "accept", TOK_ACCEPT }, { "pass", TOK_ACCEPT }, @@ -419,6 +374,7 @@ _substrcmp2(const char *str1, const char return 0; } +#if 0 /* * prints one port, symbolic or numeric */ @@ -446,6 +402,7 @@ print_port(int proto, uint16_t port) printf("%d", port); } } +#endif struct _s_x _port_name[] = { {"dst-port", O_IP_DSTPORT}, @@ -459,6 +416,7 @@ struct _s_x _port_name[] = { {NULL, 0} }; +#if 0 /* * Print the values in a list 16-bit items of the types above. * XXX todo: add support for mask. @@ -488,7 +446,6 @@ print_newports(ipfw_insn_u16 *cmd, int p } } -#if 0 /* * Like strtol, but also translates service names into port numbers * for some protocols. @@ -557,7 +514,9 @@ strtoport(char *s, char **end, int base, /* * Map between current altq queue id numbers and names. */ +#if 0 static int altq_fetched = 0; +#endif static TAILQ_HEAD(, pf_altq) altq_entries = TAILQ_HEAD_INITIALIZER(altq_entries); @@ -580,6 +539,7 @@ altq_set_enabled(int enabled) close(pffd); } +#if 0 static void altq_fetch(void) { @@ -620,7 +580,6 @@ altq_fetch(void) close(pffd); } -#if 0 static u_int32_t altq_name_to_qid(const char *name) { @@ -636,6 +595,7 @@ altq_name_to_qid(const char *name) } #endif +#if 0 static const char * altq_qid_to_name(u_int32_t qid) { @@ -649,6 +609,7 @@ altq_qid_to_name(u_int32_t qid) return NULL; return altq->qname; } +#endif #if 0 static void @@ -740,7 +701,6 @@ fill_reject_code(u_short *codep, char *s *codep = val; return; } -#endif static void print_reject_code(uint16_t code) @@ -752,6 +712,7 @@ print_reject_code(uint16_t code) else printf("unreach %u", code); } +#endif struct _s_x icmp6codes[] = { { "no-route", ICMP6_DST_UNREACH_NOROUTE }, @@ -776,7 +737,6 @@ fill_unreach6_code(u_short *codep, char *codep = val; return; } -#endif static void print_unreach6_code(uint16_t code) @@ -952,7 +912,6 @@ print_mac(uint8_t *addr, uint8_t *mask) } } -#if 0 static void fill_icmptypes(ipfw_insn_u32 *cmd, char *av) { @@ -976,7 +935,6 @@ fill_icmptypes(ipfw_insn_u32 *cmd, char cmd->o.opcode = O_ICMPTYPE; cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32); } -#endif static void print_icmptypes(ipfw_insn_u32 *cmd) @@ -1047,7 +1005,6 @@ print_ip6(ipfw_insn_ip6 *cmd, char const } } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Jan 26 18:38:26 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0674B106564A; Mon, 26 Jan 2009 18:38:26 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CFAE98FC29; Mon, 26 Jan 2009 18:38:25 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QIcP1H059167; Mon, 26 Jan 2009 18:38:25 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QIcPr6059166; Mon, 26 Jan 2009 18:38:25 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901261838.n0QIcPr6059166@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 26 Jan 2009 18:38:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187736 - user/luigi/ipfw/sbin/ipfw X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 18:38:26 -0000 Author: luigi Date: Mon Jan 26 18:38:25 2009 New Revision: 187736 URL: http://svn.freebsd.org/changeset/base/187736 Log: add keywords Modified: user/luigi/ipfw/sbin/ipfw/compile.c (props changed) user/luigi/ipfw/sbin/ipfw/dummynet.c (props changed) user/luigi/ipfw/sbin/ipfw/ipfw2.c (props changed) user/luigi/ipfw/sbin/ipfw/ipv6.c (props changed) user/luigi/ipfw/sbin/ipfw/nat.c (props changed) user/luigi/ipfw/sbin/ipfw/print.c (props changed) From owner-svn-src-user@FreeBSD.ORG Mon Jan 26 18:40:39 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D459A106566B; Mon, 26 Jan 2009 18:40:39 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A88B68FC0C; Mon, 26 Jan 2009 18:40:39 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QIed7u059277; Mon, 26 Jan 2009 18:40:39 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QIedaB059275; Mon, 26 Jan 2009 18:40:39 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901261840.n0QIedaB059275@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 26 Jan 2009 18:40:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187737 - user/luigi/ipfw/sbin/ipfw X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 18:40:40 -0000 Author: luigi Date: Mon Jan 26 18:40:39 2009 New Revision: 187737 URL: http://svn.freebsd.org/changeset/base/187737 Log: temporarily remove keyword Modified: user/luigi/ipfw/sbin/ipfw/ipfw2.c Modified: user/luigi/ipfw/sbin/ipfw/ipfw2.c ============================================================================== --- user/luigi/ipfw/sbin/ipfw/ipfw2.c Mon Jan 26 18:38:25 2009 (r187736) +++ user/luigi/ipfw/sbin/ipfw/ipfw2.c Mon Jan 26 18:40:39 2009 (r187737) @@ -17,7 +17,6 @@ * * NEW command line interface for IP firewall facility * - * $FreeBSD$ */ #include "ipfw2.h" From owner-svn-src-user@FreeBSD.ORG Mon Jan 26 18:46:37 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 858A4106568C; Mon, 26 Jan 2009 18:46:37 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7172E8FC19; Mon, 26 Jan 2009 18:46:37 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QIkbT6059448; Mon, 26 Jan 2009 18:46:37 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QIkbF6059447; Mon, 26 Jan 2009 18:46:37 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901261846.n0QIkbF6059447@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 26 Jan 2009 18:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187738 - user/luigi/ipfw/sbin/ipfw X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 18:46:38 -0000 Author: luigi Date: Mon Jan 26 18:46:37 2009 New Revision: 187738 URL: http://svn.freebsd.org/changeset/base/187738 Log: remove code residing in other files Modified: user/luigi/ipfw/sbin/ipfw/ipfw2.c Modified: user/luigi/ipfw/sbin/ipfw/ipfw2.c ============================================================================== --- user/luigi/ipfw/sbin/ipfw/ipfw2.c Mon Jan 26 18:40:39 2009 (r187737) +++ user/luigi/ipfw/sbin/ipfw/ipfw2.c Mon Jan 26 18:46:37 2009 (r187738) @@ -373,36 +373,6 @@ _substrcmp2(const char *str1, const char return 0; } -#if 0 -/* - * prints one port, symbolic or numeric - */ -static void -print_port(int proto, uint16_t port) -{ - - if (proto == IPPROTO_ETHERTYPE) { - char const *s; - - if (do_resolv && (s = match_value(ether_types, port)) ) - printf("%s", s); - else - printf("0x%04x", port); - } else { - struct servent *se = NULL; - if (do_resolv) { - struct protoent *pe = getprotobynumber(proto); - - se = getservbyport(htons(port), pe ? pe->p_name : NULL); - } - if (se) - printf("%s", se->s_name); - else - printf("%d", port); - } -} -#endif - struct _s_x _port_name[] = { {"dst-port", O_IP_DSTPORT}, {"src-port", O_IP_SRCPORT}, @@ -415,256 +385,6 @@ struct _s_x _port_name[] = { {NULL, 0} }; -#if 0 -/* - * Print the values in a list 16-bit items of the types above. - * XXX todo: add support for mask. - */ -static void -print_newports(ipfw_insn_u16 *cmd, int proto, int opcode) -{ - uint16_t *p = cmd->ports; - int i; - char const *sep; - - if (opcode != 0) { - sep = match_value(_port_name, opcode); - if (sep == NULL) - sep = "???"; - printf (" %s", sep); - } - sep = " "; - for (i = F_LEN((ipfw_insn *)cmd) - 1; i > 0; i--, p += 2) { - printf(sep); - print_port(proto, p[0]); - if (p[0] != p[1]) { - printf("-"); - print_port(proto, p[1]); - } - sep = ","; - } -} - -/* - * Like strtol, but also translates service names into port numbers - * for some protocols. - * In particular: - * proto == -1 disables the protocol check; - * proto == IPPROTO_ETHERTYPE looks up an internal table - * proto == matches the values there. - * Returns *end == s in case the parameter is not found. - */ -static int -strtoport(char *s, char **end, int base, int proto) -{ - char *p, *buf; - char *s1; - int i; - - *end = s; /* default - not found */ - if (*s == '\0') - return 0; /* not found */ - - if (isdigit(*s)) - return strtol(s, end, base); - - /* - * find separator. '\\' escapes the next char. - */ - for (s1 = s; *s1 && (isalnum(*s1) || *s1 == '\\') ; s1++) - if (*s1 == '\\' && s1[1] != '\0') - s1++; - - buf = safe_calloc(s1 - s + 1, 1); - - /* - * copy into a buffer skipping backslashes - */ - for (p = s, i = 0; p != s1 ; p++) - if (*p != '\\') - buf[i++] = *p; - buf[i++] = '\0'; - - if (proto == IPPROTO_ETHERTYPE) { - i = match_token(ether_types, buf); - free(buf); - if (i != -1) { /* found */ - *end = s1; - return i; - } - } else { - struct protoent *pe = NULL; - struct servent *se; - - if (proto != 0) - pe = getprotobynumber(proto); - setservent(1); - se = getservbyname(buf, pe ? pe->p_name : NULL); - free(buf); - if (se != NULL) { - *end = s1; - return ntohs(se->s_port); - } - } - return 0; /* not found */ -} -#endif - -/* - * Map between current altq queue id numbers and names. - */ -#if 0 -static int altq_fetched = 0; -#endif -static TAILQ_HEAD(, pf_altq) altq_entries = - TAILQ_HEAD_INITIALIZER(altq_entries); - -static void -altq_set_enabled(int enabled) -{ - int pffd; - - pffd = open("/dev/pf", O_RDWR); - if (pffd == -1) - err(EX_UNAVAILABLE, - "altq support opening pf(4) control device"); - if (enabled) { - if (ioctl(pffd, DIOCSTARTALTQ) != 0 && errno != EEXIST) - err(EX_UNAVAILABLE, "enabling altq"); - } else { - if (ioctl(pffd, DIOCSTOPALTQ) != 0 && errno != ENOENT) - err(EX_UNAVAILABLE, "disabling altq"); - } - close(pffd); -} - -#if 0 -static void -altq_fetch(void) -{ - struct pfioc_altq pfioc; - struct pf_altq *altq; - int pffd; - unsigned int mnr; - - if (altq_fetched) - return; - altq_fetched = 1; - pffd = open("/dev/pf", O_RDONLY); - if (pffd == -1) { - warn("altq support opening pf(4) control device"); - return; - } - bzero(&pfioc, sizeof(pfioc)); - if (ioctl(pffd, DIOCGETALTQS, &pfioc) != 0) { - warn("altq support getting queue list"); - close(pffd); - return; - } - mnr = pfioc.nr; - for (pfioc.nr = 0; pfioc.nr < mnr; pfioc.nr++) { - if (ioctl(pffd, DIOCGETALTQ, &pfioc) != 0) { - if (errno == EBUSY) - break; - warn("altq support getting queue list"); - close(pffd); - return; - } - if (pfioc.altq.qid == 0) - continue; - altq = safe_calloc(1, sizeof(*altq)); - *altq = pfioc.altq; - TAILQ_INSERT_TAIL(&altq_entries, altq, entries); - } - close(pffd); -} - -static u_int32_t -altq_name_to_qid(const char *name) -{ - struct pf_altq *altq; - - altq_fetch(); - TAILQ_FOREACH(altq, &altq_entries, entries) - if (strcmp(name, altq->qname) == 0) - break; - if (altq == NULL) - errx(EX_DATAERR, "altq has no queue named `%s'", name); - return altq->qid; -} -#endif - -#if 0 -static const char * -altq_qid_to_name(u_int32_t qid) -{ - struct pf_altq *altq; - - altq_fetch(); - TAILQ_FOREACH(altq, &altq_entries, entries) - if (qid == altq->qid) - break; - if (altq == NULL) - return NULL; - return altq->qname; -} -#endif - -#if 0 -static void -fill_altq_qid(u_int32_t *qid, const char *av) -{ - *qid = altq_name_to_qid(av); -} - -/* - * Fill the body of the command with the list of port ranges. - */ -static int -fill_newports(ipfw_insn_u16 *cmd, char *av, int proto) -{ - uint16_t a, b, *p = cmd->ports; - int i = 0; - char *s = av; - - while (*s) { - a = strtoport(av, &s, 0, proto); - if (s == av) /* empty or invalid argument */ - return (0); - - switch (*s) { - case '-': /* a range */ - av = s + 1; - b = strtoport(av, &s, 0, proto); - /* Reject expressions like '1-abc' or '1-2-3'. */ - if (s == av || (*s != ',' && *s != '\0')) - return (0); - p[0] = a; - p[1] = b; - break; - case ',': /* comma separated list */ - case '\0': - p[0] = p[1] = a; - break; - default: - warnx("port list: invalid separator <%c> in <%s>", - *s, av); - return (0); - } - - i++; - p += 2; - av = s + 1; - } - if (i > 0) { - if (i + 1 > F_LEN_MASK) - errx(EX_DATAERR, "too many ports/ranges\n"); - cmd->o.len |= i + 1; /* leave F_NOT and F_OR untouched */ - } - return (i); -} -#endif - struct _s_x icmpcodes[] = { { "net", ICMP_UNREACH_NET }, { "host", ICMP_UNREACH_HOST }, @@ -685,34 +405,6 @@ struct _s_x icmpcodes[] = { { NULL, 0 } }; -#if 0 -static void -fill_reject_code(u_short *codep, char *str) -{ - int val; - char *s; - - val = strtoul(str, &s, 0); - if (s == str || *s != '\0' || val >= 0x100) - val = match_token(icmpcodes, str); - if (val < 0) - errx(EX_DATAERR, "unknown ICMP unreachable code ``%s''", str); - *codep = val; - return; -} - -static void -print_reject_code(uint16_t code) -{ - char const *s = match_value(icmpcodes, code); - - if (s != NULL) - printf("unreach %s", s); - else - printf("unreach %u", code); -} -#endif - struct _s_x icmp6codes[] = { { "no-route", ICMP6_DST_UNREACH_NOROUTE }, { "admin-prohib", ICMP6_DST_UNREACH_ADMIN }, @@ -721,4815 +413,391 @@ struct _s_x icmp6codes[] = { { NULL, 0 } }; -#if 0 -static void -fill_unreach6_code(u_short *codep, char *str) -{ - int val; - char *s; - - val = strtoul(str, &s, 0); - if (s == str || *s != '\0' || val >= 0x100) - val = match_token(icmp6codes, str); - if (val < 0) - errx(EX_DATAERR, "unknown ICMPv6 unreachable code ``%s''", str); - *codep = val; - return; -} - +/* + * This one handles all set-related commands + * ipfw set { show | enable | disable } + * ipfw set swap X Y + * ipfw set move X to Y + * ipfw set move rule X to Y + */ static void -print_unreach6_code(uint16_t code) +sets_handler(int ac, char *av[]) { - char const *s = match_value(icmp6codes, code); + uint32_t set_disable, masks[2]; + int i, nbytes; + uint16_t rulenum; + uint8_t cmd, new_set; - if (s != NULL) - printf("unreach6 %s", s); - else - printf("unreach6 %u", code); -} + ac--; + av++; -/* - * Returns the number of bits set (from left) in a contiguous bitmask, - * or -1 if the mask is not contiguous. - * XXX this needs a proper fix. - * This effectively works on masks in big-endian (network) format. - * when compiled on little endian architectures. - * - * First bit is bit 7 of the first byte -- note, for MAC addresses, - * the first bit on the wire is bit 0 of the first byte. - * len is the max length in bits. - */ -static int -contigmask(uint8_t *p, int len) -{ - int i, n; + if (!ac) + errx(EX_USAGE, "set needs command"); + if (_substrcmp(*av, "show") == 0) { + void *data; + char const *msg; - for (i=0; inext_rule, + &set_disable, sizeof(set_disable)); -/* - * print flags set/clear in the two bitmasks passed as parameters. - * There is a specialized check for f_tcpflags. - */ -static void -print_flags(char const *name, ipfw_insn *cmd, struct _s_x *list) -{ - char const *comma = ""; - int i; - uint8_t set = cmd->arg1 & 0xff; - uint8_t clear = (cmd->arg1 >> 8) & 0xff; + for (i = 0, msg = "disable" ; i < RESVD_SET; i++) + if ((set_disable & (1< RESVD_SET) + errx(EX_DATAERR, "invalid set number %s\n", av[0]); + if (!isdigit(*(av[1])) || new_set > RESVD_SET) + errx(EX_DATAERR, "invalid set number %s\n", av[1]); + masks[0] = (4 << 24) | (new_set << 16) | (rulenum); + i = do_cmd(IP_FW_DEL, masks, sizeof(uint32_t)); + } else if (_substrcmp(*av, "move") == 0) { + ac--; av++; + if (ac && _substrcmp(*av, "rule") == 0) { + cmd = 2; + ac--; av++; + } else + cmd = 3; + if (ac != 3 || _substrcmp(av[1], "to") != 0) + errx(EX_USAGE, "syntax: set move [rule] X to Y\n"); + rulenum = atoi(av[0]); + new_set = atoi(av[2]); + if (!isdigit(*(av[0])) || (cmd == 3 && rulenum > RESVD_SET) || + (cmd == 2 && rulenum == IPFW_DEFAULT_RULE) ) + errx(EX_DATAERR, "invalid source number %s\n", av[0]); + if (!isdigit(*(av[2])) || new_set > RESVD_SET) + errx(EX_DATAERR, "invalid dest. set %s\n", av[1]); + masks[0] = (cmd << 24) | (new_set << 16) | (rulenum); + i = do_cmd(IP_FW_DEL, masks, sizeof(uint32_t)); + } else if (_substrcmp(*av, "disable") == 0 || + _substrcmp(*av, "enable") == 0 ) { + int which = _substrcmp(*av, "enable") == 0 ? 1 : 0; - if (list == f_tcpflags && set == TH_SYN && clear == TH_ACK) { - printf(" setup"); - return; - } + ac--; av++; + masks[0] = masks[1] = 0; - printf(" %s ", name); - for (i=0; list[i].x != 0; i++) { - if (set & list[i].x) { - set &= ~list[i].x; - printf("%s%s", comma, list[i].s); - comma = ","; - } - if (clear & list[i].x) { - clear &= ~list[i].x; - printf("%s!%s", comma, list[i].s); - comma = ","; + while (ac) { + if (isdigit(**av)) { + i = atoi(*av); + if (i < 0 || i > RESVD_SET) + errx(EX_DATAERR, + "invalid set number %d\n", i); + masks[which] |= (1<d; - - printf("%s%s ", cmd->o.len & F_NOT ? " not": "", s); - - if (cmd->o.opcode == O_IP_SRC_ME || cmd->o.opcode == O_IP_DST_ME) { - printf("me"); - return; - } - if (cmd->o.opcode == O_IP_SRC_LOOKUP || - cmd->o.opcode == O_IP_DST_LOOKUP) { - printf("table(%u", ((ipfw_insn *)cmd)->arg1); - if (len == F_INSN_SIZE(ipfw_insn_u32)) - printf(",%u", *a); - printf(")"); - return; - } - if (cmd->o.opcode == O_IP_SRC_SET || cmd->o.opcode == O_IP_DST_SET) { - uint32_t x, *map = (uint32_t *)&(cmd->mask); - int i, j; - char comma = '{'; + ac--; + av++; - x = cmd->o.arg1 - 1; - x = htonl( ~x ); - cmd->addr.s_addr = htonl(cmd->addr.s_addr); - printf("%s/%d", inet_ntoa(cmd->addr), - contigmask((uint8_t *)&x, 32)); - x = cmd->addr.s_addr = htonl(cmd->addr.s_addr); - x &= 0xff; /* base */ - /* - * Print bits and ranges. - * Locate first bit set (i), then locate first bit unset (j). - * If we have 3+ consecutive bits set, then print them as a - * range, otherwise only print the initial bit and rescan. - */ - for (i=0; i < cmd->o.arg1; i++) - if (map[i/32] & (1<<(i & 31))) { - for (j=i+1; j < cmd->o.arg1; j++) - if (!(map[ j/32] & (1<<(j & 31)))) - break; - printf("%c%d", comma, i+x); - if (j>i+2) { /* range has at least 3 elements */ - printf("-%d", j-1+x); - i = j-1; - } - comma = ','; - } - printf("}"); - return; - } - /* - * len == 2 indicates a single IP, whereas lists of 1 or more - * addr/mask pairs have len = (2n+1). We convert len to n so we - * use that to count the number of entries. - */ - for (len = len / 2; len > 0; len--, a += 2) { - int mb = /* mask length */ - (cmd->o.opcode == O_IP_SRC || cmd->o.opcode == O_IP_DST) ? - 32 : contigmask((uint8_t *)&(a[1]), 32); - if (mb == 32 && do_resolv) - he = gethostbyaddr((char *)&(a[0]), sizeof(u_long), AF_INET); - if (he != NULL) /* resolved to name */ - printf("%s", he->h_name); - else if (mb == 0) /* any */ - printf("any"); - else { /* numeric IP followed by some kind of mask */ - printf("%s", inet_ntoa( *((struct in_addr *)&a[0]) ) ); - if (mb < 0) - printf(":%s", inet_ntoa( *((struct in_addr *)&a[1]) ) ); - else if (mb < 32) - printf("/%d", mb); - } - if (len > 1) - printf(","); - } -} - -/* - * prints a MAC address/mask pair - */ -static void -print_mac(uint8_t *addr, uint8_t *mask) -{ - int l = contigmask(mask, 48); - - if (l == 0) - printf(" any"); - else { - printf(" %02x:%02x:%02x:%02x:%02x:%02x", - addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); - if (l == -1) - printf("&%02x:%02x:%02x:%02x:%02x:%02x", - mask[0], mask[1], mask[2], - mask[3], mask[4], mask[5]); - else if (l < 48) - printf("/%d", l); - } -} - -static void -fill_icmptypes(ipfw_insn_u32 *cmd, char *av) -{ - uint8_t type; - - cmd->d[0] = 0; - while (*av) { - if (*av == ',') - av++; - - type = strtoul(av, &av, 0); - - if (*av != ',' && *av != '\0') - errx(EX_DATAERR, "invalid ICMP type"); - - if (type > 31) - errx(EX_DATAERR, "ICMP type out of range"); - - cmd->d[0] |= 1 << type; - } - cmd->o.opcode = O_ICMPTYPE; - cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32); -} - -static void -print_icmptypes(ipfw_insn_u32 *cmd) -{ - int i; - char sep= ' '; - - printf(" icmptypes"); - for (i = 0; i < 32; i++) { - if ( (cmd->d[0] & (1 << (i))) == 0) - continue; - printf("%c%d", sep, i); - sep = ','; + if (ac == 0) { + warnx("missing keyword to enable/disable\n"); + } else if (_substrcmp(*av, "firewall") == 0) { + sysctlbyname("net.inet.ip.fw.enable", NULL, 0, + &which, sizeof(which)); + } else if (_substrcmp(*av, "one_pass") == 0) { + sysctlbyname("net.inet.ip.fw.one_pass", NULL, 0, + &which, sizeof(which)); + } else if (_substrcmp(*av, "debug") == 0) { + sysctlbyname("net.inet.ip.fw.debug", NULL, 0, + &which, sizeof(which)); + } else if (_substrcmp(*av, "verbose") == 0) { + sysctlbyname("net.inet.ip.fw.verbose", NULL, 0, + &which, sizeof(which)); + } else if (_substrcmp(*av, "dyn_keepalive") == 0) { + sysctlbyname("net.inet.ip.fw.dyn_keepalive", NULL, 0, + &which, sizeof(which)); + } else if (_substrcmp(*av, "altq") == 0) { + altq_set_enabled(which); + } else { + warnx("unrecognize enable/disable keyword: %s\n", *av); } } -/* - * Print the ip address contained in a command. - */ -static void -print_ip6(ipfw_insn_ip6 *cmd, char const *s) -{ - struct hostent *he = NULL; - int len = F_LEN((ipfw_insn *) cmd) - 1; - struct in6_addr *a = &(cmd->addr6); - char trad[255]; - - printf("%s%s ", cmd->o.len & F_NOT ? " not": "", s); - - if (cmd->o.opcode == O_IP6_SRC_ME || cmd->o.opcode == O_IP6_DST_ME) { - printf("me6"); - return; - } - if (cmd->o.opcode == O_IP6) { - printf(" ip6"); - return; - } - - /* - * len == 4 indicates a single IP, whereas lists of 1 or more - * addr/mask pairs have len = (2n+1). We convert len to n so we - * use that to count the number of entries. - */ - - for (len = len / 4; len > 0; len -= 2, a += 2) { - int mb = /* mask length */ - (cmd->o.opcode == O_IP6_SRC || cmd->o.opcode == O_IP6_DST) ? - 128 : contigmask((uint8_t *)&(a[1]), 128); - - if (mb == 128 && do_resolv) - he = gethostbyaddr((char *)a, sizeof(*a), AF_INET6); - if (he != NULL) /* resolved to name */ - printf("%s", he->h_name); - else if (mb == 0) /* any */ - printf("any"); - else { /* numeric IP followed by some kind of mask */ - if (inet_ntop(AF_INET6, a, trad, sizeof( trad ) ) == NULL) - printf("Error ntop in print_ip6\n"); - printf("%s", trad ); - if (mb < 0) /* XXX not really legal... */ - printf(":%s", - inet_ntop(AF_INET6, &a[1], trad, sizeof(trad))); - else if (mb < 128) - printf("/%d", mb); - } - if (len > 2) - printf(","); - } -} - -static void -fill_icmp6types(ipfw_insn_icmp6 *cmd, char *av) -{ - uint8_t type; - - bzero(cmd, sizeof(*cmd)); - while (*av) { - if (*av == ',') - av++; - type = strtoul(av, &av, 0); - if (*av != ',' && *av != '\0') - errx(EX_DATAERR, "invalid ICMP6 type"); - /* - * XXX: shouldn't this be 0xFF? I can't see any reason why - * we shouldn't be able to filter all possiable values - * regardless of the ability of the rest of the kernel to do - * anything useful with them. - */ - if (type > ICMP6_MAXTYPE) - errx(EX_DATAERR, "ICMP6 type out of range"); - cmd->d[type / 32] |= ( 1 << (type % 32)); - } - cmd->o.opcode = O_ICMP6TYPE; - cmd->o.len |= F_INSN_SIZE(ipfw_insn_icmp6); -} - - -static void -print_icmp6types(ipfw_insn_u32 *cmd) -{ - int i, j; - char sep= ' '; - - printf(" ip6 icmp6types"); - for (i = 0; i < 7; i++) - for (j=0; j < 32; ++j) { - if ( (cmd->d[i] & (1 << (j))) == 0) - continue; - printf("%c%d", sep, (i*32 + j)); - sep = ','; - } -} - -static void -print_flow6id( ipfw_insn_u32 *cmd) -{ - uint16_t i, limit = cmd->o.arg1; - char sep = ','; - - printf(" flow-id "); - for( i=0; i < limit; ++i) { - if (i == limit - 1) - sep = ' '; - printf("%d%c", cmd->d[i], sep); - } -} - -/* structure and define for the extension header in ipv6 */ -static struct _s_x ext6hdrcodes[] = { - { "frag", EXT_FRAGMENT }, - { "hopopt", EXT_HOPOPTS }, - { "route", EXT_ROUTING }, - { "dstopt", EXT_DSTOPTS }, - { "ah", EXT_AH }, - { "esp", EXT_ESP }, - { "rthdr0", EXT_RTHDR0 }, - { "rthdr2", EXT_RTHDR2 }, - { NULL, 0 } -}; - -/* fills command for the extension header filtering */ -static int -fill_ext6hdr( ipfw_insn *cmd, char *av) -{ - int tok; - char *s = av; - - cmd->arg1 = 0; - - while(s) { - av = strsep( &s, ",") ; - tok = match_token(ext6hdrcodes, av); - switch (tok) { - case EXT_FRAGMENT: - cmd->arg1 |= EXT_FRAGMENT; - break; - - case EXT_HOPOPTS: - cmd->arg1 |= EXT_HOPOPTS; - break; - - case EXT_ROUTING: - cmd->arg1 |= EXT_ROUTING; - break; - - case EXT_DSTOPTS: - cmd->arg1 |= EXT_DSTOPTS; - break; - - case EXT_AH: - cmd->arg1 |= EXT_AH; - break; - - case EXT_ESP: - cmd->arg1 |= EXT_ESP; - break; - - case EXT_RTHDR0: - cmd->arg1 |= EXT_RTHDR0; - break; - - case EXT_RTHDR2: - cmd->arg1 |= EXT_RTHDR2; - break; - - default: - errx( EX_DATAERR, "invalid option for ipv6 exten header" ); - break; - } - } - if (cmd->arg1 == 0 ) - return 0; - cmd->opcode = O_EXT_HDR; - cmd->len |= F_INSN_SIZE( ipfw_insn ); - return 1; -} - static void -print_ext6hdr( ipfw_insn *cmd ) +show_usage(void) { - char sep = ' '; - - printf(" extension header:"); - if (cmd->arg1 & EXT_FRAGMENT ) { - printf("%cfragmentation", sep); - sep = ','; - } - if (cmd->arg1 & EXT_HOPOPTS ) { - printf("%chop options", sep); - sep = ','; - } - if (cmd->arg1 & EXT_ROUTING ) { - printf("%crouting options", sep); - sep = ','; - } - if (cmd->arg1 & EXT_RTHDR0 ) { - printf("%crthdr0", sep); - sep = ','; - } - if (cmd->arg1 & EXT_RTHDR2 ) { - printf("%crthdr2", sep); - sep = ','; - } - if (cmd->arg1 & EXT_DSTOPTS ) { - printf("%cdestination options", sep); - sep = ','; - } - if (cmd->arg1 & EXT_AH ) { - printf("%cauthentication header", sep); - sep = ','; - } - if (cmd->arg1 & EXT_ESP ) { - printf("%cencapsulated security payload", sep); - } + fprintf(stderr, "usage: ipfw [options]\n" +"do \"ipfw -h\" or see ipfw manpage for details\n" +); + exit(EX_USAGE); } -/* - * show_ipfw() prints the body of an ipfw rule. - * Because the standard rule has at least proto src_ip dst_ip, we use - * a helper function to produce these entries if not provided explicitly. - * The first argument is the list of fields we have, the second is - * the list of fields we want to be printed. - * - * Special cases if we have provided a MAC header: - * + if the rule does not contain IP addresses/ports, do not print them; - * + if the rule does not contain an IP proto, print "all" instead of "ip"; - * - * Once we have 'have_options', IP header fields are printed as options. - */ -#define HAVE_PROTO 0x0001 -#define HAVE_SRCIP 0x0002 -#define HAVE_DSTIP 0x0004 -#define HAVE_PROTO4 0x0008 -#define HAVE_PROTO6 0x0010 -#define HAVE_OPTIONS 0x8000 - -#define HAVE_IP (HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP) static void -show_prerequisites(int *flags, int want, int cmd __unused) -{ - if (comment_only) - return; - if ( (*flags & HAVE_IP) == HAVE_IP) - *flags |= HAVE_OPTIONS; - - if ( !(*flags & HAVE_OPTIONS)) { - if ( !(*flags & HAVE_PROTO) && (want & HAVE_PROTO)) { - if ( (*flags & HAVE_PROTO4)) - printf(" ip4"); - else if ( (*flags & HAVE_PROTO6)) - printf(" ip6"); - else - printf(" ip"); - } - if ( !(*flags & HAVE_SRCIP) && (want & HAVE_SRCIP)) - printf(" from any"); - if ( !(*flags & HAVE_DSTIP) && (want & HAVE_DSTIP)) - printf(" to any"); - } - *flags |= want; -} - -void -show_ipfw(struct ip_fw *rule, int pcwidth, int bcwidth) +help(void) { - static int twidth = 0; - int l; - ipfw_insn *cmd, *tagptr = NULL; - const char *comment = NULL; /* ptr to comment if we have one */ - int proto = 0; /* default */ - int flags = 0; /* prerequisites */ - ipfw_insn_log *logptr = NULL; /* set if we find an O_LOG */ - ipfw_insn_altq *altqptr = NULL; /* set if we find an O_ALTQ */ - int or_block = 0; /* we are in an or block */ - uint32_t set_disable; - - bcopy(&rule->next_rule, &set_disable, sizeof(set_disable)); - - if (set_disable & (1 << rule->set)) { /* disabled */ - if (!show_sets) - return; - else - printf("# DISABLED "); - } - printf("%05u ", rule->rulenum); - - if (pcwidth>0 || bcwidth>0) - printf("%*llu %*llu ", pcwidth, align_uint64(&rule->pcnt), - bcwidth, align_uint64(&rule->bcnt)); - - if (do_time == 2) - printf("%10u ", rule->timestamp); - else if (do_time == 1) { - char timestr[30]; - time_t t = (time_t)0; - - if (twidth == 0) { - strcpy(timestr, ctime(&t)); - *strchr(timestr, '\n') = '\0'; - twidth = strlen(timestr); - } - if (rule->timestamp) { - t = _long_to_time(rule->timestamp); - - strcpy(timestr, ctime(&t)); - *strchr(timestr, '\n') = '\0'; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Mon Jan 26 23:17:19 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1375106566B; Mon, 26 Jan 2009 23:17:19 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0CE88FC08; Mon, 26 Jan 2009 23:17:19 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QNHJQm065989; Mon, 26 Jan 2009 23:17:19 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0QNHJdW065988; Mon, 26 Jan 2009 23:17:19 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901262317.n0QNHJdW065988@svn.freebsd.org> From: Sam Leffler Date: Mon, 26 Jan 2009 23:17:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187745 - user/sam/wifi/etc X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 23:17:19 -0000 Author: sam Date: Mon Jan 26 23:17:19 2009 New Revision: 187745 URL: http://svn.freebsd.org/changeset/base/187745 Log: mfc r187743: ignore DETACH events Modified: user/sam/wifi/etc/ (props changed) user/sam/wifi/etc/devd.conf Modified: user/sam/wifi/etc/devd.conf ============================================================================== --- user/sam/wifi/etc/devd.conf Mon Jan 26 23:15:19 2009 (r187744) +++ user/sam/wifi/etc/devd.conf Mon Jan 26 23:17:19 2009 (r187745) @@ -31,18 +31,17 @@ options { # Configure the interface on attach. Due to a historical accident, this # script is called pccard_ether. # +# NB: DETACH events are ignored; the kernel should handle all cleanup +# (routes, arp cache) if you need to do something beware of races +# against immediate create of a device w/ the same name; e.g. +# ifconfig bridge0 destroy; ifconfig bridge0 create +# notify 0 { match "system" "IFNET"; match "type" "ATTACH"; action "/etc/pccard_ether $subsystem start"; }; -notify 0 { - match "system" "IFNET"; - match "type" "DETACH"; - action "/etc/pccard_ether $subsystem stop"; -}; - # # Try to start dhclient on Ethernet like interfaces when the link comes # up. Only devices that are configured to support DHCP will actually From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 01:21:12 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60B311065673; Tue, 27 Jan 2009 01:21:12 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DABC8FC0A; Tue, 27 Jan 2009 01:21:12 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R1LCcM069225; Tue, 27 Jan 2009 01:21:12 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R1LCS9069217; Tue, 27 Jan 2009 01:21:12 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901270121.n0R1LCS9069217@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 01:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187750 - in user/thompsa/usb/sys/dev/usb2: controller core X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 01:21:12 -0000 Author: thompsa Date: Tue Jan 27 01:21:11 2009 New Revision: 187750 URL: http://svn.freebsd.org/changeset/base/187750 Log: Change over to using taskqueue(9) instead of hand rolled threads and the config_td system. Deleted: user/thompsa/usb/sys/dev/usb2/core/usb2_config_td.c user/thompsa/usb/sys/dev/usb2/core/usb2_config_td.h Modified: user/thompsa/usb/sys/dev/usb2/controller/usb2_bus.h user/thompsa/usb/sys/dev/usb2/controller/usb2_controller.c user/thompsa/usb/sys/dev/usb2/core/usb2_device.c user/thompsa/usb/sys/dev/usb2/core/usb2_device.h user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c user/thompsa/usb/sys/dev/usb2/core/usb2_process.c user/thompsa/usb/sys/dev/usb2/core/usb2_process.h user/thompsa/usb/sys/dev/usb2/core/usb2_transfer.c user/thompsa/usb/sys/dev/usb2/core/usb2_transfer.h Modified: user/thompsa/usb/sys/dev/usb2/controller/usb2_bus.h ============================================================================== --- user/thompsa/usb/sys/dev/usb2/controller/usb2_bus.h Tue Jan 27 00:31:25 2009 (r187749) +++ user/thompsa/usb/sys/dev/usb2/controller/usb2_bus.h Tue Jan 27 01:21:11 2009 (r187750) @@ -28,16 +28,6 @@ #define _USB2_BUS_H_ /* - * The following structure defines the USB explore message sent to the - * USB explore process. - */ - -struct usb2_bus_msg { - struct usb2_proc_msg hdr; - struct usb2_bus *bus; -}; - -/* * The following structure defines the USB statistics structure. */ struct usb2_bus_stat { @@ -51,23 +41,14 @@ struct usb2_bus_stat { struct usb2_bus { struct usb2_bus_stat stats_err; struct usb2_bus_stat stats_ok; + struct usb2_process done_proc; struct usb2_process explore_proc; - struct usb2_process roothub_proc; - /* - * There are two callback processes. One for Giant locked - * callbacks. One for non-Giant locked callbacks. This should - * avoid congestion and reduce response time in most cases. - */ - struct usb2_process giant_callback_proc; - struct usb2_process non_giant_callback_proc; - struct usb2_bus_msg explore_msg[2]; - struct usb2_bus_msg detach_msg[2]; - struct usb2_bus_msg attach_msg[2]; - struct usb2_bus_msg roothub_msg[2]; - /* - * This mutex protects the USB hardware: - */ - struct mtx bus_mtx; + struct usb2_task explore_task; + struct usb2_task attach_task; + struct usb2_task detach_task; + struct usb2_task roothub_task; + struct mtx bus_mtx; /* This mutex protects the USB + * hardware */ struct usb2_perm perm; struct usb2_xfer_queue intr_q; struct usb2_callout power_wdog; /* power management */ Modified: user/thompsa/usb/sys/dev/usb2/controller/usb2_controller.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/controller/usb2_controller.c Tue Jan 27 00:31:25 2009 (r187749) +++ user/thompsa/usb/sys/dev/usb2/controller/usb2_controller.c Tue Jan 27 01:21:11 2009 (r187750) @@ -43,6 +43,10 @@ #include /* function prototypes */ +static usb2_task_fn_t usb2_bus_explore; +static usb2_task_fn_t usb2_bus_attach; +static usb2_task_fn_t usb2_bus_detach; +static usb2_task_fn_t usb2_bus_roothub; static device_probe_t usb2_probe; static device_attach_t usb2_attach; @@ -59,7 +63,6 @@ static void usb2_bus_mem_alloc_all_cb(st static void usb2_bus_mem_free_all_cb(struct usb2_bus *, struct usb2_page_cache *, struct usb2_page *, uint32_t, uint32_t); -static void usb2_bus_roothub(struct usb2_proc_msg *pm); /* static variables */ @@ -153,31 +156,13 @@ usb2_detach(device_t dev) usb2_callout_drain(&bus->power_wdog); /* Let the USB explore process detach all devices. */ - - USB_BUS_LOCK(bus); - if (usb2_proc_msignal(&bus->explore_proc, - &bus->detach_msg[0], &bus->detach_msg[1])) { - /* ignore */ - } + usb2_proc_enqueue(&bus->explore_proc, &bus->explore_task); /* Wait for detach to complete */ + usb2_proc_drain(&bus->explore_proc, &bus->explore_task); - usb2_proc_mwait(&bus->explore_proc, - &bus->detach_msg[0], &bus->detach_msg[1]); - - USB_BUS_UNLOCK(bus); - - /* Get rid of USB callback processes */ - - usb2_proc_unsetup(&bus->giant_callback_proc); - usb2_proc_unsetup(&bus->non_giant_callback_proc); - - /* Get rid of USB roothub process */ - - usb2_proc_unsetup(&bus->roothub_proc); - - /* Get rid of USB explore process */ - - usb2_proc_unsetup(&bus->explore_proc); + /* Get rid of USB processes */ + usb2_proc_free(&bus->done_proc); + usb2_proc_free(&bus->explore_proc); return (0); } @@ -188,14 +173,14 @@ usb2_detach(device_t dev) * This function is used to explore the device tree from the root. *------------------------------------------------------------------------*/ static void -usb2_bus_explore(struct usb2_proc_msg *pm) +usb2_bus_explore(void *context, struct usb2_task *task) { - struct usb2_bus *bus; + struct usb2_bus *bus = context; struct usb2_device *udev; - bus = ((struct usb2_bus_msg *)pm)->bus; udev = bus->devices[USB_ROOT_HUB_ADDR]; + USB_BUS_LOCK(bus); if (udev && udev->hub) { if (bus->do_probe) { @@ -208,8 +193,6 @@ usb2_bus_explore(struct usb2_proc_msg *p } USB_BUS_UNLOCK(bus); - mtx_lock(&Giant); - /* * First update the USB power state! */ @@ -219,12 +202,12 @@ usb2_bus_explore(struct usb2_proc_msg *p * Explore the Root USB HUB. This call can sleep, * exiting Giant, which is actually Giant. */ + mtx_lock(&Giant); (udev->hub->explore) (udev); - mtx_unlock(&Giant); - - USB_BUS_LOCK(bus); + return; } + USB_BUS_UNLOCK(bus); } /*------------------------------------------------------------------------* @@ -233,13 +216,13 @@ usb2_bus_explore(struct usb2_proc_msg *p * This function is used to detach the device tree from the root. *------------------------------------------------------------------------*/ static void -usb2_bus_detach(struct usb2_proc_msg *pm) +usb2_bus_detach(void *context, struct usb2_task *task) { - struct usb2_bus *bus; + struct usb2_bus *bus = context; struct usb2_device *udev; device_t dev; - bus = ((struct usb2_bus_msg *)pm)->bus; + USB_BUS_LOCK(bus); udev = bus->devices[USB_ROOT_HUB_ADDR]; dev = bus->bdev; /* clear the softc */ @@ -262,6 +245,7 @@ usb2_bus_detach(struct usb2_proc_msg *pm USB_BUS_LOCK(bus); /* clear bdev variable last */ bus->bdev = NULL; + USB_BUS_UNLOCK(bus); } static void @@ -287,15 +271,14 @@ usb2_power_wdog(void *arg) * This function attaches USB in context of the explore thread. *------------------------------------------------------------------------*/ static void -usb2_bus_attach(struct usb2_proc_msg *pm) +usb2_bus_attach(void *context, struct usb2_task *task) { - struct usb2_bus *bus; + struct usb2_bus *bus = context; struct usb2_device *child; device_t dev; usb2_error_t err; uint8_t speed; - bus = ((struct usb2_bus_msg *)pm)->bus; dev = bus->bdev; DPRINTF("\n"); @@ -326,11 +309,9 @@ usb2_bus_attach(struct usb2_proc_msg *pm return; } - USB_BUS_UNLOCK(bus); mtx_lock(&Giant); /* XXX not required by USB */ /* Allocate the Root USB device */ - child = usb2_alloc_device(bus->bdev, bus, NULL, 0, 0, 1, speed, USB_MODE_HOST); if (child) { @@ -344,9 +325,7 @@ usb2_bus_attach(struct usb2_proc_msg *pm } else { err = USB_ERR_NOMEM; } - mtx_unlock(&Giant); - USB_BUS_LOCK(bus); if (err) { device_printf(bus->bdev, "Root HUB problem, error=%s\n", @@ -357,10 +336,8 @@ usb2_bus_attach(struct usb2_proc_msg *pm device_set_softc(dev, bus); /* start watchdog - this function will unlock the BUS lock ! */ - usb2_power_wdog(bus); - - /* need to return locked */ USB_BUS_LOCK(bus); + usb2_power_wdog(bus); } /*------------------------------------------------------------------------* @@ -376,53 +353,20 @@ static void usb2_attach_sub(device_t dev, struct usb2_bus *bus) { /* Initialise USB process messages */ - bus->explore_msg[0].hdr.pm_callback = &usb2_bus_explore; - bus->explore_msg[0].bus = bus; - bus->explore_msg[1].hdr.pm_callback = &usb2_bus_explore; - bus->explore_msg[1].bus = bus; - - bus->detach_msg[0].hdr.pm_callback = &usb2_bus_detach; - bus->detach_msg[0].bus = bus; - bus->detach_msg[1].hdr.pm_callback = &usb2_bus_detach; - bus->detach_msg[1].bus = bus; - - bus->attach_msg[0].hdr.pm_callback = &usb2_bus_attach; - bus->attach_msg[0].bus = bus; - bus->attach_msg[1].hdr.pm_callback = &usb2_bus_attach; - bus->attach_msg[1].bus = bus; - - bus->roothub_msg[0].hdr.pm_callback = &usb2_bus_roothub; - bus->roothub_msg[0].bus = bus; - bus->roothub_msg[1].hdr.pm_callback = &usb2_bus_roothub; - bus->roothub_msg[1].bus = bus; - - /* Create USB explore, roothub and callback processes */ - - if (usb2_proc_setup(&bus->giant_callback_proc, - &bus->bus_mtx, USB_PRI_MED)) { - printf("WARNING: Creation of USB Giant " - "callback process failed.\n"); - } else if (usb2_proc_setup(&bus->non_giant_callback_proc, - &bus->bus_mtx, USB_PRI_HIGH)) { - printf("WARNING: Creation of USB non-Giant " - "callback process failed.\n"); - } else if (usb2_proc_setup(&bus->roothub_proc, - &bus->bus_mtx, USB_PRI_HIGH)) { - printf("WARNING: Creation of USB roothub " - "process failed.\n"); - } else if (usb2_proc_setup(&bus->explore_proc, - &bus->bus_mtx, USB_PRI_MED)) { - printf("WARNING: Creation of USB explore " - "process failed.\n"); - } else { - /* Get final attach going */ - USB_BUS_LOCK(bus); - if (usb2_proc_msignal(&bus->explore_proc, - &bus->attach_msg[0], &bus->attach_msg[1])) { - /* ignore */ - } - USB_BUS_UNLOCK(bus); - } + USB_TASK_INIT(&bus->explore_task, usb2_bus_explore, bus, NULL); + USB_TASK_INIT(&bus->attach_task, usb2_bus_attach, bus, NULL); + USB_TASK_INIT(&bus->detach_task, usb2_bus_detach, bus, NULL); + USB_TASK_INIT(&bus->roothub_task, usb2_bus_roothub, bus, NULL); + + /* Create a new USB process */ + usb2_proc_create(&bus->explore_proc, USB_PRI_MED, + device_get_nameunit(dev)); + usb2_proc_create(&bus->done_proc, USB_PRI_HIGH, + device_get_nameunit(bus->parent)); + + /* Get final attach going */ + usb2_proc_enqueue(&bus->explore_proc, &bus->attach_task); + } /*------------------------------------------------------------------------* @@ -580,15 +524,13 @@ usb2_bus_mem_free_all(struct usb2_bus *b * roothub and is called from the roothub process. *------------------------------------------------------------------------*/ static void -usb2_bus_roothub(struct usb2_proc_msg *pm) +usb2_bus_roothub(void *context, struct usb2_task *task) { - struct usb2_bus *bus; - - bus = ((struct usb2_bus_msg *)pm)->bus; - - USB_BUS_LOCK_ASSERT(bus, MA_OWNED); + struct usb2_bus *bus = context; + USB_BUS_LOCK(bus); (bus->methods->roothub_exec) (bus); + USB_BUS_UNLOCK(bus); } /*------------------------------------------------------------------------* @@ -602,8 +544,5 @@ usb2_bus_roothub_exec(struct usb2_bus *b { USB_BUS_LOCK_ASSERT(bus, MA_OWNED); - if (usb2_proc_msignal(&bus->roothub_proc, - &bus->roothub_msg[0], &bus->roothub_msg[1])) { - /* ignore */ - } + usb2_proc_enqueue(&bus->done_proc, &bus->roothub_task); } Modified: user/thompsa/usb/sys/dev/usb2/core/usb2_device.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/core/usb2_device.c Tue Jan 27 00:31:25 2009 (r187749) +++ user/thompsa/usb/sys/dev/usb2/core/usb2_device.c Tue Jan 27 01:21:11 2009 (r187750) @@ -55,6 +55,7 @@ #include /* function prototypes */ +static usb2_task_fn_t usb2_clear_stall; static void usb2_fill_pipe_data(struct usb2_device *, uint8_t, struct usb2_endpoint_descriptor *, struct usb2_pipe *); @@ -68,7 +69,6 @@ static void usb2_init_attach_arg(struct struct usb2_attach_arg *); static void usb2_suspend_resume_sub(struct usb2_device *, device_t, uint8_t); -static void usb2_clear_stall_proc(struct usb2_proc_msg *_pm); static void usb2_check_strings(struct usb2_device *); static usb2_error_t usb2_fill_iface_data(struct usb2_device *, uint8_t, uint8_t); @@ -1221,26 +1221,19 @@ usb2_suspend_resume(struct usb2_device * } /*------------------------------------------------------------------------* - * usb2_clear_stall_proc + * usb2_clear_stall * * This function performs generic USB clear stall operations. *------------------------------------------------------------------------*/ static void -usb2_clear_stall_proc(struct usb2_proc_msg *_pm) +usb2_clear_stall(void *context, struct usb2_task *task) { - struct usb2_clear_stall_msg *pm = (void *)_pm; - struct usb2_device *udev = pm->udev; - - /* Change lock */ - USB_BUS_UNLOCK(udev->bus); - mtx_lock(udev->default_mtx); + struct usb2_device *udev = context; /* Start clear stall callback */ + mtx_lock(udev->default_mtx); usb2_transfer_start(udev->default_xfer[1]); - - /* Change lock */ mtx_unlock(udev->default_mtx); - USB_BUS_LOCK(udev->bus); } /*------------------------------------------------------------------------* @@ -1314,10 +1307,7 @@ usb2_alloc_device(device_t parent_dev, s mtx_init(udev->default_mtx, "USB device mutex", NULL, MTX_DEF); /* initialise generic clear stall */ - udev->cs_msg[0].hdr.pm_callback = &usb2_clear_stall_proc; - udev->cs_msg[0].udev = udev; - udev->cs_msg[1].hdr.pm_callback = &usb2_clear_stall_proc; - udev->cs_msg[1].udev = udev; + USB_TASK_INIT(&udev->clearstall_task, usb2_clear_stall, udev, NULL); /* initialise some USB device fields */ udev->parent_hub = parent_hub; @@ -1722,14 +1712,11 @@ usb2_free_device(struct usb2_device *ude /* template unsetup, if any */ (usb2_temp_unsetup_p) (udev); - /* + /* * Make sure that our clear-stall messages are not queued * anywhere: */ - USB_BUS_LOCK(udev->bus); - usb2_proc_mwait(&udev->bus->non_giant_callback_proc, - &udev->cs_msg[0], &udev->cs_msg[1]); - USB_BUS_UNLOCK(udev->bus); + usb2_proc_drain(&bus->done_proc, &udev->clearstall_task); sx_destroy(udev->default_sx); sx_destroy(udev->default_sx + 1); Modified: user/thompsa/usb/sys/dev/usb2/core/usb2_device.h ============================================================================== --- user/thompsa/usb/sys/dev/usb2/core/usb2_device.h Tue Jan 27 00:31:25 2009 (r187749) +++ user/thompsa/usb/sys/dev/usb2/core/usb2_device.h Tue Jan 27 01:21:11 2009 (r187750) @@ -31,11 +31,6 @@ struct usb2_symlink; #define USB_DEFAULT_XFER_MAX 2 -struct usb2_clear_stall_msg { - struct usb2_proc_msg hdr; - struct usb2_device *udev; -}; - /* * The following structure defines an USB pipe which is equal to an * USB endpoint. @@ -99,8 +94,8 @@ struct usb2_power_save { * these structures for every USB device. */ struct usb2_device { - struct usb2_clear_stall_msg cs_msg[2]; /* generic clear stall - * messages */ + struct usb2_task clearstall_task; + struct usb2_perm perm; struct sx default_sx[2]; struct mtx default_mtx[1]; Modified: user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c Tue Jan 27 00:31:25 2009 (r187749) +++ user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c Tue Jan 27 01:21:11 2009 (r187750) @@ -1354,10 +1354,7 @@ usb2_needs_explore(struct usb2_bus *bus, if (do_probe) { bus->do_probe = 1; } - if (usb2_proc_msignal(&bus->explore_proc, - &bus->explore_msg[0], &bus->explore_msg[1])) { - /* ignore */ - } + usb2_proc_enqueue(&bus->explore_proc, &bus->explore_task); USB_BUS_UNLOCK(bus); } Modified: user/thompsa/usb/sys/dev/usb2/core/usb2_process.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/core/usb2_process.c Tue Jan 27 00:31:25 2009 (r187749) +++ user/thompsa/usb/sys/dev/usb2/core/usb2_process.c Tue Jan 27 01:21:11 2009 (r187750) @@ -31,26 +31,8 @@ #include #include -#include -#include -#include - -#if (__FreeBSD_version < 700000) -#define thread_lock(td) mtx_lock_spin(&sched_lock) -#define thread_unlock(td) mtx_unlock_spin(&sched_lock) -#endif +#include -#if (__FreeBSD_version >= 800000) -#define USB_THREAD_CREATE(f, s, p, ...) \ - kproc_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) -#define USB_THREAD_SUSPEND(p) kproc_suspend(p,0) -#define USB_THREAD_EXIT(err) kproc_exit(err) -#else -#define USB_THREAD_CREATE(f, s, p, ...) \ - kthread_create((f), (s), (p), RFHIGHPID, 0, __VA_ARGS__) -#define USB_THREAD_SUSPEND(p) kthread_suspend(p,0) -#define USB_THREAD_EXIT(err) kthread_exit(err) -#endif #if USB_DEBUG static int usb2_proc_debug; @@ -60,416 +42,67 @@ SYSCTL_INT(_hw_usb2_proc, OID_AUTO, debu "Debug level"); #endif -/*------------------------------------------------------------------------* - * usb2_process - * - * This function is the USB process dispatcher. - *------------------------------------------------------------------------*/ -static void -usb2_process(void *arg) -{ - struct usb2_process *up = arg; - struct usb2_proc_msg *pm; - struct thread *td; - - /* adjust priority */ - td = curthread; - thread_lock(td); - sched_prio(td, up->up_prio); - thread_unlock(td); - - mtx_lock(up->up_mtx); - - up->up_curtd = td; - - while (1) { - - if (up->up_gone) { - break; - } - /* - * NOTE to reimplementors: dequeueing a command from the - * "used" queue and executing it must be atomic, with regard - * to the "up_mtx" mutex. That means any attempt to queue a - * command by another thread must be blocked until either: - * - * 1) the command sleeps - * - * 2) the command returns - * - * Here is a practical example that shows how this helps - * solving a problem: - * - * Assume that you want to set the baud rate on a USB serial - * device. During the programming of the device you don't - * want to receive nor transmit any data, because it will be - * garbage most likely anyway. The programming of our USB - * device takes 20 milliseconds and it needs to call - * functions that sleep. - * - * Non-working solution: Before we queue the programming - * command, we stop transmission and reception of data. Then - * we queue a programming command. At the end of the - * programming command we enable transmission and reception - * of data. - * - * Problem: If a second programming command is queued while the - * first one is sleeping, we end up enabling transmission - * and reception of data too early. - * - * Working solution: Before we queue the programming command, - * we stop transmission and reception of data. Then we queue - * a programming command. Then we queue a second command - * that only enables transmission and reception of data. - * - * Why it works: If a second programming command is queued - * while the first one is sleeping, then the queueing of a - * second command to enable the data transfers, will cause - * the previous one, which is still on the queue, to be - * removed from the queue, and re-inserted after the last - * baud rate programming command, which then gives the - * desired result. - */ - pm = TAILQ_FIRST(&up->up_qhead); - - if (pm) { - DPRINTF("Message pm=%p, cb=%p (enter)\n", - pm, pm->pm_callback); - - (pm->pm_callback) (pm); - - if (pm == TAILQ_FIRST(&up->up_qhead)) { - /* nothing changed */ - TAILQ_REMOVE(&up->up_qhead, pm, pm_qentry); - pm->pm_qentry.tqe_prev = NULL; - } - DPRINTF("Message pm=%p (leave)\n", pm); - - continue; - } - /* end if messages - check if anyone is waiting for sync */ - if (up->up_dsleep) { - up->up_dsleep = 0; - usb2_cv_broadcast(&up->up_drain); - } - up->up_msleep = 1; - usb2_cv_wait(&up->up_cv, up->up_mtx); - } - - up->up_ptr = NULL; - usb2_cv_signal(&up->up_cv); - mtx_unlock(up->up_mtx); - - USB_THREAD_EXIT(0); -} - -/*------------------------------------------------------------------------* - * usb2_proc_setup - * - * This function will create a process using the given "prio" that can - * execute callbacks. The mutex pointed to by "p_mtx" will be applied - * before calling the callbacks and released after that the callback - * has returned. The structure pointed to by "up" is assumed to be - * zeroed before this function is called. - * - * Return values: - * 0: success - * Else: failure - *------------------------------------------------------------------------*/ -uint8_t -usb2_proc_setup(struct usb2_process *up, struct mtx *p_mtx, uint8_t prio) +int +usb2_proc_create(struct usb2_process *up, int prio, const char *name) { - up->up_mtx = p_mtx; - up->up_prio = prio; - - TAILQ_INIT(&up->up_qhead); - - usb2_cv_init(&up->up_cv, "WMSG"); - usb2_cv_init(&up->up_drain, "DMSG"); - - if (USB_THREAD_CREATE(&usb2_process, up, - &up->up_ptr, "USBPROC")) { - DPRINTFN(0, "Unable to create USB process."); - up->up_ptr = NULL; - goto error; - } + up->up_tq = taskqueue_create(name, M_WAITOK, + taskqueue_thread_enqueue, &up->up_tq); + if (up->up_tq == NULL) + return (ENOMEM); + taskqueue_start_threads(&up->up_tq, 1, prio, + "usb: %s", name); return (0); - -error: - usb2_proc_unsetup(up); - return (1); } -/*------------------------------------------------------------------------* - * usb2_proc_unsetup - * - * NOTE: If the structure pointed to by "up" is all zero, this - * function does nothing. - * - * NOTE: Messages that are pending on the process queue will not be - * removed nor called. - *------------------------------------------------------------------------*/ void -usb2_proc_unsetup(struct usb2_process *up) +usb2_proc_free(struct usb2_process *up) { - if (!(up->up_mtx)) { - /* not initialised */ - return; - } - usb2_proc_drain(up); - - usb2_cv_destroy(&up->up_cv); - usb2_cv_destroy(&up->up_drain); - - /* make sure that we do not enter here again */ - up->up_mtx = NULL; -} - -/*------------------------------------------------------------------------* - * usb2_proc_msignal - * - * This function will queue one of the passed USB process messages on - * the USB process queue. The first message that is not already queued - * will get queued. If both messages are already queued the one queued - * last will be removed from the queue and queued in the end. The USB - * process mutex must be locked when calling this function. This - * function exploits the fact that a process can only do one callback - * at a time. The message that was queued is returned. - *------------------------------------------------------------------------*/ -void * -usb2_proc_msignal(struct usb2_process *up, void *_pm0, void *_pm1) -{ - struct usb2_proc_msg *pm0 = _pm0; - struct usb2_proc_msg *pm1 = _pm1; - struct usb2_proc_msg *pm2; - uint32_t d; - uint8_t t; - - mtx_assert(up->up_mtx, MA_OWNED); - - t = 0; - - if (pm0->pm_qentry.tqe_prev) { - t |= 1; - } - if (pm1->pm_qentry.tqe_prev) { - t |= 2; - } - if (t == 0) { - /* - * No entries are queued. Queue "pm0" and use the existing - * message number. - */ - pm2 = pm0; - } else if (t == 1) { - /* Check if we need to increment the message number. */ - if (pm0->pm_num == up->up_msg_num) { - up->up_msg_num++; - } - pm2 = pm1; - } else if (t == 2) { - /* Check if we need to increment the message number. */ - if (pm1->pm_num == up->up_msg_num) { - up->up_msg_num++; - } - pm2 = pm0; - } else if (t == 3) { - /* - * Both entries are queued. Re-queue the entry closest to - * the end. - */ - d = (pm1->pm_num - pm0->pm_num); - - /* Check sign after subtraction */ - if (d & 0x80000000) { - pm2 = pm0; - } else { - pm2 = pm1; - } - - TAILQ_REMOVE(&up->up_qhead, pm2, pm_qentry); - } else { - pm2 = NULL; /* panic - should not happen */ - } - - DPRINTF(" t=%u, num=%u\n", t, up->up_msg_num); - - /* Put message last on queue */ - - pm2->pm_num = up->up_msg_num; - TAILQ_INSERT_TAIL(&up->up_qhead, pm2, pm_qentry); - - /* Check if we need to wakeup the USB process. */ - - if (up->up_msleep) { - up->up_msleep = 0; /* save "cv_signal()" calls */ - usb2_cv_signal(&up->up_cv); + if (up->up_tq) { + taskqueue_free(up->up_tq); + up->up_tq = NULL; } - return (pm2); } -/*------------------------------------------------------------------------* - * usb2_proc_is_gone - * - * Return values: - * 0: USB process is running - * Else: USB process is tearing down - *------------------------------------------------------------------------*/ -uint8_t -usb2_proc_is_gone(struct usb2_process *up) +void +usb2_proc_block(struct usb2_process *up) { - mtx_assert(up->up_mtx, MA_OWNED); - - return (up->up_gone ? 1 : 0); + taskqueue_block(up->up_tq); } -/*------------------------------------------------------------------------* - * usb2_proc_mwait - * - * This function will return when the USB process message pointed to - * by "pm" is no longer on a queue. This function must be called - * having "up->up_mtx" locked. - *------------------------------------------------------------------------*/ void -usb2_proc_mwait(struct usb2_process *up, void *_pm0, void *_pm1) +usb2_proc_unblock(struct usb2_process *up) { - struct usb2_proc_msg *pm0 = _pm0; - struct usb2_proc_msg *pm1 = _pm1; - - mtx_assert(up->up_mtx, MA_OWNED); - - if (up->up_curtd == curthread) { - /* Just remove the messages from the queue. */ - if (pm0->pm_qentry.tqe_prev) { - TAILQ_REMOVE(&up->up_qhead, pm0, pm_qentry); - pm0->pm_qentry.tqe_prev = NULL; - } - if (pm1->pm_qentry.tqe_prev) { - TAILQ_REMOVE(&up->up_qhead, pm1, pm_qentry); - pm1->pm_qentry.tqe_prev = NULL; - } - } else - while (pm0->pm_qentry.tqe_prev || - pm1->pm_qentry.tqe_prev) { - /* check if config thread is gone */ - if (up->up_gone) - break; - up->up_dsleep = 1; - usb2_cv_wait(&up->up_drain, up->up_mtx); - } + taskqueue_unblock(up->up_tq); } -/*------------------------------------------------------------------------* - * usb2_proc_drain - * - * This function will tear down an USB process, waiting for the - * currently executing command to return. - * - * NOTE: If the structure pointed to by "up" is all zero, - * this function does nothing. - *------------------------------------------------------------------------*/ void -usb2_proc_drain(struct usb2_process *up) +usb2_proc_enqueue(struct usb2_process *up, struct usb2_task *task) { - if (!(up->up_mtx)) { - /* not initialised */ + if (up->up_tq == NULL) return; - } - if (up->up_mtx != &Giant) { - mtx_assert(up->up_mtx, MA_NOTOWNED); - } - mtx_lock(up->up_mtx); - - /* Set the gone flag */ - - up->up_gone = 1; - - while (up->up_ptr) { - - /* Check if we need to wakeup the USB process */ - if (up->up_msleep || up->up_csleep) { - up->up_msleep = 0; - up->up_csleep = 0; - usb2_cv_signal(&up->up_cv); - } - /* Check if we are still cold booted */ - - if (cold) { - USB_THREAD_SUSPEND(up->up_ptr); - printf("WARNING: A USB process has been left suspended!\n"); - break; - } - usb2_cv_wait(&up->up_cv, up->up_mtx); - } - /* Check if someone is waiting - should not happen */ - - if (up->up_dsleep) { - up->up_dsleep = 0; - usb2_cv_broadcast(&up->up_drain); - DPRINTF("WARNING: Someone is waiting " - "for USB process drain!\n"); - } - mtx_unlock(up->up_mtx); + taskqueue_enqueue(up->up_tq, &task->ut_task); } -/*------------------------------------------------------------------------* - * usb2_proc_cwait - * - * This function will suspend the current process until - * "usb2_proc_signal()" or "usb2_proc_drain()" is called. The - * "timeout" parameter defines the maximum wait time in system - * ticks. If "timeout" is zero that means no timeout. - * - * NOTE: This function can only be called from within an USB process. - * - * Return values: - * USB_PROC_WAIT_TIMEOUT: Timeout - * USB_PROC_WAIT_NORMAL: Success - * Else: USB process is tearing down - *------------------------------------------------------------------------*/ -uint8_t -usb2_proc_cwait(struct usb2_process *up, int timeout) +void +usb2_proc_drain(struct usb2_process *up, struct usb2_task *task) { - int error; - - mtx_assert(up->up_mtx, MA_OWNED); - - if (up->up_gone) { - return (USB_PROC_WAIT_DRAIN); - } - up->up_csleep = 1; - - if (timeout == 0) { - usb2_cv_wait(&up->up_cv, up->up_mtx); - error = 0; - } else { - error = usb2_cv_timedwait(&up->up_cv, up->up_mtx, timeout); - } - - up->up_csleep = 0; - - if (up->up_gone) { - return (USB_PROC_WAIT_DRAIN); - } - if (error == EWOULDBLOCK) { - return (USB_PROC_WAIT_TIMEOUT); - } - return (0); + taskqueue_drain(up->up_tq, &task->ut_task); } /*------------------------------------------------------------------------* - * usb2_proc_csignal + * usb2_proc_dispatch * - * This function will wakeup the given USB process. + * This function is used to lock the mutex before calling the task *------------------------------------------------------------------------*/ void -usb2_proc_csignal(struct usb2_process *up) +usb2_proc_dispatch(void *arg, int pending) { - mtx_assert(up->up_mtx, MA_OWNED); + struct usb2_task *task = arg; - if (up->up_csleep) { - up->up_csleep = 0; - usb2_cv_signal(&up->up_cv); - } + if (task->ut_mtx) + mtx_lock(task->ut_mtx); + task->ut_func(task->ut_context, task); + if (task->ut_mtx) + mtx_unlock(task->ut_mtx); } Modified: user/thompsa/usb/sys/dev/usb2/core/usb2_process.h ============================================================================== --- user/thompsa/usb/sys/dev/usb2/core/usb2_process.h Tue Jan 27 00:31:25 2009 (r187749) +++ user/thompsa/usb/sys/dev/usb2/core/usb2_process.h Tue Jan 27 01:21:11 2009 (r187750) @@ -28,63 +28,47 @@ #define _USB2_PROCESS_H_ #include +#include /* defines */ #define USB_PRI_HIGH PI_NET #define USB_PRI_MED PI_DISK +struct usb2_task; -#define USB_PROC_WAIT_TIMEOUT 2 -#define USB_PROC_WAIT_DRAIN 1 -#define USB_PROC_WAIT_NORMAL 0 - -/* structure prototypes */ - -struct usb2_proc_msg; - -/* typedefs */ - -typedef void (usb2_proc_callback_t)(struct usb2_proc_msg *hdr); - -/* - * The following structure defines the USB process message header. - */ -struct usb2_proc_msg { - TAILQ_ENTRY(usb2_proc_msg) pm_qentry; - usb2_proc_callback_t *pm_callback; - uint32_t pm_num; -}; - +typedef void usb2_task_fn_t(void *context, struct usb2_task *task); /* * The following structure defines the USB process. */ struct usb2_process { - TAILQ_HEAD(, usb2_proc_msg) up_qhead; - struct cv up_cv; - struct cv up_drain; - - struct proc *up_ptr; - struct thread *up_curtd; - struct mtx *up_mtx; - - uint32_t up_msg_num; - - uint8_t up_prio; - uint8_t up_gone; - uint8_t up_msleep; - uint8_t up_csleep; - uint8_t up_dsleep; + struct taskqueue *up_tq; }; -/* prototypes */ +struct usb2_task { + struct task ut_task; + struct mtx *ut_mtx; + usb2_task_fn_t *ut_func; + void *ut_context; + int ut_arg; +}; -uint8_t usb2_proc_cwait(struct usb2_process *up, int timeout); -uint8_t usb2_proc_is_gone(struct usb2_process *up); -uint8_t usb2_proc_setup(struct usb2_process *up, struct mtx *p_mtx, - uint8_t prio); -void usb2_proc_csignal(struct usb2_process *up); -void usb2_proc_drain(struct usb2_process *up); -void usb2_proc_mwait(struct usb2_process *up, void *pm0, void *pm1); -void usb2_proc_unsetup(struct usb2_process *up); -void *usb2_proc_msignal(struct usb2_process *up, void *pm0, void *pm1); +#define USB_TASK_INIT(t, f, c, m) do { \ + TASK_INIT(&(t)->ut_task, 0, usb2_proc_dispatch, t); \ + (t)->ut_func = (f); \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 01:23:26 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 382C610656F8; Tue, 27 Jan 2009 01:23:26 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2441A8FC0A; Tue, 27 Jan 2009 01:23:26 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R1NQ6w069320; Tue, 27 Jan 2009 01:23:26 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R1NPNc069306; Tue, 27 Jan 2009 01:23:25 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901270123.n0R1NPNc069306@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 01:23:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187751 - user/thompsa/usb/sys/dev/usb2/serial X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 01:23:27 -0000 Author: thompsa Date: Tue Jan 27 01:23:25 2009 New Revision: 187751 URL: http://svn.freebsd.org/changeset/base/187751 Log: Change over to usb2_proc w/ taskqueues. Modified: user/thompsa/usb/sys/dev/usb2/serial/uark2.c user/thompsa/usb/sys/dev/usb2/serial/ubsa2.c user/thompsa/usb/sys/dev/usb2/serial/uchcom2.c user/thompsa/usb/sys/dev/usb2/serial/ucycom2.c user/thompsa/usb/sys/dev/usb2/serial/ufoma2.c user/thompsa/usb/sys/dev/usb2/serial/uftdi2.c user/thompsa/usb/sys/dev/usb2/serial/uipaq2.c user/thompsa/usb/sys/dev/usb2/serial/umct2.c user/thompsa/usb/sys/dev/usb2/serial/umodem2.c user/thompsa/usb/sys/dev/usb2/serial/umoscom2.c user/thompsa/usb/sys/dev/usb2/serial/uplcom2.c user/thompsa/usb/sys/dev/usb2/serial/usb2_serial.c user/thompsa/usb/sys/dev/usb2/serial/usb2_serial.h user/thompsa/usb/sys/dev/usb2/serial/uvscom2.c Modified: user/thompsa/usb/sys/dev/usb2/serial/uark2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uark2.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/uark2.c Tue Jan 27 01:23:25 2009 (r187751) @@ -457,9 +457,6 @@ uark_cfg_write(struct uark_softc *sc, ui struct usb2_device_request req; usb2_error_t err; - if (usb2_com_cfg_is_gone(&sc->sc_ucom)) { - return; - } req.bmRequestType = UARK_WRITE; req.bRequest = UARK_REQUEST; USETW(req.wValue, value); Modified: user/thompsa/usb/sys/dev/usb2/serial/ubsa2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/ubsa2.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/ubsa2.c Tue Jan 27 01:23:25 2009 (r187751) @@ -382,9 +382,6 @@ ubsa_cfg_request(struct ubsa_softc *sc, struct usb2_device_request req; usb2_error_t err; - if (usb2_com_cfg_is_gone(&sc->sc_ucom)) { - return; - } req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = index; USETW(req.wValue, value); Modified: user/thompsa/usb/sys/dev/usb2/serial/uchcom2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uchcom2.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/uchcom2.c Tue Jan 27 01:23:25 2009 (r187751) @@ -425,9 +425,6 @@ uchcom_do_request(struct uchcom_softc *s length = UGETW(req->wLength); actlen = 0; - if (usb2_com_cfg_is_gone(&sc->sc_ucom)) { - goto done; - } err = usb2_do_request_flags(sc->sc_udev, &Giant, req, data, USB_SHORT_XFER_OK, &actlen, 1000); @@ -435,7 +432,6 @@ uchcom_do_request(struct uchcom_softc *s DPRINTFN(0, "device request failed, err=%s " "(ignored)\n", usb2_errstr(err)); } -done: if (length != actlen) { if (req->bmRequestType & UT_READ) { bzero(USB_ADD_BYTES(data, actlen), length - actlen); Modified: user/thompsa/usb/sys/dev/usb2/serial/ucycom2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/ucycom2.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/ucycom2.c Tue Jan 27 01:23:25 2009 (r187751) @@ -2,7 +2,7 @@ __FBSDID("$FreeBSD$"); /*- - * Copyright (c) 2004 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2004 Dag-Erling Co�dan Sm�rgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -441,9 +441,6 @@ ucycom_cfg_write(struct ucycom_softc *sc sc->sc_temp_cfg[3] = (baud >> 24) & 0xff; sc->sc_temp_cfg[4] = cfg; - if (usb2_com_cfg_is_gone(&sc->sc_ucom)) { - return; - } err = usb2_do_request_flags (sc->sc_udev, &Giant, &req, sc->sc_temp_cfg, 0, NULL, 1000); Modified: user/thompsa/usb/sys/dev/usb2/serial/ufoma2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/ufoma2.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/ufoma2.c Tue Jan 27 01:23:25 2009 (r187751) @@ -534,9 +534,6 @@ ufoma_cfg_do_request(struct ufoma_softc uint16_t length; usb2_error_t err; - if (usb2_com_cfg_is_gone(&sc->sc_ucom)) { - goto error; - } err = usb2_do_request_flags (sc->sc_udev, &Giant, req, data, 0, NULL, 1000); @@ -545,7 +542,6 @@ ufoma_cfg_do_request(struct ufoma_softc DPRINTFN(0, "device request failed, err=%s " "(ignored)\n", usb2_errstr(err)); -error: length = UGETW(req->wLength); if ((req->bmRequestType & UT_READ) && length) { Modified: user/thompsa/usb/sys/dev/usb2/serial/uftdi2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uftdi2.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/uftdi2.c Tue Jan 27 01:23:25 2009 (r187751) @@ -367,9 +367,6 @@ uftdi_cfg_do_request(struct uftdi_softc uint16_t length; usb2_error_t err; - if (usb2_com_cfg_is_gone(&sc->sc_ucom)) { - goto error; - } err = usb2_do_request_flags (sc->sc_udev, &Giant, req, data, 0, NULL, 1000); @@ -378,7 +375,6 @@ uftdi_cfg_do_request(struct uftdi_softc DPRINTFN(0, "device request failed, err=%s " "(ignored)\n", usb2_errstr(err)); -error: length = UGETW(req->wLength); if ((req->bmRequestType & UT_READ) && length) { Modified: user/thompsa/usb/sys/dev/usb2/serial/uipaq2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uipaq2.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/uipaq2.c Tue Jan 27 01:23:25 2009 (r187751) @@ -1234,9 +1234,6 @@ uipaq_cfg_do_request(struct uipaq_softc uint16_t length; usb2_error_t err; - if (usb2_com_cfg_is_gone(&sc->sc_ucom)) { - goto error; - } err = usb2_do_request(sc->sc_udev, &Giant, req, data); if (err) { @@ -1244,7 +1241,6 @@ uipaq_cfg_do_request(struct uipaq_softc DPRINTFN(0, "device request failed, err=%s " "(ignored)\n", usb2_errstr(err)); -error: length = UGETW(req->wLength); if ((req->bmRequestType & UT_READ) && length) { Modified: user/thompsa/usb/sys/dev/usb2/serial/umct2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/umct2.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/umct2.c Tue Jan 27 01:23:25 2009 (r187751) @@ -352,9 +352,6 @@ umct_cfg_do_request(struct umct_softc *s usb2_error_t err; uint8_t temp[4]; - if (usb2_com_cfg_is_gone(&sc->sc_ucom)) { - goto done; - } if (len > 4) { len = 4; } @@ -373,8 +370,6 @@ umct_cfg_do_request(struct umct_softc *s DPRINTFN(0, "device request failed, err=%s " "(ignored)\n", usb2_errstr(err)); } -done: - return; } static void Modified: user/thompsa/usb/sys/dev/usb2/serial/umodem2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/umodem2.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/umodem2.c Tue Jan 27 01:23:25 2009 (r187751) @@ -890,9 +890,6 @@ umodem_cfg_do_request(struct umodem_soft uint16_t length; usb2_error_t err; - if (usb2_com_cfg_is_gone(&sc->sc_ucom)) { - goto error; - } err = usb2_do_request_flags(sc->sc_udev, &Giant, req, data, 0, NULL, 1000); @@ -901,7 +898,6 @@ umodem_cfg_do_request(struct umodem_soft DPRINTFN(0, "device request failed, err=%s " "(ignored)\n", usb2_errstr(err)); -error: length = UGETW(req->wLength); if ((req->bmRequestType & UT_READ) && length) { Modified: user/thompsa/usb/sys/dev/usb2/serial/umoscom2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/umoscom2.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/umoscom2.c Tue Jan 27 01:23:25 2009 (r187751) @@ -590,16 +590,12 @@ umoscom_cfg_do_request(struct umoscom_so uint16_t length; usb2_error_t err; - if (usb2_com_cfg_is_gone(&sc->sc_ucom)) - goto error; - err = usb2_do_request_flags (sc->sc_udev, &Giant, req, data, 0, NULL, 1000); if (err) { DPRINTFN(0, "control request failed: %s\n", usb2_errstr(err)); -error: length = UGETW(req->wLength); if ((req->bmRequestType & UT_READ) && length) { Modified: user/thompsa/usb/sys/dev/usb2/serial/uplcom2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uplcom2.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/uplcom2.c Tue Jan 27 01:23:25 2009 (r187751) @@ -930,9 +930,6 @@ uplcom_cfg_do_request(struct uplcom_soft uint16_t length; usb2_error_t err; - if (usb2_com_cfg_is_gone(&sc->sc_ucom)) { - goto error; - } err = usb2_do_request_flags(sc->sc_udev, &Giant, req, data, 0, NULL, 1000); @@ -941,7 +938,6 @@ uplcom_cfg_do_request(struct uplcom_soft DPRINTFN(0, "device request failed, err=%s " "(ignored)\n", usb2_errstr(err)); -error: length = UGETW(req->wLength); if ((req->bmRequestType & UT_READ) && length) { Modified: user/thompsa/usb/sys/dev/usb2/serial/usb2_serial.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/usb2_serial.c Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/usb2_serial.c Tue Jan 27 01:23:25 2009 (r187751) @@ -96,26 +96,21 @@ SYSCTL_INT(_hw_usb2_ucom, OID_AUTO, debu &usb2_com_debug, 0, "ucom debug level"); #endif -static usb2_proc_callback_t usb2_com_cfg_start_transfers; -static usb2_proc_callback_t usb2_com_cfg_open; -static usb2_proc_callback_t usb2_com_cfg_close; -static usb2_proc_callback_t usb2_com_cfg_break_on; -static usb2_proc_callback_t usb2_com_cfg_break_off; -static usb2_proc_callback_t usb2_com_cfg_dtr_on; -static usb2_proc_callback_t usb2_com_cfg_dtr_off; -static usb2_proc_callback_t usb2_com_cfg_rts_on; -static usb2_proc_callback_t usb2_com_cfg_rts_off; -static usb2_proc_callback_t usb2_com_cfg_status_change; -static usb2_proc_callback_t usb2_com_cfg_param; +static usb2_task_fn_t usb2_com_cfg_start_transfers; +static usb2_task_fn_t usb2_com_cfg_open; +static usb2_task_fn_t usb2_com_cfg_close; +static usb2_task_fn_t usb2_com_cfg_break; +static usb2_task_fn_t usb2_com_cfg_dtr; +static usb2_task_fn_t usb2_com_cfg_rts; +static usb2_task_fn_t usb2_com_cfg_status_change; +static usb2_task_fn_t usb2_com_cfg_param; static uint8_t usb2_com_units_alloc(uint32_t, uint32_t *); static void usb2_com_units_free(uint32_t, uint32_t); -static int usb2_com_attach_sub(struct usb2_com_softc *); -static void usb2_com_detach_sub(struct usb2_com_softc *); -static void usb2_com_queue_command(struct usb2_com_softc *sc, - uint8_t cmd); -static void usb2_com_wait_command(struct usb2_com_softc *sc, - uint8_t cmd); +static int usb2_com_attach_tty(struct usb2_com_softc *); +static void usb2_com_detach_tty(struct usb2_com_softc *); +static void usb2_com_queue_command(struct usb2_com_softc *, + struct usb2_task *, int); static void usb2_com_shutdown(struct usb2_com_softc *); static void usb2_com_start_transfers(struct usb2_com_softc *); static void usb2_com_break(struct usb2_com_softc *, uint8_t); @@ -127,14 +122,14 @@ static tsw_close_t usb2_com_close; static tsw_ioctl_t usb2_com_ioctl; static tsw_modem_t usb2_com_modem; static tsw_param_t usb2_com_param; -static tsw_outwakeup_t usb2_com_start_write; +static tsw_outwakeup_t usb2_com_outwakeup; static tsw_free_t usb2_com_free; static struct ttydevsw usb2_com_class = { .tsw_flags = TF_INITLOCK | TF_CALLOUT, .tsw_open = usb2_com_open, .tsw_close = usb2_com_close, - .tsw_outwakeup = usb2_com_start_write, + .tsw_outwakeup = usb2_com_outwakeup, .tsw_ioctl = usb2_com_ioctl, .tsw_param = usb2_com_param, .tsw_modem = usb2_com_modem, @@ -221,15 +216,15 @@ usb2_com_units_free(uint32_t root_unit, * sub-units can be used to differentiate among * different types of devices. * - * The mutex pointed to by "p_mtx" is applied before all - * callbacks are called back. Also "p_mtx" must be applied + * The mutex pointed to by "mtx" is applied before all + * callbacks are called back. Also "mtx" must be applied * before calling into the ucom-layer! Currently only Giant * is supported. */ int usb2_com_attach(struct usb2_com_super_softc *ssc, struct usb2_com_softc *sc, uint32_t sub_units, void *parent, - const struct usb2_com_callback *callback, struct mtx *p_mtx) + const struct usb2_com_callback *callback, struct mtx *mtx) { uint32_t n; uint32_t root_unit; @@ -244,26 +239,39 @@ usb2_com_attach(struct usb2_com_super_so if (usb2_com_units_alloc(sub_units, &root_unit)) { return (ENOMEM); } - if (usb2_proc_setup(&ssc->sc_config_td, p_mtx, USB_PRI_MED)) { - usb2_com_units_free(root_unit, sub_units); - return (ENOMEM); - } + + error = usb2_proc_create(&ssc->sc_tq, USB_PRI_MED, "ucom"); + if (error) + return (error); + for (n = 0; n < sub_units; n++, sc++) { sc->sc_unit = root_unit + n; sc->sc_local_unit = n; sc->sc_super = ssc; - sc->sc_parent_mtx = p_mtx; + sc->sc_mtx = mtx; sc->sc_parent = parent; sc->sc_callback = callback; - error = usb2_com_attach_sub(sc); + error = usb2_com_attach_tty(sc); if (error) { usb2_com_detach(ssc, sc - n, n); usb2_com_units_free(root_unit + n, sub_units - n); - break; + goto error; } sc->sc_flag |= UCOM_FLAG_ATTACHED; + + USB_TASK_INIT(&sc->sc_start_task, usb2_com_cfg_start_transfers, sc, mtx); + USB_TASK_INIT(&sc->sc_open_task, usb2_com_cfg_open, sc, mtx); + USB_TASK_INIT(&sc->sc_close_task, usb2_com_cfg_close, sc, mtx); + USB_TASK_INIT(&sc->sc_break_task, usb2_com_cfg_break, sc, mtx); + USB_TASK_INIT(&sc->sc_dtr_task, usb2_com_cfg_dtr, sc, mtx); + USB_TASK_INIT(&sc->sc_rts_task, usb2_com_cfg_rts, sc, mtx); + USB_TASK_INIT(&sc->sc_status_task, usb2_com_cfg_status_change, sc, mtx); + USB_TASK_INIT(&sc->sc_param_task, usb2_com_cfg_param, sc, mtx); } + return (0); +error: + usb2_proc_free(&ssc->sc_tq); return (error); } @@ -276,12 +284,10 @@ usb2_com_detach(struct usb2_com_super_so { uint32_t n; - usb2_proc_drain(&ssc->sc_config_td); - for (n = 0; n < sub_units; n++, sc++) { if (sc->sc_flag & UCOM_FLAG_ATTACHED) { - usb2_com_detach_sub(sc); + usb2_com_detach_tty(sc); usb2_com_units_free(sc->sc_unit, 1); @@ -289,18 +295,17 @@ usb2_com_detach(struct usb2_com_super_so sc->sc_flag &= ~UCOM_FLAG_ATTACHED; } } - usb2_proc_unsetup(&ssc->sc_config_td); + usb2_proc_free(&ssc->sc_tq); } static int -usb2_com_attach_sub(struct usb2_com_softc *sc) +usb2_com_attach_tty(struct usb2_com_softc *sc) { struct tty *tp; int error = 0; - uint8_t n; char buf[32]; /* temporary TTY device name buffer */ - tp = tty_alloc(&usb2_com_class, sc, sc->sc_parent_mtx); + tp = tty_alloc(&usb2_com_class, sc, sc->sc_mtx); if (tp == NULL) { error = ENOMEM; goto done; @@ -327,45 +332,12 @@ usb2_com_attach_sub(struct usb2_com_soft DPRINTF("ttycreate: %s\n", buf); usb2_cv_init(&sc->sc_cv, "usb2_com"); - /* - * Set all function callback pointers for deferred COM - * operations: - */ - for (n = 0; n != 2; n++) { - sc->sc_cmds[(2*USB_COM_CFG_START_TRANSFERS) + n].hdr.pm_callback = - &usb2_com_cfg_start_transfers; - sc->sc_cmds[(2*USB_COM_CFG_OPEN) + n].hdr.pm_callback = - &usb2_com_cfg_open; - sc->sc_cmds[(2*USB_COM_CFG_CLOSE) + n].hdr.pm_callback = - &usb2_com_cfg_close; - sc->sc_cmds[(2*USB_COM_CFG_BREAK_ON) + n].hdr.pm_callback = - &usb2_com_cfg_break_on; - sc->sc_cmds[(2*USB_COM_CFG_BREAK_OFF) + n].hdr.pm_callback = - &usb2_com_cfg_break_off; - sc->sc_cmds[(2*USB_COM_CFG_DTR_ON) + n].hdr.pm_callback = - &usb2_com_cfg_dtr_on; - sc->sc_cmds[(2*USB_COM_CFG_DTR_OFF) + n].hdr.pm_callback = - &usb2_com_cfg_dtr_off; - sc->sc_cmds[(2*USB_COM_CFG_RTS_ON) + n].hdr.pm_callback = - &usb2_com_cfg_rts_on; - sc->sc_cmds[(2*USB_COM_CFG_RTS_OFF) + n].hdr.pm_callback = - &usb2_com_cfg_rts_off; - sc->sc_cmds[(2*USB_COM_CFG_STATUS_CHANGE) + n].hdr.pm_callback = - &usb2_com_cfg_status_change; - sc->sc_cmds[(2*USB_COM_CFG_PARAM) + n].hdr.pm_callback = - &usb2_com_cfg_param; - } - - /* initialise all callback pointer arguments */ - for (n = 0; n != (2*USB_COM_CFG_MAX); n++) { - sc->sc_cmds[n].cc_softc = sc; - } done: return (error); } static void -usb2_com_detach_sub(struct usb2_com_softc *sc) +usb2_com_detach_tty(struct usb2_com_softc *sc) { struct tty *tp = sc->sc_tty; @@ -373,11 +345,11 @@ usb2_com_detach_sub(struct usb2_com_soft /* the config thread has been stopped when we get here */ - mtx_lock(sc->sc_parent_mtx); + mtx_lock(sc->sc_mtx); sc->sc_flag |= UCOM_FLAG_GONE; sc->sc_flag &= ~(UCOM_FLAG_HL_READY | UCOM_FLAG_LL_READY); - mtx_unlock(sc->sc_parent_mtx); + mtx_unlock(sc->sc_mtx); if (tp) { tty_lock(tp); @@ -385,10 +357,10 @@ usb2_com_detach_sub(struct usb2_com_soft tty_rel_gone(tp); - mtx_lock(sc->sc_parent_mtx); + mtx_lock(sc->sc_mtx); /* Wait for the callback after the TTY is torn down */ while (sc->sc_ttyfreed == 0) - usb2_cv_wait(&sc->sc_cv, sc->sc_parent_mtx); + usb2_cv_wait(&sc->sc_cv, sc->sc_mtx); /* * make sure that read and write transfers are stopped */ @@ -398,46 +370,20 @@ usb2_com_detach_sub(struct usb2_com_soft if (sc->sc_callback->usb2_com_stop_write) { (sc->sc_callback->usb2_com_stop_write) (sc); } - mtx_unlock(sc->sc_parent_mtx); + mtx_unlock(sc->sc_mtx); } usb2_cv_destroy(&sc->sc_cv); } -/* - * The following function queues a command for deferred execution. - * The following function must be called locked. - */ static void -usb2_com_queue_command(struct usb2_com_softc *sc, uint8_t cmd) +usb2_com_queue_command(struct usb2_com_softc *sc, struct usb2_task *task, int arg) { struct usb2_com_super_softc *ssc = sc->sc_super; - if (usb2_proc_is_gone(&ssc->sc_config_td)) { - DPRINTF("proc is gone\n"); - return; /* nothing to do */ - } + mtx_assert(sc->sc_mtx, MA_OWNED); - if (usb2_proc_msignal(&ssc->sc_config_td, - &sc->sc_cmds[2*cmd], &sc->sc_cmds[(2*cmd)+1])) { - /* ignore */ - } -} - -/* - * The following function waits until a command has been executed. - * The following function must be called locked. - */ -static void -usb2_com_wait_command(struct usb2_com_softc *sc, uint8_t cmd) -{ - struct usb2_com_super_softc *ssc = sc->sc_super; - - if (usb2_proc_is_gone(&ssc->sc_config_td)) { - DPRINTF("proc is gone\n"); - return; /* nothing to do */ - } - usb2_proc_mwait(&ssc->sc_config_td, - &sc->sc_cmds[2*cmd], &sc->sc_cmds[(2*cmd)+1]); + USB_TASK_ARG(task) = arg; + usb2_proc_enqueue(&ssc->sc_tq, task); } static void @@ -445,7 +391,7 @@ usb2_com_shutdown(struct usb2_com_softc { struct tty *tp = sc->sc_tty; - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); DPRINTF("\n"); @@ -457,59 +403,10 @@ usb2_com_shutdown(struct usb2_com_softc } } -/* - * This function will sleep "timeout" system ticks. - * - * Return values: - * 0: normal delay - * else: config thread is gone - */ -uint8_t -usb2_com_cfg_sleep(struct usb2_com_softc *sc, uint32_t timeout) -{ - struct usb2_com_super_softc *ssc = sc->sc_super; - uint8_t is_gone; - - is_gone = usb2_proc_is_gone(&ssc->sc_config_td); - if (is_gone) - goto done; /* we are detaching */ - if (timeout == 0) - timeout = 1; /* one tick is the least timeout */ - - mtx_unlock(sc->sc_parent_mtx); - - if (pause("UCOMWAIT", timeout)) { - /* ignore */ - } - - mtx_lock(sc->sc_parent_mtx); - - /* refresh gone status */ - is_gone = usb2_proc_is_gone(&ssc->sc_config_td); -done: - return (is_gone); -} - -/* - * Return values: - * 0: normal - * else: config thread is gone - */ -uint8_t -usb2_com_cfg_is_gone(struct usb2_com_softc *sc) -{ - struct usb2_com_super_softc *ssc = sc->sc_super; - - return (usb2_proc_is_gone(&ssc->sc_config_td)); -} - static void -usb2_com_cfg_start_transfers(struct usb2_proc_msg *_cc) +usb2_com_cfg_start_transfers(void *context, struct usb2_task *task) { - struct usb2_com_command_msg *cc = (void *)_cc; - struct usb2_com_softc *sc; - - sc = cc->cc_softc; + struct usb2_com_softc *sc = context; if (!(sc->sc_flag & UCOM_FLAG_LL_READY)) { return; @@ -545,17 +442,14 @@ usb2_com_start_transfers(struct usb2_com (sc->sc_callback->usb2_com_start_write) (sc); } if (!(sc->sc_flag & UCOM_FLAG_GP_DATA)) { - usb2_com_queue_command(sc, USB_COM_CFG_START_TRANSFERS); + usb2_com_queue_command(sc, &sc->sc_start_task, 0); } } static void -usb2_com_cfg_open(struct usb2_proc_msg *_cc) +usb2_com_cfg_open(void *context, struct usb2_task *task) { - struct usb2_com_command_msg *cc = (void *)_cc; - struct usb2_com_softc *sc; - - sc = cc->cc_softc; + struct usb2_com_softc *sc = context; DPRINTF("\n"); @@ -571,7 +465,7 @@ usb2_com_cfg_open(struct usb2_proc_msg * (sc->sc_callback->usb2_com_cfg_open) (sc); /* wait a little */ - usb2_com_cfg_sleep(sc, hz / 10); + usb2_pause_mtx(sc->sc_mtx, hz / 10); } } } @@ -582,7 +476,7 @@ usb2_com_open(struct tty *tp) struct usb2_com_softc *sc = tty_softc(tp); int error; - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); if (sc->sc_flag & UCOM_FLAG_GONE) { return (ENXIO); @@ -612,7 +506,7 @@ usb2_com_open(struct tty *tp) sc->sc_msr = 0; sc->sc_mcr = 0; - usb2_com_queue_command(sc, USB_COM_CFG_OPEN); + usb2_com_queue_command(sc, &sc->sc_open_task, 0); usb2_com_start_transfers(sc); @@ -626,12 +520,9 @@ usb2_com_open(struct tty *tp) } static void -usb2_com_cfg_close(struct usb2_proc_msg *_cc) +usb2_com_cfg_close(void *context, struct usb2_task *task) { - struct usb2_com_command_msg *cc = (void *)_cc; - struct usb2_com_softc *sc; - - sc = cc->cc_softc; + struct usb2_com_softc *sc = context; DPRINTF("\n"); @@ -652,8 +543,8 @@ static void usb2_com_close(struct tty *tp) { struct usb2_com_softc *sc = tty_softc(tp); - - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + + mtx_assert(sc->sc_mtx, MA_OWNED); DPRINTF("tp=%p\n", tp); @@ -663,9 +554,7 @@ usb2_com_close(struct tty *tp) } usb2_com_shutdown(sc); - /* Queue and wait for close command to complete */ - usb2_com_queue_command(sc, USB_COM_CFG_CLOSE); - usb2_com_wait_command(sc, USB_COM_CFG_CLOSE); + usb2_com_queue_command(sc, &sc->sc_close_task, 0); sc->sc_flag &= ~(UCOM_FLAG_HL_READY | UCOM_FLAG_WR_START | @@ -685,7 +574,7 @@ usb2_com_ioctl(struct tty *tp, u_long cm struct usb2_com_softc *sc = tty_softc(tp); int error; - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); if (!(sc->sc_flag & UCOM_FLAG_HL_READY)) { return (EIO); @@ -719,7 +608,7 @@ usb2_com_modem(struct tty *tp, int sigon struct usb2_com_softc *sc = tty_softc(tp); uint8_t onoff; - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); if (!(sc->sc_flag & UCOM_FLAG_HL_READY)) { return (0); @@ -768,11 +657,10 @@ usb2_com_modem(struct tty *tp, int sigon } static void -usb2_com_cfg_break(struct usb2_com_command_msg *cc, uint8_t onoff) +usb2_com_cfg_break(void *context, struct usb2_task *task) { - struct usb2_com_softc *sc; - - sc = cc->cc_softc; + struct usb2_com_softc *sc = context; + int onoff = USB_TASK_ARG(task); if (!(sc->sc_flag & UCOM_FLAG_LL_READY)) { return; @@ -785,37 +673,23 @@ usb2_com_cfg_break(struct usb2_com_comma } static void -usb2_com_cfg_break_on(struct usb2_proc_msg *_cc) -{ - usb2_com_cfg_break((void *)_cc, 1); -} - -static void -usb2_com_cfg_break_off(struct usb2_proc_msg *_cc) -{ - usb2_com_cfg_break((void *)_cc, 0); -} - -static void usb2_com_break(struct usb2_com_softc *sc, uint8_t onoff) { - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); if (!(sc->sc_flag & UCOM_FLAG_HL_READY)) { return; } DPRINTF("onoff = %d\n", onoff); - usb2_com_queue_command(sc, onoff ? - USB_COM_CFG_BREAK_ON : USB_COM_CFG_BREAK_OFF); + usb2_com_queue_command(sc, &sc->sc_break_task, onoff); } static void -usb2_com_cfg_dtr(struct usb2_com_command_msg *cc, uint8_t onoff) +usb2_com_cfg_dtr(void *context, struct usb2_task *task) { - struct usb2_com_softc *sc; - - sc = cc->cc_softc; + struct usb2_com_softc *sc = context; + int onoff = USB_TASK_ARG(task); if (!(sc->sc_flag & UCOM_FLAG_LL_READY)) { return; @@ -828,37 +702,23 @@ usb2_com_cfg_dtr(struct usb2_com_command } static void -usb2_com_cfg_dtr_on(struct usb2_proc_msg *_cc) -{ - usb2_com_cfg_dtr((void *)_cc, 1); -} - -static void -usb2_com_cfg_dtr_off(struct usb2_proc_msg *_cc) -{ - usb2_com_cfg_dtr((void *)_cc, 0); -} - -static void usb2_com_dtr(struct usb2_com_softc *sc, uint8_t onoff) { - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); if (!(sc->sc_flag & UCOM_FLAG_HL_READY)) { return; } DPRINTF("onoff = %d\n", onoff); - usb2_com_queue_command(sc, onoff ? - USB_COM_CFG_DTR_ON : USB_COM_CFG_DTR_OFF); + usb2_com_queue_command(sc, &sc->sc_dtr_task, onoff); } static void -usb2_com_cfg_rts(struct usb2_com_command_msg *cc, uint8_t onoff) +usb2_com_cfg_rts(void *context, struct usb2_task *task) { - struct usb2_com_softc *sc; - - sc = cc->cc_softc; + struct usb2_com_softc *sc = context; + int onoff = USB_TASK_ARG(task); DPRINTF("onoff=%d\n", onoff); @@ -871,46 +731,30 @@ usb2_com_cfg_rts(struct usb2_com_command } static void -usb2_com_cfg_rts_on(struct usb2_proc_msg *_cc) -{ - usb2_com_cfg_rts((void *)_cc, 1); -} - -static void -usb2_com_cfg_rts_off(struct usb2_proc_msg *_cc) -{ - usb2_com_cfg_rts((void *)_cc, 0); -} - -static void usb2_com_rts(struct usb2_com_softc *sc, uint8_t onoff) { - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); if (!(sc->sc_flag & UCOM_FLAG_HL_READY)) { return; } DPRINTF("onoff = %d\n", onoff); - usb2_com_queue_command(sc, onoff ? - USB_COM_CFG_RTS_ON : USB_COM_CFG_RTS_OFF); + usb2_com_queue_command(sc, &sc->sc_rts_task, onoff); } static void -usb2_com_cfg_status_change(struct usb2_proc_msg *_cc) +usb2_com_cfg_status_change(void *context, struct usb2_task *task) { - struct usb2_com_command_msg *cc = (void *)_cc; - struct usb2_com_softc *sc; + struct usb2_com_softc *sc = context; struct tty *tp; - uint8_t new_msr; uint8_t new_lsr; uint8_t onoff; - sc = cc->cc_softc; tp = sc->sc_tty; - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); if (!(sc->sc_flag & UCOM_FLAG_LL_READY)) { return; @@ -947,25 +791,22 @@ usb2_com_cfg_status_change(struct usb2_p void usb2_com_status_change(struct usb2_com_softc *sc) { - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); if (!(sc->sc_flag & UCOM_FLAG_HL_READY)) { return; } DPRINTF("\n"); - usb2_com_queue_command(sc, USB_COM_CFG_STATUS_CHANGE); + usb2_com_queue_command(sc, &sc->sc_status_task, 0); } static void -usb2_com_cfg_param(struct usb2_proc_msg *_cc) +usb2_com_cfg_param(void *context, struct usb2_task *task) { - struct usb2_com_command_msg *cc = (void *)_cc; - struct usb2_com_softc *sc; + struct usb2_com_softc *sc = context; struct termios t_copy; - sc = cc->cc_softc; - if (!(sc->sc_flag & UCOM_FLAG_LL_READY)) { return; } @@ -977,7 +818,7 @@ usb2_com_cfg_param(struct usb2_proc_msg (sc->sc_callback->usb2_com_cfg_param) (sc, &t_copy); /* wait a little */ - usb2_com_cfg_sleep(sc, hz / 10); + usb2_pause_mtx(sc->sc_mtx, hz / 10); } static int @@ -987,7 +828,7 @@ usb2_com_param(struct tty *tp, struct te uint8_t opened; int error; - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); opened = 0; error = 0; @@ -1032,7 +873,7 @@ usb2_com_param(struct tty *tp, struct te sc->sc_flag &= ~UCOM_FLAG_GP_DATA; /* Queue baud rate programming command first */ - usb2_com_queue_command(sc, USB_COM_CFG_PARAM); + usb2_com_queue_command(sc, &sc->sc_param_task, 0); /* Queue transfer enable command last */ usb2_com_start_transfers(sc); @@ -1053,11 +894,11 @@ done: } static void -usb2_com_start_write(struct tty *tp) +usb2_com_outwakeup(struct tty *tp) { struct usb2_com_softc *sc = tty_softc(tp); - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); DPRINTF("sc = %p\n", sc); @@ -1086,7 +927,7 @@ usb2_com_get_data(struct usb2_com_softc uint32_t cnt; uint32_t offset_orig; - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); if ((!(sc->sc_flag & UCOM_FLAG_HL_READY)) || (!(sc->sc_flag & UCOM_FLAG_GP_DATA)) || @@ -1134,7 +975,7 @@ usb2_com_put_data(struct usb2_com_softc char *buf; uint32_t cnt; - mtx_assert(sc->sc_parent_mtx, MA_OWNED); + mtx_assert(sc->sc_mtx, MA_OWNED); if ((!(sc->sc_flag & UCOM_FLAG_HL_READY)) || (!(sc->sc_flag & UCOM_FLAG_GP_DATA))) { @@ -1188,8 +1029,8 @@ usb2_com_free(void *xsc) { struct usb2_com_softc *sc = xsc; - mtx_lock(sc->sc_parent_mtx); + mtx_lock(sc->sc_mtx); sc->sc_ttyfreed = 1; usb2_cv_signal(&sc->sc_cv); - mtx_unlock(sc->sc_parent_mtx); + mtx_unlock(sc->sc_mtx); } Modified: user/thompsa/usb/sys/dev/usb2/serial/usb2_serial.h ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/usb2_serial.h Tue Jan 27 01:21:11 2009 (r187750) +++ user/thompsa/usb/sys/dev/usb2/serial/usb2_serial.h Tue Jan 27 01:23:25 2009 (r187751) @@ -82,10 +82,7 @@ struct usb2_com_softc; struct thread; -/* NOTE: Only callbacks with "_cfg_" in its name are called - * from a config thread, and are allowed to sleep! The other - * callbacks are _not_ allowed to sleep! - * +/* * NOTE: There is no guarantee that "usb2_com_cfg_close()" will * be called after "usb2_com_cfg_open()" if the device is detached * while it is open! @@ -119,41 +116,17 @@ struct usb2_com_callback { #define ULSR_RXRDY 0x01 /* Byte ready in Receive Buffer */ #define ULSR_RCV_MASK 0x1f /* Mask for incoming data or error */ -/* - * List of serial adapter commands or deferred function calls: - */ -enum { - USB_COM_CFG_START_TRANSFERS, - USB_COM_CFG_OPEN, - USB_COM_CFG_CLOSE, - USB_COM_CFG_BREAK_ON, - USB_COM_CFG_BREAK_OFF, - USB_COM_CFG_DTR_ON, - USB_COM_CFG_DTR_OFF, - USB_COM_CFG_RTS_ON, - USB_COM_CFG_RTS_OFF, - USB_COM_CFG_STATUS_CHANGE, - USB_COM_CFG_PARAM, - USB_COM_CFG_MAX, -}; - -struct usb2_com_command_msg { - struct usb2_proc_msg hdr; /* must be first */ - struct usb2_com_softc *cc_softc; -}; - struct usb2_com_super_softc { - struct usb2_process sc_config_td; + struct usb2_process sc_tq; }; struct usb2_com_softc { - struct usb2_com_command_msg sc_cmds[2*USB_COM_CFG_MAX]; struct termios sc_termios_copy; struct cv sc_cv; const struct usb2_com_callback *sc_callback; struct usb2_com_super_softc *sc_super; struct tty *sc_tty; - struct mtx *sc_parent_mtx; + struct mtx *sc_mtx; void *sc_parent; uint32_t sc_unit; uint32_t sc_local_unit; @@ -170,7 +143,15 @@ struct usb2_com_softc { uint8_t sc_msr; uint8_t sc_mcr; uint8_t sc_ttyfreed; /* set when TTY has been freed */ - uint8_t sc_last_cmd_flag[USB_COM_CFG_MAX]; + + struct usb2_task sc_start_task; + struct usb2_task sc_open_task; + struct usb2_task sc_close_task; + struct usb2_task sc_break_task; + struct usb2_task sc_dtr_task; + struct usb2_task sc_rts_task; + struct usb2_task sc_status_task; + struct usb2_task sc_param_task; }; int usb2_com_attach(struct usb2_com_super_softc *ssc, @@ -184,6 +165,5 @@ uint8_t usb2_com_get_data(struct usb2_co void usb2_com_put_data(struct usb2_com_softc *sc, struct usb2_page_cache *pc, uint32_t offset, uint32_t len); uint8_t usb2_com_cfg_sleep(struct usb2_com_softc *sc, uint32_t timeout); -uint8_t usb2_com_cfg_is_gone(struct usb2_com_softc *sc); #endif /* _USB2_SERIAL_H_ */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 01:27:29 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12387106564A; Tue, 27 Jan 2009 01:27:29 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F31AE8FC08; Tue, 27 Jan 2009 01:27:28 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R1RSWB069426; Tue, 27 Jan 2009 01:27:28 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R1RS7k069424; Tue, 27 Jan 2009 01:27:28 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901270127.n0R1RS7k069424@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 01:27:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187752 - user/thompsa/usb/sys/dev/usb2/ethernet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 01:27:29 -0000 Author: thompsa Date: Tue Jan 27 01:27:28 2009 New Revision: 187752 URL: http://svn.freebsd.org/changeset/base/187752 Log: Revert back to the sys/dev/usb copy of the ethernet drivers in preparation of removing the config thread. Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_axereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_cdcereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_cuereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_kuereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_ruereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_udavreg.h Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c Tue Jan 27 01:23:25 2009 (r187751) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c Tue Jan 27 01:27:28 2009 (r187752) @@ -2,6 +2,9 @@ * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. * + * Copyright (c) 2006 + * Alfred Perlstein . All rights reserved. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -40,6 +43,9 @@ __FBSDID("$FreeBSD$"); * Written by Bill Paul * Electrical Engineering Department * Columbia University, New York City + * + * SMP locking by Alfred Perlstein . + * RED Inc. */ /* @@ -58,305 +64,224 @@ __FBSDID("$FreeBSD$"); * the controller uses an external PHY chip, it's possible that board * designers might simply choose a 10Mbps PHY. * - * Registers are accessed using usb2_do_request(). Packet transfers are - * done using usb2_transfer() and friends. + * Registers are accessed using usbd_do_request(). Packet transfers are + * done using usbd_transfer() and friends. */ -/* - * NOTE: all function names beginning like "aue_cfg_" can only - * be called from within the config thread function ! - */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include "usbdevs.h" +#include -#include -#include -#include -#include - -#define usb2_config_td_cc usb2_ether_cc -#define usb2_config_td_softc aue_softc - -#define USB_DEBUG_VAR aue_debug - -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include -#include -#include +#include -MODULE_DEPEND(aue, usb2_ethernet, 1, 1, 1); -MODULE_DEPEND(aue, usb2_core, 1, 1, 1); +MODULE_DEPEND(aue, usb, 1, 1, 1); MODULE_DEPEND(aue, ether, 1, 1, 1); MODULE_DEPEND(aue, miibus, 1, 1, 1); -#if USB_DEBUG -static int aue_debug = 0; - -SYSCTL_NODE(_hw_usb2, OID_AUTO, aue, CTLFLAG_RW, 0, "USB aue"); -SYSCTL_INT(_hw_usb2_aue, OID_AUTO, debug, CTLFLAG_RW, &aue_debug, 0, - "Debug level"); -#endif +/* "device miibus" required. See GENERIC if you get errors here. */ +#include "miibus_if.h" /* * Various supported device vendors/products. */ -static const struct usb2_device_id aue_devs[] = { - {USB_VPI(USB_VENDOR_3COM, USB_PRODUCT_3COM_3C460B, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_DSB650TX_PNA, 0)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_UFE1000, AUE_FLAG_LSYS)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX10, 0)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX1, AUE_FLAG_PNA | AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX2, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX4, AUE_FLAG_PNA)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX5, AUE_FLAG_PNA)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX6, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX7, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX8, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX9, AUE_FLAG_PNA)}, - {USB_VPI(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_SS1001, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_USB320_EC, 0)}, - {USB_VPI(USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_2, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_3, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_4, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUS, AUE_FLAG_PNA | AUE_FLAG_DUAL_PHY)}, - {USB_VPI(USB_VENDOR_AEI, USB_PRODUCT_AEI_FASTETHERNET, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ALLIEDTELESYN, USB_PRODUCT_ALLIEDTELESYN_ATUSB100, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC110T, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_USB2LAN, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USB100, 0)}, - {USB_VPI(USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBE100, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBEL100, 0)}, - {USB_VPI(USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBLP100, AUE_FLAG_PNA)}, - {USB_VPI(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB_TXS, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB_TX, 0)}, - {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX1, AUE_FLAG_LSYS)}, - {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX2, AUE_FLAG_LSYS | AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX3, AUE_FLAG_LSYS | AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX4, AUE_FLAG_LSYS | AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX_PNA, AUE_FLAG_PNA)}, - {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX, AUE_FLAG_LSYS)}, - {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650, AUE_FLAG_LSYS)}, - {USB_VPI(USB_VENDOR_ELCON, USB_PRODUCT_ELCON_PLAN, AUE_FLAG_PNA | AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSB20, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBLTX, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX0, 0)}, - {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX1, AUE_FLAG_LSYS)}, - {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX2, 0)}, - {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX3, AUE_FLAG_LSYS)}, - {USB_VPI(USB_VENDOR_ELSA, USB_PRODUCT_ELSA_USB2ETHERNET, 0)}, - {USB_VPI(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNBR402W, 0)}, - {USB_VPI(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_UF100, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_HP, USB_PRODUCT_HP_HN210E, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_USBETTXS, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_USBETTX, 0)}, - {USB_VPI(USB_VENDOR_KINGSTON, USB_PRODUCT_KINGSTON_KNU101TX, 0)}, - {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB100H1, AUE_FLAG_LSYS | AUE_FLAG_PNA)}, - {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB100TX, AUE_FLAG_LSYS)}, - {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TA, AUE_FLAG_LSYS)}, - {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TX1, AUE_FLAG_LSYS | AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TX2, AUE_FLAG_LSYS | AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10T, AUE_FLAG_LSYS)}, - {USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUA2TX5, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX1, 0)}, - {USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX5, 0)}, - {USB_VPI(USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_MN110, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_NETGEAR, USB_PRODUCT_NETGEAR_FA101, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_SIEMENS, USB_PRODUCT_SIEMENS_SPEEDSTREAM, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_SIIG2, USB_PRODUCT_SIIG2_USBTOETHER, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_SMARTBRIDGES, USB_PRODUCT_SMARTBRIDGES_SMARTNIC, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_SMC, USB_PRODUCT_SMC_2202USB, 0)}, - {USB_VPI(USB_VENDOR_SMC, USB_PRODUCT_SMC_2206USB, AUE_FLAG_PII)}, - {USB_VPI(USB_VENDOR_SOHOWARE, USB_PRODUCT_SOHOWARE_NUB100, 0)}, - {USB_VPI(USB_VENDOR_SOHOWARE, USB_PRODUCT_SOHOWARE_NUB110, AUE_FLAG_PII)}, +struct aue_type { + struct usb_devno aue_dev; + u_int16_t aue_flags; +#define LSYS 0x0001 /* use Linksys reset */ +#define PNA 0x0002 /* has Home PNA */ +#define PII 0x0004 /* Pegasus II chip */ }; -/* prototypes */ +static const struct aue_type aue_devs[] = { + {{ USB_VENDOR_3COM, USB_PRODUCT_3COM_3C460B}, PII }, + {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX1}, PNA|PII }, + {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX2}, PII }, + {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_UFE1000}, LSYS }, + {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX4}, PNA }, + {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX5}, PNA }, + {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX6}, PII }, + {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX7}, PII }, + {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX8}, PII }, + {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX9}, PNA }, + {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX10}, 0 }, + {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_DSB650TX_PNA}, 0 }, + {{ USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_USB320_EC}, 0 }, + {{ USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_SS1001}, PII }, + {{ USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUS}, PNA }, + {{ USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII}, PII }, + {{ USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_2}, PII }, + {{ USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_3}, PII }, + {{ USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_4}, PII }, + {{ USB_VENDOR_AEI, USB_PRODUCT_AEI_FASTETHERNET}, PII }, + {{ USB_VENDOR_ALLIEDTELESYN, USB_PRODUCT_ALLIEDTELESYN_ATUSB100}, PII }, + {{ USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC110T}, PII }, + {{ USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_USB2LAN}, PII }, + {{ USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USB100}, 0 }, + {{ USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBLP100}, PNA }, + {{ USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBEL100}, 0 }, + {{ USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBE100}, PII }, + {{ USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB_TX}, 0 }, + {{ USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB_TXS},PII }, + {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX4}, LSYS|PII }, + {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX1}, LSYS }, + {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX}, LSYS }, + {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX_PNA}, PNA }, + {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX3}, LSYS|PII }, + {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX2}, LSYS|PII }, + {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650}, LSYS }, + {{ USB_VENDOR_ELCON, USB_PRODUCT_ELCON_PLAN}, PNA|PII }, + {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSB20}, PII }, + {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX0}, 0 }, + {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX1}, LSYS }, + {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX2}, 0 }, + {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX3}, LSYS }, + {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBLTX}, PII }, + {{ USB_VENDOR_ELSA, USB_PRODUCT_ELSA_USB2ETHERNET}, 0 }, + {{ USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNBR402W}, 0 }, + {{ USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_UF100}, PII }, + {{ USB_VENDOR_HP, USB_PRODUCT_HP_HN210E}, PII }, + {{ USB_VENDOR_IODATA, USB_PRODUCT_IODATA_USBETTX}, 0 }, + {{ USB_VENDOR_IODATA, USB_PRODUCT_IODATA_USBETTXS}, PII }, + {{ USB_VENDOR_KINGSTON, USB_PRODUCT_KINGSTON_KNU101TX}, 0 }, + {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TX1}, LSYS|PII }, + {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10T}, LSYS }, + {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB100TX}, LSYS }, + {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB100H1}, LSYS|PNA }, + {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TA}, LSYS }, + {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TX2}, LSYS|PII }, + {{ USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX1}, 0 }, + {{ USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX5}, 0 }, + {{ USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUA2TX5}, PII }, + {{ USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_MN110}, PII }, + {{ USB_VENDOR_NETGEAR, USB_PRODUCT_NETGEAR_FA101}, PII }, + {{ USB_VENDOR_SIEMENS, USB_PRODUCT_SIEMENS_SPEEDSTREAM}, PII }, + {{ USB_VENDOR_SIIG2, USB_PRODUCT_SIIG2_USBTOETHER}, PII }, + {{ USB_VENDOR_SMARTBRIDGES, USB_PRODUCT_SMARTBRIDGES_SMARTNIC},PII }, + {{ USB_VENDOR_SMC, USB_PRODUCT_SMC_2202USB}, 0 }, + {{ USB_VENDOR_SMC, USB_PRODUCT_SMC_2206USB}, PII }, + {{ USB_VENDOR_SOHOWARE, USB_PRODUCT_SOHOWARE_NUB100}, 0 }, + {{ USB_VENDOR_SOHOWARE, USB_PRODUCT_SOHOWARE_NUB110}, PII }, +}; +#define aue_lookup(v, p) ((const struct aue_type *)usb_lookup(aue_devs, v, p)) -static device_probe_t aue_probe; +static device_probe_t aue_match; static device_attach_t aue_attach; static device_detach_t aue_detach; static device_shutdown_t aue_shutdown; - -static usb2_callback_t aue_intr_clear_stall_callback; -static usb2_callback_t aue_intr_callback; -static usb2_callback_t aue_bulk_read_clear_stall_callback; -static usb2_callback_t aue_bulk_read_callback; -static usb2_callback_t aue_bulk_write_clear_stall_callback; -static usb2_callback_t aue_bulk_write_callback; - -static void aue_cfg_do_request(struct aue_softc *, - struct usb2_device_request *, void *); -static uint8_t aue_cfg_csr_read_1(struct aue_softc *, uint16_t); -static uint16_t aue_cfg_csr_read_2(struct aue_softc *, uint16_t); -static void aue_cfg_csr_write_1(struct aue_softc *, uint16_t, uint8_t); -static void aue_cfg_csr_write_2(struct aue_softc *, uint16_t, uint16_t); -static void aue_cfg_eeprom_getword(struct aue_softc *, uint8_t, uint8_t *); -static void aue_cfg_read_eeprom(struct aue_softc *, uint8_t *, uint16_t, - uint16_t); - -static miibus_readreg_t aue_cfg_miibus_readreg; -static miibus_writereg_t aue_cfg_miibus_writereg; -static miibus_statchg_t aue_cfg_miibus_statchg; - -static usb2_config_td_command_t aue_cfg_setmulti; -static usb2_config_td_command_t aue_cfg_first_time_setup; -static usb2_config_td_command_t aue_config_copy; -static usb2_config_td_command_t aue_cfg_tick; -static usb2_config_td_command_t aue_cfg_pre_init; -static usb2_config_td_command_t aue_cfg_init; -static usb2_config_td_command_t aue_cfg_promisc_upd; -static usb2_config_td_command_t aue_cfg_ifmedia_upd; -static usb2_config_td_command_t aue_cfg_pre_stop; -static usb2_config_td_command_t aue_cfg_stop; - -static void aue_cfg_reset_pegasus_II(struct aue_softc *); -static void aue_cfg_reset(struct aue_softc *); -static void aue_start_cb(struct ifnet *); -static void aue_init_cb(void *); -static void aue_start_transfers(struct aue_softc *); -static int aue_ifmedia_upd_cb(struct ifnet *); -static void aue_ifmedia_sts_cb(struct ifnet *, struct ifmediareq *); -static int aue_ioctl_cb(struct ifnet *, u_long, caddr_t); -static void aue_watchdog(void *); - -static const struct usb2_config aue_config[AUE_N_TRANSFER] = { - - [AUE_BULK_DT_WR] = { - .type = UE_BULK, - .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_OUT, - .mh.bufsize = (MCLBYTES + 2), - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = &aue_bulk_write_callback, - .mh.timeout = 10000, /* 10 seconds */ - }, - - [AUE_BULK_DT_RD] = { - .type = UE_BULK, - .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, - .mh.bufsize = (MCLBYTES + 4 + ETHER_CRC_LEN), - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = &aue_bulk_read_callback, - }, - - [AUE_BULK_CS_WR] = { - .type = UE_CONTROL, - .endpoint = 0x00, /* Control pipe */ - .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.flags = {}, - .mh.callback = &aue_bulk_write_clear_stall_callback, - .mh.timeout = 1000, /* 1 second */ - .mh.interval = 50, /* 50ms */ - }, - - [AUE_BULK_CS_RD] = { - .type = UE_CONTROL, - .endpoint = 0x00, /* Control pipe */ - .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.flags = {}, - .mh.callback = &aue_bulk_read_clear_stall_callback, - .mh.timeout = 1000, /* 1 second */ - .mh.interval = 50, /* 50ms */ - }, - - [AUE_INTR_DT_RD] = { - .type = UE_INTERRUPT, - .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.bufsize = 0, /* use wMaxPacketSize */ - .mh.callback = &aue_intr_callback, - }, - - [AUE_INTR_CS_RD] = { - .type = UE_CONTROL, - .endpoint = 0x00, /* Control pipe */ - .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.flags = {}, - .mh.callback = &aue_intr_clear_stall_callback, - .mh.timeout = 1000, /* 1 second */ - .mh.interval = 50, /* 50ms */ - }, -}; +static miibus_readreg_t aue_miibus_readreg; +static miibus_writereg_t aue_miibus_writereg; +static miibus_statchg_t aue_miibus_statchg; + +static void aue_reset_pegasus_II(struct aue_softc *sc); +static int aue_encap(struct aue_softc *, struct mbuf *, int); +#ifdef AUE_INTR_PIPE +static void aue_intr(usbd_xfer_handle, usbd_private_handle, usbd_status); +#endif +static void aue_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); +static void aue_rxeof_thread(struct aue_softc *sc); +static void aue_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); +static void aue_txeof_thread(struct aue_softc *); +static void aue_task_sched(struct aue_softc *, int); +static void aue_task(void *xsc, int pending); +static void aue_tick(void *); +static void aue_rxstart(struct ifnet *); +static void aue_rxstart_thread(struct aue_softc *); +static void aue_start(struct ifnet *); +static void aue_start_thread(struct aue_softc *); +static int aue_ioctl(struct ifnet *, u_long, caddr_t); +static void aue_init(void *); +static void aue_init_body(struct aue_softc *); +static void aue_stop(struct aue_softc *); +static void aue_watchdog(struct aue_softc *); +static int aue_ifmedia_upd(struct ifnet *); +static void aue_ifmedia_sts(struct ifnet *, struct ifmediareq *); + +static void aue_eeprom_getword(struct aue_softc *, int, u_int16_t *); +static void aue_read_eeprom(struct aue_softc *, caddr_t, int, int, int); + +static void aue_setmulti(struct aue_softc *); +static void aue_reset(struct aue_softc *); + +static int aue_csr_read_1(struct aue_softc *, int); +static int aue_csr_write_1(struct aue_softc *, int, int); +static int aue_csr_read_2(struct aue_softc *, int); +static int aue_csr_write_2(struct aue_softc *, int, int); static device_method_t aue_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, aue_probe), - DEVMETHOD(device_attach, aue_attach), - DEVMETHOD(device_detach, aue_detach), - DEVMETHOD(device_shutdown, aue_shutdown), + DEVMETHOD(device_probe, aue_match), + DEVMETHOD(device_attach, aue_attach), + DEVMETHOD(device_detach, aue_detach), + DEVMETHOD(device_shutdown, aue_shutdown), /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), /* MII interface */ - DEVMETHOD(miibus_readreg, aue_cfg_miibus_readreg), - DEVMETHOD(miibus_writereg, aue_cfg_miibus_writereg), - DEVMETHOD(miibus_statchg, aue_cfg_miibus_statchg), + DEVMETHOD(miibus_readreg, aue_miibus_readreg), + DEVMETHOD(miibus_writereg, aue_miibus_writereg), + DEVMETHOD(miibus_statchg, aue_miibus_statchg), - {0, 0} + { 0, 0 } }; static driver_t aue_driver = { - .name = "aue", - .methods = aue_methods, - .size = sizeof(struct aue_softc) + "aue", + aue_methods, + sizeof(struct aue_softc) }; static devclass_t aue_devclass; -DRIVER_MODULE(aue, ushub, aue_driver, aue_devclass, NULL, 0); +DRIVER_MODULE(aue, uhub, aue_driver, aue_devclass, usbd_driver_load, 0); DRIVER_MODULE(miibus, aue, miibus_driver, miibus_devclass, 0, 0); -static void -aue_cfg_do_request(struct aue_softc *sc, struct usb2_device_request *req, - void *data) -{ - uint16_t length; - usb2_error_t err; +#define AUE_SETBIT(sc, reg, x) \ + aue_csr_write_1(sc, reg, aue_csr_read_1(sc, reg) | (x)) - if (usb2_config_td_is_gone(&sc->sc_config_td)) { - goto error; - } - err = usb2_do_request_flags - (sc->sc_udev, &sc->sc_mtx, req, data, 0, NULL, 1000); +#define AUE_CLRBIT(sc, reg, x) \ + aue_csr_write_1(sc, reg, aue_csr_read_1(sc, reg) & ~(x)) - if (err) { - - DPRINTF("device request failed, err=%s " - "(ignored)\n", usb2_errstr(err)); - -error: - length = UGETW(req->wLength); - - if ((req->bmRequestType & UT_READ) && length) { - bzero(data, length); - } - } -} - -#define AUE_CFG_SETBIT(sc, reg, x) \ - aue_cfg_csr_write_1(sc, reg, aue_cfg_csr_read_1(sc, reg) | (x)) - -#define AUE_CFG_CLRBIT(sc, reg, x) \ - aue_cfg_csr_write_1(sc, reg, aue_cfg_csr_read_1(sc, reg) & ~(x)) - -static uint8_t -aue_cfg_csr_read_1(struct aue_softc *sc, uint16_t reg) +static int +aue_csr_read_1(struct aue_softc *sc, int reg) { - struct usb2_device_request req; - uint8_t val; + usb_device_request_t req; + usbd_status err; + u_int8_t val = 0; + + AUE_SXASSERTLOCKED(sc); req.bmRequestType = UT_READ_VENDOR_DEVICE; req.bRequest = AUE_UR_READREG; @@ -364,15 +289,23 @@ aue_cfg_csr_read_1(struct aue_softc *sc, USETW(req.wIndex, reg); USETW(req.wLength, 1); - aue_cfg_do_request(sc, &req, &val); + err = usbd_do_request(sc->aue_udev, &req, &val); + + if (err) { + return (0); + } + return (val); } -static uint16_t -aue_cfg_csr_read_2(struct aue_softc *sc, uint16_t reg) +static int +aue_csr_read_2(struct aue_softc *sc, int reg) { - struct usb2_device_request req; - uint16_t val; + usb_device_request_t req; + usbd_status err; + u_int16_t val = 0; + + AUE_SXASSERTLOCKED(sc); req.bmRequestType = UT_READ_VENDOR_DEVICE; req.bRequest = AUE_UR_READREG; @@ -380,29 +313,45 @@ aue_cfg_csr_read_2(struct aue_softc *sc, USETW(req.wIndex, reg); USETW(req.wLength, 2); - aue_cfg_do_request(sc, &req, &val); - return (le16toh(val)); + err = usbd_do_request(sc->aue_udev, &req, &val); + + if (err) { + return (0); + } + + return (val); } -static void -aue_cfg_csr_write_1(struct aue_softc *sc, uint16_t reg, uint8_t val) +static int +aue_csr_write_1(struct aue_softc *sc, int reg, int val) { - struct usb2_device_request req; + usb_device_request_t req; + usbd_status err; + + AUE_SXASSERTLOCKED(sc); req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = AUE_UR_WRITEREG; - req.wValue[0] = val; - req.wValue[1] = 0; + USETW(req.wValue, val); USETW(req.wIndex, reg); USETW(req.wLength, 1); - aue_cfg_do_request(sc, &req, &val); + err = usbd_do_request(sc->aue_udev, &req, &val); + + if (err) { + return (-1); + } + + return (0); } -static void -aue_cfg_csr_write_2(struct aue_softc *sc, uint16_t reg, uint16_t val) +static int +aue_csr_write_2(struct aue_softc *sc, int reg, int val) { - struct usb2_device_request req; + usb_device_request_t req; + usbd_status err; + + AUE_SXASSERTLOCKED(sc); req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = AUE_UR_WRITEREG; @@ -410,73 +359,70 @@ aue_cfg_csr_write_2(struct aue_softc *sc USETW(req.wIndex, reg); USETW(req.wLength, 2); - val = htole16(val); + err = usbd_do_request(sc->aue_udev, &req, &val); + + if (err) { + return (-1); + } - aue_cfg_do_request(sc, &req, &val); + return (0); } /* * Read a word of data stored in the EEPROM at address 'addr.' */ static void -aue_cfg_eeprom_getword(struct aue_softc *sc, uint8_t addr, - uint8_t *dest) +aue_eeprom_getword(struct aue_softc *sc, int addr, u_int16_t *dest) { - uint16_t i; - - aue_cfg_csr_write_1(sc, AUE_EE_REG, addr); - aue_cfg_csr_write_1(sc, AUE_EE_CTL, AUE_EECTL_READ); - - for (i = 0;; i++) { + int i; + u_int16_t word = 0; - if (i < AUE_TIMEOUT) { + aue_csr_write_1(sc, AUE_EE_REG, addr); + aue_csr_write_1(sc, AUE_EE_CTL, AUE_EECTL_READ); - if (aue_cfg_csr_read_1(sc, AUE_EE_CTL) & AUE_EECTL_DONE) { - break; - } - if (usb2_config_td_sleep(&sc->sc_config_td, hz / 100)) { - break; - } - } else { - DPRINTF("EEPROM read timed out!\n"); + for (i = 0; i < AUE_TIMEOUT; i++) { + if (aue_csr_read_1(sc, AUE_EE_CTL) & AUE_EECTL_DONE) break; - } } - i = aue_cfg_csr_read_2(sc, AUE_EE_DATA); + if (i == AUE_TIMEOUT) { + printf("aue%d: EEPROM read timed out\n", + sc->aue_unit); + } + + word = aue_csr_read_2(sc, AUE_EE_DATA); + *dest = word; - dest[0] = (i & 0xFF); - dest[1] = (i >> 8); + return; } /* * Read a sequence of words from the EEPROM. */ static void -aue_cfg_read_eeprom(struct aue_softc *sc, uint8_t *dest, - uint16_t off, uint16_t len) +aue_read_eeprom(struct aue_softc *sc, caddr_t dest, int off, int cnt, int swap) { - uint16_t i; + int i; + u_int16_t word = 0, *ptr; - for (i = 0; i < len; i++) { - aue_cfg_eeprom_getword(sc, off + i, dest + (i * 2)); + for (i = 0; i < cnt; i++) { + aue_eeprom_getword(sc, off + i, &word); + ptr = (u_int16_t *)(dest + (i * 2)); + if (swap) + *ptr = ntohs(word); + else + *ptr = word; } + + return; } static int -aue_cfg_miibus_readreg(device_t dev, int phy, int reg) +aue_miibus_readreg(device_t dev, int phy, int reg) { - struct aue_softc *sc = device_get_softc(dev); - uint16_t i; - uint8_t do_unlock; - - /* avoid recursive locking */ - if (mtx_owned(&sc->sc_mtx)) { - do_unlock = 0; - } else { - mtx_lock(&sc->sc_mtx); - do_unlock = 1; - } + struct aue_softc *sc = device_get_softc(dev); + int i; + u_int16_t val = 0; /* * The Am79C901 HomePNA PHY actually contains @@ -488,198 +434,162 @@ aue_cfg_miibus_readreg(device_t dev, int * happens to be configured for MII address 3, * so we filter that out. */ - if (sc->sc_flags & AUE_FLAG_DUAL_PHY) { - - if (phy == 3) { - i = 0; - goto done; - } -#if 0 - if (phy != 1) { - i = 0; - goto done; - } + if (sc->aue_vendor == USB_VENDOR_ADMTEK && + sc->aue_product == USB_PRODUCT_ADMTEK_PEGASUS) { + if (phy == 3) + return (0); +#ifdef notdef + if (phy != 1) + return (0); #endif } - aue_cfg_csr_write_1(sc, AUE_PHY_ADDR, phy); - aue_cfg_csr_write_1(sc, AUE_PHY_CTL, reg | AUE_PHYCTL_READ); - for (i = 0;; i++) { + aue_csr_write_1(sc, AUE_PHY_ADDR, phy); + aue_csr_write_1(sc, AUE_PHY_CTL, reg | AUE_PHYCTL_READ); - if (i < AUE_TIMEOUT) { - - if (aue_cfg_csr_read_1(sc, AUE_PHY_CTL) & AUE_PHYCTL_DONE) { - break; - } - if (usb2_config_td_sleep(&sc->sc_config_td, hz / 100)) { - break; - } - } else { - DPRINTF("MII read timed out\n"); + for (i = 0; i < AUE_TIMEOUT; i++) { + if (aue_csr_read_1(sc, AUE_PHY_CTL) & AUE_PHYCTL_DONE) break; - } } - i = aue_cfg_csr_read_2(sc, AUE_PHY_DATA); - -done: - if (do_unlock) { - mtx_unlock(&sc->sc_mtx); + if (i == AUE_TIMEOUT) { + printf("aue%d: MII read timed out\n", sc->aue_unit); } - return (i); + + val = aue_csr_read_2(sc, AUE_PHY_DATA); + + return (val); } static int -aue_cfg_miibus_writereg(device_t dev, int phy, int reg, int data) +aue_miibus_writereg(device_t dev, int phy, int reg, int data) { - struct aue_softc *sc = device_get_softc(dev); - uint16_t i; - uint8_t do_unlock; + struct aue_softc *sc = device_get_softc(dev); + int i; - if (phy == 3) { + if (phy == 3) return (0); - } - /* avoid recursive locking */ - if (mtx_owned(&sc->sc_mtx)) { - do_unlock = 0; - } else { - mtx_lock(&sc->sc_mtx); - do_unlock = 1; - } - - aue_cfg_csr_write_2(sc, AUE_PHY_DATA, data); - aue_cfg_csr_write_1(sc, AUE_PHY_ADDR, phy); - aue_cfg_csr_write_1(sc, AUE_PHY_CTL, reg | AUE_PHYCTL_WRITE); - for (i = 0;; i++) { + aue_csr_write_2(sc, AUE_PHY_DATA, data); + aue_csr_write_1(sc, AUE_PHY_ADDR, phy); + aue_csr_write_1(sc, AUE_PHY_CTL, reg | AUE_PHYCTL_WRITE); - if (i < AUE_TIMEOUT) { - if (aue_cfg_csr_read_1(sc, AUE_PHY_CTL) & AUE_PHYCTL_DONE) { - break; - } - if (usb2_config_td_sleep(&sc->sc_config_td, hz / 100)) { - break; - } - } else { - DPRINTF("MII write timed out\n"); + for (i = 0; i < AUE_TIMEOUT; i++) { + if (aue_csr_read_1(sc, AUE_PHY_CTL) & AUE_PHYCTL_DONE) break; - } } - if (do_unlock) { - mtx_unlock(&sc->sc_mtx); + if (i == AUE_TIMEOUT) { + printf("aue%d: MII read timed out\n", + sc->aue_unit); } - return (0); + + return(0); } static void -aue_cfg_miibus_statchg(device_t dev) +aue_miibus_statchg(device_t dev) { - struct aue_softc *sc = device_get_softc(dev); - struct mii_data *mii = GET_MII(sc); - uint8_t do_unlock; - - /* avoid recursive locking */ - if (mtx_owned(&sc->sc_mtx)) { - do_unlock = 0; - } else { - mtx_lock(&sc->sc_mtx); - do_unlock = 1; - } - - AUE_CFG_CLRBIT(sc, AUE_CTL0, AUE_CTL0_RX_ENB | AUE_CTL0_TX_ENB); + struct aue_softc *sc = device_get_softc(dev); + struct mii_data *mii = GET_MII(sc); + AUE_CLRBIT(sc, AUE_CTL0, AUE_CTL0_RX_ENB | AUE_CTL0_TX_ENB); if (IFM_SUBTYPE(mii->mii_media_active) == IFM_100_TX) { - AUE_CFG_SETBIT(sc, AUE_CTL1, AUE_CTL1_SPEEDSEL); + AUE_SETBIT(sc, AUE_CTL1, AUE_CTL1_SPEEDSEL); } else { - AUE_CFG_CLRBIT(sc, AUE_CTL1, AUE_CTL1_SPEEDSEL); + AUE_CLRBIT(sc, AUE_CTL1, AUE_CTL1_SPEEDSEL); } - if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) { - AUE_CFG_SETBIT(sc, AUE_CTL1, AUE_CTL1_DUPLEX); - } else { - AUE_CFG_CLRBIT(sc, AUE_CTL1, AUE_CTL1_DUPLEX); - } + if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) + AUE_SETBIT(sc, AUE_CTL1, AUE_CTL1_DUPLEX); + else + AUE_CLRBIT(sc, AUE_CTL1, AUE_CTL1_DUPLEX); - AUE_CFG_SETBIT(sc, AUE_CTL0, AUE_CTL0_RX_ENB | AUE_CTL0_TX_ENB); + AUE_SETBIT(sc, AUE_CTL0, AUE_CTL0_RX_ENB | AUE_CTL0_TX_ENB); /* * Set the LED modes on the LinkSys adapter. * This turns on the 'dual link LED' bin in the auxmode * register of the Broadcom PHY. */ - if (sc->sc_flags & AUE_FLAG_LSYS) { - uint16_t auxmode; - - auxmode = aue_cfg_miibus_readreg(dev, 0, 0x1b); - aue_cfg_miibus_writereg(dev, 0, 0x1b, auxmode | 0x04); - } - if (do_unlock) { - mtx_unlock(&sc->sc_mtx); + if (sc->aue_flags & LSYS) { + u_int16_t auxmode; + auxmode = aue_miibus_readreg(dev, 0, 0x1b); + aue_miibus_writereg(dev, 0, 0x1b, auxmode | 0x04); } + + return; } +#define AUE_BITS 6 + static void -aue_cfg_setmulti(struct aue_softc *sc, - struct usb2_config_td_cc *cc, uint16_t refcount) +aue_setmulti(struct aue_softc *sc) { - uint16_t i; + struct ifnet *ifp; + struct ifmultiaddr *ifma; + u_int32_t h = 0, i; + u_int8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - if ((cc->if_flags & IFF_ALLMULTI) || - (cc->if_flags & IFF_PROMISC)) { - AUE_CFG_SETBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI); + AUE_SXASSERTLOCKED(sc); + ifp = sc->aue_ifp; + + if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { + AUE_SETBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI); return; } - AUE_CFG_CLRBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI); - /* clear existing ones */ - for (i = 0; i < 8; i++) { - aue_cfg_csr_write_1(sc, AUE_MAR0 + i, 0); - } + AUE_CLRBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI); /* now program new ones */ - for (i = 0; i < 8; i++) { - aue_cfg_csr_write_1(sc, AUE_MAR0 + i, cc->if_hash[i]); - } + IF_ADDR_LOCK(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) + { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + h = ether_crc32_le(LLADDR((struct sockaddr_dl *) + ifma->ifma_addr), ETHER_ADDR_LEN) & ((1 << AUE_BITS) - 1); + hashtbl[(h >> 3)] |= 1 << (h & 0x7); + } + IF_ADDR_UNLOCK(ifp); + + /* write the hashtable */ + for (i = 0; i < 8; i++) + aue_csr_write_1(sc, AUE_MAR0 + i, hashtbl[i]); + + return; } static void -aue_cfg_reset_pegasus_II(struct aue_softc *sc) +aue_reset_pegasus_II(struct aue_softc *sc) { /* Magic constants taken from Linux driver. */ - aue_cfg_csr_write_1(sc, AUE_REG_1D, 0); - aue_cfg_csr_write_1(sc, AUE_REG_7B, 2); + aue_csr_write_1(sc, AUE_REG_1D, 0); + aue_csr_write_1(sc, AUE_REG_7B, 2); #if 0 - if ((sc->sc_flags & HAS_HOME_PNA) && mii_mode) - aue_cfg_csr_write_1(sc, AUE_REG_81, 6); + if ((sc->aue_flags & HAS_HOME_PNA) && mii_mode) + aue_csr_write_1(sc, AUE_REG_81, 6); else #endif - aue_cfg_csr_write_1(sc, AUE_REG_81, 2); + aue_csr_write_1(sc, AUE_REG_81, 2); } static void -aue_cfg_reset(struct aue_softc *sc) +aue_reset(struct aue_softc *sc) { - uint16_t i; - - AUE_CFG_SETBIT(sc, AUE_CTL1, AUE_CTL1_RESETMAC); + int i; - for (i = 0;; i++) { + AUE_SXASSERTLOCKED(sc); + AUE_SETBIT(sc, AUE_CTL1, AUE_CTL1_RESETMAC); - if (i < AUE_TIMEOUT) { - - if (!(aue_cfg_csr_read_1(sc, AUE_CTL1) & AUE_CTL1_RESETMAC)) { - break; - } - if (usb2_config_td_sleep(&sc->sc_config_td, hz / 100)) { - break; - } - } else { - DPRINTF("reset timed out\n"); + for (i = 0; i < AUE_TIMEOUT; i++) { + if (!(aue_csr_read_1(sc, AUE_CTL1) & AUE_CTL1_RESETMAC)) break; - } } + if (i == AUE_TIMEOUT) + printf("aue%d: reset failed\n", sc->aue_unit); + /* * The PHY(s) attached to the Pegasus chip may be held * in reset until we flip on the GPIO outputs. Make sure @@ -689,55 +599,48 @@ aue_cfg_reset(struct aue_softc *sc) * Note: We force all of the GPIO pins low first, *then* * enable the ones we want. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 01:29:22 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B26F106564A; Tue, 27 Jan 2009 01:29:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38A718FC08; Tue, 27 Jan 2009 01:29:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R1TMBO069498; Tue, 27 Jan 2009 01:29:22 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R1TMr9069496; Tue, 27 Jan 2009 01:29:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901270129.n0R1TMr9069496@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 01:29:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187753 - user/thompsa/usb/sys/dev/usb2/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 01:29:22 -0000 Author: thompsa Date: Tue Jan 27 01:29:22 2009 New Revision: 187753 URL: http://svn.freebsd.org/changeset/base/187753 Log: Revert back to the sys/dev/usb copy of the wlan drivers in preparation of removing the config thread. Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c user/thompsa/usb/sys/dev/usb2/wlan/if_rumreg.h user/thompsa/usb/sys/dev/usb2/wlan/if_rumvar.h user/thompsa/usb/sys/dev/usb2/wlan/if_ural2.c user/thompsa/usb/sys/dev/usb2/wlan/if_uralreg.h user/thompsa/usb/sys/dev/usb2/wlan/if_uralvar.h user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c user/thompsa/usb/sys/dev/usb2/wlan/if_zydfw.h user/thompsa/usb/sys/dev/usb2/wlan/if_zydreg.h Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c Tue Jan 27 01:27:28 2009 (r187752) +++ user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c Tue Jan 27 01:29:22 2009 (r187753) @@ -1,7 +1,8 @@ +/* $FreeBSD$ */ + /*- * Copyright (c) 2005-2007 Damien Bergamini * Copyright (c) 2006 Niall O'Higgins - * Copyright (c) 2007-2008 Hans Petter Selasky * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -16,11 +17,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* - * NOTE: all function names beginning like "rum_cfg_" can only - * be called from within the config thread function ! - */ - #include __FBSDID("$FreeBSD$"); @@ -29,1191 +25,1213 @@ __FBSDID("$FreeBSD$"); * http://www.ralinktech.com.tw/ */ -#include -#include -#include -#include - -#define usb2_config_td_cc rum_config_copy -#define usb2_config_td_softc rum_softc - -#define USB_DEBUG_VAR rum_debug - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#if USB_DEBUG -static int rum_debug = 0; - -SYSCTL_NODE(_hw_usb2, OID_AUTO, rum, CTLFLAG_RW, 0, "USB rum"); -SYSCTL_INT(_hw_usb2_rum, OID_AUTO, debug, CTLFLAG_RW, &rum_debug, 0, - "Debug level"); +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include "usbdevs.h" + +#include +#include +#include + +#ifdef USB_DEBUG +#define DPRINTF(x) do { if (rumdebug > 0) printf x; } while (0) +#define DPRINTFN(n, x) do { if (rumdebug >= (n)) printf x; } while (0) +int rumdebug = 0; +SYSCTL_NODE(_hw_usb, OID_AUTO, rum, CTLFLAG_RW, 0, "USB rum"); +SYSCTL_INT(_hw_usb_rum, OID_AUTO, debug, CTLFLAG_RW, &rumdebug, 0, + "rum debug level"); +#else +#define DPRINTF(x) +#define DPRINTFN(n, x) #endif -/* prototypes */ - -static device_probe_t rum_probe; -static device_attach_t rum_attach; -static device_detach_t rum_detach; - -static usb2_callback_t rum_bulk_read_callback; -static usb2_callback_t rum_bulk_read_clear_stall_callback; -static usb2_callback_t rum_bulk_write_callback; -static usb2_callback_t rum_bulk_write_clear_stall_callback; - -static usb2_config_td_command_t rum_cfg_first_time_setup; -static usb2_config_td_command_t rum_config_copy; -static usb2_config_td_command_t rum_cfg_scan_start; -static usb2_config_td_command_t rum_cfg_scan_end; -static usb2_config_td_command_t rum_cfg_select_band; -static usb2_config_td_command_t rum_cfg_set_chan; -static usb2_config_td_command_t rum_cfg_enable_tsf_sync; -static usb2_config_td_command_t rum_cfg_enable_mrr; -static usb2_config_td_command_t rum_cfg_update_slot; -static usb2_config_td_command_t rum_cfg_select_antenna; -static usb2_config_td_command_t rum_cfg_set_txpreamble; -static usb2_config_td_command_t rum_cfg_update_promisc; -static usb2_config_td_command_t rum_cfg_pre_init; -static usb2_config_td_command_t rum_cfg_init; -static usb2_config_td_command_t rum_cfg_pre_stop; -static usb2_config_td_command_t rum_cfg_stop; -static usb2_config_td_command_t rum_cfg_amrr_timeout; -static usb2_config_td_command_t rum_cfg_prepare_beacon; -static usb2_config_td_command_t rum_cfg_newstate; - -static const char *rum_get_rf(uint32_t); -static int rum_ioctl_cb(struct ifnet *, u_long, caddr_t); -static void rum_std_command(struct ieee80211com *, usb2_config_td_command_t *); -static void rum_scan_start_cb(struct ieee80211com *); -static void rum_scan_end_cb(struct ieee80211com *); -static void rum_set_channel_cb(struct ieee80211com *); -static uint16_t rum_cfg_eeprom_read_2(struct rum_softc *, uint16_t); -static uint32_t rum_cfg_bbp_disbusy(struct rum_softc *); -static uint32_t rum_cfg_read(struct rum_softc *, uint16_t); -static uint8_t rum_cfg_bbp_init(struct rum_softc *); -static uint8_t rum_cfg_bbp_read(struct rum_softc *, uint8_t); -static void rum_cfg_amrr_start(struct rum_softc *); -static void rum_cfg_bbp_write(struct rum_softc *, uint8_t, uint8_t); -static void rum_cfg_do_request(struct rum_softc *, - struct usb2_device_request *, void *); -static void rum_cfg_eeprom_read(struct rum_softc *, uint16_t, void *, - uint16_t); -static void rum_cfg_load_microcode(struct rum_softc *, const uint8_t *, - uint16_t); -static void rum_cfg_read_eeprom(struct rum_softc *); -static void rum_cfg_read_multi(struct rum_softc *, uint16_t, void *, - uint16_t); -static void rum_cfg_rf_write(struct rum_softc *, uint8_t, uint32_t); -static void rum_cfg_set_bssid(struct rum_softc *, uint8_t *); -static void rum_cfg_set_macaddr(struct rum_softc *, uint8_t *); -static void rum_cfg_write(struct rum_softc *, uint16_t, uint32_t); -static void rum_cfg_write_multi(struct rum_softc *, uint16_t, void *, - uint16_t); -static void rum_end_of_commands(struct rum_softc *); -static void rum_init_cb(void *); -static void rum_start_cb(struct ifnet *); -static void rum_watchdog(void *); -static uint8_t rum_get_rssi(struct rum_softc *, uint8_t); -static struct ieee80211vap *rum_vap_create(struct ieee80211com *, - const char[], int, int, int, const uint8_t[], - const uint8_t[]); -static void rum_vap_delete(struct ieee80211vap *); -static struct ieee80211_node *rum_node_alloc(struct ieee80211vap *, - const uint8_t[]); -static void rum_newassoc(struct ieee80211_node *, int); -static void rum_cfg_disable_tsf_sync(struct rum_softc *); -static void rum_cfg_set_run(struct rum_softc *, struct rum_config_copy *); -static void rum_fill_write_queue(struct rum_softc *); -static void rum_tx_clean_queue(struct rum_softc *); -static void rum_tx_freem(struct mbuf *); -static void rum_tx_mgt(struct rum_softc *, struct mbuf *, - struct ieee80211_node *); -static struct ieee80211vap *rum_get_vap(struct rum_softc *); -static void rum_tx_data(struct rum_softc *, struct mbuf *, - struct ieee80211_node *); -static void rum_tx_prot(struct rum_softc *, const struct mbuf *, - struct ieee80211_node *, uint8_t, uint16_t); -static void rum_tx_raw(struct rum_softc *, struct mbuf *, - struct ieee80211_node *, - const struct ieee80211_bpf_params *); -static int rum_raw_xmit_cb(struct ieee80211_node *, struct mbuf *, - const struct ieee80211_bpf_params *); -static void rum_setup_desc_and_tx(struct rum_softc *, struct mbuf *, - uint32_t, uint16_t, uint16_t); -static int rum_newstate_cb(struct ieee80211vap *, - enum ieee80211_state nstate, int arg); -static void rum_update_mcast_cb(struct ifnet *); -static void rum_update_promisc_cb(struct ifnet *); - /* various supported device vendors/products */ -static const struct usb2_device_id rum_devs[] = { - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_HWU54DM, 0)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_2, 0)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_3, 0)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_4, 0)}, - {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_WUG2700, 0)}, - {USB_VPI(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_CGWLUSB2GO, 0)}, - {USB_VPI(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2573_1, 0)}, - {USB_VPI(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2573_2, 0)}, - {USB_VPI(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D7050A, 0)}, - {USB_VPI(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D9050V3, 0)}, - {USB_VPI(USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSB54GC, 0)}, - {USB_VPI(USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSB54GR, 0)}, - {USB_VPI(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_C54RU2, 0)}, - {USB_VPI(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB2GL, 0)}, - {USB_VPI(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB2GPX, 0)}, - {USB_VPI(USB_VENDOR_DICKSMITH, USB_PRODUCT_DICKSMITH_CWD854F, 0)}, - {USB_VPI(USB_VENDOR_DICKSMITH, USB_PRODUCT_DICKSMITH_RT2573, 0)}, - {USB_VPI(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWLG122C1, 0)}, - {USB_VPI(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_WUA1340, 0)}, - {USB_VPI(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA111, 0)}, - {USB_VPI(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA110, 0)}, - {USB_VPI(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB01GS, 0)}, - {USB_VPI(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWI05GS, 0)}, - {USB_VPI(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT2573, 0)}, - {USB_VPI(USB_VENDOR_GOODWAY, USB_PRODUCT_GOODWAY_RT2573, 0)}, - {USB_VPI(USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWGUSB254LB, 0)}, - {USB_VPI(USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWGUSB254V2AP, 0)}, - {USB_VPI(USB_VENDOR_HUAWEI3COM, USB_PRODUCT_HUAWEI3COM_WUB320G, 0)}, - {USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_G54HP, 0)}, - {USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_SG54HP, 0)}, - {USB_VPI(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_1, 0)}, - {USB_VPI(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_2, 0)}, - {USB_VPI(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_3, 0)}, - {USB_VPI(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_4, 0)}, - {USB_VPI(USB_VENDOR_NOVATECH, USB_PRODUCT_NOVATECH_RT2573, 0)}, - {USB_VPI(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54HP, 0)}, - {USB_VPI(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54MINI2, 0)}, - {USB_VPI(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMM, 0)}, - {USB_VPI(USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2573, 0)}, - {USB_VPI(USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2573_2, 0)}, - {USB_VPI(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2573, 0)}, - {USB_VPI(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2573_2, 0)}, - {USB_VPI(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2671, 0)}, - {USB_VPI(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL113R2, 0)}, - {USB_VPI(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL172, 0)}, - {USB_VPI(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT2573, 0)}, - {USB_VPI(USB_VENDOR_SURECOM, USB_PRODUCT_SURECOM_RT2573, 0)}, +static const struct usb_devno rum_devs[] = { + { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_HWU54DM }, + { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_2 }, + { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_3 }, + { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_4 }, + { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_WUG2700 }, + { USB_VENDOR_AMIT, USB_PRODUCT_AMIT_CGWLUSB2GO }, + { USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2573_1 }, + { USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2573_2 }, + { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D7050A }, + { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D9050V3 }, + { USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSB54GC }, + { USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSB54GR }, + { USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_C54RU2 }, + { USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB2GL }, + { USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB2GPX }, + { USB_VENDOR_DICKSMITH, USB_PRODUCT_DICKSMITH_CWD854F }, + { USB_VENDOR_DICKSMITH, USB_PRODUCT_DICKSMITH_RT2573 }, + { USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWLG122C1 }, + { USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_WUA1340 }, + { USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA111 }, + { USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA110 }, + { USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB01GS }, + { USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWI05GS }, + { USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT2573 }, + { USB_VENDOR_GOODWAY, USB_PRODUCT_GOODWAY_RT2573 }, + { USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWGUSB254LB }, + { USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWGUSB254V2AP }, + { USB_VENDOR_HUAWEI3COM, USB_PRODUCT_HUAWEI3COM_WUB320G }, + { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_G54HP }, + { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_SG54HP }, + { USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_1 }, + { USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_2 }, + { USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_3 }, + { USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_4 }, + { USB_VENDOR_NOVATECH, USB_PRODUCT_NOVATECH_RT2573 }, + { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54HP }, + { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54MINI2 }, + { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMM }, + { USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2573 }, + { USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2573_2 }, + { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2573 }, + { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2573_2 }, + { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2671 }, + { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL113R2 }, + { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL172 }, + { USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT2573 }, + { USB_VENDOR_SURECOM, USB_PRODUCT_SURECOM_RT2573 } }; -struct rum_def_mac { - uint32_t reg; - uint32_t val; -}; +MODULE_DEPEND(rum, wlan, 1, 1, 1); +MODULE_DEPEND(rum, wlan_amrr, 1, 1, 1); +MODULE_DEPEND(rum, usb, 1, 1, 1); -static const struct rum_def_mac rum_def_mac[] = { - {RT2573_TXRX_CSR0, 0x025fb032}, - {RT2573_TXRX_CSR1, 0x9eaa9eaf}, - {RT2573_TXRX_CSR2, 0x8a8b8c8d}, - {RT2573_TXRX_CSR3, 0x00858687}, - {RT2573_TXRX_CSR7, 0x2e31353b}, - {RT2573_TXRX_CSR8, 0x2a2a2a2c}, - {RT2573_TXRX_CSR15, 0x0000000f}, - {RT2573_MAC_CSR6, 0x00000fff}, - {RT2573_MAC_CSR8, 0x016c030a}, - {RT2573_MAC_CSR10, 0x00000718}, - {RT2573_MAC_CSR12, 0x00000004}, - {RT2573_MAC_CSR13, 0x00007f00}, - {RT2573_SEC_CSR0, 0x00000000}, - {RT2573_SEC_CSR1, 0x00000000}, - {RT2573_SEC_CSR5, 0x00000000}, - {RT2573_PHY_CSR1, 0x000023b0}, - {RT2573_PHY_CSR5, 0x00040a06}, - {RT2573_PHY_CSR6, 0x00080606}, - {RT2573_PHY_CSR7, 0x00000408}, - {RT2573_AIFSN_CSR, 0x00002273}, - {RT2573_CWMIN_CSR, 0x00002344}, - {RT2573_CWMAX_CSR, 0x000034aa} +static struct ieee80211vap *rum_vap_create(struct ieee80211com *, + const char name[IFNAMSIZ], int unit, int opmode, + int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]); +static void rum_vap_delete(struct ieee80211vap *); +static int rum_alloc_tx_list(struct rum_softc *); +static void rum_free_tx_list(struct rum_softc *); +static int rum_alloc_rx_list(struct rum_softc *); +static void rum_free_rx_list(struct rum_softc *); +static void rum_task(void *); +static void rum_scantask(void *); +static int rum_newstate(struct ieee80211vap *, + enum ieee80211_state, int); +static void rum_txeof(usbd_xfer_handle, usbd_private_handle, + usbd_status); +static void rum_rxeof(usbd_xfer_handle, usbd_private_handle, + usbd_status); +static void rum_setup_tx_desc(struct rum_softc *, + struct rum_tx_desc *, uint32_t, uint16_t, int, + int); +static int rum_tx_mgt(struct rum_softc *, struct mbuf *, + struct ieee80211_node *); +static int rum_tx_raw(struct rum_softc *, struct mbuf *, + struct ieee80211_node *, + const struct ieee80211_bpf_params *); +static int rum_tx_data(struct rum_softc *, struct mbuf *, + struct ieee80211_node *); +static void rum_start(struct ifnet *); +static void rum_watchdog(void *); +static int rum_ioctl(struct ifnet *, u_long, caddr_t); +static void rum_eeprom_read(struct rum_softc *, uint16_t, void *, + int); +static uint32_t rum_read(struct rum_softc *, uint16_t); +static void rum_read_multi(struct rum_softc *, uint16_t, void *, + int); +static void rum_write(struct rum_softc *, uint16_t, uint32_t); +static void rum_write_multi(struct rum_softc *, uint16_t, void *, + size_t); +static void rum_bbp_write(struct rum_softc *, uint8_t, uint8_t); +static uint8_t rum_bbp_read(struct rum_softc *, uint8_t); +static void rum_rf_write(struct rum_softc *, uint8_t, uint32_t); +static void rum_select_antenna(struct rum_softc *); +static void rum_enable_mrr(struct rum_softc *); +static void rum_set_txpreamble(struct rum_softc *); +static void rum_set_basicrates(struct rum_softc *); +static void rum_select_band(struct rum_softc *, + struct ieee80211_channel *); +static void rum_set_chan(struct rum_softc *, + struct ieee80211_channel *); +static void rum_enable_tsf_sync(struct rum_softc *); +static void rum_update_slot(struct ifnet *); +static void rum_set_bssid(struct rum_softc *, const uint8_t *); +static void rum_set_macaddr(struct rum_softc *, const uint8_t *); +static void rum_update_promisc(struct rum_softc *); +static const char *rum_get_rf(int); +static void rum_read_eeprom(struct rum_softc *); +static int rum_bbp_init(struct rum_softc *); +static void rum_init_locked(struct rum_softc *); +static void rum_init(void *); +static void rum_stop(void *); +static int rum_load_microcode(struct rum_softc *, const u_char *, + size_t); +static int rum_prepare_beacon(struct rum_softc *, + struct ieee80211vap *); +static int rum_raw_xmit(struct ieee80211_node *, struct mbuf *, + const struct ieee80211_bpf_params *); +static struct ieee80211_node *rum_node_alloc(struct ieee80211vap *, + const uint8_t mac[IEEE80211_ADDR_LEN]); +static void rum_newassoc(struct ieee80211_node *, int); +static void rum_scan_start(struct ieee80211com *); +static void rum_scan_end(struct ieee80211com *); +static void rum_set_channel(struct ieee80211com *); +static int rum_get_rssi(struct rum_softc *, uint8_t); +static void rum_amrr_start(struct rum_softc *, + struct ieee80211_node *); +static void rum_amrr_timeout(void *); +static void rum_amrr_update(usbd_xfer_handle, usbd_private_handle, + usbd_status); + +static const struct { + uint32_t reg; + uint32_t val; +} rum_def_mac[] = { + { RT2573_TXRX_CSR0, 0x025fb032 }, + { RT2573_TXRX_CSR1, 0x9eaa9eaf }, + { RT2573_TXRX_CSR2, 0x8a8b8c8d }, + { RT2573_TXRX_CSR3, 0x00858687 }, + { RT2573_TXRX_CSR7, 0x2e31353b }, + { RT2573_TXRX_CSR8, 0x2a2a2a2c }, + { RT2573_TXRX_CSR15, 0x0000000f }, + { RT2573_MAC_CSR6, 0x00000fff }, + { RT2573_MAC_CSR8, 0x016c030a }, + { RT2573_MAC_CSR10, 0x00000718 }, + { RT2573_MAC_CSR12, 0x00000004 }, + { RT2573_MAC_CSR13, 0x00007f00 }, + { RT2573_SEC_CSR0, 0x00000000 }, + { RT2573_SEC_CSR1, 0x00000000 }, + { RT2573_SEC_CSR5, 0x00000000 }, + { RT2573_PHY_CSR1, 0x000023b0 }, + { RT2573_PHY_CSR5, 0x00040a06 }, + { RT2573_PHY_CSR6, 0x00080606 }, + { RT2573_PHY_CSR7, 0x00000408 }, + { RT2573_AIFSN_CSR, 0x00002273 }, + { RT2573_CWMIN_CSR, 0x00002344 }, + { RT2573_CWMAX_CSR, 0x000034aa } }; -struct rum_def_bbp { +static const struct { uint8_t reg; uint8_t val; +} rum_def_bbp[] = { + { 3, 0x80 }, + { 15, 0x30 }, + { 17, 0x20 }, + { 21, 0xc8 }, + { 22, 0x38 }, + { 23, 0x06 }, + { 24, 0xfe }, + { 25, 0x0a }, + { 26, 0x0d }, + { 32, 0x0b }, + { 34, 0x12 }, + { 37, 0x07 }, + { 39, 0xf8 }, + { 41, 0x60 }, + { 53, 0x10 }, + { 54, 0x18 }, + { 60, 0x10 }, + { 61, 0x04 }, + { 62, 0x04 }, + { 75, 0xfe }, + { 86, 0xfe }, + { 88, 0xfe }, + { 90, 0x0f }, + { 99, 0x00 }, + { 102, 0x16 }, + { 107, 0x04 } }; -static const struct rum_def_bbp rum_def_bbp[] = { - {3, 0x80}, - {15, 0x30}, - {17, 0x20}, - {21, 0xc8}, - {22, 0x38}, - {23, 0x06}, - {24, 0xfe}, - {25, 0x0a}, - {26, 0x0d}, - {32, 0x0b}, - {34, 0x12}, - {37, 0x07}, - {39, 0xf8}, - {41, 0x60}, - {53, 0x10}, - {54, 0x18}, - {60, 0x10}, - {61, 0x04}, - {62, 0x04}, - {75, 0xfe}, - {86, 0xfe}, - {88, 0xfe}, - {90, 0x0f}, - {99, 0x00}, - {102, 0x16}, - {107, 0x04} +static const struct rfprog { + uint8_t chan; + uint32_t r1, r2, r3, r4; +} rum_rf5226[] = { + { 1, 0x00b03, 0x001e1, 0x1a014, 0x30282 }, + { 2, 0x00b03, 0x001e1, 0x1a014, 0x30287 }, + { 3, 0x00b03, 0x001e2, 0x1a014, 0x30282 }, + { 4, 0x00b03, 0x001e2, 0x1a014, 0x30287 }, + { 5, 0x00b03, 0x001e3, 0x1a014, 0x30282 }, + { 6, 0x00b03, 0x001e3, 0x1a014, 0x30287 }, + { 7, 0x00b03, 0x001e4, 0x1a014, 0x30282 }, + { 8, 0x00b03, 0x001e4, 0x1a014, 0x30287 }, + { 9, 0x00b03, 0x001e5, 0x1a014, 0x30282 }, + { 10, 0x00b03, 0x001e5, 0x1a014, 0x30287 }, + { 11, 0x00b03, 0x001e6, 0x1a014, 0x30282 }, + { 12, 0x00b03, 0x001e6, 0x1a014, 0x30287 }, + { 13, 0x00b03, 0x001e7, 0x1a014, 0x30282 }, + { 14, 0x00b03, 0x001e8, 0x1a014, 0x30284 }, + + { 34, 0x00b03, 0x20266, 0x36014, 0x30282 }, + { 38, 0x00b03, 0x20267, 0x36014, 0x30284 }, + { 42, 0x00b03, 0x20268, 0x36014, 0x30286 }, + { 46, 0x00b03, 0x20269, 0x36014, 0x30288 }, + + { 36, 0x00b03, 0x00266, 0x26014, 0x30288 }, + { 40, 0x00b03, 0x00268, 0x26014, 0x30280 }, + { 44, 0x00b03, 0x00269, 0x26014, 0x30282 }, + { 48, 0x00b03, 0x0026a, 0x26014, 0x30284 }, + { 52, 0x00b03, 0x0026b, 0x26014, 0x30286 }, + { 56, 0x00b03, 0x0026c, 0x26014, 0x30288 }, + { 60, 0x00b03, 0x0026e, 0x26014, 0x30280 }, + { 64, 0x00b03, 0x0026f, 0x26014, 0x30282 }, + + { 100, 0x00b03, 0x0028a, 0x2e014, 0x30280 }, + { 104, 0x00b03, 0x0028b, 0x2e014, 0x30282 }, + { 108, 0x00b03, 0x0028c, 0x2e014, 0x30284 }, + { 112, 0x00b03, 0x0028d, 0x2e014, 0x30286 }, + { 116, 0x00b03, 0x0028e, 0x2e014, 0x30288 }, + { 120, 0x00b03, 0x002a0, 0x2e014, 0x30280 }, + { 124, 0x00b03, 0x002a1, 0x2e014, 0x30282 }, + { 128, 0x00b03, 0x002a2, 0x2e014, 0x30284 }, + { 132, 0x00b03, 0x002a3, 0x2e014, 0x30286 }, + { 136, 0x00b03, 0x002a4, 0x2e014, 0x30288 }, + { 140, 0x00b03, 0x002a6, 0x2e014, 0x30280 }, + + { 149, 0x00b03, 0x002a8, 0x2e014, 0x30287 }, + { 153, 0x00b03, 0x002a9, 0x2e014, 0x30289 }, + { 157, 0x00b03, 0x002ab, 0x2e014, 0x30281 }, + { 161, 0x00b03, 0x002ac, 0x2e014, 0x30283 }, + { 165, 0x00b03, 0x002ad, 0x2e014, 0x30285 } +}, rum_rf5225[] = { + { 1, 0x00b33, 0x011e1, 0x1a014, 0x30282 }, + { 2, 0x00b33, 0x011e1, 0x1a014, 0x30287 }, + { 3, 0x00b33, 0x011e2, 0x1a014, 0x30282 }, + { 4, 0x00b33, 0x011e2, 0x1a014, 0x30287 }, + { 5, 0x00b33, 0x011e3, 0x1a014, 0x30282 }, + { 6, 0x00b33, 0x011e3, 0x1a014, 0x30287 }, + { 7, 0x00b33, 0x011e4, 0x1a014, 0x30282 }, + { 8, 0x00b33, 0x011e4, 0x1a014, 0x30287 }, + { 9, 0x00b33, 0x011e5, 0x1a014, 0x30282 }, + { 10, 0x00b33, 0x011e5, 0x1a014, 0x30287 }, + { 11, 0x00b33, 0x011e6, 0x1a014, 0x30282 }, + { 12, 0x00b33, 0x011e6, 0x1a014, 0x30287 }, + { 13, 0x00b33, 0x011e7, 0x1a014, 0x30282 }, + { 14, 0x00b33, 0x011e8, 0x1a014, 0x30284 }, + + { 34, 0x00b33, 0x01266, 0x26014, 0x30282 }, + { 38, 0x00b33, 0x01267, 0x26014, 0x30284 }, + { 42, 0x00b33, 0x01268, 0x26014, 0x30286 }, + { 46, 0x00b33, 0x01269, 0x26014, 0x30288 }, + + { 36, 0x00b33, 0x01266, 0x26014, 0x30288 }, + { 40, 0x00b33, 0x01268, 0x26014, 0x30280 }, + { 44, 0x00b33, 0x01269, 0x26014, 0x30282 }, + { 48, 0x00b33, 0x0126a, 0x26014, 0x30284 }, + { 52, 0x00b33, 0x0126b, 0x26014, 0x30286 }, + { 56, 0x00b33, 0x0126c, 0x26014, 0x30288 }, + { 60, 0x00b33, 0x0126e, 0x26014, 0x30280 }, + { 64, 0x00b33, 0x0126f, 0x26014, 0x30282 }, + + { 100, 0x00b33, 0x0128a, 0x2e014, 0x30280 }, + { 104, 0x00b33, 0x0128b, 0x2e014, 0x30282 }, + { 108, 0x00b33, 0x0128c, 0x2e014, 0x30284 }, + { 112, 0x00b33, 0x0128d, 0x2e014, 0x30286 }, + { 116, 0x00b33, 0x0128e, 0x2e014, 0x30288 }, + { 120, 0x00b33, 0x012a0, 0x2e014, 0x30280 }, + { 124, 0x00b33, 0x012a1, 0x2e014, 0x30282 }, + { 128, 0x00b33, 0x012a2, 0x2e014, 0x30284 }, + { 132, 0x00b33, 0x012a3, 0x2e014, 0x30286 }, + { 136, 0x00b33, 0x012a4, 0x2e014, 0x30288 }, + { 140, 0x00b33, 0x012a6, 0x2e014, 0x30280 }, + + { 149, 0x00b33, 0x012a8, 0x2e014, 0x30287 }, + { 153, 0x00b33, 0x012a9, 0x2e014, 0x30289 }, + { 157, 0x00b33, 0x012ab, 0x2e014, 0x30281 }, + { 161, 0x00b33, 0x012ac, 0x2e014, 0x30283 }, + { 165, 0x00b33, 0x012ad, 0x2e014, 0x30285 } }; -struct rfprog { - uint8_t chan; - uint32_t r1, r2, r3, r4; -}; +static int +rum_match(device_t self) +{ + struct usb_attach_arg *uaa = device_get_ivars(self); -static const struct rfprog rum_rf5226[] = { - {1, 0x00b03, 0x001e1, 0x1a014, 0x30282}, - {2, 0x00b03, 0x001e1, 0x1a014, 0x30287}, - {3, 0x00b03, 0x001e2, 0x1a014, 0x30282}, - {4, 0x00b03, 0x001e2, 0x1a014, 0x30287}, - {5, 0x00b03, 0x001e3, 0x1a014, 0x30282}, - {6, 0x00b03, 0x001e3, 0x1a014, 0x30287}, - {7, 0x00b03, 0x001e4, 0x1a014, 0x30282}, - {8, 0x00b03, 0x001e4, 0x1a014, 0x30287}, - {9, 0x00b03, 0x001e5, 0x1a014, 0x30282}, - {10, 0x00b03, 0x001e5, 0x1a014, 0x30287}, - {11, 0x00b03, 0x001e6, 0x1a014, 0x30282}, - {12, 0x00b03, 0x001e6, 0x1a014, 0x30287}, - {13, 0x00b03, 0x001e7, 0x1a014, 0x30282}, - {14, 0x00b03, 0x001e8, 0x1a014, 0x30284}, - - {34, 0x00b03, 0x20266, 0x36014, 0x30282}, - {38, 0x00b03, 0x20267, 0x36014, 0x30284}, - {42, 0x00b03, 0x20268, 0x36014, 0x30286}, - {46, 0x00b03, 0x20269, 0x36014, 0x30288}, - - {36, 0x00b03, 0x00266, 0x26014, 0x30288}, - {40, 0x00b03, 0x00268, 0x26014, 0x30280}, - {44, 0x00b03, 0x00269, 0x26014, 0x30282}, - {48, 0x00b03, 0x0026a, 0x26014, 0x30284}, - {52, 0x00b03, 0x0026b, 0x26014, 0x30286}, - {56, 0x00b03, 0x0026c, 0x26014, 0x30288}, - {60, 0x00b03, 0x0026e, 0x26014, 0x30280}, - {64, 0x00b03, 0x0026f, 0x26014, 0x30282}, - - {100, 0x00b03, 0x0028a, 0x2e014, 0x30280}, - {104, 0x00b03, 0x0028b, 0x2e014, 0x30282}, - {108, 0x00b03, 0x0028c, 0x2e014, 0x30284}, - {112, 0x00b03, 0x0028d, 0x2e014, 0x30286}, - {116, 0x00b03, 0x0028e, 0x2e014, 0x30288}, - {120, 0x00b03, 0x002a0, 0x2e014, 0x30280}, - {124, 0x00b03, 0x002a1, 0x2e014, 0x30282}, - {128, 0x00b03, 0x002a2, 0x2e014, 0x30284}, - {132, 0x00b03, 0x002a3, 0x2e014, 0x30286}, - {136, 0x00b03, 0x002a4, 0x2e014, 0x30288}, - {140, 0x00b03, 0x002a6, 0x2e014, 0x30280}, - - {149, 0x00b03, 0x002a8, 0x2e014, 0x30287}, - {153, 0x00b03, 0x002a9, 0x2e014, 0x30289}, - {157, 0x00b03, 0x002ab, 0x2e014, 0x30281}, - {161, 0x00b03, 0x002ac, 0x2e014, 0x30283}, - {165, 0x00b03, 0x002ad, 0x2e014, 0x30285} -}; + if (uaa->iface != NULL) + return UMATCH_NONE; -static const struct rfprog rum_rf5225[] = { - {1, 0x00b33, 0x011e1, 0x1a014, 0x30282}, - {2, 0x00b33, 0x011e1, 0x1a014, 0x30287}, - {3, 0x00b33, 0x011e2, 0x1a014, 0x30282}, - {4, 0x00b33, 0x011e2, 0x1a014, 0x30287}, - {5, 0x00b33, 0x011e3, 0x1a014, 0x30282}, - {6, 0x00b33, 0x011e3, 0x1a014, 0x30287}, - {7, 0x00b33, 0x011e4, 0x1a014, 0x30282}, - {8, 0x00b33, 0x011e4, 0x1a014, 0x30287}, - {9, 0x00b33, 0x011e5, 0x1a014, 0x30282}, - {10, 0x00b33, 0x011e5, 0x1a014, 0x30287}, - {11, 0x00b33, 0x011e6, 0x1a014, 0x30282}, - {12, 0x00b33, 0x011e6, 0x1a014, 0x30287}, - {13, 0x00b33, 0x011e7, 0x1a014, 0x30282}, - {14, 0x00b33, 0x011e8, 0x1a014, 0x30284}, - - {34, 0x00b33, 0x01266, 0x26014, 0x30282}, - {38, 0x00b33, 0x01267, 0x26014, 0x30284}, - {42, 0x00b33, 0x01268, 0x26014, 0x30286}, - {46, 0x00b33, 0x01269, 0x26014, 0x30288}, - - {36, 0x00b33, 0x01266, 0x26014, 0x30288}, - {40, 0x00b33, 0x01268, 0x26014, 0x30280}, - {44, 0x00b33, 0x01269, 0x26014, 0x30282}, - {48, 0x00b33, 0x0126a, 0x26014, 0x30284}, - {52, 0x00b33, 0x0126b, 0x26014, 0x30286}, - {56, 0x00b33, 0x0126c, 0x26014, 0x30288}, - {60, 0x00b33, 0x0126e, 0x26014, 0x30280}, - {64, 0x00b33, 0x0126f, 0x26014, 0x30282}, - - {100, 0x00b33, 0x0128a, 0x2e014, 0x30280}, - {104, 0x00b33, 0x0128b, 0x2e014, 0x30282}, - {108, 0x00b33, 0x0128c, 0x2e014, 0x30284}, - {112, 0x00b33, 0x0128d, 0x2e014, 0x30286}, - {116, 0x00b33, 0x0128e, 0x2e014, 0x30288}, - {120, 0x00b33, 0x012a0, 0x2e014, 0x30280}, - {124, 0x00b33, 0x012a1, 0x2e014, 0x30282}, - {128, 0x00b33, 0x012a2, 0x2e014, 0x30284}, - {132, 0x00b33, 0x012a3, 0x2e014, 0x30286}, - {136, 0x00b33, 0x012a4, 0x2e014, 0x30288}, - {140, 0x00b33, 0x012a6, 0x2e014, 0x30280}, - - {149, 0x00b33, 0x012a8, 0x2e014, 0x30287}, - {153, 0x00b33, 0x012a9, 0x2e014, 0x30289}, - {157, 0x00b33, 0x012ab, 0x2e014, 0x30281}, - {161, 0x00b33, 0x012ac, 0x2e014, 0x30283}, - {165, 0x00b33, 0x012ad, 0x2e014, 0x30285} -}; + return (usb_lookup(rum_devs, uaa->vendor, uaa->product) != NULL) ? + UMATCH_VENDOR_PRODUCT : UMATCH_NONE; +} -static const struct usb2_config rum_config[RUM_N_TRANSFER] = { - [RUM_BULK_DT_WR] = { - .type = UE_BULK, - .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_OUT, - .mh.bufsize = (MCLBYTES + RT2573_TX_DESC_SIZE + 8), - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = &rum_bulk_write_callback, - .mh.timeout = 5000, /* ms */ - }, - - [RUM_BULK_DT_RD] = { - .type = UE_BULK, - .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, - .mh.bufsize = (MCLBYTES + RT2573_RX_DESC_SIZE), - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = &rum_bulk_read_callback, - }, - - [RUM_BULK_CS_WR] = { - .type = UE_CONTROL, - .endpoint = 0x00, /* Control pipe */ - .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.callback = &rum_bulk_write_clear_stall_callback, - .mh.timeout = 1000, /* 1 second */ - .mh.interval = 50, /* 50ms */ - }, - - [RUM_BULK_CS_RD] = { - .type = UE_CONTROL, - .endpoint = 0x00, /* Control pipe */ - .direction = UE_DIR_ANY, - .mh.bufsize = sizeof(struct usb2_device_request), - .mh.callback = &rum_bulk_read_clear_stall_callback, - .mh.timeout = 1000, /* 1 second */ - .mh.interval = 50, /* 50ms */ - }, -}; +static int +rum_attach(device_t self) +{ + struct rum_softc *sc = device_get_softc(self); + struct usb_attach_arg *uaa = device_get_ivars(self); + struct ieee80211com *ic; + struct ifnet *ifp; + const uint8_t *ucode = NULL; + usb_interface_descriptor_t *id; + usb_endpoint_descriptor_t *ed; + usbd_status error; + int i, ntries, size; + uint8_t bands; + uint32_t tmp; -static devclass_t rum_devclass; + sc->sc_udev = uaa->device; + sc->sc_dev = self; -static device_method_t rum_methods[] = { - DEVMETHOD(device_probe, rum_probe), - DEVMETHOD(device_attach, rum_attach), - DEVMETHOD(device_detach, rum_detach), - {0, 0} -}; + if (usbd_set_config_no(sc->sc_udev, RT2573_CONFIG_NO, 0) != 0) { + device_printf(self, "could not set configuration no\n"); + return ENXIO; + } -static driver_t rum_driver = { - .name = "rum", - .methods = rum_methods, - .size = sizeof(struct rum_softc), -}; + /* get the first interface handle */ + error = usbd_device2interface_handle(sc->sc_udev, RT2573_IFACE_INDEX, + &sc->sc_iface); + if (error != 0) { + device_printf(self, "could not get interface handle\n"); + return ENXIO; + } -DRIVER_MODULE(rum, ushub, rum_driver, rum_devclass, NULL, 0); -MODULE_DEPEND(rum, usb2_wlan, 1, 1, 1); -MODULE_DEPEND(rum, usb2_core, 1, 1, 1); -MODULE_DEPEND(rum, wlan, 1, 1, 1); -MODULE_DEPEND(rum, wlan_amrr, 1, 1, 1); + /* + * Find endpoints. + */ + id = usbd_get_interface_descriptor(sc->sc_iface); -static int -rum_probe(device_t dev) -{ - struct usb2_attach_arg *uaa = device_get_ivars(dev); + sc->sc_rx_no = sc->sc_tx_no = -1; + for (i = 0; i < id->bNumEndpoints; i++) { + ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i); + if (ed == NULL) { + device_printf(self, + "no endpoint descriptor for iface %d\n", i); + return ENXIO; + } + + if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && + UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) + sc->sc_rx_no = ed->bEndpointAddress; + else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && + UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) + sc->sc_tx_no = ed->bEndpointAddress; + } + if (sc->sc_rx_no == -1 || sc->sc_tx_no == -1) { + device_printf(self, "missing endpoint\n"); + return ENXIO; + } - if (uaa->usb2_mode != USB_MODE_HOST) { - return (ENXIO); + ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); + if (ifp == NULL) { + device_printf(self, "can not if_alloc()\n"); + return ENXIO; } - if (uaa->info.bConfigIndex != 0) { - return (ENXIO); + ic = ifp->if_l2com; + + mtx_init(&sc->sc_mtx, device_get_nameunit(sc->sc_dev), MTX_NETWORK_LOCK, + MTX_DEF | MTX_RECURSE); + + usb_init_task(&sc->sc_task, rum_task, sc); + usb_init_task(&sc->sc_scantask, rum_scantask, sc); + callout_init(&sc->watchdog_ch, 0); + + /* retrieve RT2573 rev. no */ + for (ntries = 0; ntries < 1000; ntries++) { + if ((tmp = rum_read(sc, RT2573_MAC_CSR0)) != 0) + break; + DELAY(1000); } - if (uaa->info.bIfaceIndex != RT2573_IFACE_INDEX) { - return (ENXIO); + if (ntries == 1000) { + device_printf(self, "timeout waiting for chip to settle\n"); + goto bad; } - return (usb2_lookup_id_by_uaa(rum_devs, sizeof(rum_devs), uaa)); -} -static int -rum_attach(device_t dev) -{ - struct usb2_attach_arg *uaa = device_get_ivars(dev); - struct rum_softc *sc = device_get_softc(dev); - int error; - uint8_t iface_index; + /* retrieve MAC address and various other things from EEPROM */ + rum_read_eeprom(sc); - if (sc == NULL) { - return (ENOMEM); + device_printf(self, "MAC/BBP RT2573 (rev 0x%05x), RF %s\n", + tmp, rum_get_rf(sc->rf_rev)); + + ucode = rt2573_ucode; + size = sizeof rt2573_ucode; + error = rum_load_microcode(sc, ucode, size); + if (error != 0) { + device_printf(self, "could not load 8051 microcode\n"); + goto bad; } - device_set_usb2_desc(dev); - mtx_init(&sc->sc_mtx, "rum lock", MTX_NETWORK_LOCK, - MTX_DEF | MTX_RECURSE); + ifp->if_softc = sc; + if_initname(ifp, "rum", device_get_unit(sc->sc_dev)); + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | + IFF_NEEDSGIANT; /* USB stack is still under Giant lock */ + ifp->if_init = rum_init; + ifp->if_ioctl = rum_ioctl; + ifp->if_start = rum_start; + IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_READY(&ifp->if_snd); - snprintf(sc->sc_name, sizeof(sc->sc_name), "%s", - device_get_nameunit(dev)); + ic->ic_ifp = ifp; + ic->ic_phytype = IEEE80211_T_OFDM; /* not only, but not used */ - sc->sc_udev = uaa->device; - sc->sc_unit = device_get_unit(dev); + /* set device capabilities */ + ic->ic_caps = + IEEE80211_C_STA /* station mode supported */ + | IEEE80211_C_IBSS /* IBSS mode supported */ + | IEEE80211_C_MONITOR /* monitor mode supported */ + | IEEE80211_C_HOSTAP /* HostAp mode supported */ + | IEEE80211_C_TXPMGT /* tx power management */ + | IEEE80211_C_SHPREAMBLE /* short preamble supported */ + | IEEE80211_C_SHSLOT /* short slot time supported */ + | IEEE80211_C_BGSCAN /* bg scanning supported */ + | IEEE80211_C_WPA /* 802.11i */ + ; - usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); + bands = 0; + setbit(&bands, IEEE80211_MODE_11B); + setbit(&bands, IEEE80211_MODE_11G); + if (sc->rf_rev == RT2573_RF_5225 || sc->rf_rev == RT2573_RF_5226) + setbit(&bands, IEEE80211_MODE_11A); + ieee80211_init_channels(ic, NULL, &bands); - iface_index = RT2573_IFACE_INDEX; - error = usb2_transfer_setup(uaa->device, &iface_index, - sc->sc_xfer, rum_config, RUM_N_TRANSFER, sc, &sc->sc_mtx); - if (error) { - device_printf(dev, "could not allocate USB transfers, " - "err=%s\n", usb2_errstr(error)); - goto detach; - } - error = usb2_config_td_setup(&sc->sc_config_td, sc, &sc->sc_mtx, - &rum_end_of_commands, - sizeof(struct usb2_config_td_cc), 24); - if (error) { - device_printf(dev, "could not setup config " - "thread!\n"); - goto detach; - } - mtx_lock(&sc->sc_mtx); - - /* start setup */ - - usb2_config_td_queue_command - (&sc->sc_config_td, NULL, &rum_cfg_first_time_setup, 0, 0); - - rum_watchdog(sc); - mtx_unlock(&sc->sc_mtx); - return (0); /* success */ - -detach: - rum_detach(dev); - return (ENXIO); /* failure */ -} + ieee80211_ifattach(ic); + ic->ic_newassoc = rum_newassoc; + ic->ic_raw_xmit = rum_raw_xmit; + ic->ic_node_alloc = rum_node_alloc; + ic->ic_scan_start = rum_scan_start; + ic->ic_scan_end = rum_scan_end; + ic->ic_set_channel = rum_set_channel; -static int -rum_detach(device_t dev) -{ - struct rum_softc *sc = device_get_softc(dev); - struct ieee80211com *ic; - struct ifnet *ifp; + ic->ic_vap_create = rum_vap_create; + ic->ic_vap_delete = rum_vap_delete; - usb2_config_td_drain(&sc->sc_config_td); + sc->sc_rates = ieee80211_get_ratetable(ic->ic_curchan); + + bpfattach(ifp, DLT_IEEE802_11_RADIO, + sizeof (struct ieee80211_frame) + sizeof(sc->sc_txtap)); - mtx_lock(&sc->sc_mtx); + sc->sc_rxtap_len = sizeof sc->sc_rxtap; + sc->sc_rxtap.wr_ihdr.it_len = htole16(sc->sc_rxtap_len); + sc->sc_rxtap.wr_ihdr.it_present = htole32(RT2573_RX_RADIOTAP_PRESENT); - usb2_callout_stop(&sc->sc_watchdog); + sc->sc_txtap_len = sizeof sc->sc_txtap; + sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len); + sc->sc_txtap.wt_ihdr.it_present = htole32(RT2573_TX_RADIOTAP_PRESENT); - rum_cfg_pre_stop(sc, NULL, 0); + if (bootverbose) + ieee80211_announce(ic); - ifp = sc->sc_ifp; - ic = ifp->if_l2com; + return 0; +bad: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 01:31:25 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7472D1065672; Tue, 27 Jan 2009 01:31:25 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60E1F8FC18; Tue, 27 Jan 2009 01:31:25 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R1VPhs069576; Tue, 27 Jan 2009 01:31:25 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R1VPIZ069574; Tue, 27 Jan 2009 01:31:25 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901270131.n0R1VPIZ069574@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 01:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187754 - user/thompsa/usb/sys/dev/usb2/ethernet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 01:31:25 -0000 Author: thompsa Date: Tue Jan 27 01:31:24 2009 New Revision: 187754 URL: http://svn.freebsd.org/changeset/base/187754 Log: Convert over to the USB2 API. Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_axereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_cdcereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_cuereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_kuereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_ruereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_udavreg.h Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c Tue Jan 27 01:29:22 2009 (r187753) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c Tue Jan 27 01:31:24 2009 (r187754) @@ -2,9 +2,6 @@ * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. * - * Copyright (c) 2006 - * Alfred Perlstein . All rights reserved. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -43,9 +40,6 @@ __FBSDID("$FreeBSD$"); * Written by Bill Paul * Electrical Engineering Department * Columbia University, New York City - * - * SMP locking by Alfred Perlstein . - * RED Inc. */ /* @@ -64,138 +58,113 @@ __FBSDID("$FreeBSD$"); * the controller uses an external PHY chip, it's possible that board * designers might simply choose a 10Mbps PHY. * - * Registers are accessed using usbd_do_request(). Packet transfers are - * done using usbd_transfer() and friends. + * Registers are accessed using usb2_do_request(). Packet transfers are + * done using usb2_transfer() and friends. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include "usbdevs.h" -#include - -#include -#include - -#include - -MODULE_DEPEND(aue, usb, 1, 1, 1); -MODULE_DEPEND(aue, ether, 1, 1, 1); -MODULE_DEPEND(aue, miibus, 1, 1, 1); - -/* "device miibus" required. See GENERIC if you get errors here. */ -#include "miibus_if.h" +#include +#include +#include +#include + +#define USB_DEBUG_VAR aue_debug + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#if USB_DEBUG +static int aue_debug = 0; + +SYSCTL_NODE(_hw_usb2, OID_AUTO, aue, CTLFLAG_RW, 0, "USB aue"); +SYSCTL_INT(_hw_usb2_aue, OID_AUTO, debug, CTLFLAG_RW, &aue_debug, 0, + "Debug level"); +#endif /* * Various supported device vendors/products. */ -struct aue_type { - struct usb_devno aue_dev; - u_int16_t aue_flags; -#define LSYS 0x0001 /* use Linksys reset */ -#define PNA 0x0002 /* has Home PNA */ -#define PII 0x0004 /* Pegasus II chip */ +static const struct usb2_device_id aue_devs[] = { + {USB_VPI(USB_VENDOR_3COM, USB_PRODUCT_3COM_3C460B, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_DSB650TX_PNA, 0)}, + {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_UFE1000, AUE_FLAG_LSYS)}, + {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX10, 0)}, + {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX1, AUE_FLAG_PNA | AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX2, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX4, AUE_FLAG_PNA)}, + {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX5, AUE_FLAG_PNA)}, + {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX6, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX7, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX8, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX9, AUE_FLAG_PNA)}, + {USB_VPI(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_SS1001, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_USB320_EC, 0)}, + {USB_VPI(USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_2, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_3, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_4, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUS, AUE_FLAG_PNA | AUE_FLAG_DUAL_PHY)}, + {USB_VPI(USB_VENDOR_AEI, USB_PRODUCT_AEI_FASTETHERNET, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ALLIEDTELESYN, USB_PRODUCT_ALLIEDTELESYN_ATUSB100, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC110T, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_USB2LAN, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USB100, 0)}, + {USB_VPI(USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBE100, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBEL100, 0)}, + {USB_VPI(USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBLP100, AUE_FLAG_PNA)}, + {USB_VPI(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB_TXS, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB_TX, 0)}, + {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX1, AUE_FLAG_LSYS)}, + {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX2, AUE_FLAG_LSYS | AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX3, AUE_FLAG_LSYS | AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX4, AUE_FLAG_LSYS | AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX_PNA, AUE_FLAG_PNA)}, + {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX, AUE_FLAG_LSYS)}, + {USB_VPI(USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650, AUE_FLAG_LSYS)}, + {USB_VPI(USB_VENDOR_ELCON, USB_PRODUCT_ELCON_PLAN, AUE_FLAG_PNA | AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSB20, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBLTX, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX0, 0)}, + {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX1, AUE_FLAG_LSYS)}, + {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX2, 0)}, + {USB_VPI(USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX3, AUE_FLAG_LSYS)}, + {USB_VPI(USB_VENDOR_ELSA, USB_PRODUCT_ELSA_USB2ETHERNET, 0)}, + {USB_VPI(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNBR402W, 0)}, + {USB_VPI(USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_UF100, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_HP, USB_PRODUCT_HP_HN210E, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_USBETTXS, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_IODATA, USB_PRODUCT_IODATA_USBETTX, 0)}, + {USB_VPI(USB_VENDOR_KINGSTON, USB_PRODUCT_KINGSTON_KNU101TX, 0)}, + {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB100H1, AUE_FLAG_LSYS | AUE_FLAG_PNA)}, + {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB100TX, AUE_FLAG_LSYS)}, + {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TA, AUE_FLAG_LSYS)}, + {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TX1, AUE_FLAG_LSYS | AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TX2, AUE_FLAG_LSYS | AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10T, AUE_FLAG_LSYS)}, + {USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUA2TX5, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX1, 0)}, + {USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX5, 0)}, + {USB_VPI(USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_MN110, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_NETGEAR, USB_PRODUCT_NETGEAR_FA101, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_SIEMENS, USB_PRODUCT_SIEMENS_SPEEDSTREAM, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_SIIG2, USB_PRODUCT_SIIG2_USBTOETHER, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_SMARTBRIDGES, USB_PRODUCT_SMARTBRIDGES_SMARTNIC, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_SMC, USB_PRODUCT_SMC_2202USB, 0)}, + {USB_VPI(USB_VENDOR_SMC, USB_PRODUCT_SMC_2206USB, AUE_FLAG_PII)}, + {USB_VPI(USB_VENDOR_SOHOWARE, USB_PRODUCT_SOHOWARE_NUB100, 0)}, + {USB_VPI(USB_VENDOR_SOHOWARE, USB_PRODUCT_SOHOWARE_NUB110, AUE_FLAG_PII)}, }; -static const struct aue_type aue_devs[] = { - {{ USB_VENDOR_3COM, USB_PRODUCT_3COM_3C460B}, PII }, - {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX1}, PNA|PII }, - {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX2}, PII }, - {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_UFE1000}, LSYS }, - {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX4}, PNA }, - {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX5}, PNA }, - {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX6}, PII }, - {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX7}, PII }, - {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX8}, PII }, - {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX9}, PNA }, - {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX10}, 0 }, - {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_DSB650TX_PNA}, 0 }, - {{ USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_USB320_EC}, 0 }, - {{ USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_SS1001}, PII }, - {{ USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUS}, PNA }, - {{ USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII}, PII }, - {{ USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_2}, PII }, - {{ USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_3}, PII }, - {{ USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUSII_4}, PII }, - {{ USB_VENDOR_AEI, USB_PRODUCT_AEI_FASTETHERNET}, PII }, - {{ USB_VENDOR_ALLIEDTELESYN, USB_PRODUCT_ALLIEDTELESYN_ATUSB100}, PII }, - {{ USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC110T}, PII }, - {{ USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_USB2LAN}, PII }, - {{ USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USB100}, 0 }, - {{ USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBLP100}, PNA }, - {{ USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBEL100}, 0 }, - {{ USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USBE100}, PII }, - {{ USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB_TX}, 0 }, - {{ USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB_TXS},PII }, - {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX4}, LSYS|PII }, - {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX1}, LSYS }, - {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX}, LSYS }, - {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX_PNA}, PNA }, - {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX3}, LSYS|PII }, - {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX2}, LSYS|PII }, - {{ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650}, LSYS }, - {{ USB_VENDOR_ELCON, USB_PRODUCT_ELCON_PLAN}, PNA|PII }, - {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSB20}, PII }, - {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX0}, 0 }, - {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX1}, LSYS }, - {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX2}, 0 }, - {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBTX3}, LSYS }, - {{ USB_VENDOR_ELECOM, USB_PRODUCT_ELECOM_LDUSBLTX}, PII }, - {{ USB_VENDOR_ELSA, USB_PRODUCT_ELSA_USB2ETHERNET}, 0 }, - {{ USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNBR402W}, 0 }, - {{ USB_VENDOR_HAWKING, USB_PRODUCT_HAWKING_UF100}, PII }, - {{ USB_VENDOR_HP, USB_PRODUCT_HP_HN210E}, PII }, - {{ USB_VENDOR_IODATA, USB_PRODUCT_IODATA_USBETTX}, 0 }, - {{ USB_VENDOR_IODATA, USB_PRODUCT_IODATA_USBETTXS}, PII }, - {{ USB_VENDOR_KINGSTON, USB_PRODUCT_KINGSTON_KNU101TX}, 0 }, - {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TX1}, LSYS|PII }, - {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10T}, LSYS }, - {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB100TX}, LSYS }, - {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB100H1}, LSYS|PNA }, - {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TA}, LSYS }, - {{ USB_VENDOR_LINKSYS, USB_PRODUCT_LINKSYS_USB10TX2}, LSYS|PII }, - {{ USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX1}, 0 }, - {{ USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX5}, 0 }, - {{ USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUA2TX5}, PII }, - {{ USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_MN110}, PII }, - {{ USB_VENDOR_NETGEAR, USB_PRODUCT_NETGEAR_FA101}, PII }, - {{ USB_VENDOR_SIEMENS, USB_PRODUCT_SIEMENS_SPEEDSTREAM}, PII }, - {{ USB_VENDOR_SIIG2, USB_PRODUCT_SIIG2_USBTOETHER}, PII }, - {{ USB_VENDOR_SMARTBRIDGES, USB_PRODUCT_SMARTBRIDGES_SMARTNIC},PII }, - {{ USB_VENDOR_SMC, USB_PRODUCT_SMC_2202USB}, 0 }, - {{ USB_VENDOR_SMC, USB_PRODUCT_SMC_2206USB}, PII }, - {{ USB_VENDOR_SOHOWARE, USB_PRODUCT_SOHOWARE_NUB100}, 0 }, - {{ USB_VENDOR_SOHOWARE, USB_PRODUCT_SOHOWARE_NUB110}, PII }, -}; -#define aue_lookup(v, p) ((const struct aue_type *)usb_lookup(aue_devs, v, p)) +/* prototypes */ -static device_probe_t aue_match; +static device_probe_t aue_probe; static device_attach_t aue_attach; static device_detach_t aue_detach; static device_shutdown_t aue_shutdown; @@ -203,85 +172,163 @@ static miibus_readreg_t aue_miibus_readr static miibus_writereg_t aue_miibus_writereg; static miibus_statchg_t aue_miibus_statchg; -static void aue_reset_pegasus_II(struct aue_softc *sc); -static int aue_encap(struct aue_softc *, struct mbuf *, int); -#ifdef AUE_INTR_PIPE -static void aue_intr(usbd_xfer_handle, usbd_private_handle, usbd_status); -#endif -static void aue_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); -static void aue_rxeof_thread(struct aue_softc *sc); -static void aue_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); -static void aue_txeof_thread(struct aue_softc *); -static void aue_task_sched(struct aue_softc *, int); -static void aue_task(void *xsc, int pending); -static void aue_tick(void *); -static void aue_rxstart(struct ifnet *); -static void aue_rxstart_thread(struct aue_softc *); -static void aue_start(struct ifnet *); -static void aue_start_thread(struct aue_softc *); -static int aue_ioctl(struct ifnet *, u_long, caddr_t); -static void aue_init(void *); -static void aue_init_body(struct aue_softc *); -static void aue_stop(struct aue_softc *); -static void aue_watchdog(struct aue_softc *); -static int aue_ifmedia_upd(struct ifnet *); -static void aue_ifmedia_sts(struct ifnet *, struct ifmediareq *); - -static void aue_eeprom_getword(struct aue_softc *, int, u_int16_t *); -static void aue_read_eeprom(struct aue_softc *, caddr_t, int, int, int); - -static void aue_setmulti(struct aue_softc *); -static void aue_reset(struct aue_softc *); - -static int aue_csr_read_1(struct aue_softc *, int); -static int aue_csr_write_1(struct aue_softc *, int, int); -static int aue_csr_read_2(struct aue_softc *, int); -static int aue_csr_write_2(struct aue_softc *, int, int); +static usb2_callback_t aue_intr_clear_stall_callback; +static usb2_callback_t aue_intr_callback; +static usb2_callback_t aue_bulk_read_clear_stall_callback; +static usb2_callback_t aue_bulk_read_callback; +static usb2_callback_t aue_bulk_write_clear_stall_callback; +static usb2_callback_t aue_bulk_write_callback; + +static usb2_task_fn_t aue_promisc_task; +static usb2_task_fn_t aue_ifmedia_task; +static usb2_task_fn_t aue_setmulti_task; +static usb2_task_fn_t aue_tick_task; + +static int aue_do_request(struct aue_softc *, + struct usb2_device_request *, void *); +static uint8_t aue_csr_read_1(struct aue_softc *, uint16_t); +static uint16_t aue_csr_read_2(struct aue_softc *, uint16_t); +static int aue_csr_write_1(struct aue_softc *, uint16_t, uint8_t); +static int aue_csr_write_2(struct aue_softc *, uint16_t, uint16_t); +static void aue_eeprom_getword(struct aue_softc *, int, uint16_t *); +static void aue_read_eeprom(struct aue_softc *, uint8_t *, uint16_t, + uint16_t); +static void aue_setmulti(struct aue_softc *); +static void aue_setpromisc(struct aue_softc *); +static void aue_reset(struct aue_softc *); +static void aue_reset_pegasus_II(struct aue_softc *); +static void aue_start(struct ifnet *); +static void aue_init(void *); +static void aue_init_locked(struct aue_softc *); +static void aue_stop(struct aue_softc *); +static void aue_start_transfers(struct aue_softc *); +static int aue_ifmedia_upd(struct ifnet *); +static void aue_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static int aue_ioctl(struct ifnet *, u_long, caddr_t); +static void aue_watchdog(void *); + +static const struct usb2_config aue_config[AUE_N_TRANSFER] = { + + [AUE_BULK_DT_WR] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .mh.bufsize = (MCLBYTES + 2), + .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .mh.callback = aue_bulk_write_callback, + .mh.timeout = 10000, /* 10 seconds */ + }, + + [AUE_BULK_DT_RD] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .mh.bufsize = (MCLBYTES + 4 + ETHER_CRC_LEN), + .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .mh.callback = aue_bulk_read_callback, + }, + + [AUE_BULK_CS_WR] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = UE_DIR_ANY, + .mh.bufsize = sizeof(struct usb2_device_request), + .mh.flags = {}, + .mh.callback = aue_bulk_write_clear_stall_callback, + .mh.timeout = 1000, /* 1 second */ + .mh.interval = 50, /* 50ms */ + }, + + [AUE_BULK_CS_RD] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = UE_DIR_ANY, + .mh.bufsize = sizeof(struct usb2_device_request), + .mh.flags = {}, + .mh.callback = aue_bulk_read_clear_stall_callback, + .mh.timeout = 1000, /* 1 second */ + .mh.interval = 50, /* 50ms */ + }, + + [AUE_INTR_DT_RD] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .mh.bufsize = 0, /* use wMaxPacketSize */ + .mh.callback = aue_intr_callback, + }, + + [AUE_INTR_CS_RD] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = UE_DIR_ANY, + .mh.bufsize = sizeof(struct usb2_device_request), + .mh.flags = {}, + .mh.callback = aue_intr_clear_stall_callback, + .mh.timeout = 1000, /* 1 second */ + .mh.interval = 50, /* 50ms */ + }, +}; static device_method_t aue_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, aue_match), - DEVMETHOD(device_attach, aue_attach), - DEVMETHOD(device_detach, aue_detach), - DEVMETHOD(device_shutdown, aue_shutdown), + DEVMETHOD(device_probe, aue_probe), + DEVMETHOD(device_attach, aue_attach), + DEVMETHOD(device_detach, aue_detach), + DEVMETHOD(device_shutdown, aue_shutdown), /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), + DEVMETHOD(bus_print_child, bus_generic_print_child), + DEVMETHOD(bus_driver_added, bus_generic_driver_added), /* MII interface */ - DEVMETHOD(miibus_readreg, aue_miibus_readreg), - DEVMETHOD(miibus_writereg, aue_miibus_writereg), - DEVMETHOD(miibus_statchg, aue_miibus_statchg), + DEVMETHOD(miibus_readreg, aue_miibus_readreg), + DEVMETHOD(miibus_writereg, aue_miibus_writereg), + DEVMETHOD(miibus_statchg, aue_miibus_statchg), - { 0, 0 } + {0, 0} }; static driver_t aue_driver = { - "aue", - aue_methods, - sizeof(struct aue_softc) + .name = "aue", + .methods = aue_methods, + .size = sizeof(struct aue_softc) }; static devclass_t aue_devclass; -DRIVER_MODULE(aue, uhub, aue_driver, aue_devclass, usbd_driver_load, 0); +DRIVER_MODULE(aue, ushub, aue_driver, aue_devclass, NULL, 0); DRIVER_MODULE(miibus, aue, miibus_driver, miibus_devclass, 0, 0); +MODULE_DEPEND(aue, usb2_ethernet, 1, 1, 1); +MODULE_DEPEND(aue, usb2_core, 1, 1, 1); +MODULE_DEPEND(aue, ether, 1, 1, 1); +MODULE_DEPEND(aue, miibus, 1, 1, 1); + +static int +aue_do_request(struct aue_softc *sc, struct usb2_device_request *req, + void *data) +{ + usb2_error_t err; + + err = usb2_do_request_flags(sc->sc_udev, &sc->sc_mtx, req, data, 0, + NULL, 1000); -#define AUE_SETBIT(sc, reg, x) \ + return (err); +} + +#define AUE_SETBIT(sc, reg, x) \ aue_csr_write_1(sc, reg, aue_csr_read_1(sc, reg) | (x)) -#define AUE_CLRBIT(sc, reg, x) \ +#define AUE_CLRBIT(sc, reg, x) \ aue_csr_write_1(sc, reg, aue_csr_read_1(sc, reg) & ~(x)) -static int -aue_csr_read_1(struct aue_softc *sc, int reg) +static uint8_t +aue_csr_read_1(struct aue_softc *sc, uint16_t reg) { - usb_device_request_t req; - usbd_status err; - u_int8_t val = 0; - - AUE_SXASSERTLOCKED(sc); + struct usb2_device_request req; + usb2_error_t err; + uint8_t val; req.bmRequestType = UT_READ_VENDOR_DEVICE; req.bRequest = AUE_UR_READREG; @@ -289,23 +336,18 @@ aue_csr_read_1(struct aue_softc *sc, int USETW(req.wIndex, reg); USETW(req.wLength, 1); - err = usbd_do_request(sc->aue_udev, &req, &val); - - if (err) { + err = aue_do_request(sc, &req, &val); + if (err) return (0); - } - return (val); } -static int -aue_csr_read_2(struct aue_softc *sc, int reg) +static uint16_t +aue_csr_read_2(struct aue_softc *sc, uint16_t reg) { - usb_device_request_t req; - usbd_status err; - u_int16_t val = 0; - - AUE_SXASSERTLOCKED(sc); + struct usb2_device_request req; + usb2_error_t err; + uint16_t val; req.bmRequestType = UT_READ_VENDOR_DEVICE; req.bRequest = AUE_UR_READREG; @@ -313,45 +355,31 @@ aue_csr_read_2(struct aue_softc *sc, int USETW(req.wIndex, reg); USETW(req.wLength, 2); - err = usbd_do_request(sc->aue_udev, &req, &val); - - if (err) { + err = aue_do_request(sc, &req, &val); + if (err) return (0); - } - - return (val); + return (le16toh(val)); } static int -aue_csr_write_1(struct aue_softc *sc, int reg, int val) +aue_csr_write_1(struct aue_softc *sc, uint16_t reg, uint8_t val) { - usb_device_request_t req; - usbd_status err; - - AUE_SXASSERTLOCKED(sc); + struct usb2_device_request req; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = AUE_UR_WRITEREG; - USETW(req.wValue, val); + req.wValue[0] = val; + req.wValue[1] = 0; USETW(req.wIndex, reg); USETW(req.wLength, 1); - err = usbd_do_request(sc->aue_udev, &req, &val); - - if (err) { - return (-1); - } - - return (0); + return (aue_do_request(sc, &req, &val)); } static int -aue_csr_write_2(struct aue_softc *sc, int reg, int val) +aue_csr_write_2(struct aue_softc *sc, uint16_t reg, uint16_t val) { - usb_device_request_t req; - usbd_status err; - - AUE_SXASSERTLOCKED(sc); + struct usb2_device_request req; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = AUE_UR_WRITEREG; @@ -359,23 +387,19 @@ aue_csr_write_2(struct aue_softc *sc, in USETW(req.wIndex, reg); USETW(req.wLength, 2); - err = usbd_do_request(sc->aue_udev, &req, &val); - - if (err) { - return (-1); - } + val = htole16(val); - return (0); + return (aue_do_request(sc, &req, &val)); } /* * Read a word of data stored in the EEPROM at address 'addr.' */ static void -aue_eeprom_getword(struct aue_softc *sc, int addr, u_int16_t *dest) +aue_eeprom_getword(struct aue_softc *sc, int addr, uint16_t *dest) { - int i; - u_int16_t word = 0; + int i; + uint16_t word = 0; aue_csr_write_1(sc, AUE_EE_REG, addr); aue_csr_write_1(sc, AUE_EE_CTL, AUE_EECTL_READ); @@ -385,65 +409,57 @@ aue_eeprom_getword(struct aue_softc *sc, break; } - if (i == AUE_TIMEOUT) { - printf("aue%d: EEPROM read timed out\n", - sc->aue_unit); - } + if (i == AUE_TIMEOUT) + device_printf(sc->sc_dev, "EEPROM read timed out\n"); word = aue_csr_read_2(sc, AUE_EE_DATA); *dest = word; - - return; } /* * Read a sequence of words from the EEPROM. */ static void -aue_read_eeprom(struct aue_softc *sc, caddr_t dest, int off, int cnt, int swap) +aue_read_eeprom(struct aue_softc *sc, uint8_t *dest, + uint16_t off, uint16_t len) { - int i; - u_int16_t word = 0, *ptr; - - for (i = 0; i < cnt; i++) { - aue_eeprom_getword(sc, off + i, &word); - ptr = (u_int16_t *)(dest + (i * 2)); - if (swap) - *ptr = ntohs(word); - else - *ptr = word; - } + uint16_t *ptr = (uint16_t *)dest; + int i; - return; + for (i = 0; i < len; i++, ptr++) + aue_eeprom_getword(sc, off + i, ptr); } static int aue_miibus_readreg(device_t dev, int phy, int reg) { - struct aue_softc *sc = device_get_softc(dev); - int i; - u_int16_t val = 0; + struct aue_softc *sc = device_get_softc(dev); + int i, do_unlock; + uint16_t val = 0; + + /* avoid recursive locking */ + if (mtx_owned(&sc->sc_mtx)) { + do_unlock = 0; + } else { + AUE_LOCK(sc); + do_unlock = 1; + } /* - * The Am79C901 HomePNA PHY actually contains - * two transceivers: a 1Mbps HomePNA PHY and a - * 10Mbps full/half duplex ethernet PHY with - * NWAY autoneg. However in the ADMtek adapter, - * only the 1Mbps PHY is actually connected to - * anything, so we ignore the 10Mbps one. It - * happens to be configured for MII address 3, - * so we filter that out. + * The Am79C901 HomePNA PHY actually contains two transceivers: a 1Mbps + * HomePNA PHY and a 10Mbps full/half duplex ethernet PHY with NWAY + * autoneg. However in the ADMtek adapter, only the 1Mbps PHY is + * actually connected to anything, so we ignore the 10Mbps one. It + * happens to be configured for MII address 3, so we filter that out. */ - if (sc->aue_vendor == USB_VENDOR_ADMTEK && - sc->aue_product == USB_PRODUCT_ADMTEK_PEGASUS) { + if (sc->sc_flags & AUE_FLAG_DUAL_PHY) { if (phy == 3) - return (0); -#ifdef notdef + goto done; +#if 0 if (phy != 1) - return (0); + goto done; #endif } - aue_csr_write_1(sc, AUE_PHY_ADDR, phy); aue_csr_write_1(sc, AUE_PHY_CTL, reg | AUE_PHYCTL_READ); @@ -452,24 +468,34 @@ aue_miibus_readreg(device_t dev, int phy break; } - if (i == AUE_TIMEOUT) { - printf("aue%d: MII read timed out\n", sc->aue_unit); - } + if (i == AUE_TIMEOUT) + device_printf(sc->sc_dev, "MII read timed out\n"); val = aue_csr_read_2(sc, AUE_PHY_DATA); +done: + if (do_unlock) + AUE_UNLOCK(sc); return (val); } static int aue_miibus_writereg(device_t dev, int phy, int reg, int data) { - struct aue_softc *sc = device_get_softc(dev); - int i; + struct aue_softc *sc = device_get_softc(dev); + int i, do_unlock; if (phy == 3) return (0); + /* avoid recursive locking */ + if (mtx_owned(&sc->sc_mtx)) { + do_unlock = 0; + } else { + AUE_LOCK(sc); + do_unlock = 1; + } + aue_csr_write_2(sc, AUE_PHY_DATA, data); aue_csr_write_1(sc, AUE_PHY_ADDR, phy); aue_csr_write_1(sc, AUE_PHY_CTL, reg | AUE_PHYCTL_WRITE); @@ -479,26 +505,34 @@ aue_miibus_writereg(device_t dev, int ph break; } - if (i == AUE_TIMEOUT) { - printf("aue%d: MII read timed out\n", - sc->aue_unit); - } + if (i == AUE_TIMEOUT) + device_printf(sc->sc_dev, "MII read timed out\n"); - return(0); + if (do_unlock) + AUE_UNLOCK(sc); + return (0); } static void aue_miibus_statchg(device_t dev) { - struct aue_softc *sc = device_get_softc(dev); - struct mii_data *mii = GET_MII(sc); + struct aue_softc *sc = device_get_softc(dev); + struct mii_data *mii = GET_MII(sc); + uint8_t do_unlock; + + /* avoid recursive locking */ + if (mtx_owned(&sc->sc_mtx)) { + do_unlock = 0; + } else { + AUE_LOCK(sc); + do_unlock = 1; + } AUE_CLRBIT(sc, AUE_CTL0, AUE_CTL0_RX_ENB | AUE_CTL0_TX_ENB); - if (IFM_SUBTYPE(mii->mii_media_active) == IFM_100_TX) { + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_100_TX) AUE_SETBIT(sc, AUE_CTL1, AUE_CTL1_SPEEDSEL); - } else { + else AUE_CLRBIT(sc, AUE_CTL1, AUE_CTL1_SPEEDSEL); - } if ((mii->mii_media_active & IFM_GMASK) == IFM_FDX) AUE_SETBIT(sc, AUE_CTL1, AUE_CTL1_DUPLEX); @@ -512,27 +546,32 @@ aue_miibus_statchg(device_t dev) * This turns on the 'dual link LED' bin in the auxmode * register of the Broadcom PHY. */ - if (sc->aue_flags & LSYS) { - u_int16_t auxmode; + if (sc->sc_flags & AUE_FLAG_LSYS) { + uint16_t auxmode; + auxmode = aue_miibus_readreg(dev, 0, 0x1b); aue_miibus_writereg(dev, 0, 0x1b, auxmode | 0x04); } - - return; + if (do_unlock) + AUE_UNLOCK(sc); } -#define AUE_BITS 6 +static void +aue_setmulti_task(void *context, struct usb2_task *task) +{ + struct aue_softc *sc = context; + + aue_setmulti(sc); +} +#define AUE_BITS 6 static void aue_setmulti(struct aue_softc *sc) { - struct ifnet *ifp; - struct ifmultiaddr *ifma; - u_int32_t h = 0, i; - u_int8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - - AUE_SXASSERTLOCKED(sc); - ifp = sc->aue_ifp; + struct ifnet *ifp = sc->sc_ifp; + struct ifmultiaddr *ifma; + uint32_t h = 0, i; + uint8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { AUE_SETBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI); @@ -543,8 +582,7 @@ aue_setmulti(struct aue_softc *sc) /* now program new ones */ IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) - { + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (ifma->ifma_addr->sa_family != AF_LINK) continue; h = ether_crc32_le(LLADDR((struct sockaddr_dl *) @@ -556,8 +594,6 @@ aue_setmulti(struct aue_softc *sc) /* write the hashtable */ for (i = 0; i < 8; i++) aue_csr_write_1(sc, AUE_MAR0 + i, hashtbl[i]); - - return; } static void @@ -567,7 +603,7 @@ aue_reset_pegasus_II(struct aue_softc *s aue_csr_write_1(sc, AUE_REG_1D, 0); aue_csr_write_1(sc, AUE_REG_7B, 2); #if 0 - if ((sc->aue_flags & HAS_HOME_PNA) && mii_mode) + if ((sc->sc_flags & HAS_HOME_PNA) && mii_mode) aue_csr_write_1(sc, AUE_REG_81, 6); else #endif @@ -577,9 +613,8 @@ aue_reset_pegasus_II(struct aue_softc *s static void aue_reset(struct aue_softc *sc) { - int i; + int i; - AUE_SXASSERTLOCKED(sc); AUE_SETBIT(sc, AUE_CTL1, AUE_CTL1_RESETMAC); for (i = 0; i < AUE_TIMEOUT; i++) { @@ -588,7 +623,7 @@ aue_reset(struct aue_softc *sc) } if (i == AUE_TIMEOUT) - printf("aue%d: reset failed\n", sc->aue_unit); + device_printf(sc->sc_dev, "reset failed\n"); /* * The PHY(s) attached to the Pegasus chip may be held @@ -602,45 +637,44 @@ aue_reset(struct aue_softc *sc) aue_csr_write_1(sc, AUE_GPIO0, AUE_GPIO_OUT0|AUE_GPIO_SEL0); aue_csr_write_1(sc, AUE_GPIO0, AUE_GPIO_OUT0|AUE_GPIO_SEL0|AUE_GPIO_SEL1); - if (sc->aue_flags & LSYS) { + if (sc->sc_flags & AUE_FLAG_LSYS) { /* Grrr. LinkSys has to be different from everyone else. */ + aue_csr_write_1(sc, AUE_GPIO0, AUE_GPIO_SEL0|AUE_GPIO_SEL1); aue_csr_write_1(sc, AUE_GPIO0, - AUE_GPIO_SEL0 | AUE_GPIO_SEL1); - aue_csr_write_1(sc, AUE_GPIO0, - AUE_GPIO_SEL0 | AUE_GPIO_SEL1 | AUE_GPIO_OUT0); + AUE_GPIO_SEL0|AUE_GPIO_SEL1|AUE_GPIO_OUT0); } + if (sc->sc_flags & AUE_FLAG_PII) + aue_reset_pegasus_II(sc); - if (sc->aue_flags & PII) - aue_reset_pegasus_II(sc); - - /* Wait a little while for the chip to get its brains in order. */ - DELAY(10000); - - return; + /* Wait a little while for the chip to get its brains in order: */ + usb2_pause_mtx(&sc->sc_mtx, hz / 100); } /* * Probe for a Pegasus chip. */ static int -aue_match(device_t self) +aue_probe(device_t dev) { - struct usb_attach_arg *uaa = device_get_ivars(self); - - if (uaa->iface != NULL) - return (UMATCH_NONE); + struct usb2_attach_arg *uaa = device_get_ivars(dev); + if (uaa->usb2_mode != USB_MODE_HOST) + return (ENXIO); + if (uaa->info.bConfigIndex != AUE_CONFIG_INDEX) + return (ENXIO); + if (uaa->info.bIfaceIndex != AUE_IFACE_IDX) + return (ENXIO); /* * Belkin USB Bluetooth dongles of the F8T012xx1 model series conflict * with older Belkin USB2LAN adapters. Skip if_aue if we detect one of * the devices that look like Bluetooth adapters. */ - if (uaa->vendor == USB_VENDOR_BELKIN && - uaa->product == USB_PRODUCT_BELKIN_F8T012 && uaa->release == 0x0413) - return (UMATCH_NONE); + if (uaa->info.idVendor == USB_VENDOR_BELKIN && + uaa->info.idProduct == USB_PRODUCT_BELKIN_F8T012 && + uaa->info.bcdDevice == 0x0413) + return (ENXIO); - return (aue_lookup(uaa->vendor, uaa->product) != NULL ? - UMATCH_VENDOR_PRODUCT : UMATCH_NONE); + return (usb2_lookup_id_by_uaa(aue_devs, sizeof(aue_devs), uaa)); } /* @@ -648,86 +682,65 @@ aue_match(device_t self) * setup and ethernet/BPF attach. */ static int -aue_attach(device_t self) +aue_attach(device_t dev) { - struct aue_softc *sc = device_get_softc(self); - struct usb_attach_arg *uaa = device_get_ivars(self); - u_char eaddr[ETHER_ADDR_LEN]; - struct ifnet *ifp; - usbd_interface_handle iface; - usbd_status err; - usb_interface_descriptor_t *id; - usb_endpoint_descriptor_t *ed; - int i; - - sc->aue_dev = self; - sc->aue_udev = uaa->device; - sc->aue_unit = device_get_unit(self); - - if (usbd_set_config_no(sc->aue_udev, AUE_CONFIG_NO, 0)) { - device_printf(self, "getting interface handle failed\n"); - return ENXIO; - } - - err = usbd_device2interface_handle(uaa->device, AUE_IFACE_IDX, &iface); - if (err) { - device_printf(self, "getting interface handle failed\n"); - return ENXIO; - } - - sc->aue_iface = iface; - sc->aue_flags = aue_lookup(uaa->vendor, uaa->product)->aue_flags; - - sc->aue_product = uaa->product; - sc->aue_vendor = uaa->vendor; - - id = usbd_get_interface_descriptor(sc->aue_iface); - - /* Find endpoints. */ - for (i = 0; i < id->bNumEndpoints; i++) { - ed = usbd_interface2endpoint_descriptor(iface, i); - if (ed == NULL) { - device_printf(self, "couldn't get ep %d\n", i); - return ENXIO; - } - if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && - UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - sc->aue_ed[AUE_ENDPT_RX] = ed->bEndpointAddress; - } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && - UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - sc->aue_ed[AUE_ENDPT_TX] = ed->bEndpointAddress; - } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && - UE_GET_XFERTYPE(ed->bmAttributes) == UE_INTERRUPT) { - sc->aue_ed[AUE_ENDPT_INTR] = ed->bEndpointAddress; - } + struct usb2_attach_arg *uaa = device_get_ivars(dev); + struct aue_softc *sc = device_get_softc(dev); + struct ifnet *ifp; + uint8_t eaddr[ETHER_ADDR_LEN]; + uint8_t iface_index; + int error; + + if (sc == NULL) + return (ENOMEM); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 01:31:52 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE36A1065670; Tue, 27 Jan 2009 01:31:52 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82FDA8FC0C; Tue, 27 Jan 2009 01:31:52 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R1Vq6t069619; Tue, 27 Jan 2009 01:31:52 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R1Vqp4069617; Tue, 27 Jan 2009 01:31:52 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901270131.n0R1Vqp4069617@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 01:31:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187755 - user/thompsa/usb/sys/dev/usb2/ethernet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 01:31:52 -0000 Author: thompsa Date: Tue Jan 27 01:31:52 2009 New Revision: 187755 URL: http://svn.freebsd.org/changeset/base/187755 Log: Retire config_td code. Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c Tue Jan 27 01:31:24 2009 (r187754) +++ user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c Tue Jan 27 01:31:52 2009 (r187755) @@ -45,56 +45,3 @@ usb2_ether_get_mbuf(void) } return (m); } - -/*------------------------------------------------------------------------* - * usb2_ether_cc - common ethernet config copy - *------------------------------------------------------------------------*/ -void -usb2_ether_cc(struct ifnet *ifp, usb2_ether_mchash_t *fhash, - struct usb2_ether_cc *cc) -{ - struct ifmultiaddr *ifma; - uint8_t i; - - if (ifp == NULL) { - /* Nothing to do */ - return; - } - /* Copy interface flags */ - - cc->if_flags = ifp->if_flags; - - /* Copy link layer address */ - - for (i = 0; i != ETHER_ADDR_LEN; i++) { - cc->if_lladdr[i] = IF_LLADDR(ifp)[i]; - } - - /* Check hash filter disable bits */ - - if ((ifp->if_flags & IFF_ALLMULTI) || - (ifp->if_flags & IFF_PROMISC)) { - - memset(cc->if_hash, 0xFF, sizeof(cc->if_hash)); - - } else if (fhash) { - - /* Compute hash bits for multicast filter */ - - IF_ADDR_LOCK(ifp); - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) { - continue; - } - fhash(cc, LLADDR((struct sockaddr_dl *) - (ifma->ifma_addr))); - } - IF_ADDR_UNLOCK(ifp); - - /* Compute hash bits for broadcast address */ - - if (ifp->if_flags & IFF_BROADCAST) { - fhash(cc, ifp->if_broadcastaddr); - } - } -} Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h Tue Jan 27 01:31:24 2009 (r187754) +++ user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h Tue Jan 27 01:31:52 2009 (r187755) @@ -48,21 +48,5 @@ #include #include -#define USB_ETHER_HASH_MAX 64 /* bytes */ - -struct usb2_ether_cc { - uint32_t if_flags; - uint16_t if_rxfilt; - uint8_t if_lladdr[ETHER_ADDR_LEN]; - uint8_t if_mhash; - uint8_t if_nhash; - uint8_t if_hash[USB_ETHER_HASH_MAX]; -}; - -typedef void (usb2_ether_mchash_t)(struct usb2_ether_cc *cc, const uint8_t *ptr); - struct mbuf *usb2_ether_get_mbuf(void); -void usb2_ether_cc(struct ifnet *ifp, usb2_ether_mchash_t *fhash, - struct usb2_ether_cc *cc); - #endif /* _USB2_ETHERNET_H_ */ From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 01:32:13 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CE121065674; Tue, 27 Jan 2009 01:32:13 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 59BF28FC16; Tue, 27 Jan 2009 01:32:13 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R1WDJC069665; Tue, 27 Jan 2009 01:32:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R1WDbu069663; Tue, 27 Jan 2009 01:32:13 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901270132.n0R1WDbu069663@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 01:32:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187756 - user/thompsa/usb/sys/dev/usb2/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 01:32:13 -0000 Author: thompsa Date: Tue Jan 27 01:32:13 2009 New Revision: 187756 URL: http://svn.freebsd.org/changeset/base/187756 Log: Convert over to the USB2 API. Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c user/thompsa/usb/sys/dev/usb2/wlan/if_rumvar.h user/thompsa/usb/sys/dev/usb2/wlan/if_ural2.c user/thompsa/usb/sys/dev/usb2/wlan/if_uralreg.h user/thompsa/usb/sys/dev/usb2/wlan/if_uralvar.h user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c user/thompsa/usb/sys/dev/usb2/wlan/if_zydreg.h Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c Tue Jan 27 01:31:52 2009 (r187755) +++ user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c Tue Jan 27 01:32:13 2009 (r187756) @@ -3,6 +3,7 @@ /*- * Copyright (c) 2005-2007 Damien Bergamini * Copyright (c) 2006 Niall O'Higgins + * Copyright (c) 2007-2008 Hans Petter Selasky * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -25,129 +26,113 @@ __FBSDID("$FreeBSD$"); * http://www.ralinktech.com.tw/ */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include "usbdevs.h" - -#include -#include -#include - -#ifdef USB_DEBUG -#define DPRINTF(x) do { if (rumdebug > 0) printf x; } while (0) -#define DPRINTFN(n, x) do { if (rumdebug >= (n)) printf x; } while (0) -int rumdebug = 0; -SYSCTL_NODE(_hw_usb, OID_AUTO, rum, CTLFLAG_RW, 0, "USB rum"); -SYSCTL_INT(_hw_usb_rum, OID_AUTO, debug, CTLFLAG_RW, &rumdebug, 0, - "rum debug level"); -#else -#define DPRINTF(x) -#define DPRINTFN(n, x) +#include +#include +#include +#include + +#define USB_DEBUG_VAR rum_debug + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#if USB_DEBUG +static int rum_debug = 0; + +SYSCTL_NODE(_hw_usb2, OID_AUTO, rum, CTLFLAG_RW, 0, "USB rum"); +SYSCTL_INT(_hw_usb2_rum, OID_AUTO, debug, CTLFLAG_RW, &rum_debug, 0, + "Debug level"); #endif -/* various supported device vendors/products */ -static const struct usb_devno rum_devs[] = { - { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_HWU54DM }, - { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_2 }, - { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_3 }, - { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_4 }, - { USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_WUG2700 }, - { USB_VENDOR_AMIT, USB_PRODUCT_AMIT_CGWLUSB2GO }, - { USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2573_1 }, - { USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2573_2 }, - { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D7050A }, - { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D9050V3 }, - { USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSB54GC }, - { USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSB54GR }, - { USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_C54RU2 }, - { USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB2GL }, - { USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB2GPX }, - { USB_VENDOR_DICKSMITH, USB_PRODUCT_DICKSMITH_CWD854F }, - { USB_VENDOR_DICKSMITH, USB_PRODUCT_DICKSMITH_RT2573 }, - { USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWLG122C1 }, - { USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_WUA1340 }, - { USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA111 }, - { USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA110 }, - { USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB01GS }, - { USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWI05GS }, - { USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT2573 }, - { USB_VENDOR_GOODWAY, USB_PRODUCT_GOODWAY_RT2573 }, - { USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWGUSB254LB }, - { USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWGUSB254V2AP }, - { USB_VENDOR_HUAWEI3COM, USB_PRODUCT_HUAWEI3COM_WUB320G }, - { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_G54HP }, - { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_SG54HP }, - { USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_1 }, - { USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_2 }, - { USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_3 }, - { USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_4 }, - { USB_VENDOR_NOVATECH, USB_PRODUCT_NOVATECH_RT2573 }, - { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54HP }, - { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54MINI2 }, - { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMM }, - { USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2573 }, - { USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2573_2 }, - { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2573 }, - { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2573_2 }, - { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2671 }, - { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL113R2 }, - { USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL172 }, - { USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT2573 }, - { USB_VENDOR_SURECOM, USB_PRODUCT_SURECOM_RT2573 } +static const struct usb2_device_id rum_devs[] = { + { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_HWU54DM) }, + { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_2) }, + { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_3) }, + { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_RT2573_4) }, + { USB_VP(USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_WUG2700) }, + { USB_VP(USB_VENDOR_AMIT, USB_PRODUCT_AMIT_CGWLUSB2GO) }, + { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2573_1) }, + { USB_VP(USB_VENDOR_ASUS, USB_PRODUCT_ASUS_RT2573_2) }, + { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D7050A) }, + { USB_VP(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D9050V3) }, + { USB_VP(USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSB54GC) }, + { USB_VP(USB_VENDOR_CISCOLINKSYS, USB_PRODUCT_CISCOLINKSYS_WUSB54GR) }, + { USB_VP(USB_VENDOR_CONCEPTRONIC2, USB_PRODUCT_CONCEPTRONIC2_C54RU2) }, + { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB2GL) }, + { USB_VP(USB_VENDOR_COREGA, USB_PRODUCT_COREGA_CGWLUSB2GPX) }, + { USB_VP(USB_VENDOR_DICKSMITH, USB_PRODUCT_DICKSMITH_CWD854F) }, + { USB_VP(USB_VENDOR_DICKSMITH, USB_PRODUCT_DICKSMITH_RT2573) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWLG122C1) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_WUA1340) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA111) }, + { USB_VP(USB_VENDOR_DLINK2, USB_PRODUCT_DLINK2_DWA110) }, + { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWB01GS) }, + { USB_VP(USB_VENDOR_GIGABYTE, USB_PRODUCT_GIGABYTE_GNWI05GS) }, + { USB_VP(USB_VENDOR_GIGASET, USB_PRODUCT_GIGASET_RT2573) }, + { USB_VP(USB_VENDOR_GOODWAY, USB_PRODUCT_GOODWAY_RT2573) }, + { USB_VP(USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWGUSB254LB) }, + { USB_VP(USB_VENDOR_GUILLEMOT, USB_PRODUCT_GUILLEMOT_HWGUSB254V2AP) }, + { USB_VP(USB_VENDOR_HUAWEI3COM, USB_PRODUCT_HUAWEI3COM_WUB320G) }, + { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_G54HP) }, + { USB_VP(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_SG54HP) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_1) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_2) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_3) }, + { USB_VP(USB_VENDOR_MSI, USB_PRODUCT_MSI_RT2573_4) }, + { USB_VP(USB_VENDOR_NOVATECH, USB_PRODUCT_NOVATECH_RT2573) }, + { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54HP) }, + { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54MINI2) }, + { USB_VP(USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSMM) }, + { USB_VP(USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2573) }, + { USB_VP(USB_VENDOR_QCOM, USB_PRODUCT_QCOM_RT2573_2) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2573) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2573_2) }, + { USB_VP(USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2671) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL113R2) }, + { USB_VP(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_WL172) }, + { USB_VP(USB_VENDOR_SPARKLAN, USB_PRODUCT_SPARKLAN_RT2573) }, + { USB_VP(USB_VENDOR_SURECOM, USB_PRODUCT_SURECOM_RT2573) }, }; MODULE_DEPEND(rum, wlan, 1, 1, 1); MODULE_DEPEND(rum, wlan_amrr, 1, 1, 1); -MODULE_DEPEND(rum, usb, 1, 1, 1); +MODULE_DEPEND(rum, usb2_wlan, 1, 1, 1); +MODULE_DEPEND(rum, usb2_core, 1, 1, 1); + +static device_probe_t rum_match; +static device_attach_t rum_attach; +static device_detach_t rum_detach; + +static usb2_callback_t rum_bulk_read_callback; +static usb2_callback_t rum_bulk_read_clear_stall_callback; +static usb2_callback_t rum_bulk_write_callback; +static usb2_callback_t rum_bulk_write_clear_stall_callback; + +static usb2_task_fn_t rum_task; +static usb2_task_fn_t rum_scantask; +static usb2_task_fn_t rum_promisctask; +static usb2_task_fn_t rum_amrr_task; static struct ieee80211vap *rum_vap_create(struct ieee80211com *, const char name[IFNAMSIZ], int unit, int opmode, int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t mac[IEEE80211_ADDR_LEN]); static void rum_vap_delete(struct ieee80211vap *); +static void rum_tx_free(struct rum_tx_data *, int); static int rum_alloc_tx_list(struct rum_softc *); static void rum_free_tx_list(struct rum_softc *); -static int rum_alloc_rx_list(struct rum_softc *); -static void rum_free_rx_list(struct rum_softc *); -static void rum_task(void *); -static void rum_scantask(void *); static int rum_newstate(struct ieee80211vap *, enum ieee80211_state, int); -static void rum_txeof(usbd_xfer_handle, usbd_private_handle, - usbd_status); -static void rum_rxeof(usbd_xfer_handle, usbd_private_handle, - usbd_status); static void rum_setup_tx_desc(struct rum_softc *, struct rum_tx_desc *, uint32_t, uint16_t, int, int); @@ -159,7 +144,6 @@ static int rum_tx_raw(struct rum_softc static int rum_tx_data(struct rum_softc *, struct mbuf *, struct ieee80211_node *); static void rum_start(struct ifnet *); -static void rum_watchdog(void *); static int rum_ioctl(struct ifnet *, u_long, caddr_t); static void rum_eeprom_read(struct rum_softc *, uint16_t, void *, int); @@ -184,7 +168,6 @@ static void rum_enable_tsf_sync(struct static void rum_update_slot(struct ifnet *); static void rum_set_bssid(struct rum_softc *, const uint8_t *); static void rum_set_macaddr(struct rum_softc *, const uint8_t *); -static void rum_update_promisc(struct rum_softc *); static const char *rum_get_rf(int); static void rum_read_eeprom(struct rum_softc *); static int rum_bbp_init(struct rum_softc *); @@ -207,8 +190,6 @@ static int rum_get_rssi(struct rum_soft static void rum_amrr_start(struct rum_softc *, struct ieee80211_node *); static void rum_amrr_timeout(void *); -static void rum_amrr_update(usbd_xfer_handle, usbd_private_handle, - usbd_status); static const struct { uint32_t reg; @@ -369,89 +350,110 @@ static const struct rfprog { { 165, 0x00b33, 0x012ad, 0x2e014, 0x30285 } }; +static const struct usb2_config rum_config[RUM_N_TRANSFER] = { + [RUM_BULK_DT_WR] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .mh.bufsize = (MCLBYTES + RT2573_TX_DESC_SIZE + 8), + .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .mh.callback = rum_bulk_write_callback, + .mh.timeout = 5000, /* ms */ + }, + + [RUM_BULK_DT_RD] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .mh.bufsize = (MCLBYTES + RT2573_RX_DESC_SIZE), + .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .mh.callback = rum_bulk_read_callback, + }, + + [RUM_BULK_CS_WR] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = UE_DIR_ANY, + .mh.bufsize = sizeof(struct usb2_device_request), + .mh.callback = rum_bulk_write_clear_stall_callback, + .mh.timeout = 1000, /* 1 second */ + .mh.interval = 50, /* 50ms */ + }, + + [RUM_BULK_CS_RD] = { + .type = UE_CONTROL, + .endpoint = 0x00, /* Control pipe */ + .direction = UE_DIR_ANY, + .mh.bufsize = sizeof(struct usb2_device_request), + .mh.callback = rum_bulk_read_clear_stall_callback, + .mh.timeout = 1000, /* 1 second */ + .mh.interval = 50, /* 50ms */ + }, +}; + static int rum_match(device_t self) { - struct usb_attach_arg *uaa = device_get_ivars(self); + struct usb2_attach_arg *uaa = device_get_ivars(self); - if (uaa->iface != NULL) - return UMATCH_NONE; + if (uaa->usb2_mode != USB_MODE_HOST) + return (ENXIO); + if (uaa->info.bConfigIndex != 0) + return (ENXIO); + if (uaa->info.bIfaceIndex != RT2573_IFACE_INDEX) + return (ENXIO); - return (usb_lookup(rum_devs, uaa->vendor, uaa->product) != NULL) ? - UMATCH_VENDOR_PRODUCT : UMATCH_NONE; + return (usb2_lookup_id_by_uaa(rum_devs, sizeof(rum_devs), uaa)); } static int rum_attach(device_t self) { + struct usb2_attach_arg *uaa = device_get_ivars(self); struct rum_softc *sc = device_get_softc(self); - struct usb_attach_arg *uaa = device_get_ivars(self); struct ieee80211com *ic; struct ifnet *ifp; const uint8_t *ucode = NULL; - usb_interface_descriptor_t *id; - usb_endpoint_descriptor_t *ed; - usbd_status error; - int i, ntries, size; - uint8_t bands; + uint8_t bands, iface_index; uint32_t tmp; + int error, ntries, size; + if (sc == NULL) + return (ENOMEM); + + device_set_usb2_desc(self); sc->sc_udev = uaa->device; sc->sc_dev = self; - if (usbd_set_config_no(sc->sc_udev, RT2573_CONFIG_NO, 0) != 0) { - device_printf(self, "could not set configuration no\n"); - return ENXIO; - } - - /* get the first interface handle */ - error = usbd_device2interface_handle(sc->sc_udev, RT2573_IFACE_INDEX, - &sc->sc_iface); - if (error != 0) { - device_printf(self, "could not get interface handle\n"); - return ENXIO; - } - - /* - * Find endpoints. - */ - id = usbd_get_interface_descriptor(sc->sc_iface); - - sc->sc_rx_no = sc->sc_tx_no = -1; - for (i = 0; i < id->bNumEndpoints; i++) { - ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i); - if (ed == NULL) { - device_printf(self, - "no endpoint descriptor for iface %d\n", i); - return ENXIO; - } - - if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && - UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) - sc->sc_rx_no = ed->bEndpointAddress; - else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && - UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) - sc->sc_tx_no = ed->bEndpointAddress; - } - if (sc->sc_rx_no == -1 || sc->sc_tx_no == -1) { - device_printf(self, "missing endpoint\n"); - return ENXIO; + mtx_init(&sc->sc_mtx, device_get_nameunit(self), + MTX_NETWORK_LOCK, MTX_DEF); + USB_TASK_INIT(&sc->sc_task, rum_task, sc, NULL); + USB_TASK_INIT(&sc->sc_promisctask, rum_promisctask, sc, &sc->sc_mtx); + USB_TASK_INIT(&sc->sc_scantask, rum_scantask, sc, &sc->sc_mtx); + + iface_index = RT2573_IFACE_INDEX; + error = usb2_transfer_setup(uaa->device, &iface_index, + sc->sc_xfer, rum_config, RUM_N_TRANSFER, sc, &sc->sc_mtx); + if (error) { + device_printf(self, "could not allocate USB transfers, " + "err=%s\n", usb2_errstr(error)); + goto detach; + } + error = usb2_proc_create(&sc->sc_tq, USB_PRI_MED, + device_get_nameunit(self)); + if (error) { + device_printf(self, "could not setup config thread!\n"); + goto detach; } ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); if (ifp == NULL) { - device_printf(self, "can not if_alloc()\n"); - return ENXIO; + device_printf(sc->sc_dev, "can not if_alloc()\n"); + goto detach; } ic = ifp->if_l2com; - mtx_init(&sc->sc_mtx, device_get_nameunit(sc->sc_dev), MTX_NETWORK_LOCK, - MTX_DEF | MTX_RECURSE); - - usb_init_task(&sc->sc_task, rum_task, sc); - usb_init_task(&sc->sc_scantask, rum_scantask, sc); - callout_init(&sc->watchdog_ch, 0); - + RUM_LOCK(sc); /* retrieve RT2573 rev. no */ for (ntries = 0; ntries < 1000; ntries++) { if ((tmp = rum_read(sc, RT2573_MAC_CSR0)) != 0) @@ -460,7 +462,8 @@ rum_attach(device_t self) } if (ntries == 1000) { device_printf(self, "timeout waiting for chip to settle\n"); - goto bad; + RUM_UNLOCK(sc); + goto detach; } /* retrieve MAC address and various other things from EEPROM */ @@ -474,13 +477,14 @@ rum_attach(device_t self) error = rum_load_microcode(sc, ucode, size); if (error != 0) { device_printf(self, "could not load 8051 microcode\n"); - goto bad; + RUM_UNLOCK(sc); + goto detach; } + RUM_UNLOCK(sc); ifp->if_softc = sc; if_initname(ifp, "rum", device_get_unit(sc->sc_dev)); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | - IFF_NEEDSGIANT; /* USB stack is still under Giant lock */ + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = rum_init; ifp->if_ioctl = rum_ioctl; ifp->if_start = rum_start; @@ -539,10 +543,9 @@ rum_attach(device_t self) ieee80211_announce(ic); return 0; -bad: - mtx_destroy(&sc->sc_mtx); - if_free(ifp); - return ENXIO; +detach: + rum_detach(self); + return (ENXIO); /* failure */ } static int @@ -552,35 +555,23 @@ rum_detach(device_t self) struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; + RUM_LOCK(sc); + sc->sc_flags |= RUM_FLAG_DETACH; rum_stop(sc); - bpfdetach(ifp); - ieee80211_ifdetach(ic); - - usb_rem_task(sc->sc_udev, &sc->sc_task); - usb_rem_task(sc->sc_udev, &sc->sc_scantask); - callout_stop(&sc->watchdog_ch); - - if (sc->amrr_xfer != NULL) { - usbd_free_xfer(sc->amrr_xfer); - sc->amrr_xfer = NULL; - } + RUM_UNLOCK(sc); - if (sc->sc_rx_pipeh != NULL) { - usbd_abort_pipe(sc->sc_rx_pipeh); - usbd_close_pipe(sc->sc_rx_pipeh); - } - if (sc->sc_tx_pipeh != NULL) { - usbd_abort_pipe(sc->sc_tx_pipeh); - usbd_close_pipe(sc->sc_tx_pipeh); + /* stop all USB transfers first */ + usb2_transfer_unsetup(sc->sc_xfer, RUM_N_TRANSFER); + usb2_proc_free(&sc->sc_tq); + + if (ifp) { + bpfdetach(ifp); + ieee80211_ifdetach(ic); + if_free(ifp); } - - rum_free_rx_list(sc); - rum_free_tx_list(sc); - - if_free(ifp); mtx_destroy(&sc->sc_mtx); - return 0; + return (0); } static struct ieee80211vap * @@ -589,6 +580,7 @@ rum_vap_create(struct ieee80211com *ic, const uint8_t bssid[IEEE80211_ADDR_LEN], const uint8_t mac[IEEE80211_ADDR_LEN]) { + struct rum_softc *sc = ic->ic_ifp->if_softc; struct rum_vap *rvp; struct ieee80211vap *vap; @@ -607,7 +599,9 @@ rum_vap_create(struct ieee80211com *ic, rvp->newstate = vap->iv_newstate; vap->iv_newstate = rum_newstate; - callout_init(&rvp->amrr_ch, 0); + rvp->sc = sc; + usb2_callout_init_mtx(&rvp->amrr_ch, &sc->sc_mtx, 0); + USB_TASK_INIT(&rvp->amrr_task, rum_amrr_task, rvp, &sc->sc_mtx); ieee80211_amrr_init(&rvp->amrr, vap, IEEE80211_AMRR_MIN_SUCCESS_THRESHOLD, IEEE80211_AMRR_MAX_SUCCESS_THRESHOLD, @@ -623,49 +617,58 @@ static void rum_vap_delete(struct ieee80211vap *vap) { struct rum_vap *rvp = RUM_VAP(vap); + struct rum_softc *sc = rvp->sc; - callout_stop(&rvp->amrr_ch); + RUM_LOCK(sc); + usb2_callout_stop(&rvp->amrr_ch); + RUM_UNLOCK(sc); ieee80211_amrr_cleanup(&rvp->amrr); ieee80211_vap_detach(vap); free(rvp, M_80211_VAP); } +static void +rum_tx_free(struct rum_tx_data *data, int txerr) +{ + struct rum_softc *sc = data->sc; + + if (data->m != NULL) { + if (data->m->m_flags & M_TXCB) + ieee80211_process_callback(data->ni, data->m, + txerr ? ETIMEDOUT : 0); + m_freem(data->m); + data->m = NULL; + + ieee80211_free_node(data->ni); + data->ni = NULL; + } + STAILQ_INSERT_TAIL(&sc->tx_free, data, next); + sc->tx_nfree++; +} + static int rum_alloc_tx_list(struct rum_softc *sc) { struct rum_tx_data *data; - int i, error; + int i; - sc->tx_queued = sc->tx_cur = 0; + sc->tx_data = malloc(sizeof(struct rum_tx_data) * RUM_TX_LIST_COUNT, + M_USB, M_NOWAIT|M_ZERO); + if (sc->tx_data == NULL) + return (ENOMEM); + + sc->tx_nfree = 0; + STAILQ_INIT(&sc->tx_q); + STAILQ_INIT(&sc->tx_free); for (i = 0; i < RUM_TX_LIST_COUNT; i++) { data = &sc->tx_data[i]; data->sc = sc; - - data->xfer = usbd_alloc_xfer(sc->sc_udev); - if (data->xfer == NULL) { - device_printf(sc->sc_dev, - "could not allocate tx xfer\n"); - error = ENOMEM; - goto fail; - } - data->buf = usbd_alloc_buffer(data->xfer, - RT2573_TX_DESC_SIZE + MCLBYTES); - if (data->buf == NULL) { - device_printf(sc->sc_dev, - "could not allocate tx buffer\n"); - error = ENOMEM; - goto fail; - } - /* clean Tx descriptor */ - bzero(data->buf, RT2573_TX_DESC_SIZE); + STAILQ_INSERT_TAIL(&sc->tx_free, data, next); + sc->tx_nfree++; } - return 0; - -fail: rum_free_tx_list(sc); - return error; } static void @@ -674,85 +677,27 @@ rum_free_tx_list(struct rum_softc *sc) struct rum_tx_data *data; int i; + if (sc->tx_data == NULL) + return; + for (i = 0; i < RUM_TX_LIST_COUNT; i++) { data = &sc->tx_data[i]; - if (data->xfer != NULL) { - usbd_free_xfer(data->xfer); - data->xfer = NULL; + if (data->m != NULL) { + m_freem(data->m); + data->m = NULL; } - if (data->ni != NULL) { ieee80211_free_node(data->ni); data->ni = NULL; } } -} - -static int -rum_alloc_rx_list(struct rum_softc *sc) -{ - struct rum_rx_data *data; - int i, error; - - for (i = 0; i < RUM_RX_LIST_COUNT; i++) { - data = &sc->rx_data[i]; - - data->sc = sc; - - data->xfer = usbd_alloc_xfer(sc->sc_udev); - if (data->xfer == NULL) { - device_printf(sc->sc_dev, - "could not allocate rx xfer\n"); - error = ENOMEM; - goto fail; - } - if (usbd_alloc_buffer(data->xfer, MCLBYTES) == NULL) { - device_printf(sc->sc_dev, - "could not allocate rx buffer\n"); - error = ENOMEM; - goto fail; - } - - data->m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - if (data->m == NULL) { - device_printf(sc->sc_dev, - "could not allocate rx mbuf\n"); - error = ENOMEM; - goto fail; - } - - data->buf = mtod(data->m, uint8_t *); - } - - return 0; - -fail: rum_free_rx_list(sc); - return error; + free(sc->tx_data, M_USB); + sc->tx_data = NULL; } static void -rum_free_rx_list(struct rum_softc *sc) -{ - struct rum_rx_data *data; - int i; - - for (i = 0; i < RUM_RX_LIST_COUNT; i++) { - data = &sc->rx_data[i]; - - if (data->xfer != NULL) { - usbd_free_xfer(data->xfer); - data->xfer = NULL; - } - if (data->m != NULL) { - m_freem(data->m); - data->m = NULL; - } - } -} - -static void -rum_task(void *arg) +rum_task(void *arg, struct usb2_task *task) { struct rum_softc *sc = arg; struct ifnet *ifp = sc->sc_ifp; @@ -764,10 +709,12 @@ rum_task(void *arg) struct ieee80211_node *ni; uint32_t tmp; + if (sc->sc_flags & RUM_FLAG_DETACH) + return; + ostate = vap->iv_state; RUM_LOCK(sc); - switch (sc->sc_state) { case IEEE80211_S_INIT: if (ostate == IEEE80211_S_RUN) { @@ -803,7 +750,6 @@ rum_task(void *arg) default: break; } - RUM_UNLOCK(sc); IEEE80211_LOCK(ic); @@ -820,152 +766,264 @@ rum_newstate(struct ieee80211vap *vap, e struct ieee80211com *ic = vap->iv_ic; struct rum_softc *sc = ic->ic_ifp->if_softc; - usb_rem_task(sc->sc_udev, &sc->sc_task); - usb_rem_task(sc->sc_udev, &sc->sc_scantask); - callout_stop(&rvp->amrr_ch); + DPRINTF("%s -> %s\n", + ieee80211_state_name[vap->iv_state], + ieee80211_state_name[nstate]); + + RUM_LOCK(sc); + usb2_callout_stop(&rvp->amrr_ch); /* do it in a process context */ sc->sc_state = nstate; sc->sc_arg = arg; + RUM_UNLOCK(sc); if (nstate == IEEE80211_S_INIT) { rvp->newstate(vap, nstate, arg); return 0; } else { - usb_add_task(sc->sc_udev, &sc->sc_task, USB_TASKQ_DRIVER); + usb2_proc_enqueue(&sc->sc_tq, &sc->sc_task); return EINPROGRESS; } } static void -rum_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) +rum_bulk_write_callback(struct usb2_xfer *xfer) { - struct rum_tx_data *data = priv; - struct rum_softc *sc = data->sc; + struct rum_softc *sc = xfer->priv_sc; struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211_channel *c = ic->ic_curchan; + struct rum_tx_data *data; + struct mbuf *m; + int len; - if (data->m != NULL && data->m->m_flags & M_TXCB) - ieee80211_process_callback(data->ni, data->m, 0/*XXX*/); + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + DPRINTFN(11, "transfer complete, %d bytes\n", xfer->actlen); + + /* free resources */ + data = xfer->priv_fifo; + rum_tx_free(data, 0); + xfer->priv_fifo = NULL; + + ifp->if_opackets++; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + + /* FALLTHROUGH */ + case USB_ST_SETUP: + if (sc->sc_flags & RUM_FLAG_WRITE_STALL) { + usb2_transfer_start(sc->sc_xfer[RUM_BULK_CS_WR]); + break; + } +#if 0 + if (sc->sc_flags & RUM_FLAG_WAIT_COMMAND) { + /* + * don't send anything while a command is pending ! + */ + break; + } +#endif - if (status != USBD_NORMAL_COMPLETION) { - if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) - return; + data = STAILQ_FIRST(&sc->tx_q); + if (data) { + STAILQ_REMOVE_HEAD(&sc->tx_q, next); + m = data->m; + + if (m->m_pkthdr.len > (MCLBYTES + RT2573_TX_DESC_SIZE)) { + DPRINTFN(0, "data overflow, %u bytes\n", + m->m_pkthdr.len); + m->m_pkthdr.len = (MCLBYTES + RT2573_TX_DESC_SIZE); + } + usb2_copy_in(xfer->frbuffers, 0, &data->desc, + RT2573_TX_DESC_SIZE); + usb2_m_copy_in(xfer->frbuffers, RT2573_TX_DESC_SIZE, m, + 0, m->m_pkthdr.len); + + if (bpf_peers_present(ifp->if_bpf)) { + struct rum_tx_radiotap_header *tap = &sc->sc_txtap; + + tap->wt_flags = 0; + tap->wt_rate = data->rate; + tap->wt_chan_freq = htole16(c->ic_freq); + tap->wt_chan_flags = htole16(c->ic_flags); + tap->wt_antenna = sc->tx_ant; - device_printf(sc->sc_dev, "could not transmit buffer: %s\n", - usbd_errstr(status)); + bpf_mtap2(ifp->if_bpf, tap, sc->sc_txtap_len, m); + } - if (status == USBD_STALLED) - usbd_clear_endpoint_stall_async(sc->sc_tx_pipeh); + /* align end on a 4-bytes boundary */ + len = (RT2573_TX_DESC_SIZE + m->m_pkthdr.len + 3) & ~3; + if ((len % 64) == 0) + len += 4; - ifp->if_oerrors++; - return; - } + DPRINTFN(11, "sending frame len=%u xferlen=%u\n", + m->m_pkthdr.len, len); - m_freem(data->m); - data->m = NULL; - ieee80211_free_node(data->ni); - data->ni = NULL; + xfer->frlengths[0] = len; + xfer->priv_fifo = data; - sc->tx_queued--; - ifp->if_opackets++; + usb2_start_hardware(xfer); + } + break; + + default: /* Error */ + DPRINTFN(11, "transfer error, %s\n", + usb2_errstr(xfer->error)); + + if (xfer->error == USB_ERR_STALLED) { + /* try to clear stall first */ + sc->sc_flags |= RUM_FLAG_WRITE_STALL; + usb2_transfer_start(sc->sc_xfer[RUM_BULK_CS_WR]); + return; + } + if (xfer->error == USB_ERR_TIMEOUT) + device_printf(sc->sc_dev, "device timeout\n"); - DPRINTFN(10, ("tx done\n")); + ifp->if_oerrors++; + data = xfer->priv_fifo; + if (data != NULL) { + rum_tx_free(data, xfer->error); + xfer->priv_fifo = NULL; + } + break; + } +} - sc->sc_tx_timer = 0; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - rum_start(ifp); +static void +rum_bulk_write_clear_stall_callback(struct usb2_xfer *xfer) +{ + struct rum_softc *sc = xfer->priv_sc; + struct usb2_xfer *xfer_other = sc->sc_xfer[RUM_BULK_DT_WR]; + + if (usb2_clear_stall_callback(xfer, xfer_other)) { + DPRINTF("stall cleared\n"); + sc->sc_flags &= ~RUM_FLAG_WRITE_STALL; + usb2_transfer_start(xfer_other); + } } static void -rum_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) +rum_bulk_read_callback(struct usb2_xfer *xfer) { - struct rum_rx_data *data = priv; - struct rum_softc *sc = data->sc; + struct rum_softc *sc = xfer->priv_sc; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - struct rum_rx_desc *desc; struct ieee80211_node *ni; - struct mbuf *mnew, *m; - int len, rssi; - - if (status != USBD_NORMAL_COMPLETION) { - if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) - return; + struct mbuf *m = NULL; + uint32_t flags; + uint8_t rssi = 0; + int len; - if (status == USBD_STALLED) - usbd_clear_endpoint_stall_async(sc->sc_rx_pipeh); - goto skip; - } + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: - usbd_get_xfer_status(xfer, NULL, NULL, &len, NULL); + DPRINTFN(15, "rx done, actlen=%d\n", xfer->actlen); - if (len < RT2573_RX_DESC_SIZE + sizeof (struct ieee80211_frame_min)) { - DPRINTF(("%s: xfer too short %d\n", - device_get_nameunit(sc->sc_dev), len)); - ifp->if_ierrors++; - goto skip; - } + len = xfer->actlen; + if (len < RT2573_RX_DESC_SIZE + IEEE80211_MIN_LEN) { + DPRINTF("%s: xfer too short %d\n", + device_get_nameunit(sc->sc_dev), len); + ifp->if_ierrors++; + goto tr_setup; + } + + len -= RT2573_RX_DESC_SIZE; + usb2_copy_out(xfer->frbuffers, 0, &sc->sc_rx_desc, + RT2573_RX_DESC_SIZE); + + rssi = rum_get_rssi(sc, sc->sc_rx_desc.rssi); + flags = le32toh(sc->sc_rx_desc.flags); + if (flags & RT2573_RX_CRC_ERROR) { + /* + * This should not happen since we did not + * request to receive those frames when we + * filled RUM_TXRX_CSR2: + */ + DPRINTFN(5, "PHY or CRC error\n"); + ifp->if_ierrors++; + goto tr_setup; + } - desc = (struct rum_rx_desc *)data->buf; + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) { + DPRINTF("could not allocate mbuf\n"); + ifp->if_ierrors++; + goto tr_setup; + } + usb2_copy_out(xfer->frbuffers, RT2573_RX_DESC_SIZE, + mtod(m, uint8_t *), len); + + /* finalize mbuf */ + m->m_pkthdr.rcvif = ifp; + m->m_pkthdr.len = m->m_len = (flags >> 16) & 0xfff; + + if (bpf_peers_present(ifp->if_bpf)) { + struct rum_rx_radiotap_header *tap = &sc->sc_rxtap; + + tap->wr_flags = IEEE80211_RADIOTAP_F_FCS; + tap->wr_rate = ieee80211_plcp2rate(sc->sc_rx_desc.rate, + (flags & RT2573_RX_OFDM) ? + IEEE80211_T_OFDM : IEEE80211_T_CCK); + tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); + tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); + tap->wr_antenna = sc->rx_ant; + tap->wr_antsignal = rssi; + + bpf_mtap2(ifp->if_bpf, tap, sc->sc_rxtap_len, m); + } + /* FALLTHROUGH */ + case USB_ST_SETUP: +tr_setup: + if (sc->sc_flags & RUM_FLAG_READ_STALL) { + usb2_transfer_start(sc->sc_xfer[RUM_BULK_CS_RD]); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 01:33:52 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6D33106564A; Tue, 27 Jan 2009 01:33:52 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C412C8FC13; Tue, 27 Jan 2009 01:33:52 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R1XqrA069748; Tue, 27 Jan 2009 01:33:52 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R1XqBv069746; Tue, 27 Jan 2009 01:33:52 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901270133.n0R1XqBv069746@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 01:33:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187757 - in user/thompsa/usb/sys: conf modules/usb2/core X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 01:33:53 -0000 Author: thompsa Date: Tue Jan 27 01:33:52 2009 New Revision: 187757 URL: http://svn.freebsd.org/changeset/base/187757 Log: usb2_config_td.c has been removed. Modified: user/thompsa/usb/sys/conf/files user/thompsa/usb/sys/modules/usb2/core/Makefile Modified: user/thompsa/usb/sys/conf/files ============================================================================== --- user/thompsa/usb/sys/conf/files Tue Jan 27 01:32:13 2009 (r187756) +++ user/thompsa/usb/sys/conf/files Tue Jan 27 01:33:52 2009 (r187757) @@ -1567,7 +1567,6 @@ dev/usb2/ndis/usb2_ndis.c optional usb2 # dev/usb2/core/usb2_busdma.c optional usb2_core dev/usb2/core/usb2_compat_linux.c optional usb2_core -dev/usb2/core/usb2_config_td.c optional usb2_core dev/usb2/core/usb2_core.c optional usb2_core dev/usb2/core/usb2_debug.c optional usb2_core dev/usb2/core/usb2_dev.c optional usb2_core Modified: user/thompsa/usb/sys/modules/usb2/core/Makefile ============================================================================== --- user/thompsa/usb/sys/modules/usb2/core/Makefile Tue Jan 27 01:32:13 2009 (r187756) +++ user/thompsa/usb/sys/modules/usb2/core/Makefile Tue Jan 27 01:33:52 2009 (r187757) @@ -35,7 +35,6 @@ SRCS+= bus_if.h usb2_if.h device_if.h vn SRCS+= usb2_if.c SRCS+= usb2_busdma.c SRCS+= usb2_compat_linux.c -SRCS+= usb2_config_td.c SRCS+= usb2_core.c SRCS+= usb2_debug.c SRCS+= usb2_dev.c From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 01:45:43 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CF81106564A; Tue, 27 Jan 2009 01:45:43 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BD878FC12; Tue, 27 Jan 2009 01:45:43 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R1jhbr070048; Tue, 27 Jan 2009 01:45:43 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R1jhJO070047; Tue, 27 Jan 2009 01:45:43 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901270145.n0R1jhJO070047@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 01:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187758 - user/thompsa/usb/sys/dev/usb2/ethernet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 01:45:43 -0000 Author: thompsa Date: Tue Jan 27 01:45:43 2009 New Revision: 187758 URL: http://svn.freebsd.org/changeset/base/187758 Log: This Copyright notice shouldnt have been removed as the file is now based on the latest copy of sys/dev/usb/if_aue.c. Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c Tue Jan 27 01:33:52 2009 (r187757) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c Tue Jan 27 01:45:43 2009 (r187758) @@ -2,6 +2,9 @@ * Copyright (c) 1997, 1998, 1999, 2000 * Bill Paul . All rights reserved. * + * Copyright (c) 2006 + * Alfred Perlstein . All rights reserved. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -40,6 +43,9 @@ __FBSDID("$FreeBSD$"); * Written by Bill Paul * Electrical Engineering Department * Columbia University, New York City + * + * SMP locking by Alfred Perlstein . + * RED Inc. */ /* From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 02:09:53 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31BE2106566C; Tue, 27 Jan 2009 02:09:53 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2074C8FC0C; Tue, 27 Jan 2009 02:09:53 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R29rJK070581; Tue, 27 Jan 2009 02:09:53 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R29qjX070574; Tue, 27 Jan 2009 02:09:52 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901270209.n0R29qjX070574@svn.freebsd.org> From: Sam Leffler Date: Tue, 27 Jan 2009 02:09:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187759 - user/sam/wifi/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 02:09:53 -0000 Author: sam Date: Tue Jan 27 02:09:52 2009 New Revision: 187759 URL: http://svn.freebsd.org/changeset/base/187759 Log: o make %b msg bit defines public (to user apps too) o rename IEEE80211_C_CRYPTO_BITS to IEEE80211_CRYPTO_BITS; not sure why I had it the way it was Modified: user/sam/wifi/sys/net80211/_ieee80211.h user/sam/wifi/sys/net80211/ieee80211.h user/sam/wifi/sys/net80211/ieee80211_crypto.h user/sam/wifi/sys/net80211/ieee80211_ddb.c user/sam/wifi/sys/net80211/ieee80211_ht.h user/sam/wifi/sys/net80211/ieee80211_node.h user/sam/wifi/sys/net80211/ieee80211_var.h Modified: user/sam/wifi/sys/net80211/_ieee80211.h ============================================================================== --- user/sam/wifi/sys/net80211/_ieee80211.h Tue Jan 27 01:45:43 2009 (r187758) +++ user/sam/wifi/sys/net80211/_ieee80211.h Tue Jan 27 02:09:52 2009 (r187759) @@ -175,6 +175,11 @@ struct ieee80211_channel { #define IEEE80211_CHAN_HT40 (IEEE80211_CHAN_HT40U | IEEE80211_CHAN_HT40D) #define IEEE80211_CHAN_HT (IEEE80211_CHAN_HT20 | IEEE80211_CHAN_HT40) +#define IEEE80211_CHAN_BITS \ + "\20\1PRIV0\2PRIV2\3PRIV3\4PRIV4\5TURBO\6CCK\7OFDM\0102GHZ\0115GHZ" \ + "\12PASSIVE\13DYN\14GFSK\15GSM\16STURBO\17HALF\20QUARTER\21HT20" \ + "\22HT40U\23HT40D\24DFS\0254MSXMIT\26NOADHOC\27NOHOSTAP\03011D" + /* * Useful combinations of channel characteristics. */ Modified: user/sam/wifi/sys/net80211/ieee80211.h ============================================================================== --- user/sam/wifi/sys/net80211/ieee80211.h Tue Jan 27 01:45:43 2009 (r187758) +++ user/sam/wifi/sys/net80211/ieee80211.h Tue Jan 27 02:09:52 2009 (r187759) @@ -502,6 +502,11 @@ struct ieee80211_frame_bar { #define IEEE80211_CAPINFO_DSSSOFDM 0x2000 /* bits 14-15 are reserved */ +#define IEEE80211_CAPINFO_BITS \ + "\20\1ESS\2IBSS\3CF_POLLABLE\4CF_POLLREQ\5PRIVACY\6SHORT_PREAMBLE" \ + "\7PBCC\10CHNL_AGILITY\11SPECTRUM_MGMT\13SHORT_SLOTTIME\14RSN" \ + "\16DSSOFDM" + /* * 802.11i/WPA information element (maximally sized). */ @@ -562,6 +567,11 @@ struct ieee80211_ie_htcap { #define IEEE80211_HTCAP_40INTOLERANT 0x4000 /* 40MHz intolerant */ #define IEEE80211_HTCAP_LSIGTXOPPROT 0x8000 /* L-SIG TXOP prot */ +#define IEEE80211_HTCAP_BITS \ + "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ + "\13DELBA\14AMSDU(7935)\15DSSSCCK40\16PSMP\1740INTOLERANT" \ + "\20LSIGTXOPPROT" + /* HT parameters (hc_param) */ #define IEEE80211_HTCAP_MAXRXAMPDU 0x03 /* max rx A-MPDU factor */ #define IEEE80211_HTCAP_MAXRXAMPDU_S 0 @@ -754,6 +764,9 @@ struct ieee80211_ath_ie { #define IEEE80211_ERP_USE_PROTECTION 0x02 #define IEEE80211_ERP_LONG_PREAMBLE 0x04 +#define IEEE80211_ERP_BITS \ + "\20\1NON_ERP_PRESENT\2USE_PROTECTION\3LONG_PREAMBLE" + #define ATH_OUI 0x7f0300 /* Atheros OUI */ #define ATH_OUI_TYPE 0x01 #define ATH_OUI_SUBTYPE 0x01 Modified: user/sam/wifi/sys/net80211/ieee80211_crypto.h ============================================================================== --- user/sam/wifi/sys/net80211/ieee80211_crypto.h Tue Jan 27 01:45:43 2009 (r187758) +++ user/sam/wifi/sys/net80211/ieee80211_crypto.h Tue Jan 27 02:09:52 2009 (r187759) @@ -131,6 +131,9 @@ struct ieee80211_key { #define IEEE80211_CRYPTO_TKIPMIC (1< #include -#define IEEE80211_MSG_BITS \ - "\20\3IOCTL\4WDS\5ACTION\6RATECTL\7ROAM\10INACT\11DOTH\12SUPERG" \ - "\13WME\14ACL\15WPA\16RADKEYS\17RADDUMP\20RADIUS\21DOT1X\22POWER" \ - "\23STATE\24OUTPUT\25SCAN\26AUTH\27ASSOC\30NODE\31ELEMID\32XRATE" \ - "\33INPUT\34CRYPTO\35DUPMPKTS\36DEBUG\3711N" - -#define IEEE80211_F_BITS \ - "\20\1TURBOP\2COMP\3FF\4BURST\5PRIVACY\6PUREG\10SCAN\11ASCAN\12SIBSS" \ - "\13SHSLOT\14PMGTON\15DESBSSID\16WME\17BGSCAN\20SWRETRY\21TXPOW_FIXED" \ - "\22IBSSON\23SHPREAMBLE\24DATAPAD\25USEPROT\26USERBARKER\27CSAPENDING" \ - "\30WPA1\31WPA2\32DROPUNENC\33COUNTERM\34HIDESSID\35NOBRIDG\36PCF" \ - "\37DOTH\40DWDS" - -#define IEEE80211_FEXT_BITS \ - "\20\1NONHT_PR\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \ - "\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\22WDSLEGACY\23PROBECHAN\24HT" \ - "\25AMDPU_TX\26AMPDU_TX\27AMSDU_TX\30AMSDU_RX\31USEHT40\32PUREN" \ - "\33SHORTGI20\34SHORTGI40\35HTCOMPAT\36RIFS" - -#define IEEE80211_FVEN_BITS "\20" - -#define IEEE80211_C_BITS \ - "\20\1STA\7FF\10TURBOP\11IBSS\12PMGT" \ - "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \ - "\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ - "\37TXFRAG\40TDMA" - -#define IEEE80211_C_CRYPTO_BITS \ - "\20\1WEP\2TKIP\3AES\4AES_CCM\5TKIPMIC\6CKIP\12PMGT" - -#define IEEE80211_C_HTCAP_BITS \ - "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ - "\21AMPDU\22AMSDU\23HT\24SMPS\25RIFS" - -/* NB: policy bits not included */ -#define IEEE80211_CHAN_BITS \ - "\20\5TURBO\6CCK\7OFDM\0102GHZ\0115GHZ\12PASSIVE\13DYN\14GFSK" \ - "\15STURBO\16HALF\17QUARTER\20HT20\21HT40U\22HT40D\23DFS" - -#define IEEE80211_NODE_BITS \ - "\20\1AUTH\2QOS\3ERP\5PWR_MGT\6AREF\7HT\10HTCOMPAT\11WPS\12TSN" \ - "\13AMPDU_RX\14AMPDU_TX\15MIMO_PS\16MIMO_RTS\17RIFS\20SGI20\21SGI40" \ - "\22ASSOCID" - -#define IEEE80211_ERP_BITS \ - "\20\1NON_ERP_PRESENT\2USE_PROTECTION\3LONG_PREAMBLE" - -#define IEEE80211_CAPINFO_BITS \ - "\20\1ESS\2IBSS\3CF_POLLABLE\4CF_POLLREQ\5PRIVACY\6SHORT_PREAMBLE" \ - "\7PBCC\10CHNL_AGILITY\11SPECTRUM_MGMT\13SHORT_SLOTTIME\14RSN" \ - "\16DSSOFDM" - -#define IEEE80211_HTCAP_BITS \ - "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ - "\13DELBA\14AMSDU(7935)\15DSSSCCK40\16PSMP\1740INTOLERANT" \ - "\20LSIGTXOPPROT" - -#define IEEE80211_AGGR_BITS \ - "\20\1IMMEDIATE\2XCHGPEND\3RUNNING\4SETUP\5NAK" - #define DB_PRINTSYM(prefix, addr) \ db_printf(prefix " "); \ db_printsym((db_addr_t) addr, DB_STGY_ANY); \ @@ -501,7 +441,7 @@ _db_show_com(const struct ieee80211com * db_printf("\tflags_ven=%b\n", ic->ic_flags_ven, IEEE80211_FVEN_BITS); db_printf("\tcaps=%b\n", ic->ic_caps, IEEE80211_C_BITS); db_printf("\tcryptocaps=%b\n", - ic->ic_cryptocaps, IEEE80211_C_CRYPTO_BITS); + ic->ic_cryptocaps, IEEE80211_CRYPTO_BITS); db_printf("\thtcaps=%b\n", ic->ic_htcaps, IEEE80211_HTCAP_BITS); #if 0 Modified: user/sam/wifi/sys/net80211/ieee80211_ht.h ============================================================================== --- user/sam/wifi/sys/net80211/ieee80211_ht.h Tue Jan 27 01:45:43 2009 (r187758) +++ user/sam/wifi/sys/net80211/ieee80211_ht.h Tue Jan 27 02:09:52 2009 (r187759) @@ -71,6 +71,9 @@ struct ieee80211_tx_ampdu { (((tap)->txa_flags & \ (IEEE80211_AGGR_RUNNING|IEEE80211_AGGR_XCHGPEND|IEEE80211_AGGR_NAK)) != 0) +#define IEEE80211_AGGR_BITS \ + "\20\1IMMEDIATE\2XCHGPEND\3RUNNING\4SETUP\5NAK" + /* * Traffic estimator support. We estimate packets/sec for * each AC that is setup for AMPDU or will potentially be Modified: user/sam/wifi/sys/net80211/ieee80211_node.h ============================================================================== --- user/sam/wifi/sys/net80211/ieee80211_node.h Tue Jan 27 01:45:43 2009 (r187758) +++ user/sam/wifi/sys/net80211/ieee80211_node.h Tue Jan 27 02:09:52 2009 (r187759) @@ -206,6 +206,11 @@ MALLOC_DECLARE(M_80211_NODE_IE); IEEE80211_NODE_MIMO_RTS | IEEE80211_NODE_RIFS | \ IEEE80211_NODE_SGI20 | IEEE80211_NODE_SGI40) +#define IEEE80211_NODE_BITS \ + "\20\1AUTH\2QOS\3ERP\5PWR_MGT\6AREF\7HT\10HTCOMPAT\11WPS\12TSN" \ + "\13AMPDU_RX\14AMPDU_TX\15MIMO_PS\16MIMO_RTS\17RIFS\20SGI20\21SGI40" \ + "\22ASSOCID" + #define IEEE80211_NODE_AID(ni) IEEE80211_AID(ni->ni_associd) #define IEEE80211_NODE_STAT(ni,stat) (ni->ni_stats.ns_##stat++) Modified: user/sam/wifi/sys/net80211/ieee80211_var.h ============================================================================== --- user/sam/wifi/sys/net80211/ieee80211_var.h Tue Jan 27 01:45:43 2009 (r187758) +++ user/sam/wifi/sys/net80211/ieee80211_var.h Tue Jan 27 02:09:52 2009 (r187759) @@ -469,6 +469,13 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_F_DOTH 0x40000000 /* CONF: 11h enabled */ #define IEEE80211_F_DWDS 0x80000000 /* CONF: Dynamic WDS enabled */ +#define IEEE80211_F_BITS \ + "\20\1TURBOP\2COMP\3FF\4BURST\5PRIVACY\6PUREG\10SCAN\11ASCAN\12SIBSS" \ + "\13SHSLOT\14PMGTON\15DESBSSID\16WME\17BGSCAN\20SWRETRY\21TXPOW_FIXED" \ + "\22IBSSON\23SHPREAMBLE\24DATAPAD\25USEPROT\26USERBARKER\27CSAPENDING" \ + "\30WPA1\31WPA2\32DROPUNENC\33COUNTERM\34HIDESSID\35NOBRIDG\36PCF" \ + "\37DOTH\40DWDS" + /* Atheros protocol-specific flags */ #define IEEE80211_F_ATHEROS \ (IEEE80211_F_FF | IEEE80211_F_COMP | IEEE80211_F_TURBOP) @@ -505,6 +512,14 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_FEXT_HTCOMPAT 0x10000000 /* CONF: HT vendor OUI's */ #define IEEE80211_FEXT_RIFS 0x20000000 /* CONF: RIFS enabled */ +#define IEEE80211_FEXT_BITS \ + "\20\1NONHT_PR\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \ + "\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\22WDSLEGACY\23PROBECHAN\24HT" \ + "\25AMDPU_TX\26AMPDU_TX\27AMSDU_TX\30AMSDU_RX\31USEHT40\32PUREN" \ + "\33SHORTGI20\34SHORTGI40\35HTCOMPAT\36RIFS" + +#define IEEE80211_FVEN_BITS "\20" + /* ic_caps/iv_caps: device driver capabilities */ /* 0x2f available */ #define IEEE80211_C_STA 0x00000001 /* CAPABILITY: STA available */ @@ -538,6 +553,12 @@ MALLOC_DECLARE(M_80211_VAP); IEEE80211_C_AHDEMO | IEEE80211_C_MONITOR | IEEE80211_C_WDS | \ IEEE80211_C_TDMA) +#define IEEE80211_C_BITS \ + "\20\1STA\7FF\10TURBOP\11IBSS\12PMGT" \ + "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \ + "\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ + "\37TXFRAG\40TDMA" + /* * ic_htcaps/iv_htcaps: HT-specific device/driver capabilities * @@ -551,6 +572,10 @@ MALLOC_DECLARE(M_80211_VAP); #define IEEE80211_HTC_SMPS 0x00080000 /* CAPABILITY: MIMO power save*/ #define IEEE80211_HTC_RIFS 0x00100000 /* CAPABILITY: RIFS support */ +#define IEEE80211_C_HTCAP_BITS \ + "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ + "\21AMPDU\22AMSDU\23HT\24SMPS\25RIFS" + void ieee80211_ifattach(struct ieee80211com *); void ieee80211_ifdetach(struct ieee80211com *); int ieee80211_vap_setup(struct ieee80211com *, struct ieee80211vap *, @@ -694,6 +719,12 @@ ieee80211_htchanflags(const struct ieee8 #define IEEE80211_MSG_ANY 0xffffffff /* anything */ +#define IEEE80211_MSG_BITS \ + "\20\3IOCTL\4WDS\5ACTION\6RATECTL\7ROAM\10INACT\11DOTH\12SUPERG" \ + "\13WME\14ACL\15WPA\16RADKEYS\17RADDUMP\20RADIUS\21DOT1X\22POWER" \ + "\23STATE\24OUTPUT\25SCAN\26AUTH\27ASSOC\30NODE\31ELEMID\32XRATE" \ + "\33INPUT\34CRYPTO\35DUPMPKTS\36DEBUG\3711N" + #ifdef IEEE80211_DEBUG #define ieee80211_msg(_vap, _m) ((_vap)->iv_debug & (_m)) #define IEEE80211_DPRINTF(_vap, _m, _fmt, ...) do { \ From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 02:18:42 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9573E1065672; Tue, 27 Jan 2009 02:18:42 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 846338FC0C; Tue, 27 Jan 2009 02:18:42 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0R2IgIc070771; Tue, 27 Jan 2009 02:18:42 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0R2Ig7j070770; Tue, 27 Jan 2009 02:18:42 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901270218.n0R2Ig7j070770@svn.freebsd.org> From: Sam Leffler Date: Tue, 27 Jan 2009 02:18:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187760 - user/sam/wifi/sbin/ifconfig X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 02:18:42 -0000 Author: sam Date: Tue Jan 27 02:18:42 2009 New Revision: 187760 URL: http://svn.freebsd.org/changeset/base/187760 Log: o remove defines now available in public include files o print channel flags w/ %b format in regulatory debug msgs o small cleanup to channel flags decoding for 5+10 MHz channels o include the channel list in list caps when -v is set; ieee channel #'s are not available and we have to hack around the mapchan routine but it lets us see the calibration table w/o forcing the debug regdomain Modified: user/sam/wifi/sbin/ifconfig/ifieee80211.c Modified: user/sam/wifi/sbin/ifconfig/ifieee80211.c ============================================================================== --- user/sam/wifi/sbin/ifconfig/ifieee80211.c Tue Jan 27 02:09:52 2009 (r187759) +++ user/sam/wifi/sbin/ifconfig/ifieee80211.c Tue Jan 27 02:18:42 2009 (r187760) @@ -1780,9 +1780,13 @@ regdomain_addchans(struct ieee80211req_c channelSep = (chanFlags & IEEE80211_CHAN_2GHZ) ? 0 : 40; LIST_FOREACH(nb, bands, next) { b = nb->band; - if (verbose) - printf("%s: chanFlags 0x%x bandFlags 0x%x\n", - __func__, chanFlags, nb->flags | b->flags); + if (verbose) { + printf("%s:", __func__); + printb(" chanFlags", chanFlags, IEEE80211_CHAN_BITS); + printb(" bandFlags", nb->flags | b->flags, + IEEE80211_CHAN_BITS); + putchar('\n'); + } prev = NULL; for (freq = b->freqStart; freq <= b->freqEnd; freq += b->chanSep) { uint32_t flags = nb->flags | b->flags; @@ -1796,9 +1800,12 @@ regdomain_addchans(struct ieee80211req_c */ if (chanlookup(avail->ic_chans, avail->ic_nchans, freq, chanFlags) == NULL && (flags & IEEE80211_CHAN_GSM) == 0) { - if (verbose) - printf("%u: skip, flags 0x%x not " - "available\n", freq, chanFlags); + if (verbose) { + printf("%u: skip, ", freq); + printb("flags", chanFlags, + IEEE80211_CHAN_BITS); + printf(" not available\n"); + } continue; } if ((flags & IEEE80211_CHAN_HALF) && @@ -1864,10 +1871,12 @@ regdomain_addchans(struct ieee80211req_c c->ic_maxregpower = nb->maxPowerDFS; else c->ic_maxregpower = nb->maxPower; - if (verbose) - printf("[%3d] add freq %u flags 0x%x power %u\n", - ci->ic_nchans-1, c->ic_freq, c->ic_flags, - c->ic_maxregpower); + if (verbose) { + printf("[%3d] add freq %u ", + ci->ic_nchans-1, c->ic_freq); + printb("flags", c->ic_flags, IEEE80211_CHAN_BITS); + printf(" power %u\n", c->ic_maxregpower); + } /* NB: kernel fills in other fields */ prev = c; } @@ -3058,23 +3067,16 @@ get_chaninfo(const struct ieee80211_chan buf[0] = '\0'; if (IEEE80211_IS_CHAN_FHSS(c)) strlcat(buf, " FHSS", bsize); - if (IEEE80211_IS_CHAN_A(c)) { - if (IEEE80211_IS_CHAN_HALF(c)) - strlcat(buf, " 11a/10Mhz", bsize); - else if (IEEE80211_IS_CHAN_QUARTER(c)) - strlcat(buf, " 11a/5Mhz", bsize); - else - strlcat(buf, " 11a", bsize); - } - if (IEEE80211_IS_CHAN_ANYG(c)) { - if (IEEE80211_IS_CHAN_HALF(c)) - strlcat(buf, " 11g/10Mhz", bsize); - else if (IEEE80211_IS_CHAN_QUARTER(c)) - strlcat(buf, " 11g/5Mhz", bsize); - else - strlcat(buf, " 11g", bsize); - } else if (IEEE80211_IS_CHAN_B(c)) + if (IEEE80211_IS_CHAN_A(c)) + strlcat(buf, " 11a", bsize); + else if (IEEE80211_IS_CHAN_ANYG(c)) + strlcat(buf, " 11g", bsize); + else if (IEEE80211_IS_CHAN_B(c)) strlcat(buf, " 11b", bsize); + if (IEEE80211_IS_CHAN_HALF(c)) + strlcat(buf, "/10Mhz", bsize); + if (IEEE80211_IS_CHAN_QUARTER(c)) + strlcat(buf, "/5Mhz", bsize); if (IEEE80211_IS_CHAN_TURBO(c)) strlcat(buf, " Turbo", bsize); if (precise) { @@ -3277,28 +3279,18 @@ list_keys(int s) { } -#define IEEE80211_C_BITS \ - "\20\1STA\7FF\10TURBOP\11IBSS\12PMGT" \ - "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \ - "\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ - "\37TXFRAG" - -#define IEEE80211_CRYPTO_BITS \ - "\20\1WEP\2TKIP\3AES\4AES_CCM\5TKIPMIC\6CKIP\12PMGT" - -#define IEEE80211_HTCAP_BITS \ - "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ - "\21AMPDU\22AMSDU\23HT" - static void list_capabilities(int s) { struct ieee80211_devcaps_req *dc; - dc = malloc(IEEE80211_DEVCAPS_SIZE(1)); + if (verbose) + dc = malloc(IEEE80211_DEVCAPS_SIZE(MAXCHAN)); + else + dc = malloc(IEEE80211_DEVCAPS_SIZE(1)); if (dc == NULL) errx(1, "no space for device capabilities"); - dc->dc_chaninfo.ic_nchans = 1; + dc->dc_chaninfo.ic_nchans = verbose ? MAXCHAN : 1; getdevcaps(s, dc); printb("drivercaps", dc->dc_drivercaps, IEEE80211_C_BITS); if (dc->dc_cryptocaps != 0 || verbose) { @@ -3310,6 +3302,10 @@ list_capabilities(int s) printb("htcaps", dc->dc_htcaps, IEEE80211_HTCAP_BITS); } putchar('\n'); + if (verbose) { + chaninfo = &dc->dc_chaninfo; /* XXX */ + print_channels(s, &dc->dc_chaninfo, 1/*allchans*/, verbose); + } free(dc); } From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 15:34:30 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E03C0106564A; Tue, 27 Jan 2009 15:34:30 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEC9A8FC1B; Tue, 27 Jan 2009 15:34:30 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RFYU8k089753; Tue, 27 Jan 2009 15:34:30 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RFYUHY089750; Tue, 27 Jan 2009 15:34:30 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901271534.n0RFYUHY089750@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 15:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187772 - user/thompsa/usb/sys/dev/usb2/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 15:34:31 -0000 Author: thompsa Date: Tue Jan 27 15:34:30 2009 New Revision: 187772 URL: http://svn.freebsd.org/changeset/base/187772 Log: - Remove check of null softc in attach routines; it can never happen - Readd missing parts of zyd_attach Submitted by: sam Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c user/thompsa/usb/sys/dev/usb2/wlan/if_ural2.c user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c Tue Jan 27 12:24:53 2009 (r187771) +++ user/thompsa/usb/sys/dev/usb2/wlan/if_rum2.c Tue Jan 27 15:34:30 2009 (r187772) @@ -418,9 +418,6 @@ rum_attach(device_t self) uint32_t tmp; int error, ntries, size; - if (sc == NULL) - return (ENOMEM); - device_set_usb2_desc(self); sc->sc_udev = uaa->device; sc->sc_dev = self; Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_ural2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/wlan/if_ural2.c Tue Jan 27 12:24:53 2009 (r187771) +++ user/thompsa/usb/sys/dev/usb2/wlan/if_ural2.c Tue Jan 27 15:34:30 2009 (r187772) @@ -419,9 +419,6 @@ ural_attach(device_t self) int error; uint8_t bands, iface_index; - if (sc == NULL) - return (ENOMEM); - device_set_usb2_desc(self); sc->sc_udev = uaa->device; sc->sc_dev = self; Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c Tue Jan 27 12:24:53 2009 (r187771) +++ user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c Tue Jan 27 15:34:30 2009 (r187772) @@ -355,10 +355,7 @@ zyd_attach(device_t dev) struct ifnet *ifp; struct usb2_attach_arg *uaa = device_get_ivars(dev); struct zyd_softc *sc = device_get_softc(dev); - uint8_t bands; - - if (sc == NULL) - return (ENOMEM); + uint8_t bands, iface_index; if (uaa->info.bcdDevice < 0x4330) { device_printf(dev, "device version mismatch: 0x%X " @@ -374,19 +371,36 @@ zyd_attach(device_t dev) #ifdef ZYD_DEBUG sc->sc_debug = zyd_debug; #endif - - if ((error = zyd_get_macaddr(sc)) != 0) { - device_printf(sc->sc_dev, "could not read EEPROM\n"); - return (ENXIO); - } - mtx_init(&sc->sc_mtx, device_get_nameunit(sc->sc_dev), MTX_NETWORK_LOCK, MTX_DEF); + USB_TASK_INIT(&sc->sc_task, zyd_task, sc, NULL); USB_TASK_INIT(&sc->sc_scantask, zyd_scantask, sc, &sc->sc_mtx); USB_TASK_INIT(&sc->sc_mcasttask, zyd_multitask, sc, &sc->sc_mtx); STAILQ_INIT(&sc->sc_rqh); + iface_index = ZYD_IFACE_INDEX; + error = usb2_transfer_setup(uaa->device, + &iface_index, sc->sc_xfer, zyd_config, + ZYD_N_TRANSFER, sc, &sc->sc_mtx); + if (error) { + device_printf(dev, "could not allocate USB transfers, " + "err=%s\n", usb2_errstr(error)); + goto fail0; + } + error = usb2_proc_create(&sc->sc_tq, USB_PRI_MED, + device_get_nameunit(dev)); + if (error) { + device_printf(dev, "could not setup config thread!\n"); + goto fail0; + } + + if ((error = zyd_get_macaddr(sc)) != 0) { + device_printf(sc->sc_dev, "could not read EEPROM\n"); + error = ENXIO; + goto fail0; + } + ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); if (ifp == NULL) { device_printf(dev, "can not if_alloc()\n"); @@ -395,8 +409,7 @@ zyd_attach(device_t dev) } ifp->if_softc = sc; if_initname(ifp, "zyd", device_get_unit(sc->sc_dev)); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST | - IFF_NEEDSGIANT; /* USB stack is still under Giant lock */ + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_init = zyd_init; ifp->if_ioctl = zyd_ioctl; ifp->if_start = zyd_start; @@ -1958,11 +1971,13 @@ zyd_get_macaddr(struct zyd_softc *sc) USETW(req.wIndex, 0); USETW(req.wLength, IEEE80211_ADDR_LEN); + ZYD_LOCK(sc); error = usb2_do_request(sc->sc_udev, &sc->sc_mtx, &req, sc->sc_bssid); if (error != 0) { device_printf(sc->sc_dev, "could not read EEPROM: %s\n", usb2_errstr(error)); } + ZYD_UNLOCK(sc); return (error); } @@ -2286,9 +2301,9 @@ zyd_bulk_read_callback(struct usb2_xfer int8_t nf; int i, rxcount; + rxcount = 0; switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (xfer->actlen < MAX(sizeof(desc), ZYD_MIN_FRAGSZ)) { DPRINTF(sc, ZYD_DEBUG_ANY, "xfer too short, %d bytes\n", xfer->actlen); ifp->if_ierrors++; @@ -2297,7 +2312,7 @@ zyd_bulk_read_callback(struct usb2_xfer usb2_copy_out(xfer->frbuffers, xfer->actlen - sizeof(desc), &desc, sizeof(desc)); - rxcount = offset = 0; + offset = 0; if (UGETW(desc.tag) == ZYD_TAG_MULTIFRAME) { DPRINTF(sc, ZYD_DEBUG_RECV, "%s: received multi-frame transfer\n", __func__); @@ -2347,7 +2362,8 @@ tr_setup: nf = -95; /* XXX */ - ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); + ni = ieee80211_find_rxnode(ic, + mtod(m, struct ieee80211_frame_min *)); if (ni != NULL) { (void)ieee80211_input(ni, m, rssi, nf, 0); ieee80211_free_node(ni); From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 15:40:10 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E6C310656E8; Tue, 27 Jan 2009 15:40:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CF808FC1B; Tue, 27 Jan 2009 15:40:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RFeA9D089881; Tue, 27 Jan 2009 15:40:10 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RFeALk089880; Tue, 27 Jan 2009 15:40:10 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901271540.n0RFeALk089880@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 15:40:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187773 - user/thompsa/usb/sys/dev/usb2/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 15:40:10 -0000 Author: thompsa Date: Tue Jan 27 15:40:09 2009 New Revision: 187773 URL: http://svn.freebsd.org/changeset/base/187773 Log: Exit early if zyd_cmd is passed a read command, dev/usb/if_zyd.c does this. Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c Tue Jan 27 15:34:30 2009 (r187772) +++ user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c Tue Jan 27 15:40:09 2009 (r187773) @@ -817,9 +817,6 @@ zyd_intr_write_callback(struct usb2_xfer switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTF(sc, ZYD_DEBUG_ANY, "length=%d\n", xfer->actlen); - rqp = xfer->priv_fifo; - if ((rqp->flags & ZYD_CMD_FLAG_READ) == 0) - wakeup(rqp->odata); /* wakeup caller */ /* FALLTHROUGH */ case USB_ST_SETUP: @@ -838,6 +835,7 @@ zyd_intr_write_callback(struct usb2_xfer xfer->priv_fifo = rqp; rqp->flags |= ZYD_CMD_FLAG_SENT; usb2_start_hardware(xfer); + break; } break; @@ -894,6 +892,8 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c STAILQ_INSERT_TAIL(&sc->sc_rqh, &rq, rq); usb2_transfer_start(sc->sc_xfer[ZYD_INTR_DT_WR]); + if (!(flags & ZYD_CMD_FLAG_READ)) + return (0); /* write: don't wait for reply */ /* wait at most one second for command reply */ error = mtx_sleep(odata, &sc->sc_mtx, 0 , "zydcmd", hz); if (error) From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 16:09:39 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CB6210656C6; Tue, 27 Jan 2009 16:09:39 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FB588FC14; Tue, 27 Jan 2009 16:09:39 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RG9crO090442; Tue, 27 Jan 2009 16:09:38 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RG9c8b090440; Tue, 27 Jan 2009 16:09:38 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901271609.n0RG9c8b090440@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 16:09:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187774 - user/thompsa/usb/sys/dev/usb2/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 16:09:39 -0000 Author: thompsa Date: Tue Jan 27 16:09:38 2009 New Revision: 187774 URL: http://svn.freebsd.org/changeset/base/187774 Log: Revert r187773. The reason that I had write commands waiting was the data is on the stack, just use a different wait channel. Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c user/thompsa/usb/sys/dev/usb2/wlan/if_zydreg.h Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c Tue Jan 27 15:40:09 2009 (r187773) +++ user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c Tue Jan 27 16:09:38 2009 (r187774) @@ -757,12 +757,7 @@ zyd_intr_read_callback(struct usb2_xfer } if (i != rqp->olen) continue; - - /* copy answer into caller-supplied buffer */ - bcopy(cmd->data, rqp->odata, - sizeof(struct zyd_pair) * rqp->olen); - wakeup(rqp->odata); /* wakeup caller */ - + wakeup(rqp); /* wakeup caller */ return; } return; /* unexpected IORD notification */ @@ -817,6 +812,9 @@ zyd_intr_write_callback(struct usb2_xfer switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTF(sc, ZYD_DEBUG_ANY, "length=%d\n", xfer->actlen); + rqp = xfer->priv_fifo; + if ((rqp->flags & ZYD_CMD_FLAG_READ) == 0) + wakeup(rqp); /* wakeup caller */ /* FALLTHROUGH */ case USB_ST_SETUP: @@ -835,7 +833,6 @@ zyd_intr_write_callback(struct usb2_xfer xfer->priv_fifo = rqp; rqp->flags |= ZYD_CMD_FLAG_SENT; usb2_start_hardware(xfer); - break; } break; @@ -849,7 +846,7 @@ zyd_intr_write_callback(struct usb2_xfer usb2_transfer_start(sc->sc_xfer[ZYD_INTR_CS_WR]); } rqp = xfer->priv_fifo; - wakeup(rqp->odata); /* wakeup caller */ + wakeup(rqp); /* wakeup caller */ break; } } @@ -886,19 +883,17 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c rq.cmd = &cmd; rq.idata = idata; rq.ilen = sizeof(uint16_t) + ilen; - rq.odata = odata; rq.olen = olen / sizeof(struct zyd_pair); rq.flags = flags; STAILQ_INSERT_TAIL(&sc->sc_rqh, &rq, rq); usb2_transfer_start(sc->sc_xfer[ZYD_INTR_DT_WR]); - if (!(flags & ZYD_CMD_FLAG_READ)) - return (0); /* write: don't wait for reply */ /* wait at most one second for command reply */ - error = mtx_sleep(odata, &sc->sc_mtx, 0 , "zydcmd", hz); + error = mtx_sleep(&rq, &sc->sc_mtx, 0 , "zydcmd", hz); if (error) device_printf(sc->sc_dev, "command timeout\n"); STAILQ_REMOVE(&sc->sc_rqh, &rq, zyd_rq, rq); + bcopy(cmd.data, odata, olen); /* copy answer into caller buffer */ return (error); } @@ -3154,7 +3149,7 @@ zyd_wakeup(struct zyd_softc *sc) struct zyd_rq *rqp; STAILQ_FOREACH(rqp, &sc->sc_rqh, rq) - wakeup(rqp->odata); /* wakeup sleeping caller */ + wakeup(rqp); /* wakeup sleeping caller */ } static device_method_t zyd_methods[] = { Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_zydreg.h ============================================================================== --- user/thompsa/usb/sys/dev/usb2/wlan/if_zydreg.h Tue Jan 27 15:40:09 2009 (r187773) +++ user/thompsa/usb/sys/dev/usb2/wlan/if_zydreg.h Tue Jan 27 16:09:38 2009 (r187774) @@ -1231,7 +1231,6 @@ struct zyd_rf { struct zyd_rq { struct zyd_cmd *cmd; const uint16_t *idata; - struct zyd_pair *odata; int ilen; int olen; int flags; From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 16:12:19 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE10A1065675; Tue, 27 Jan 2009 16:12:19 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACACC8FC19; Tue, 27 Jan 2009 16:12:19 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RGCJHM090547; Tue, 27 Jan 2009 16:12:19 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RGCJRn090546; Tue, 27 Jan 2009 16:12:19 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901271612.n0RGCJRn090546@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 16:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187775 - user/thompsa/usb/sys/dev/usb2/wlan X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 16:12:20 -0000 Author: thompsa Date: Tue Jan 27 16:12:19 2009 New Revision: 187775 URL: http://svn.freebsd.org/changeset/base/187775 Log: Break after sending the interrupt data, it needs to be one xfer at a time. Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c Modified: user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c Tue Jan 27 16:09:38 2009 (r187774) +++ user/thompsa/usb/sys/dev/usb2/wlan/if_zyd2.c Tue Jan 27 16:12:19 2009 (r187775) @@ -833,6 +833,7 @@ zyd_intr_write_callback(struct usb2_xfer xfer->priv_fifo = rqp; rqp->flags |= ZYD_CMD_FLAG_SENT; usb2_start_hardware(xfer); + break; } break; From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 16:27:33 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B70C21065688; Tue, 27 Jan 2009 16:27:33 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3C568FC08; Tue, 27 Jan 2009 16:27:33 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RGRXbo091008; Tue, 27 Jan 2009 16:27:33 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RGRVxK090966; Tue, 27 Jan 2009 16:27:31 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901271627.n0RGRVxK090966@svn.freebsd.org> From: Andrew Thompson Date: Tue, 27 Jan 2009 16:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187777 - in user/thompsa/usb/sys/dev/usb2: bluetooth controller core ethernet input misc serial sound storage X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 16:27:34 -0000 Author: thompsa Date: Tue Jan 27 16:27:31 2009 New Revision: 187777 URL: http://svn.freebsd.org/changeset/base/187777 Log: Remove check of null softc in attach routines; it can never happen Modified: user/thompsa/usb/sys/dev/usb2/bluetooth/ubtbcmfw2.c user/thompsa/usb/sys/dev/usb2/controller/at91dci_atmelarm.c user/thompsa/usb/sys/dev/usb2/controller/ehci2_pci.c user/thompsa/usb/sys/dev/usb2/controller/musb2_otg_atmelarm.c user/thompsa/usb/sys/dev/usb2/controller/ohci2_atmelarm.c user/thompsa/usb/sys/dev/usb2/controller/ohci2_pci.c user/thompsa/usb/sys/dev/usb2/controller/uhci2_pci.c user/thompsa/usb/sys/dev/usb2/controller/uss820dci_atmelarm.c user/thompsa/usb/sys/dev/usb2/core/usb2_compat_linux.c user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c user/thompsa/usb/sys/dev/usb2/input/uhid2.c user/thompsa/usb/sys/dev/usb2/input/ukbd2.c user/thompsa/usb/sys/dev/usb2/misc/udbp2.c user/thompsa/usb/sys/dev/usb2/misc/ufm2.c user/thompsa/usb/sys/dev/usb2/serial/u3g2.c user/thompsa/usb/sys/dev/usb2/serial/uark2.c user/thompsa/usb/sys/dev/usb2/serial/ubsa2.c user/thompsa/usb/sys/dev/usb2/serial/ubser2.c user/thompsa/usb/sys/dev/usb2/serial/uchcom2.c user/thompsa/usb/sys/dev/usb2/serial/ucycom2.c user/thompsa/usb/sys/dev/usb2/serial/ufoma2.c user/thompsa/usb/sys/dev/usb2/serial/uftdi2.c user/thompsa/usb/sys/dev/usb2/serial/ugensa2.c user/thompsa/usb/sys/dev/usb2/serial/uipaq2.c user/thompsa/usb/sys/dev/usb2/serial/umct2.c user/thompsa/usb/sys/dev/usb2/serial/umodem2.c user/thompsa/usb/sys/dev/usb2/serial/umoscom2.c user/thompsa/usb/sys/dev/usb2/serial/uplcom2.c user/thompsa/usb/sys/dev/usb2/serial/uvisor2.c user/thompsa/usb/sys/dev/usb2/serial/uvscom2.c user/thompsa/usb/sys/dev/usb2/sound/uaudio2.c user/thompsa/usb/sys/dev/usb2/storage/ata-usb2.c user/thompsa/usb/sys/dev/usb2/storage/umass2.c user/thompsa/usb/sys/dev/usb2/storage/urio2.c user/thompsa/usb/sys/dev/usb2/storage/ustorage2_fs.c Modified: user/thompsa/usb/sys/dev/usb2/bluetooth/ubtbcmfw2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/bluetooth/ubtbcmfw2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/bluetooth/ubtbcmfw2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -216,9 +216,6 @@ ubtbcmfw_attach(device_t dev) int32_t err; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_dev = dev; sc->sc_udev = uaa->device; Modified: user/thompsa/usb/sys/dev/usb2/controller/at91dci_atmelarm.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/controller/at91dci_atmelarm.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/controller/at91dci_atmelarm.c Tue Jan 27 16:27:31 2009 (r187777) @@ -131,9 +131,6 @@ at91_udp_attach(device_t dev) int err; int rid; - if (sc == NULL) { - return (ENXIO); - } /* setup AT9100 USB device controller interface softc */ sc->sc_dci.sc_clocks_on = &at91_udp_clocks_on; Modified: user/thompsa/usb/sys/dev/usb2/controller/ehci2_pci.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/controller/ehci2_pci.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/controller/ehci2_pci.c Tue Jan 27 16:27:31 2009 (r187777) @@ -227,10 +227,6 @@ ehci_pci_attach(device_t self) int err; int rid; - if (sc == NULL) { - device_printf(self, "Could not allocate sc\n"); - return (ENXIO); - } /* initialise some bus fields */ sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; Modified: user/thompsa/usb/sys/dev/usb2/controller/musb2_otg_atmelarm.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/controller/musb2_otg_atmelarm.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/controller/musb2_otg_atmelarm.c Tue Jan 27 16:27:31 2009 (r187777) @@ -90,11 +90,7 @@ musbotg_attach(device_t dev) int err; int rid; - if (sc == NULL) { - return (ENXIO); - } /* setup MUSB OTG USB controller interface softc */ - sc->sc_otg.sc_clocks_on = &musbotg_clocks_on; sc->sc_otg.sc_clocks_off = &musbotg_clocks_off; sc->sc_otg.sc_clocks_arg = sc; Modified: user/thompsa/usb/sys/dev/usb2/controller/ohci2_atmelarm.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/controller/ohci2_atmelarm.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/controller/ohci2_atmelarm.c Tue Jan 27 16:27:31 2009 (r187777) @@ -69,9 +69,6 @@ ohci_atmelarm_attach(device_t dev) int err; int rid; - if (sc == NULL) { - return (ENXIO); - } /* initialise some bus fields */ sc->sc_ohci.sc_bus.parent = dev; sc->sc_ohci.sc_bus.devices = sc->sc_ohci.sc_devices; Modified: user/thompsa/usb/sys/dev/usb2/controller/ohci2_pci.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/controller/ohci2_pci.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/controller/ohci2_pci.c Tue Jan 27 16:27:31 2009 (r187777) @@ -195,10 +195,6 @@ ohci_pci_attach(device_t self) int rid; int err; - if (sc == NULL) { - device_printf(self, "Could not allocate sc\n"); - return (ENXIO); - } /* initialise some bus fields */ sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; Modified: user/thompsa/usb/sys/dev/usb2/controller/uhci2_pci.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/controller/uhci2_pci.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/controller/uhci2_pci.c Tue Jan 27 16:27:31 2009 (r187777) @@ -246,10 +246,6 @@ uhci_pci_attach(device_t self) int rid; int err; - if (sc == NULL) { - device_printf(self, "Could not allocate sc\n"); - return (ENXIO); - } /* initialise some bus fields */ sc->sc_bus.parent = self; sc->sc_bus.devices = sc->sc_devices; Modified: user/thompsa/usb/sys/dev/usb2/controller/uss820dci_atmelarm.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/controller/uss820dci_atmelarm.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/controller/uss820dci_atmelarm.c Tue Jan 27 16:27:31 2009 (r187777) @@ -134,10 +134,6 @@ uss820_atmelarm_attach(device_t dev) int err; int rid; - if (sc == NULL) { - return (ENXIO); - } - /* initialise some bus fields */ sc->sc_bus.parent = dev; sc->sc_bus.devices = sc->sc_devices; Modified: user/thompsa/usb/sys/dev/usb2/core/usb2_compat_linux.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/core/usb2_compat_linux.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/core/usb2_compat_linux.c Tue Jan 27 16:27:31 2009 (r187777) @@ -246,9 +246,6 @@ usb_linux_attach(device_t dev) struct usb_device *p_dev; const struct usb_device_id *id = NULL; - if (sc == NULL) { - return (ENOMEM); - } mtx_lock(&Giant); LIST_FOREACH(udrv, &usb_linux_driver_list, linux_driver_list) { id = usb_linux_lookup_id(udrv->id_table, uaa); Modified: user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c Tue Jan 27 16:27:31 2009 (r187777) @@ -649,9 +649,6 @@ uhub_attach(device_t dev) uint8_t iface_index; usb2_error_t err; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = udev; sc->sc_dev = dev; Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -697,9 +697,6 @@ aue_attach(device_t dev) uint8_t iface_index; int error; - if (sc == NULL) - return (ENOMEM); - sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_flags = USB_GET_DRIVER_INFO(uaa); Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -666,9 +666,6 @@ axe_attach(device_t dev) uint8_t iface_index; int error; - if (sc == NULL) - return (ENOMEM); - sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_flags = USB_GET_DRIVER_INFO(uaa); Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -228,9 +228,6 @@ cdce_attach(device_t dev) uint8_t eaddr[ETHER_ADDR_LEN]; char eaddr_str[5 * ETHER_ADDR_LEN]; /* approx */ - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_flags = USB_GET_DRIVER_INFO(uaa); Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -419,9 +419,6 @@ cue_attach(device_t dev) uint8_t iface_index; int error; - if (sc == NULL) - return (ENOMEM); - sc->sc_udev = uaa->device; sc->sc_dev = dev; Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -467,9 +467,6 @@ kue_attach(device_t dev) uint8_t iface_index; int error; - if (sc == NULL) - return (ENOMEM); - sc->sc_udev = uaa->device; sc->sc_dev = dev; Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -628,9 +628,6 @@ rue_attach(device_t dev) uint8_t iface_index; int error; - if (sc == NULL) - return (ENOMEM); - sc->sc_udev = uaa->device; sc->sc_dev = dev; Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -255,9 +255,6 @@ udav_attach(device_t dev) uint8_t iface_index; int error; - if (sc == NULL) - return (ENOMEM); - sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_flags = USB_GET_DRIVER_INFO(uaa); Modified: user/thompsa/usb/sys/dev/usb2/input/uhid2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/input/uhid2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/input/uhid2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -660,9 +660,6 @@ uhid_attach(device_t dev) DPRINTFN(10, "sc=%p\n", sc); - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); mtx_init(&sc->sc_mtx, "uhid lock", NULL, MTX_DEF | MTX_RECURSE); Modified: user/thompsa/usb/sys/dev/usb2/input/ukbd2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/input/ukbd2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/input/ukbd2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -625,9 +625,6 @@ ukbd_attach(device_t dev) usb2_error_t err; uint16_t n; - if (sc == NULL) { - return (ENOMEM); - } mtx_assert(&Giant, MA_OWNED); kbd_init_struct(kbd, UKBD_DRIVER_NAME, KB_OTHER, unit, 0, 0, 0); Modified: user/thompsa/usb/sys/dev/usb2/misc/udbp2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/misc/udbp2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/misc/udbp2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -320,9 +320,6 @@ udbp_attach(device_t dev) struct udbp_softc *sc = device_get_softc(dev); int error; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); snprintf(sc->sc_name, sizeof(sc->sc_name), Modified: user/thompsa/usb/sys/dev/usb2/misc/ufm2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/misc/ufm2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/misc/ufm2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -130,9 +130,6 @@ ufm_attach(device_t dev) struct ufm_softc *sc = device_get_softc(dev); int error; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_unit = device_get_unit(dev); Modified: user/thompsa/usb/sys/dev/usb2/serial/u3g2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/u3g2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/u3g2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -388,9 +388,6 @@ u3g_attach(device_t dev) DPRINTF("sc=%p\n", sc); - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; Modified: user/thompsa/usb/sys/dev/usb2/serial/uark2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uark2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/uark2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -209,9 +209,6 @@ uark_attach(device_t dev) int32_t error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; Modified: user/thompsa/usb/sys/dev/usb2/serial/ubsa2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/ubsa2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/ubsa2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -329,9 +329,6 @@ ubsa_attach(device_t dev) DPRINTF("sc=%p\n", sc); - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; Modified: user/thompsa/usb/sys/dev/usb2/serial/ubser2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/ubser2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/ubser2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -256,9 +256,6 @@ ubser_attach(device_t dev) uint8_t n; int error; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); snprintf(sc->sc_name, sizeof(sc->sc_name), "%s", Modified: user/thompsa/usb/sys/dev/usb2/serial/uchcom2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uchcom2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/uchcom2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -342,9 +342,6 @@ uchcom_attach(device_t dev) DPRINTFN(11, "\n"); - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; Modified: user/thompsa/usb/sys/dev/usb2/serial/ucycom2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/ucycom2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/ucycom2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -216,9 +216,6 @@ ucycom_attach(device_t dev) uint16_t urd_len; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; device_set_usb2_desc(dev); Modified: user/thompsa/usb/sys/dev/usb2/serial/ufoma2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/ufoma2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/ufoma2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -407,9 +407,6 @@ ufoma_attach(device_t dev) uint8_t elements; int32_t error; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); Modified: user/thompsa/usb/sys/dev/usb2/serial/uftdi2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uftdi2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/uftdi2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -286,9 +286,6 @@ uftdi_attach(device_t dev) struct uftdi_softc *sc = device_get_softc(dev); int error; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_dev = dev; sc->sc_unit = device_get_unit(dev); Modified: user/thompsa/usb/sys/dev/usb2/serial/ugensa2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/ugensa2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/ugensa2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -215,9 +215,6 @@ ugensa_attach(device_t dev) uint8_t iface_index; int x, cnt; - if (sc == NULL) - return (ENOMEM); - device_set_usb2_desc(dev); mtx_init(&sc->sc_mtx, "ugensa", NULL, MTX_DEF); Modified: user/thompsa/usb/sys/dev/usb2/serial/uipaq2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uipaq2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/uipaq2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -1129,9 +1129,6 @@ uipaq_attach(device_t dev) uint8_t iface_index; uint8_t i; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; device_set_usb2_desc(dev); Modified: user/thompsa/usb/sys/dev/usb2/serial/umct2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/umct2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/umct2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -273,9 +273,6 @@ umct_attach(device_t dev) uint16_t maxp; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_unit = device_get_unit(dev); Modified: user/thompsa/usb/sys/dev/usb2/serial/umodem2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/umodem2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/umodem2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -322,9 +322,6 @@ umodem_attach(device_t dev) uint8_t i; int error; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_ctrl_iface_no = uaa->info.bIfaceNum; Modified: user/thompsa/usb/sys/dev/usb2/serial/umoscom2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/umoscom2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/umoscom2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -335,9 +335,6 @@ umoscom_attach(device_t dev) int error; uint8_t iface_index; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_udev = uaa->device; sc->sc_mcr = 0x08; /* enable interrupts */ Modified: user/thompsa/usb/sys/dev/usb2/serial/uplcom2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uplcom2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/uplcom2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -371,9 +371,6 @@ uplcom_attach(device_t dev) DPRINTFN(11, "\n"); - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); DPRINTF("sc = %p\n", sc); Modified: user/thompsa/usb/sys/dev/usb2/serial/uvisor2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uvisor2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/uvisor2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -321,9 +321,6 @@ uvisor_attach(device_t dev) DPRINTF("sc=%p\n", sc); bcopy(uvisor_config, uvisor_config_copy, sizeof(uvisor_config_copy)); - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; Modified: user/thompsa/usb/sys/dev/usb2/serial/uvscom2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/serial/uvscom2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/serial/uvscom2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -315,9 +315,6 @@ uvscom_attach(device_t dev) struct uvscom_softc *sc = device_get_softc(dev); int error; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; Modified: user/thompsa/usb/sys/dev/usb2/sound/uaudio2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/sound/uaudio2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/sound/uaudio2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -562,9 +562,6 @@ uaudio_attach(device_t dev) struct usb2_interface_descriptor *id; device_t child; - if (sc == NULL) { - return (ENOMEM); - } sc->sc_play_chan.priv_sc = sc; sc->sc_rec_chan.priv_sc = sc; sc->sc_udev = uaa->device; Modified: user/thompsa/usb/sys/dev/usb2/storage/ata-usb2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/storage/ata-usb2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/storage/ata-usb2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -328,9 +328,6 @@ atausb2_attach(device_t dev) uint8_t has_intr; int err; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->dev = dev; Modified: user/thompsa/usb/sys/dev/usb2/storage/umass2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/storage/umass2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/storage/umass2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -1440,9 +1440,6 @@ umass_attach(device_t dev) struct usb2_interface_descriptor *id; int32_t err; - if (sc == NULL) { - return (ENOMEM); - } if (device_get_unit(dev) >= UMASS_MAXUNIT) { device_printf(dev, "Maxunit(%u) limit reached!\n", UMASS_MAXUNIT); Modified: user/thompsa/usb/sys/dev/usb2/storage/urio2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/storage/urio2.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/storage/urio2.c Tue Jan 27 16:27:31 2009 (r187777) @@ -212,9 +212,6 @@ urio_attach(device_t dev) struct urio_softc *sc = device_get_softc(dev); int error; - if (sc == NULL) { - return (ENOMEM); - } device_set_usb2_desc(dev); sc->sc_udev = uaa->device; Modified: user/thompsa/usb/sys/dev/usb2/storage/ustorage2_fs.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/storage/ustorage2_fs.c Tue Jan 27 16:25:45 2009 (r187776) +++ user/thompsa/usb/sys/dev/usb2/storage/ustorage2_fs.c Tue Jan 27 16:27:31 2009 (r187777) @@ -318,9 +318,6 @@ ustorage_fs_attach(device_t dev) struct usb2_interface_descriptor *id; int err; - if (sc == NULL) { - return (ENOMEM); - } /* * NOTE: the softc struct is bzero-ed in device_set_driver. * We can safely call ustorage_fs_detach without specifically From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 19:17:59 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E592D1065673; Tue, 27 Jan 2009 19:17:59 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D3F578FC12; Tue, 27 Jan 2009 19:17:59 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RJHxfa094210; Tue, 27 Jan 2009 19:17:59 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RJHx4j094209; Tue, 27 Jan 2009 19:17:59 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901271917.n0RJHx4j094209@svn.freebsd.org> From: Sam Leffler Date: Tue, 27 Jan 2009 19:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187778 - user/sam/wifi/sbin/ifconfig X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 19:18:00 -0000 Author: sam Date: Tue Jan 27 19:17:59 2009 New Revision: 187778 URL: http://svn.freebsd.org/changeset/base/187778 Log: Really fix 1/2 and 1/4 width channel handling: o only include 1/2 and 1/4 width channels when they are specified in the regulatory database description; previously we treated them as if they were part of the band and blindly added them for 11a/g o check the channel list returned in the devcaps to identify whether a device supports 1/2 or 1/4 width channels on a band; this might be better brought out as a capability bit to avoid filling the channel list w/ 1/2 and 1/4 width channels but then cards that only support these channels in a range of frequencies could not be described (though right now we don't check frequency range only band) While here bring back private def of IEEE80211_C_BITS; we don't want to include ieee80211_var.h which was where it was placed. Modified: user/sam/wifi/sbin/ifconfig/ifieee80211.c Modified: user/sam/wifi/sbin/ifconfig/ifieee80211.c ============================================================================== --- user/sam/wifi/sbin/ifconfig/ifieee80211.c Tue Jan 27 16:27:31 2009 (r187777) +++ user/sam/wifi/sbin/ifconfig/ifieee80211.c Tue Jan 27 19:17:59 2009 (r187778) @@ -120,6 +120,13 @@ #define IEEE80211_NODE_RIFS 0x4000 /* RIFS enabled */ #endif +/* NB: defined in ieee80211_var.h but we don't want to include that */ +#define IEEE80211_C_BITS \ + "\20\1STA\7FF\10TURBOP\11IBSS\12PMGT" \ + "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \ + "\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ + "\37TXFRAG\40TDMA" + #define MAXCHAN 1536 /* max 1.5K channels */ #define MAXCOL 78 @@ -1765,6 +1772,19 @@ chanlookup(const struct ieee80211_channe return NULL; } +static int +chanfind(const struct ieee80211_channel chans[], int nchans, int flags) +{ + int i; + + for (i = 0; i < nchans; i++) { + const struct ieee80211_channel *c = &chans[i]; + if ((c->ic_flags & flags) == flags) + return 1; + } + return 0; +} + static void regdomain_addchans(struct ieee80211req_chaninfo *ci, const netband_head *bands, @@ -1775,9 +1795,15 @@ regdomain_addchans(struct ieee80211req_c const struct netband *nb; const struct freqband *b; struct ieee80211_channel *c, *prev; - int freq, channelSep; + int freq, channelSep, hasHalfChans, hasQuarterChans; channelSep = (chanFlags & IEEE80211_CHAN_2GHZ) ? 0 : 40; + hasHalfChans = chanfind(avail->ic_chans, avail->ic_nchans, + IEEE80211_CHAN_HALF | + (chanFlags & (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ))); + hasQuarterChans = chanfind(avail->ic_chans, avail->ic_nchans, + IEEE80211_CHAN_QUARTER | + (chanFlags & (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ))); LIST_FOREACH(nb, bands, next) { b = nb->band; if (verbose) { @@ -1808,8 +1834,7 @@ regdomain_addchans(struct ieee80211req_c } continue; } - if ((flags & IEEE80211_CHAN_HALF) && - (chanFlags & IEEE80211_CHAN_HALF) == 0) { + if ((flags & IEEE80211_CHAN_HALF) && !hasHalfChans) { if (verbose) printf("%u: skip, device does not " "support half-rate channel\n", @@ -1817,7 +1842,7 @@ regdomain_addchans(struct ieee80211req_c continue; } if ((flags & IEEE80211_CHAN_QUARTER) && - (chanFlags & IEEE80211_CHAN_QUARTER) == 0) { + !hasQuarterChans) { if (verbose) printf("%u: skip, device does not " "support quarter-rate channel\n", @@ -1925,26 +1950,12 @@ regdomain_makechannels( if (!LIST_EMPTY(&rd->bands_11b)) regdomain_addchans(ci, &rd->bands_11b, reg, IEEE80211_CHAN_B, &dc->dc_chaninfo); - if (!LIST_EMPTY(&rd->bands_11g)) { + if (!LIST_EMPTY(&rd->bands_11g)) regdomain_addchans(ci, &rd->bands_11g, reg, IEEE80211_CHAN_G, &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11g, reg, - IEEE80211_CHAN_G | IEEE80211_CHAN_HALF, - &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11g, reg, - IEEE80211_CHAN_G | IEEE80211_CHAN_QUARTER, - &dc->dc_chaninfo); - } - if (!LIST_EMPTY(&rd->bands_11a)) { + if (!LIST_EMPTY(&rd->bands_11a)) regdomain_addchans(ci, &rd->bands_11a, reg, IEEE80211_CHAN_A, &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11a, reg, - IEEE80211_CHAN_A | IEEE80211_CHAN_HALF, - &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11a, reg, - IEEE80211_CHAN_A | IEEE80211_CHAN_QUARTER, - &dc->dc_chaninfo); - } if (!LIST_EMPTY(&rd->bands_11na)) { regdomain_addchans(ci, &rd->bands_11na, reg, IEEE80211_CHAN_A | IEEE80211_CHAN_HT20, From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 19:25:00 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E31CA10656DF; Tue, 27 Jan 2009 19:25:00 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B5FA28FC18; Tue, 27 Jan 2009 19:25:00 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RJP0VY094392; Tue, 27 Jan 2009 19:25:00 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RJP0n7094391; Tue, 27 Jan 2009 19:25:00 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901271925.n0RJP0n7094391@svn.freebsd.org> From: Sam Leffler Date: Tue, 27 Jan 2009 19:25:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187779 - user/sam/wifi/tools/tools/ath/athrd X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 19:25:02 -0000 Author: sam Date: Tue Jan 27 19:25:00 2009 New Revision: 187779 URL: http://svn.freebsd.org/changeset/base/187779 Log: merge from head Added: user/sam/wifi/tools/tools/ath/athrd/ - copied from r187322, head/tools/tools/ath/athrd/ From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 19:56:39 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 278F9106564A; Tue, 27 Jan 2009 19:56:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1664E8FC18; Tue, 27 Jan 2009 19:56:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RJucr1095023; Tue, 27 Jan 2009 19:56:38 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RJucdS095022; Tue, 27 Jan 2009 19:56:38 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901271956.n0RJucdS095022@svn.freebsd.org> From: Sam Leffler Date: Tue, 27 Jan 2009 19:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187781 - user/sam/wifi/sys/net80211 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 19:56:39 -0000 Author: sam Date: Tue Jan 27 19:56:38 2009 New Revision: 187781 URL: http://svn.freebsd.org/changeset/base/187781 Log: make CTRY_DEBUG and CTRY_DEFAULT public Modified: user/sam/wifi/sys/net80211/ieee80211_regdomain.h Modified: user/sam/wifi/sys/net80211/ieee80211_regdomain.h ============================================================================== --- user/sam/wifi/sys/net80211/ieee80211_regdomain.h Tue Jan 27 19:37:30 2009 (r187780) +++ user/sam/wifi/sys/net80211/ieee80211_regdomain.h Tue Jan 27 19:56:38 2009 (r187781) @@ -206,6 +206,9 @@ enum ISOCountryCode { CTRY_ZIMBABWE = 716, /* Zimbabwe */ /* NB: from here down not listed in 3166; they come from Atheros */ + CTRY_DEBUG = 0x1ff, /* debug */ + CTRY_DEFAULT = 0, /* default */ + CTRY_UNITED_STATES_FCC49 = 842, /* United States (Public Safety)*/ CTRY_KOREA_ROC3 = 412, /* South Korea */ @@ -258,9 +261,6 @@ enum RegdomainCode { }; #if defined(__KERNEL__) || defined(_KERNEL) -#define CTRY_DEBUG 0x1ff /* debug */ -#define CTRY_DEFAULT 0 /* default */ - struct ieee80211com; void ieee80211_regdomain_attach(struct ieee80211com *); void ieee80211_regdomain_detach(struct ieee80211com *); From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 20:16:40 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54298106566B; Tue, 27 Jan 2009 20:16:40 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40AE28FC12; Tue, 27 Jan 2009 20:16:40 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RKGeGu095553; Tue, 27 Jan 2009 20:16:40 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RKGeuH095552; Tue, 27 Jan 2009 20:16:40 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901272016.n0RKGeuH095552@svn.freebsd.org> From: Sam Leffler Date: Tue, 27 Jan 2009 20:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187783 - user/sam/wifi/tools/tools/ath/athrd X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 20:16:40 -0000 Author: sam Date: Tue Jan 27 20:16:40 2009 New Revision: 187783 URL: http://svn.freebsd.org/changeset/base/187783 Log: update for hal changes; remove 11n mode by default as we don't calculate txpower properly Modified: user/sam/wifi/tools/tools/ath/athrd/athrd.c Modified: user/sam/wifi/tools/tools/ath/athrd/athrd.c ============================================================================== --- user/sam/wifi/tools/tools/ath/athrd/athrd.c Tue Jan 27 20:13:24 2009 (r187782) +++ user/sam/wifi/tools/tools/ath/athrd/athrd.c Tue Jan 27 20:16:40 2009 (r187783) @@ -31,6 +31,10 @@ #include "opt_ah.h" #include "ah.h" + +#include +#include + #include "ah_internal.h" #include "ah_eeprom_v3.h" /* XXX */ @@ -40,13 +44,9 @@ #include #include -#define IEEE80211_CHAN_MAX 255 -#define IEEE80211_REGCLASSIDS_MAX 10 - int ath_hal_debug = 0; HAL_CTRY_CODE cc = CTRY_DEFAULT; HAL_REG_DOMAIN rd = 169; /* FCC */ -HAL_BOOL outdoor = AH_TRUE; HAL_BOOL Amode = 1; HAL_BOOL Bmode = 1; HAL_BOOL Gmode = 1; @@ -169,12 +169,12 @@ getChannelEdges(struct ath_hal *ah, u_in struct ath_hal_private *ahp = AH_PRIVATE(ah); HAL_CAPABILITIES *pCap = &ahp->ah_caps; - if (flags & CHANNEL_5GHZ) { + if (flags & IEEE80211_CHAN_5GHZ) { *low = pCap->halLow5GhzChan; *high = pCap->halHigh5GhzChan; return AH_TRUE; } - if (flags & CHANNEL_2GHZ) { + if (flags & IEEE80211_CHAN_2GHZ) { *low = pCap->halLow2GhzChan; *high = pCap->halHigh2GhzChan; return AH_TRUE; @@ -208,158 +208,6 @@ getWirelessModes(struct ath_hal *ah) return mode; } -/* - * Country/Region Codes from MS WINNLS.H - * Numbering from ISO 3166 - */ -enum CountryCode { - CTRY_ALBANIA = 8, /* Albania */ - CTRY_ALGERIA = 12, /* Algeria */ - CTRY_ARGENTINA = 32, /* Argentina */ - CTRY_ARMENIA = 51, /* Armenia */ - CTRY_AUSTRALIA = 36, /* Australia */ - CTRY_AUSTRIA = 40, /* Austria */ - CTRY_AZERBAIJAN = 31, /* Azerbaijan */ - CTRY_BAHRAIN = 48, /* Bahrain */ - CTRY_BELARUS = 112, /* Belarus */ - CTRY_BELGIUM = 56, /* Belgium */ - CTRY_BELIZE = 84, /* Belize */ - CTRY_BOLIVIA = 68, /* Bolivia */ - CTRY_BRAZIL = 76, /* Brazil */ - CTRY_BRUNEI_DARUSSALAM = 96, /* Brunei Darussalam */ - CTRY_BULGARIA = 100, /* Bulgaria */ - CTRY_CANADA = 124, /* Canada */ - CTRY_CHILE = 152, /* Chile */ - CTRY_CHINA = 156, /* People's Republic of China */ - CTRY_COLOMBIA = 170, /* Colombia */ - CTRY_COSTA_RICA = 188, /* Costa Rica */ - CTRY_CROATIA = 191, /* Croatia */ - CTRY_CYPRUS = 196, - CTRY_CZECH = 203, /* Czech Republic */ - CTRY_DENMARK = 208, /* Denmark */ - CTRY_DOMINICAN_REPUBLIC = 214, /* Dominican Republic */ - CTRY_ECUADOR = 218, /* Ecuador */ - CTRY_EGYPT = 818, /* Egypt */ - CTRY_EL_SALVADOR = 222, /* El Salvador */ - CTRY_ESTONIA = 233, /* Estonia */ - CTRY_FAEROE_ISLANDS = 234, /* Faeroe Islands */ - CTRY_FINLAND = 246, /* Finland */ - CTRY_FRANCE = 250, /* France */ - CTRY_FRANCE2 = 255, /* France2 */ - CTRY_GEORGIA = 268, /* Georgia */ - CTRY_GERMANY = 276, /* Germany */ - CTRY_GREECE = 300, /* Greece */ - CTRY_GSM = 843, /* 900MHz/GSM */ - CTRY_GUATEMALA = 320, /* Guatemala */ - CTRY_HONDURAS = 340, /* Honduras */ - CTRY_HONG_KONG = 344, /* Hong Kong S.A.R., P.R.C. */ - CTRY_HUNGARY = 348, /* Hungary */ - CTRY_ICELAND = 352, /* Iceland */ - CTRY_INDIA = 356, /* India */ - CTRY_INDONESIA = 360, /* Indonesia */ - CTRY_IRAN = 364, /* Iran */ - CTRY_IRAQ = 368, /* Iraq */ - CTRY_IRELAND = 372, /* Ireland */ - CTRY_ISRAEL = 376, /* Israel */ - CTRY_ITALY = 380, /* Italy */ - CTRY_JAMAICA = 388, /* Jamaica */ - CTRY_JAPAN = 392, /* Japan */ - CTRY_JAPAN1 = 393, /* Japan (JP1) */ - CTRY_JAPAN2 = 394, /* Japan (JP0) */ - CTRY_JAPAN3 = 395, /* Japan (JP1-1) */ - CTRY_JAPAN4 = 396, /* Japan (JE1) */ - CTRY_JAPAN5 = 397, /* Japan (JE2) */ - CTRY_JAPAN6 = 399, /* Japan (JP6) */ - - CTRY_JAPAN7 = 4007, /* Japan (J7) */ - CTRY_JAPAN8 = 4008, /* Japan (J8) */ - CTRY_JAPAN9 = 4009, /* Japan (J9) */ - - CTRY_JAPAN10 = 4010, /* Japan (J10) */ - CTRY_JAPAN11 = 4011, /* Japan (J11) */ - CTRY_JAPAN12 = 4012, /* Japan (J12) */ - - CTRY_JAPAN13 = 4013, /* Japan (J13) */ - CTRY_JAPAN14 = 4014, /* Japan (J14) */ - CTRY_JAPAN15 = 4015, /* Japan (J15) */ - - CTRY_JAPAN16 = 4016, /* Japan (J16) */ - CTRY_JAPAN17 = 4017, /* Japan (J17) */ - CTRY_JAPAN18 = 4018, /* Japan (J18) */ - - CTRY_JAPAN19 = 4019, /* Japan (J19) */ - CTRY_JAPAN20 = 4020, /* Japan (J20) */ - CTRY_JAPAN21 = 4021, /* Japan (J21) */ - - CTRY_JAPAN22 = 4022, /* Japan (J22) */ - CTRY_JAPAN23 = 4023, /* Japan (J23) */ - CTRY_JAPAN24 = 4024, /* Japan (J24) */ - - CTRY_JORDAN = 400, /* Jordan */ - CTRY_KAZAKHSTAN = 398, /* Kazakhstan */ - CTRY_KENYA = 404, /* Kenya */ - CTRY_KOREA_NORTH = 408, /* North Korea */ - CTRY_KOREA_ROC = 410, /* South Korea */ - CTRY_KOREA_ROC2 = 411, /* South Korea */ - CTRY_KOREA_ROC3 = 412, /* South Korea */ - CTRY_KUWAIT = 414, /* Kuwait */ - CTRY_LATVIA = 428, /* Latvia */ - CTRY_LEBANON = 422, /* Lebanon */ - CTRY_LIBYA = 434, /* Libya */ - CTRY_LIECHTENSTEIN = 438, /* Liechtenstein */ - CTRY_LITHUANIA = 440, /* Lithuania */ - CTRY_LUXEMBOURG = 442, /* Luxembourg */ - CTRY_MACAU = 446, /* Macau */ - CTRY_MACEDONIA = 807, /* the Former Yugoslav Republic of Macedonia */ - CTRY_MALAYSIA = 458, /* Malaysia */ - CTRY_MALTA = 470, /* Malta */ - CTRY_MEXICO = 484, /* Mexico */ - CTRY_MONACO = 492, /* Principality of Monaco */ - CTRY_MOROCCO = 504, /* Morocco */ - CTRY_NETHERLANDS = 528, /* Netherlands */ - CTRY_NEW_ZEALAND = 554, /* New Zealand */ - CTRY_NICARAGUA = 558, /* Nicaragua */ - CTRY_NORWAY = 578, /* Norway */ - CTRY_OMAN = 512, /* Oman */ - CTRY_PAKISTAN = 586, /* Islamic Republic of Pakistan */ - CTRY_PANAMA = 591, /* Panama */ - CTRY_PARAGUAY = 600, /* Paraguay */ - CTRY_PERU = 604, /* Peru */ - CTRY_PHILIPPINES = 608, /* Republic of the Philippines */ - CTRY_POLAND = 616, /* Poland */ - CTRY_PORTUGAL = 620, /* Portugal */ - CTRY_PUERTO_RICO = 630, /* Puerto Rico */ - CTRY_QATAR = 634, /* Qatar */ - CTRY_ROMANIA = 642, /* Romania */ - CTRY_RUSSIA = 643, /* Russia */ - CTRY_SAUDI_ARABIA = 682, /* Saudi Arabia */ - CTRY_SINGAPORE = 702, /* Singapore */ - CTRY_SLOVAKIA = 703, /* Slovak Republic */ - CTRY_SLOVENIA = 705, /* Slovenia */ - CTRY_SOUTH_AFRICA = 710, /* South Africa */ - CTRY_SPAIN = 724, /* Spain */ - CTRY_SWEDEN = 752, /* Sweden */ - CTRY_SWITZERLAND = 756, /* Switzerland */ - CTRY_SYRIA = 760, /* Syria */ - CTRY_TAIWAN = 158, /* Taiwan */ - CTRY_THAILAND = 764, /* Thailand */ - CTRY_TRINIDAD_Y_TOBAGO = 780, /* Trinidad y Tobago */ - CTRY_TUNISIA = 788, /* Tunisia */ - CTRY_TURKEY = 792, /* Turkey */ - CTRY_UAE = 784, /* U.A.E. */ - CTRY_UKRAINE = 804, /* Ukraine */ - CTRY_UNITED_KINGDOM = 826, /* United Kingdom */ - CTRY_UNITED_STATES = 840, /* United States */ - CTRY_UNITED_STATES_FCC49 = 842, /* United States (Public Safety)*/ - CTRY_URUGUAY = 858, /* Uruguay */ - CTRY_UZBEKISTAN = 860, /* Uzbekistan */ - CTRY_VENEZUELA = 862, /* Venezuela */ - CTRY_VIET_NAM = 704, /* Viet Nam */ - CTRY_YEMEN = 887, /* Yemen */ - CTRY_ZIMBABWE = 716 /* Zimbabwe */ -}; - - /* Enumerated Regulatory Domain Information 8 bit values indicate that * the regdomain is really a pair of unitary regdomains. 12 bit values * are the real unitary regdomains and are the only ones which have the @@ -381,7 +229,6 @@ enum EnumRd { NULL1_WORLD = 0x03, /* For 11b-only countries (no 11a allowed) */ NULL1_ETSIB = 0x07, /* Israel */ NULL1_ETSIC = 0x08, - NULL1_GSM = 0x09, /* GSM-only operation */ FCC1_FCCA = 0x10, /* USA */ FCC1_WORLD = 0x11, /* Hong Kong */ FCC4_FCCA = 0x12, /* USA - Public Safety */ @@ -531,7 +378,6 @@ enum EnumRd { NULL1 = 0x0198, WORLD = 0x0199, - GSM = 0x019a, DEBUG_REG_DMN = 0x01ff, }; #define DEF_REGDMN FCC1_FCCA @@ -545,7 +391,6 @@ static struct { D(NULL1_WORLD), /* For 11b-only countries (no 11a allowed) */ D(NULL1_ETSIB), /* Israel */ D(NULL1_ETSIC), - D(NULL1_GSM), /* GSM-only operation */ D(FCC1_FCCA), /* USA */ D(FCC1_WORLD), /* Hong Kong */ D(FCC4_FCCA), /* USA - Public Safety */ @@ -682,7 +527,6 @@ static struct { D(NULL1), D(WORLD), - D(GSM), D(DEBUG_REG_DMN), #undef D }; @@ -734,163 +578,151 @@ typedef struct { HAL_REG_DOMAIN regDmnEnum; const char* isoName; const char* name; - HAL_BOOL allow11g; - HAL_BOOL allow11aTurbo; - HAL_BOOL allow11gTurbo; - u_int16_t outdoorChanStart; } COUNTRY_CODE_TO_ENUM_RD; -#define YES AH_TRUE -#define NO AH_FALSE -/* Index into table to avoid DEBUG and NO COUNTRY SET entries */ -#define CTRY_ONLY_INDEX 2 /* * Country Code Table to Enumerated RD */ - static COUNTRY_CODE_TO_ENUM_RD allCountries[] = { - {CTRY_DEBUG, NO_ENUMRD, "DB", "DEBUG", YES, YES, YES, 7000 }, - {CTRY_DEFAULT, DEF_REGDMN, "NA", "NO_COUNTRY_SET", YES, YES, YES, 7000 }, - {CTRY_ALBANIA, NULL1_WORLD, "AL", "ALBANIA", YES, NO, YES, 7000 }, - {CTRY_ALGERIA, NULL1_WORLD, "DZ", "ALGERIA", YES, NO, YES, 7000 }, - {CTRY_ARGENTINA, APL3_WORLD, "AR", "ARGENTINA", NO, NO, NO, 7000 }, - {CTRY_ARMENIA, ETSI4_WORLD, "AM", "ARMENIA", YES, NO, YES, 7000 }, - {CTRY_AUSTRALIA, FCC2_WORLD, "AU", "AUSTRALIA", YES, YES, YES, 7000 }, - {CTRY_AUSTRIA, ETSI1_WORLD, "AT", "AUSTRIA", YES, NO, YES, 7000 }, - {CTRY_AZERBAIJAN, ETSI4_WORLD, "AZ", "AZERBAIJAN", YES, YES, YES, 7000 }, - {CTRY_BAHRAIN, APL6_WORLD, "BH", "BAHRAIN", YES, NO, YES, 7000 }, - {CTRY_BELARUS, NULL1_WORLD, "BY", "BELARUS", YES, NO, YES, 7000 }, - {CTRY_BELGIUM, ETSI1_WORLD, "BE", "BELGIUM", YES, NO, YES, 7000 }, - {CTRY_BELIZE, APL1_ETSIC, "BZ", "BELIZE", YES, YES, YES, 7000 }, - {CTRY_BOLIVIA, APL1_ETSIC, "BO", "BOLVIA", YES, YES, YES, 7000 }, - {CTRY_BRAZIL, FCC3_WORLD, "BR", "BRAZIL", YES, NO, NO, 7000 }, - {CTRY_BRUNEI_DARUSSALAM,APL1_WORLD,"BN", "BRUNEI DARUSSALAM", YES, YES, YES, 7000 }, - {CTRY_BULGARIA, ETSI6_WORLD, "BG", "BULGARIA", YES, NO, YES, 7000 }, - {CTRY_CANADA, FCC2_FCCA, "CA", "CANADA", YES, YES, YES, 7000 }, - {CTRY_CHILE, APL6_WORLD, "CL", "CHILE", YES, YES, YES, 7000 }, - {CTRY_CHINA, APL1_WORLD, "CN", "CHINA", YES, YES, YES, 7000 }, - {CTRY_COLOMBIA, FCC1_FCCA, "CO", "COLOMBIA", YES, NO, YES, 7000 }, - {CTRY_COSTA_RICA, NULL1_WORLD, "CR", "COSTA RICA", YES, NO, YES, 7000 }, - {CTRY_CROATIA, ETSI3_WORLD, "HR", "CROATIA", YES, NO, YES, 7000 }, - {CTRY_CYPRUS, ETSI1_WORLD, "CY", "CYPRUS", YES, YES, YES, 7000 }, - {CTRY_CZECH, ETSI3_WORLD, "CZ", "CZECH REPUBLIC", YES, NO, YES, 7000 }, - {CTRY_DENMARK, ETSI1_WORLD, "DK", "DENMARK", YES, NO, YES, 7000 }, - {CTRY_DOMINICAN_REPUBLIC,FCC1_FCCA,"DO", "DOMINICAN REPUBLIC", YES, YES, YES, 7000 }, - {CTRY_ECUADOR, NULL1_WORLD, "EC", "ECUADOR", NO, NO, NO, 7000 }, - {CTRY_EGYPT, ETSI3_WORLD, "EG", "EGYPT", YES, NO, YES, 7000 }, - {CTRY_EL_SALVADOR, NULL1_WORLD, "SV", "EL SALVADOR", YES, NO, YES, 7000 }, - {CTRY_ESTONIA, ETSI1_WORLD, "EE", "ESTONIA", YES, NO, YES, 7000 }, - {CTRY_FINLAND, ETSI1_WORLD, "FI", "FINLAND", YES, NO, YES, 7000 }, - {CTRY_FRANCE, ETSI3_WORLD, "FR", "FRANCE", YES, NO, YES, 7000 }, - {CTRY_FRANCE2, ETSI3_WORLD, "F2", "FRANCE_RES", YES, NO, YES, 7000 }, - {CTRY_GEORGIA, ETSI4_WORLD, "GE", "GEORGIA", YES, YES, YES, 7000 }, - {CTRY_GERMANY, ETSI1_WORLD, "DE", "GERMANY", YES, NO, YES, 7000 }, - {CTRY_GREECE, ETSI1_WORLD, "GR", "GREECE", YES, NO, YES, 7000 }, - {CTRY_GSM, NULL1_GSM, "GS", "GSM", YES, NO, NO, 7000 }, - {CTRY_GUATEMALA, FCC1_FCCA, "GT", "GUATEMALA", YES, YES, YES, 7000 }, - {CTRY_HONDURAS, NULL1_WORLD, "HN", "HONDURAS", YES, NO, YES, 7000 }, - {CTRY_HONG_KONG, FCC2_WORLD, "HK", "HONG KONG", YES, YES, YES, 7000 }, - {CTRY_HUNGARY, ETSI1_WORLD, "HU", "HUNGARY", YES, NO, YES, 7000 }, - {CTRY_ICELAND, ETSI1_WORLD, "IS", "ICELAND", YES, NO, YES, 7000 }, - {CTRY_INDIA, APL6_WORLD, "IN", "INDIA", YES, NO, YES, 7000 }, - {CTRY_INDONESIA, APL1_WORLD, "ID", "INDONESIA", YES, NO, YES, 7000 }, - {CTRY_IRAN, APL1_WORLD, "IR", "IRAN", YES, YES, YES, 7000 }, - {CTRY_IRELAND, ETSI1_WORLD, "IE", "IRELAND", YES, NO, YES, 7000 }, - {CTRY_ISRAEL, NULL1_WORLD, "IL", "ISRAEL", YES, NO, YES, 7000 }, - {CTRY_ITALY, ETSI1_WORLD, "IT", "ITALY", YES, NO, YES, 7000 }, - {CTRY_JAPAN, MKK1_MKKA, "JP", "JAPAN", YES, NO, NO, 7000 }, - {CTRY_JAPAN1, MKK1_MKKB, "JP", "JAPAN1", YES, NO, NO, 7000 }, - {CTRY_JAPAN2, MKK1_FCCA, "JP", "JAPAN2", YES, NO, NO, 7000 }, - {CTRY_JAPAN3, MKK2_MKKA, "JP", "JAPAN3", YES, NO, NO, 7000 }, - {CTRY_JAPAN4, MKK1_MKKA1, "JP", "JAPAN4", YES, NO, NO, 7000 }, - {CTRY_JAPAN5, MKK1_MKKA2, "JP", "JAPAN5", YES, NO, NO, 7000 }, - {CTRY_JAPAN6, MKK1_MKKC, "JP", "JAPAN6", YES, NO, NO, 7000 }, - - {CTRY_JAPAN7, MKK3_MKKB, "JP", "JAPAN7", YES, NO, NO, 7000 }, - {CTRY_JAPAN8, MKK3_MKKA2, "JP", "JAPAN8", YES, NO, NO, 7000 }, - {CTRY_JAPAN9, MKK3_MKKC, "JP", "JAPAN9", YES, NO, NO, 7000 }, - - {CTRY_JAPAN10, MKK4_MKKB, "JP", "JAPAN10", YES, NO, NO, 7000 }, - {CTRY_JAPAN11, MKK4_MKKA2, "JP", "JAPAN11", YES, NO, NO, 7000 }, - {CTRY_JAPAN12, MKK4_MKKC, "JP", "JAPAN12", YES, NO, NO, 7000 }, - - {CTRY_JAPAN13, MKK5_MKKB, "JP", "JAPAN13", YES, NO, NO, 7000 }, - {CTRY_JAPAN14, MKK5_MKKA2, "JP", "JAPAN14", YES, NO, NO, 7000 }, - {CTRY_JAPAN15, MKK5_MKKC, "JP", "JAPAN15", YES, NO, NO, 7000 }, - - {CTRY_JAPAN16, MKK6_MKKB, "JP", "JAPAN16", YES, NO, NO, 7000 }, - {CTRY_JAPAN17, MKK6_MKKA2, "JP", "JAPAN17", YES, NO, NO, 7000 }, - {CTRY_JAPAN18, MKK6_MKKC, "JP", "JAPAN18", YES, NO, NO, 7000 }, - - {CTRY_JAPAN19, MKK7_MKKB, "JP", "JAPAN19", YES, NO, NO, 7000 }, - {CTRY_JAPAN20, MKK7_MKKA2, "JP", "JAPAN20", YES, NO, NO, 7000 }, - {CTRY_JAPAN21, MKK7_MKKC, "JP", "JAPAN21", YES, NO, NO, 7000 }, - - {CTRY_JAPAN22, MKK8_MKKB, "JP", "JAPAN22", YES, NO, NO, 7000 }, - {CTRY_JAPAN23, MKK8_MKKA2, "JP", "JAPAN23", YES, NO, NO, 7000 }, - {CTRY_JAPAN24, MKK8_MKKC, "JP", "JAPAN24", YES, NO, NO, 7000 }, - - {CTRY_JORDAN, APL4_WORLD, "JO", "JORDAN", YES, NO, YES, 7000 }, - {CTRY_KAZAKHSTAN, NULL1_WORLD, "KZ", "KAZAKHSTAN", YES, NO, YES, 7000 }, - {CTRY_KOREA_NORTH, APL2_WORLD, "KP", "NORTH KOREA", YES, YES, YES, 7000 }, - {CTRY_KOREA_ROC, APL2_WORLD, "KR", "KOREA REPUBLIC", YES, NO, NO, 7000 }, - {CTRY_KOREA_ROC2, APL2_WORLD, "K2", "KOREA REPUBLIC2",YES, NO, NO, 7000 }, - {CTRY_KOREA_ROC3, APL9_WORLD, "K3", "KOREA REPUBLIC3",YES, NO, NO, 7000 }, - {CTRY_KUWAIT, NULL1_WORLD, "KW", "KUWAIT", YES, NO, YES, 7000 }, - {CTRY_LATVIA, ETSI1_WORLD, "LV", "LATVIA", YES, NO, YES, 7000 }, - {CTRY_LEBANON, NULL1_WORLD, "LB", "LEBANON", YES, NO, YES, 7000 }, - {CTRY_LIECHTENSTEIN,ETSI1_WORLD, "LI", "LIECHTENSTEIN", YES, NO, YES, 7000 }, - {CTRY_LITHUANIA, ETSI1_WORLD, "LT", "LITHUANIA", YES, NO, YES, 7000 }, - {CTRY_LUXEMBOURG, ETSI1_WORLD, "LU", "LUXEMBOURG", YES, NO, YES, 7000 }, - {CTRY_MACAU, FCC2_WORLD, "MO", "MACAU", YES, YES, YES, 7000 }, - {CTRY_MACEDONIA, NULL1_WORLD, "MK", "MACEDONIA", YES, NO, YES, 7000 }, - {CTRY_MALAYSIA, APL8_WORLD, "MY", "MALAYSIA", YES, NO, NO, 7000 }, - {CTRY_MALTA, ETSI1_WORLD, "MT", "MALTA", YES, NO, YES, 7000 }, - {CTRY_MEXICO, FCC1_FCCA, "MX", "MEXICO", YES, YES, YES, 7000 }, - {CTRY_MONACO, ETSI4_WORLD, "MC", "MONACO", YES, YES, YES, 7000 }, - {CTRY_MOROCCO, NULL1_WORLD, "MA", "MOROCCO", YES, NO, YES, 7000 }, - {CTRY_NETHERLANDS, ETSI1_WORLD, "NL", "NETHERLANDS", YES, NO, YES, 7000 }, - {CTRY_NEW_ZEALAND, FCC2_ETSIC, "NZ", "NEW ZEALAND", YES, NO, YES, 7000 }, - {CTRY_NORWAY, ETSI1_WORLD, "NO", "NORWAY", YES, NO, YES, 7000 }, - {CTRY_OMAN, APL6_WORLD, "OM", "OMAN", YES, NO, YES, 7000 }, - {CTRY_PAKISTAN, NULL1_WORLD, "PK", "PAKISTAN", YES, NO, YES, 7000 }, - {CTRY_PANAMA, FCC1_FCCA, "PA", "PANAMA", YES, YES, YES, 7000 }, - {CTRY_PERU, APL1_WORLD, "PE", "PERU", YES, NO, YES, 7000 }, - {CTRY_PHILIPPINES, APL1_WORLD, "PH", "PHILIPPINES", YES, YES, YES, 7000 }, - {CTRY_POLAND, ETSI1_WORLD, "PL", "POLAND", YES, NO, YES, 7000 }, - {CTRY_PORTUGAL, ETSI1_WORLD, "PT", "PORTUGAL", YES, NO, YES, 7000 }, - {CTRY_PUERTO_RICO, FCC1_FCCA, "PR", "PUERTO RICO", YES, YES, YES, 7000 }, - {CTRY_QATAR, NULL1_WORLD, "QA", "QATAR", YES, NO, YES, 7000 }, - {CTRY_ROMANIA, NULL1_WORLD, "RO", "ROMANIA", YES, NO, YES, 7000 }, - {CTRY_RUSSIA, NULL1_WORLD, "RU", "RUSSIA", YES, NO, YES, 7000 }, - {CTRY_SAUDI_ARABIA,NULL1_WORLD, "SA", "SAUDI ARABIA", YES, NO, YES, 7000 }, - {CTRY_SINGAPORE, APL6_WORLD, "SG", "SINGAPORE", YES, YES, YES, 7000 }, - {CTRY_SLOVAKIA, ETSI1_WORLD, "SK", "SLOVAK REPUBLIC",YES, NO, YES, 7000 }, - {CTRY_SLOVENIA, ETSI1_WORLD, "SI", "SLOVENIA", YES, NO, YES, 7000 }, - {CTRY_SOUTH_AFRICA,FCC3_WORLD, "ZA", "SOUTH AFRICA", YES, NO, YES, 7000 }, - {CTRY_SPAIN, ETSI1_WORLD, "ES", "SPAIN", YES, NO, YES, 7000 }, - {CTRY_SWEDEN, ETSI1_WORLD, "SE", "SWEDEN", YES, NO, YES, 7000 }, - {CTRY_SWITZERLAND, ETSI1_WORLD, "CH", "SWITZERLAND", YES, NO, YES, 7000 }, - {CTRY_SYRIA, NULL1_WORLD, "SY", "SYRIA", YES, NO, YES, 7000 }, - {CTRY_TAIWAN, APL3_FCCA, "TW", "TAIWAN", YES, YES, YES, 7000 }, - {CTRY_THAILAND, NULL1_WORLD, "TH", "THAILAND", YES, NO, YES, 7000 }, - {CTRY_TRINIDAD_Y_TOBAGO,ETSI4_WORLD,"TT", "TRINIDAD & TOBAGO", YES, NO, YES, 7000 }, - {CTRY_TUNISIA, ETSI3_WORLD, "TN", "TUNISIA", YES, NO, YES, 7000 }, - {CTRY_TURKEY, ETSI3_WORLD, "TR", "TURKEY", YES, NO, YES, 7000 }, - {CTRY_UKRAINE, NULL1_WORLD, "UA", "UKRAINE", YES, NO, YES, 7000 }, - {CTRY_UAE, NULL1_WORLD, "AE", "UNITED ARAB EMIRATES", YES, NO, YES, 7000 }, - {CTRY_UNITED_KINGDOM, ETSI1_WORLD,"GB", "UNITED KINGDOM", YES, NO, YES, 7000 }, - {CTRY_UNITED_STATES, FCC1_FCCA, "US", "UNITED STATES", YES, YES, YES, 5825 }, - {CTRY_UNITED_STATES_FCC49, FCC4_FCCA, "PS", "UNITED STATES (PUBLIC SAFETY)", YES, YES, YES, 7000 }, - {CTRY_URUGUAY, APL2_WORLD, "UY", "URUGUAY", YES, NO, YES, 7000 }, - {CTRY_UZBEKISTAN, FCC3_FCCA, "UZ", "UZBEKISTAN", YES, YES, YES, 7000 }, - {CTRY_VENEZUELA, APL2_ETSIC, "VE", "VENEZUELA", YES, NO, YES, 7000 }, - {CTRY_VIET_NAM, NULL1_WORLD, "VN", "VIET NAM", YES, NO, YES, 7000 }, - {CTRY_YEMEN, NULL1_WORLD, "YE", "YEMEN", YES, NO, YES, 7000 }, - {CTRY_ZIMBABWE, NULL1_WORLD, "ZW", "ZIMBABWE", YES, NO, YES, 7000 } + {CTRY_DEBUG, NO_ENUMRD, "DB", "DEBUG" }, + {CTRY_DEFAULT, DEF_REGDMN, "NA", "NO_COUNTRY_SET" }, + {CTRY_ALBANIA, NULL1_WORLD, "AL", "ALBANIA" }, + {CTRY_ALGERIA, NULL1_WORLD, "DZ", "ALGERIA" }, + {CTRY_ARGENTINA, APL3_WORLD, "AR", "ARGENTINA" }, + {CTRY_ARMENIA, ETSI4_WORLD, "AM", "ARMENIA" }, + {CTRY_AUSTRALIA, FCC2_WORLD, "AU", "AUSTRALIA" }, + {CTRY_AUSTRIA, ETSI1_WORLD, "AT", "AUSTRIA" }, + {CTRY_AZERBAIJAN, ETSI4_WORLD, "AZ", "AZERBAIJAN" }, + {CTRY_BAHRAIN, APL6_WORLD, "BH", "BAHRAIN" }, + {CTRY_BELARUS, NULL1_WORLD, "BY", "BELARUS" }, + {CTRY_BELGIUM, ETSI1_WORLD, "BE", "BELGIUM" }, + {CTRY_BELIZE, APL1_ETSIC, "BZ", "BELIZE" }, + {CTRY_BOLIVIA, APL1_ETSIC, "BO", "BOLVIA" }, + {CTRY_BRAZIL, FCC3_WORLD, "BR", "BRAZIL" }, + {CTRY_BRUNEI_DARUSSALAM,APL1_WORLD,"BN", "BRUNEI DARUSSALAM" }, + {CTRY_BULGARIA, ETSI6_WORLD, "BG", "BULGARIA" }, + {CTRY_CANADA, FCC2_FCCA, "CA", "CANADA" }, + {CTRY_CHILE, APL6_WORLD, "CL", "CHILE" }, + {CTRY_CHINA, APL1_WORLD, "CN", "CHINA" }, + {CTRY_COLOMBIA, FCC1_FCCA, "CO", "COLOMBIA" }, + {CTRY_COSTA_RICA, NULL1_WORLD, "CR", "COSTA RICA" }, + {CTRY_CROATIA, ETSI3_WORLD, "HR", "CROATIA" }, + {CTRY_CYPRUS, ETSI1_WORLD, "CY", "CYPRUS" }, + {CTRY_CZECH, ETSI3_WORLD, "CZ", "CZECH REPUBLIC" }, + {CTRY_DENMARK, ETSI1_WORLD, "DK", "DENMARK" }, + {CTRY_DOMINICAN_REPUBLIC,FCC1_FCCA,"DO", "DOMINICAN REPUBLIC" }, + {CTRY_ECUADOR, NULL1_WORLD, "EC", "ECUADOR" }, + {CTRY_EGYPT, ETSI3_WORLD, "EG", "EGYPT" }, + {CTRY_EL_SALVADOR, NULL1_WORLD, "SV", "EL SALVADOR" }, + {CTRY_ESTONIA, ETSI1_WORLD, "EE", "ESTONIA" }, + {CTRY_FINLAND, ETSI1_WORLD, "FI", "FINLAND" }, + {CTRY_FRANCE, ETSI3_WORLD, "FR", "FRANCE" }, + {CTRY_FRANCE2, ETSI3_WORLD, "F2", "FRANCE_RES" }, + {CTRY_GEORGIA, ETSI4_WORLD, "GE", "GEORGIA" }, + {CTRY_GERMANY, ETSI1_WORLD, "DE", "GERMANY" }, + {CTRY_GREECE, ETSI1_WORLD, "GR", "GREECE" }, + {CTRY_GUATEMALA, FCC1_FCCA, "GT", "GUATEMALA" }, + {CTRY_HONDURAS, NULL1_WORLD, "HN", "HONDURAS" }, + {CTRY_HONG_KONG, FCC2_WORLD, "HK", "HONG KONG" }, + {CTRY_HUNGARY, ETSI1_WORLD, "HU", "HUNGARY" }, + {CTRY_ICELAND, ETSI1_WORLD, "IS", "ICELAND" }, + {CTRY_INDIA, APL6_WORLD, "IN", "INDIA" }, + {CTRY_INDONESIA, APL1_WORLD, "ID", "INDONESIA" }, + {CTRY_IRAN, APL1_WORLD, "IR", "IRAN" }, + {CTRY_IRELAND, ETSI1_WORLD, "IE", "IRELAND" }, + {CTRY_ISRAEL, NULL1_WORLD, "IL", "ISRAEL" }, + {CTRY_ITALY, ETSI1_WORLD, "IT", "ITALY" }, + {CTRY_JAPAN, MKK1_MKKA, "JP", "JAPAN" }, + {CTRY_JAPAN1, MKK1_MKKB, "JP", "JAPAN1" }, + {CTRY_JAPAN2, MKK1_FCCA, "JP", "JAPAN2" }, + {CTRY_JAPAN3, MKK2_MKKA, "JP", "JAPAN3" }, + {CTRY_JAPAN4, MKK1_MKKA1, "JP", "JAPAN4" }, + {CTRY_JAPAN5, MKK1_MKKA2, "JP", "JAPAN5" }, + {CTRY_JAPAN6, MKK1_MKKC, "JP", "JAPAN6" }, + + {CTRY_JAPAN7, MKK3_MKKB, "JP", "JAPAN7" }, + {CTRY_JAPAN8, MKK3_MKKA2, "JP", "JAPAN8" }, + {CTRY_JAPAN9, MKK3_MKKC, "JP", "JAPAN9" }, + + {CTRY_JAPAN10, MKK4_MKKB, "JP", "JAPAN10" }, + {CTRY_JAPAN11, MKK4_MKKA2, "JP", "JAPAN11" }, + {CTRY_JAPAN12, MKK4_MKKC, "JP", "JAPAN12" }, + + {CTRY_JAPAN13, MKK5_MKKB, "JP", "JAPAN13" }, + {CTRY_JAPAN14, MKK5_MKKA2, "JP", "JAPAN14" }, + {CTRY_JAPAN15, MKK5_MKKC, "JP", "JAPAN15" }, + + {CTRY_JAPAN16, MKK6_MKKB, "JP", "JAPAN16" }, + {CTRY_JAPAN17, MKK6_MKKA2, "JP", "JAPAN17" }, + {CTRY_JAPAN18, MKK6_MKKC, "JP", "JAPAN18" }, + + {CTRY_JAPAN19, MKK7_MKKB, "JP", "JAPAN19" }, + {CTRY_JAPAN20, MKK7_MKKA2, "JP", "JAPAN20" }, + {CTRY_JAPAN21, MKK7_MKKC, "JP", "JAPAN21" }, + + {CTRY_JAPAN22, MKK8_MKKB, "JP", "JAPAN22" }, + {CTRY_JAPAN23, MKK8_MKKA2, "JP", "JAPAN23" }, + {CTRY_JAPAN24, MKK8_MKKC, "JP", "JAPAN24" }, + + {CTRY_JORDAN, APL4_WORLD, "JO", "JORDAN" }, + {CTRY_KAZAKHSTAN, NULL1_WORLD, "KZ", "KAZAKHSTAN" }, + {CTRY_KOREA_NORTH, APL2_WORLD, "KP", "NORTH KOREA" }, + {CTRY_KOREA_ROC, APL2_WORLD, "KR", "KOREA REPUBLIC" }, + {CTRY_KOREA_ROC2, APL2_WORLD, "K2", "KOREA REPUBLIC2" }, + {CTRY_KOREA_ROC3, APL9_WORLD, "K3", "KOREA REPUBLIC3" }, + {CTRY_KUWAIT, NULL1_WORLD, "KW", "KUWAIT" }, + {CTRY_LATVIA, ETSI1_WORLD, "LV", "LATVIA" }, + {CTRY_LEBANON, NULL1_WORLD, "LB", "LEBANON" }, + {CTRY_LIECHTENSTEIN,ETSI1_WORLD, "LI", "LIECHTENSTEIN" }, + {CTRY_LITHUANIA, ETSI1_WORLD, "LT", "LITHUANIA" }, + {CTRY_LUXEMBOURG, ETSI1_WORLD, "LU", "LUXEMBOURG" }, + {CTRY_MACAU, FCC2_WORLD, "MO", "MACAU" }, + {CTRY_MACEDONIA, NULL1_WORLD, "MK", "MACEDONIA" }, + {CTRY_MALAYSIA, APL8_WORLD, "MY", "MALAYSIA" }, + {CTRY_MALTA, ETSI1_WORLD, "MT", "MALTA" }, + {CTRY_MEXICO, FCC1_FCCA, "MX", "MEXICO" }, + {CTRY_MONACO, ETSI4_WORLD, "MC", "MONACO" }, + {CTRY_MOROCCO, NULL1_WORLD, "MA", "MOROCCO" }, + {CTRY_NETHERLANDS, ETSI1_WORLD, "NL", "NETHERLANDS" }, + {CTRY_NEW_ZEALAND, FCC2_ETSIC, "NZ", "NEW ZEALAND" }, + {CTRY_NORWAY, ETSI1_WORLD, "NO", "NORWAY" }, + {CTRY_OMAN, APL6_WORLD, "OM", "OMAN" }, + {CTRY_PAKISTAN, NULL1_WORLD, "PK", "PAKISTAN" }, + {CTRY_PANAMA, FCC1_FCCA, "PA", "PANAMA" }, + {CTRY_PERU, APL1_WORLD, "PE", "PERU" }, + {CTRY_PHILIPPINES, APL1_WORLD, "PH", "PHILIPPINES" }, + {CTRY_POLAND, ETSI1_WORLD, "PL", "POLAND" }, + {CTRY_PORTUGAL, ETSI1_WORLD, "PT", "PORTUGAL" }, + {CTRY_PUERTO_RICO, FCC1_FCCA, "PR", "PUERTO RICO" }, + {CTRY_QATAR, NULL1_WORLD, "QA", "QATAR" }, + {CTRY_ROMANIA, NULL1_WORLD, "RO", "ROMANIA" }, + {CTRY_RUSSIA, NULL1_WORLD, "RU", "RUSSIA" }, + {CTRY_SAUDI_ARABIA,NULL1_WORLD, "SA", "SAUDI ARABIA" }, + {CTRY_SINGAPORE, APL6_WORLD, "SG", "SINGAPORE" }, + {CTRY_SLOVAKIA, ETSI1_WORLD, "SK", "SLOVAK REPUBLIC" }, + {CTRY_SLOVENIA, ETSI1_WORLD, "SI", "SLOVENIA" }, + {CTRY_SOUTH_AFRICA,FCC3_WORLD, "ZA", "SOUTH AFRICA" }, + {CTRY_SPAIN, ETSI1_WORLD, "ES", "SPAIN" }, + {CTRY_SWEDEN, ETSI1_WORLD, "SE", "SWEDEN" }, + {CTRY_SWITZERLAND, ETSI1_WORLD, "CH", "SWITZERLAND" }, + {CTRY_SYRIA, NULL1_WORLD, "SY", "SYRIA" }, + {CTRY_TAIWAN, APL3_FCCA, "TW", "TAIWAN" }, + {CTRY_THAILAND, NULL1_WORLD, "TH", "THAILAND" }, + {CTRY_TRINIDAD_Y_TOBAGO,ETSI4_WORLD,"TT", "TRINIDAD & TOBAGO" }, + {CTRY_TUNISIA, ETSI3_WORLD, "TN", "TUNISIA" }, + {CTRY_TURKEY, ETSI3_WORLD, "TR", "TURKEY" }, + {CTRY_UKRAINE, NULL1_WORLD, "UA", "UKRAINE" }, + {CTRY_UAE, NULL1_WORLD, "AE", "UNITED ARAB EMIRATES" }, + {CTRY_UNITED_KINGDOM, ETSI1_WORLD,"GB", "UNITED KINGDOM" }, + {CTRY_UNITED_STATES, FCC1_FCCA, "US", "UNITED STATES" }, + {CTRY_UNITED_STATES_FCC49, FCC4_FCCA, "PS", "UNITED STATES (PUBLIC SAFETY)" }, + {CTRY_URUGUAY, APL2_WORLD, "UY", "URUGUAY" }, + {CTRY_UZBEKISTAN, FCC3_FCCA, "UZ", "UZBEKISTAN" }, + {CTRY_VENEZUELA, APL2_ETSIC, "VE", "VENEZUELA" }, + {CTRY_VIET_NAM, NULL1_WORLD, "VN", "VIET NAM" }, + {CTRY_YEMEN, NULL1_WORLD, "YE", "YEMEN" }, + {CTRY_ZIMBABWE, NULL1_WORLD, "ZW", "ZIMBABWE" } }; -#undef YES -#undef NO static HAL_BOOL cclookup(const char *name, HAL_REG_DOMAIN *rd, HAL_CTRY_CODE *cc) @@ -952,12 +784,13 @@ cclist() } static HAL_BOOL -setRateTable(struct ath_hal *ah, HAL_CHANNEL *chan, +setRateTable(struct ath_hal *ah, const struct ieee80211_channel *chan, int16_t tpcScaleReduction, int16_t powerLimit, int16_t *pMinPower, int16_t *pMaxPower); static void -calctxpower(struct ath_hal *ah, int nchan, HAL_CHANNEL *chans, +calctxpower(struct ath_hal *ah, + int nchan, const struct ieee80211_channel *chans, int16_t tpcScaleReduction, int16_t powerLimit, int16_t *txpow) { int16_t minpow; @@ -979,12 +812,12 @@ int isdfs = 0; int is4ms = 0; static int -anychan(const HAL_CHANNEL *chans, int nc, int flag) +anychan(const struct ieee80211_channel *chans, int nc, int flag) { int i; for (i = 0; i < nc; i++) - if ((chans[i].privFlags & flag) != 0) + if ((chans[i].ic_flags & flag) != 0) return 1; return 0; } @@ -993,9 +826,9 @@ static __inline int mapgsm(u_int freq, u_int flags) { freq *= 10; - if (flags & CHANNEL_QUARTER) + if (flags & IEEE80211_CHAN_QUARTER) freq += 5; - else if (flags & CHANNEL_HALF) + else if (flags & IEEE80211_CHAN_HALF) freq += 10; else freq += 20; @@ -1014,93 +847,85 @@ mappsb(u_int freq, u_int flags) int ath_hal_mhz2ieee(struct ath_hal *ah, u_int freq, u_int flags) { - if (flags & CHANNEL_2GHZ) { /* 2GHz band */ + if (flags & IEEE80211_CHAN_2GHZ) { /* 2GHz band */ if (freq == 2484) return 14; - if (freq < 2484) { - if (ath_hal_isgsmsku(ah)) - return mapgsm(freq, flags); + if (freq < 2484) return ((int)freq - 2407) / 5; - } else + else return 15 + ((freq - 2512) / 20); - } else if (flags & CHANNEL_5GHZ) {/* 5Ghz band */ - if (ath_hal_ispublicsafetysku(ah) && - IS_CHAN_IN_PUBLIC_SAFETY_BAND(freq)) { + } else if (flags & IEEE80211_CHAN_5GHZ) {/* 5Ghz band */ + if (IS_CHAN_IN_PUBLIC_SAFETY_BAND(freq)) return mappsb(freq, flags); - } else if ((flags & CHANNEL_A) && (freq <= 5000)) { + else if ((flags & IEEE80211_CHAN_A) && (freq <= 5000)) return (freq - 4000) / 5; - } else { + else return (freq - 5000) / 5; - } } else { /* either, guess */ if (freq == 2484) return 14; - if (freq < 2484) { - if (ath_hal_isgsmsku(ah)) - return mapgsm(freq, flags); + if (freq < 2484) return ((int)freq - 2407) / 5; - } if (freq < 5000) { - if (ath_hal_ispublicsafetysku(ah) && - IS_CHAN_IN_PUBLIC_SAFETY_BAND(freq)) { + if (IS_CHAN_IN_PUBLIC_SAFETY_BAND(freq)) return mappsb(freq, flags); - } else if (freq > 4900) { + else if (freq > 4900) return (freq - 4000) / 5; - } else { + else return 15 + ((freq - 2512) / 20); - } } return (freq - 5000) / 5; } } -#define IS_CHAN_DFS(_c) (((_c)->privFlags & CHANNEL_DFS) != 0) -#define IS_CHAN_4MS(_c) (((_c)->privFlags & CHANNEL_4MS_LIMIT) != 0) +#define IEEE80211_IS_CHAN_4MS(_c) \ + (((_c)->ic_flags & IEEE80211_CHAN_4MSXMIT) != 0) static void -dumpchannels(struct ath_hal *ah, int nc, HAL_CHANNEL *chans, int16_t *txpow) +dumpchannels(struct ath_hal *ah, int nc, + const struct ieee80211_channel *chans, int16_t *txpow) { int i; for (i = 0; i < nc; i++) { - HAL_CHANNEL *c = &chans[i]; + const struct ieee80211_channel *c = &chans[i]; int type; if (showchannels) printf("%s%3d", sep, - ath_hal_mhz2ieee(ah, c->channel, c->channelFlags)); + ath_hal_mhz2ieee(ah, c->ic_freq, c->ic_flags)); else - printf("%s%u", sep, c->channel); - if (IS_CHAN_HALF_RATE(c)) + printf("%s%u", sep, c->ic_freq); + if (IEEE80211_IS_CHAN_HALF(c)) type = 'H'; - else if (IS_CHAN_QUARTER_RATE(c)) + else if (IEEE80211_IS_CHAN_QUARTER(c)) type = 'Q'; - else if (IS_CHAN_TURBO(c)) + else if (IEEE80211_IS_CHAN_TURBO(c)) type = 'T'; - else if (IS_CHAN_HT(c)) + else if (IEEE80211_IS_CHAN_HT(c)) type = 'N'; - else if (IS_CHAN_A(c)) + else if (IEEE80211_IS_CHAN_A(c)) type = 'A'; - else if (IS_CHAN_108G(c)) + else if (IEEE80211_IS_CHAN_108G(c)) type = 'T'; - else if (IS_CHAN_G(c)) + else if (IEEE80211_IS_CHAN_G(c)) type = 'G'; else type = 'B'; - if (dopassive && IS_CHAN_PASSIVE(c)) + if (dopassive && IEEE80211_IS_CHAN_PASSIVE(c)) type = tolower(type); if (isdfs && is4ms) printf("%c%c%c %d.%d", type, - IS_CHAN_DFS(c) ? '*' : ' ', - IS_CHAN_4MS(c) ? '4' : ' ', + IEEE80211_IS_CHAN_DFS(c) ? '*' : ' ', + IEEE80211_IS_CHAN_4MS(c) ? '4' : ' ', txpow[i]/2, (txpow[i]%2)*5); else if (isdfs) printf("%c%c %d.%d", type, - IS_CHAN_DFS(c) ? '*' : ' ', + IEEE80211_IS_CHAN_DFS(c) ? '*' : ' ', txpow[i]/2, (txpow[i]%2)*5); else if (is4ms) printf("%c%c %d.%d", type, - IS_CHAN_4MS(c) ? '4' : ' ', + IEEE80211_IS_CHAN_4MS(c) ? '4' : ' ', txpow[i]/2, (txpow[i]%2)*5); else printf("%c %d.%d", type, txpow[i]/2, (txpow[i]%2)*5); @@ -1112,25 +937,12 @@ dumpchannels(struct ath_hal *ah, int nc, } static void -checkchannels(struct ath_hal *ah, HAL_CHANNEL *chans, int nchan) -{ - int i; - - for (i = 0; i < nchan; i++) { - HAL_CHANNEL *c = &chans[i]; - if (!ath_hal_checkchannel(ah, c)) - printf("Channel %u (0x%x) disallowed\n", - c->channel, c->channelFlags); - } -} - -static void -intersect(HAL_CHANNEL *dst, int16_t *dtxpow, int *nd, - const HAL_CHANNEL *src, int16_t *stxpow, int ns) +intersect(struct ieee80211_channel *dst, int16_t *dtxpow, int *nd, + const struct ieee80211_channel *src, int16_t *stxpow, int ns) { int i = 0, j, k, l; while (i < *nd) { - for (j = 0; j < ns && dst[i].channel != src[j].channel; j++) + for (j = 0; j < ns && dst[i].ic_freq != src[j].ic_freq; j++) ; if (j < ns && dtxpow[i] == stxpow[j]) { for (k = i+1, l = i; k < *nd; k++, l++) @@ -1149,7 +961,7 @@ usage(const char *progname) } static HAL_BOOL -getChipPowerLimits(struct ath_hal *ah, HAL_CHANNEL *chans, u_int32_t nchan) +getChipPowerLimits(struct ath_hal *ah, struct ieee80211_channel *chan) { } @@ -1199,25 +1011,23 @@ main(int argc, char *argv[]) static const u_int16_t tpcScaleReductionTable[5] = { 0, 3, 6, 9, MAX_RATE_POWER }; struct ath_hal_private ahp; - HAL_CHANNEL achans[IEEE80211_CHAN_MAX]; + struct ieee80211_channel achans[IEEE80211_CHAN_MAX]; int16_t atxpow[IEEE80211_CHAN_MAX]; - HAL_CHANNEL bchans[IEEE80211_CHAN_MAX]; + struct ieee80211_channel bchans[IEEE80211_CHAN_MAX]; int16_t btxpow[IEEE80211_CHAN_MAX]; - HAL_CHANNEL gchans[IEEE80211_CHAN_MAX]; + struct ieee80211_channel gchans[IEEE80211_CHAN_MAX]; int16_t gtxpow[IEEE80211_CHAN_MAX]; - HAL_CHANNEL tchans[IEEE80211_CHAN_MAX]; + struct ieee80211_channel tchans[IEEE80211_CHAN_MAX]; int16_t ttxpow[IEEE80211_CHAN_MAX]; - HAL_CHANNEL tgchans[IEEE80211_CHAN_MAX]; + struct ieee80211_channel tgchans[IEEE80211_CHAN_MAX]; int16_t tgtxpow[IEEE80211_CHAN_MAX]; - HAL_CHANNEL nchans[IEEE80211_CHAN_MAX]; + struct ieee80211_channel nchans[IEEE80211_CHAN_MAX]; int16_t ntxpow[IEEE80211_CHAN_MAX]; int i, na, nb, ng, nt, ntg, nn; HAL_BOOL showall = AH_FALSE; HAL_BOOL extendedChanMode = AH_TRUE; int modes = 0; int16_t tpcReduction, powerLimit; - int8_t regids[IEEE80211_REGCLASSIDS_MAX]; - int nregids; int showdfs = 0; int show4ms = 0; @@ -1239,7 +1049,7 @@ main(int argc, char *argv[]) tpcReduction = tpcScaleReductionTable[0]; powerLimit = MAX_RATE_POWER; - while ((i = getopt(argc, argv, "acdefoilm:pr4ABGhHNT")) != -1) + while ((i = getopt(argc, argv, "acdeflm:pr4ABGhHNT")) != -1) switch (i) { case 'a': showall = AH_TRUE; @@ -1256,12 +1066,6 @@ main(int argc, char *argv[]) case 'f': showchannels = AH_FALSE; break; - case 'o': - outdoor = AH_TRUE; - break; - case 'i': - outdoor = AH_FALSE; - break; case 'l': cclist(); rdlist(); @@ -1362,93 +1166,76 @@ main(int argc, char *argv[]) printf("\n%s (0x%x, %u)\n", getrdname(rd), rd, rd); - if (modes == 0) + if (modes == 0) { + /* NB: no HAL_MODE_HT */ modes = HAL_MODE_11A | HAL_MODE_11B | - HAL_MODE_11G | HAL_MODE_TURBO | HAL_MODE_108G | - HAL_MODE_HT; + HAL_MODE_11G | HAL_MODE_TURBO | HAL_MODE_108G; + } na = nb = ng = nt = ntg = nn = 0; if (modes & HAL_MODE_11G) { ahp.ah_currentRD = rd; - if (ath_hal_init_channels(&ahp.h, - gchans, IEEE80211_CHAN_MAX, &ng, - regids, IEEE80211_REGCLASSIDS_MAX, &nregids, - cc, HAL_MODE_11G, outdoor, extendedChanMode)) { - checkchannels(&ahp.h, gchans, ng); + if (ath_hal_getchannels(&ahp.h, gchans, IEEE80211_CHAN_MAX, &ng, + HAL_MODE_11G, cc, rd, extendedChanMode) == HAL_OK) { calctxpower(&ahp.h, ng, gchans, tpcReduction, powerLimit, gtxpow); if (showdfs) - isdfs |= anychan(gchans, ng, CHANNEL_DFS); + isdfs |= anychan(gchans, ng, IEEE80211_CHAN_DFS); if (show4ms) - is4ms |= anychan(gchans, ng, CHANNEL_4MS_LIMIT); + is4ms |= anychan(gchans, ng, IEEE80211_CHAN_4MSXMIT); } } if (modes & HAL_MODE_11B) { ahp.ah_currentRD = rd; - if (ath_hal_init_channels(&ahp.h, - bchans, IEEE80211_CHAN_MAX, &nb, - regids, IEEE80211_REGCLASSIDS_MAX, &nregids, - cc, HAL_MODE_11B, outdoor, extendedChanMode)) { - checkchannels(&ahp.h, bchans, nb); + if (ath_hal_getchannels(&ahp.h, bchans, IEEE80211_CHAN_MAX, &nb, + HAL_MODE_11B, cc, rd, extendedChanMode) == HAL_OK) { calctxpower(&ahp.h, nb, bchans, tpcReduction, powerLimit, btxpow); if (showdfs) - isdfs |= anychan(bchans, nb, CHANNEL_DFS); + isdfs |= anychan(bchans, nb, IEEE80211_CHAN_DFS); if (show4ms) - is4ms |= anychan(bchans, nb, CHANNEL_4MS_LIMIT); + is4ms |= anychan(bchans, nb, IEEE80211_CHAN_4MSXMIT); } } if (modes & HAL_MODE_11A) { ahp.ah_currentRD = rd; - if (ath_hal_init_channels(&ahp.h, - achans, IEEE80211_CHAN_MAX, &na, - regids, IEEE80211_REGCLASSIDS_MAX, &nregids, - cc, HAL_MODE_11A, outdoor, extendedChanMode)) { - checkchannels(&ahp.h, achans, na); + if (ath_hal_getchannels(&ahp.h, achans, IEEE80211_CHAN_MAX, &na, + HAL_MODE_11A, cc, rd, extendedChanMode) == HAL_OK) { calctxpower(&ahp.h, na, achans, tpcReduction, powerLimit, atxpow); if (showdfs) - isdfs |= anychan(achans, na, CHANNEL_DFS); + isdfs |= anychan(achans, na, IEEE80211_CHAN_DFS); if (show4ms) - is4ms |= anychan(achans, na, CHANNEL_4MS_LIMIT); + is4ms |= anychan(achans, na, IEEE80211_CHAN_4MSXMIT); } } if (modes & HAL_MODE_TURBO) { ahp.ah_currentRD = rd; - if (ath_hal_init_channels(&ahp.h, - tchans, IEEE80211_CHAN_MAX, &nt, - regids, IEEE80211_REGCLASSIDS_MAX, &nregids, - cc, HAL_MODE_TURBO, outdoor, extendedChanMode)) { - checkchannels(&ahp.h, tchans, nt); + if (ath_hal_getchannels(&ahp.h, tchans, IEEE80211_CHAN_MAX, &nt, + HAL_MODE_TURBO, cc, rd, extendedChanMode) == HAL_OK) { calctxpower(&ahp.h, nt, tchans, tpcReduction, powerLimit, ttxpow); if (showdfs) - isdfs |= anychan(tchans, nt, CHANNEL_DFS); + isdfs |= anychan(tchans, nt, IEEE80211_CHAN_DFS); if (show4ms) - is4ms |= anychan(tchans, nt, CHANNEL_4MS_LIMIT); + is4ms |= anychan(tchans, nt, IEEE80211_CHAN_4MSXMIT); } } if (modes & HAL_MODE_108G) { ahp.ah_currentRD = rd; - if (ath_hal_init_channels(&ahp.h, - tgchans, IEEE80211_CHAN_MAX, &ntg, - regids, IEEE80211_REGCLASSIDS_MAX, &nregids, - cc, HAL_MODE_108G, outdoor, extendedChanMode)) { - checkchannels(&ahp.h, tgchans, ntg); + if (ath_hal_getchannels(&ahp.h, tgchans, IEEE80211_CHAN_MAX, &ntg, + HAL_MODE_108G, cc, rd, extendedChanMode) == HAL_OK) { calctxpower(&ahp.h, ntg, tgchans, tpcReduction, powerLimit, tgtxpow); if (showdfs) - isdfs |= anychan(tgchans, ntg, CHANNEL_DFS); + isdfs |= anychan(tgchans, ntg, IEEE80211_CHAN_DFS); if (show4ms) - is4ms |= anychan(tgchans, ntg, CHANNEL_4MS_LIMIT); + is4ms |= anychan(tgchans, ntg, IEEE80211_CHAN_4MSXMIT); } } if (modes & HAL_MODE_HT) { ahp.ah_currentRD = rd; - if (ath_hal_init_channels(&ahp.h, - nchans, IEEE80211_CHAN_MAX, &nn, - regids, IEEE80211_REGCLASSIDS_MAX, &nregids, - cc, modes & HAL_MODE_HT, outdoor, extendedChanMode)) { - checkchannels(&ahp.h, nchans, nn); + if (ath_hal_getchannels(&ahp.h, nchans, IEEE80211_CHAN_MAX, &nn, + modes & HAL_MODE_HT, cc, rd, extendedChanMode) == HAL_OK) { calctxpower(&ahp.h, nn, nchans, tpcReduction, powerLimit, ntxpow); if (showdfs) - isdfs |= anychan(nchans, nn, CHANNEL_DFS); + isdfs |= anychan(nchans, nn, IEEE80211_CHAN_DFS); if (show4ms) - is4ms |= anychan(nchans, nn, CHANNEL_4MS_LIMIT); + is4ms |= anychan(nchans, nn, IEEE80211_CHAN_4MSXMIT); } } @@ -1623,7 +1410,7 @@ interpolate(u_int16_t target, u_int16_t * channel, and number of channels */ static void -ar5212GetTargetPowers(struct ath_hal *ah, HAL_CHANNEL *chan, +ar5212GetTargetPowers(struct ath_hal *ah, const struct ieee80211_channel *chan, TRGT_POWER_INFO *powInfo, u_int16_t numChannels, TRGT_POWER_INFO *pNewPower) { @@ -1636,7 +1423,7 @@ ar5212GetTargetPowers(struct ath_hal *ah for (i = 0; i < numChannels; i++) tempChannelList[i] = powInfo[i].testChannel; - ar5212GetLowerUpperValues(chan->channel, tempChannelList, + ar5212GetLowerUpperValues(chan->ic_freq, tempChannelList, numChannels, &clo, &chi); /* Get the indices for the channel */ @@ -1655,13 +1442,13 @@ ar5212GetTargetPowers(struct ath_hal *ah * Get the lower and upper channels, target powers, * and interpolate between them. */ - pNewPower->twicePwr6_24 = interpolate(chan->channel, clo, chi, + pNewPower->twicePwr6_24 = interpolate(chan->ic_freq, clo, chi, powInfo[ixlo].twicePwr6_24, powInfo[ixhi].twicePwr6_24); - pNewPower->twicePwr36 = interpolate(chan->channel, clo, chi, + pNewPower->twicePwr36 = interpolate(chan->ic_freq, clo, chi, powInfo[ixlo].twicePwr36, powInfo[ixhi].twicePwr36); - pNewPower->twicePwr48 = interpolate(chan->channel, clo, chi, + pNewPower->twicePwr48 = interpolate(chan->ic_freq, clo, chi, powInfo[ixlo].twicePwr48, powInfo[ixhi].twicePwr48); - pNewPower->twicePwr54 = interpolate(chan->channel, clo, chi, + pNewPower->twicePwr54 = interpolate(chan->ic_freq, clo, chi, powInfo[ixlo].twicePwr54, powInfo[ixhi].twicePwr54); } @@ -1681,7 +1468,7 @@ findEdgePower(struct ath_hal *ah, u_int * operating channel and mode. */ static HAL_BOOL -setRateTable(struct ath_hal *ah, HAL_CHANNEL *chan, +setRateTable(struct ath_hal *ah, const struct ieee80211_channel *chan, int16_t tpcScaleReduction, int16_t powerLimit, int16_t *pMinPower, int16_t *pMaxPower) { @@ -1694,7 +1481,7 @@ setRateTable(struct ath_hal *ah, HAL_CHA int16_t scaledPower; u_int8_t cfgCtl; - twiceMaxRDPower = chan->maxRegTxPower * 2; + twiceMaxRDPower = chan->ic_maxregpower * 2; *pMaxPower = -MAX_RATE_POWER; *pMinPower = MAX_RATE_POWER; @@ -1702,16 +1489,16 @@ setRateTable(struct ath_hal *ah, HAL_CHA cfgCtl = ath_hal_getctl(ah, chan); rep = findEdgePower(ah, cfgCtl); if (rep != AH_NULL) - twiceMaxEdgePower = ar5212GetMaxEdgePower(chan->channel, rep); + twiceMaxEdgePower = ar5212GetMaxEdgePower(chan->ic_freq, rep); else twiceMaxEdgePower = MAX_RATE_POWER; - if (IS_CHAN_G(chan)) { + if (IEEE80211_IS_CHAN_G(chan)) { /* Check for a CCK CTL for 11G CCK powers */ cfgCtl = (cfgCtl & 0xFC) | 0x01; rep = findEdgePower(ah, cfgCtl); if (rep != AH_NULL) - twiceMaxEdgePowerCck = ar5212GetMaxEdgePower(chan->channel, rep); + twiceMaxEdgePowerCck = ar5212GetMaxEdgePower(chan->ic_freq, rep); else twiceMaxEdgePowerCck = MAX_RATE_POWER; } else { @@ -1720,7 +1507,7 @@ setRateTable(struct ath_hal *ah, HAL_CHA } /* Get Antenna Gain reduction */ - if (IS_CHAN_5GHZ(chan)) { + if (IEEE80211_IS_CHAN_5GHZ(chan)) { twiceAntennaGain = antennaGainMax[0]; } else { twiceAntennaGain = antennaGainMax[1]; @@ -1728,9 +1515,9 @@ setRateTable(struct ath_hal *ah, HAL_CHA *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 20:17:13 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C600106566B; Tue, 27 Jan 2009 20:17:13 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E52478FC08; Tue, 27 Jan 2009 20:17:12 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RKHCw5095599; Tue, 27 Jan 2009 20:17:12 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RKHC2A095598; Tue, 27 Jan 2009 20:17:12 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901272017.n0RKHC2A095598@svn.freebsd.org> From: Sam Leffler Date: Tue, 27 Jan 2009 20:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187784 - user/sam/wifi/tools/tools/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 20:17:13 -0000 Author: sam Date: Tue Jan 27 20:17:12 2009 New Revision: 187784 URL: http://svn.freebsd.org/changeset/base/187784 Log: merge athrd addition Modified: user/sam/wifi/tools/tools/ath/Makefile Modified: user/sam/wifi/tools/tools/ath/Makefile ============================================================================== --- user/sam/wifi/tools/tools/ath/Makefile Tue Jan 27 20:16:40 2009 (r187783) +++ user/sam/wifi/tools/tools/ath/Makefile Tue Jan 27 20:17:12 2009 (r187784) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= athdebug athkey athprom athregs athstats +SUBDIR= athdebug athkey athprom athrd athregs athstats .include From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 20:17:47 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E2921065672; Tue, 27 Jan 2009 20:17:47 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CEDF8FC19; Tue, 27 Jan 2009 20:17:47 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RKHleN095643; Tue, 27 Jan 2009 20:17:47 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RKHl0x095642; Tue, 27 Jan 2009 20:17:47 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901272017.n0RKHl0x095642@svn.freebsd.org> From: Sam Leffler Date: Tue, 27 Jan 2009 20:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187785 - user/sam/wifi/tools/tools/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 20:17:48 -0000 Author: sam Date: Tue Jan 27 20:17:47 2009 New Revision: 187785 URL: http://svn.freebsd.org/changeset/base/187785 Log: merge from head Modified: user/sam/wifi/tools/tools/ath/Makefile.inc Modified: user/sam/wifi/tools/tools/ath/Makefile.inc ============================================================================== --- user/sam/wifi/tools/tools/ath/Makefile.inc Tue Jan 27 20:17:12 2009 (r187784) +++ user/sam/wifi/tools/tools/ath/Makefile.inc Tue Jan 27 20:17:47 2009 (r187785) @@ -6,6 +6,7 @@ NO_MAN= ATH_DEFAULT= ath0 CFLAGS+=-DATH_DEFAULT='"${ATH_DEFAULT}"' -CFLAGS+=-I../common -CFLAGS+=-I../../../../sys/dev/ath -CFLAGS+=-I../../../../sys/dev/ath/ath_hal +CFLAGS+=-I${.CURDIR} +CFLAGS+=-I${.CURDIR}/../common +CFLAGS+=-I${.CURDIR}/../../../../sys/dev/ath +CFLAGS+=-I${.CURDIR}/../../../../sys/dev/ath/ath_hal From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 20:26:00 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D311106564A; Tue, 27 Jan 2009 20:26:00 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECD928FC1D; Tue, 27 Jan 2009 20:25:59 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RKPxef095934; Tue, 27 Jan 2009 20:25:59 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RKPtmI095829; Tue, 27 Jan 2009 20:25:55 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901272025.n0RKPtmI095829@svn.freebsd.org> From: Sam Leffler Date: Tue, 27 Jan 2009 20:25:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187786 - in user/sam/wifi/sys/dev/ath/ath_hal: . ar5210 ar5211 ar5212 ar5312 ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 20:26:00 -0000 Author: sam Date: Tue Jan 27 20:25:55 2009 New Revision: 187786 URL: http://svn.freebsd.org/changeset/base/187786 Log: update my copyright Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.c user/sam/wifi/sys/dev/ath/ath_hal/ah.h user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.c user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.c user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5111.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312.h user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008 Sam Leffler, Errno Consulting + * Copyright (c) 2009 Sam Leffler, Errno Consulting * Copyright (c) 2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008 Sam Leffler, Errno Consulting + * Copyright (c) 2009 Sam Leffler, Errno Consulting * Copyright (c) 2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008 Sam Leffler, Errno Consulting + * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting * Copyright (c) 2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008 Sam Leffler, Errno Consulting + * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting * Copyright (c) 2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_internal.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2005-2006 Atheros Communications, Inc. * All rights reserved. * Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2004 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2006 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5111.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5111.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5111.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_rfgain.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416desc.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416desc.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416phy.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416reg.h Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * Copyright (c) 2002-2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c Tue Jan 27 20:17:47 2009 (r187785) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c Tue Jan 27 20:25:55 2009 (r187786) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008 Sam Leffler, Errno Consulting + * Copyright (c) 2008-2009 Sam Leffler, Errno Consulting * Copyright (c) 2008 Atheros Communications, Inc. * * Permission to use, copy, modify, and/or distribute this software for any From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 20:28:05 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26A90106566C; Tue, 27 Jan 2009 20:28:05 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1144F8FC1B; Tue, 27 Jan 2009 20:28:05 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RKS5ir096138; Tue, 27 Jan 2009 20:28:05 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RKS1Yv096043; Tue, 27 Jan 2009 20:28:01 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901272028.n0RKS1Yv096043@svn.freebsd.org> From: Sam Leffler Date: Tue, 27 Jan 2009 20:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187788 - in user/sam/wifi/sys/dev/ath/ath_hal: . ar5210 ar5211 ar5212 ar5312 ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 20:28:06 -0000 Author: sam Date: Tue Jan 27 20:28:01 2009 New Revision: 187788 URL: http://svn.freebsd.org/changeset/base/187788 Log: switch to FreeBSD keyword; this'll be required to commit to head Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.h user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ah.h,v 1.15 2008/11/15 03:43:50 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AH_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ah_debug.h,v 1.1 2008/10/12 16:44:34 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AH_DEBUG_H_ #define _ATH_AH_DEBUG_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ah_decode.h,v 1.4 2008/11/10 04:08:00 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AH_DECODE_H_ #define _ATH_AH_DECODE_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ah_desc.h,v 1.5 2008/11/10 04:08:00 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_DESC_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ah_devid.h,v 1.4 2008/10/06 18:32:46 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_DEVID_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ah_eeprom.h,v 1.11 2008/11/27 22:32:48 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AH_EEPROM_H_ #define _ATH_AH_EEPROM_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ah_eeprom_v1.c,v 1.1 2008/11/11 02:40:11 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ah_eeprom_v1.h,v 1.1 2008/11/11 02:40:11 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AH_EEPROM_V1_H_ #define _ATH_AH_EEPROM_V1_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ah_eeprom_v14.h,v 1.3 2008/11/10 04:08:00 sam Exp $ + * $FreeBSD */ #ifndef _AH_EEPROM_V14_H_ #define _AH_EEPROM_V14_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ah_eeprom_v3.h,v 1.2 2008/11/10 04:08:00 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AH_EEPROM_V3_H_ #define _ATH_AH_EEPROM_V3_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Tue Jan 27 20:28:01 2009 (r187788) @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_regdomain.c,v 1.24 2008/11/27 22:29:27 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ah_soc.h,v 1.4 2008/11/10 04:08:00 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AH_SOC_H_ #define _ATH_AH_SOC_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210.h,v 1.8 2008/11/11 02:40:13 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AR5210_H_ #define _ATH_AR5210_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210_attach.c,v 1.9 2008/11/11 02:40:13 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210_beacon.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210_interrupts.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210_keycache.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210_misc.c,v 1.6 2008/11/27 22:29:37 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210_phy.c,v 1.3 2008/11/10 01:19:37 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210_power.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210_recv.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210_reset.c,v 1.8 2008/11/11 17:25:16 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210_xmit.c,v 1.5 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210desc.h,v 1.5 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_AR5210DESC_H #define _DEV_ATH_AR5210DESC_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210phy.h,v 1.4 2008/11/10 01:19:37 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_AR5210PHY_H #define _DEV_ATH_AR5210PHY_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5210reg.h,v 1.4 2008/11/10 01:19:37 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_AR5210REG_H #define _DEV_ATH_AR5210REG_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211.h,v 1.8 2008/11/10 22:08:47 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AR5211_H_ #define _ATH_AR5211_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211_attach.c,v 1.11 2008/11/27 22:29:52 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211_beacon.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211_interrupts.c,v 1.6 2008/11/27 22:29:52 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211_keycache.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211_misc.c,v 1.7 2008/11/27 22:29:52 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211_phy.c,v 1.3 2008/11/10 01:19:37 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211_power.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211_recv.c,v 1.4 2008/11/10 04:08:02 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211_reset.c,v 1.9 2008/11/27 22:29:52 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211_xmit.c,v 1.6 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211desc.h,v 1.5 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_AR5211DESC_H #define _DEV_ATH_AR5211DESC_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211phy.h,v 1.4 2008/11/10 01:19:38 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_AR5211PHY_H #define _DEV_ATH_AR5211PHY_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5211reg.h,v 1.4 2008/11/10 01:19:38 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_AR5211REG_H #define _DEV_ATH_AR5211REG_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar2316.c,v 1.9 2008/11/15 22:15:46 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar2317.c,v 1.8 2008/11/15 22:15:46 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar2413.c,v 1.8 2008/11/15 22:15:46 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar2425.c,v 1.8 2008/11/16 21:33:05 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5112.c,v 1.7 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212.h,v 1.16 2008/11/22 07:42:00 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AR5212_H_ #define _ATH_AR5212_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212_attach.c,v 1.18 2008/11/19 22:10:42 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212_beacon.c,v 1.6 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212_eeprom.c,v 1.6 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212_gpio.c,v 1.3 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212_interrupts.c,v 1.6 2008/11/27 22:30:00 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212_keycache.c,v 1.4 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212_phy.c,v 1.5 2008/11/15 03:43:53 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212_power.c,v 1.4 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212_recv.c,v 1.4 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212_reset.c,v 1.20 2008/11/27 22:30:00 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212_xmit.c,v 1.7 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212desc.h,v 1.4 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AR5212_DESC_H_ #define _ATH_AR5212_DESC_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212phy.h,v 1.7 2008/11/19 21:23:01 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_AR5212PHY_H_ #define _DEV_ATH_AR5212PHY_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5212reg.h,v 1.5 2008/11/16 06:45:43 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_AR5212REG_H_ #define _DEV_ATH_AR5212REG_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5311reg.h,v 1.3 2008/10/06 18:32:50 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_AR5311REG_H_ #define _DEV_ATH_AR5311REG_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5413.c,v 1.8 2008/11/15 22:15:46 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5312_eeprom.c,v 1.4 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5312_gpio.c,v 1.3 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5312_interrupts.c,v 1.2 2008/11/10 01:19:39 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5312_misc.c,v 1.4 2008/11/22 07:40:15 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5312_power.c,v 1.4 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5312_reset.c,v 1.10 2008/11/22 07:41:37 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5312phy.h,v 1.3 2008/10/06 18:32:50 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_AR5312PHY_H_ #define _DEV_ATH_AR5312PHY_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5312reg.h,v 1.4 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD */ #ifndef _DEV_ATH_AR5312REG_H_ #define _DEV_ATH_AR5312REG_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5315_gpio.c,v 1.3 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar2133.c,v 1.13 2008/11/11 00:11:30 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416.h,v 1.19 2008/11/11 21:38:13 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AR5416_H_ #define _ATH_AR5416_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_ani.c,v 1.1 2008/11/11 20:46:06 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_attach.c,v 1.27 2008/11/27 22:30:07 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_beacon.c,v 1.8 2008/11/11 01:03:12 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_cal.c,v 1.7 2008/11/11 17:43:23 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_cal.h,v 1.3 2008/11/11 17:43:23 sam Exp $ + * $FreeBSD */ #ifndef _ATH_AR5416_CAL_H_ #define _ATH_AR5416_CAL_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_cal_adcdc.c,v 1.2 2008/11/11 17:43:23 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_cal_adcgain.c,v 1.2 2008/11/11 17:43:23 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_cal_iq.c,v 1.2 2008/11/11 17:43:23 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_eeprom.c,v 1.6 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_gpio.c,v 1.3 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_interrupts.c,v 1.6 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_keycache.c,v 1.3 2008/11/10 04:08:04 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_misc.c,v 1.12 2008/11/27 22:30:07 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_phy.c,v 1.4 2008/11/27 22:30:08 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_power.c,v 1.6 2008/11/11 00:11:30 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_recv.c,v 1.7 2008/11/11 20:46:06 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_reset.c,v 1.27 2008/11/27 22:30:08 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Tue Jan 27 20:26:45 2009 (r187787) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Tue Jan 27 20:28:01 2009 (r187788) @@ -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. * - * $Id: ar5416_xmit.c,v 1.9 2008/11/27 22:30:08 sam Exp $ + * $FreeBSD */ #include "opt_ah.h" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Tue Jan 27 20:34:14 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B83621065674; Tue, 27 Jan 2009 20:34:14 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4F218FC1D; Tue, 27 Jan 2009 20:34:14 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0RKYESL096312; Tue, 27 Jan 2009 20:34:14 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0RKYEK9096302; Tue, 27 Jan 2009 20:34:14 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901272034.n0RKYEK9096302@svn.freebsd.org> From: Sam Leffler Date: Tue, 27 Jan 2009 20:34:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187789 - in user/sam/wifi/sys/dev/ath: . ath_rate/amrr ath_rate/onoe ath_rate/sample X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2009 20:34:15 -0000 Author: sam Date: Tue Jan 27 20:34:14 2009 New Revision: 187789 URL: http://svn.freebsd.org/changeset/base/187789 Log: more copyright stuff Modified: user/sam/wifi/sys/dev/ath/ah_osdep.c user/sam/wifi/sys/dev/ath/ah_osdep.h user/sam/wifi/sys/dev/ath/ath_rate/amrr/amrr.c user/sam/wifi/sys/dev/ath/ath_rate/amrr/amrr.h user/sam/wifi/sys/dev/ath/ath_rate/onoe/onoe.c user/sam/wifi/sys/dev/ath/ath_rate/onoe/onoe.h user/sam/wifi/sys/dev/ath/ath_rate/sample/sample.c user/sam/wifi/sys/dev/ath/ath_rate/sample/sample.h user/sam/wifi/sys/dev/ath/if_ath_pci.c user/sam/wifi/sys/dev/ath/if_athrate.h Modified: user/sam/wifi/sys/dev/ath/ah_osdep.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ah_osdep.c Tue Jan 27 20:28:01 2009 (r187788) +++ user/sam/wifi/sys/dev/ath/ah_osdep.c Tue Jan 27 20:34:14 2009 (r187789) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: user/sam/wifi/sys/dev/ath/ah_osdep.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ah_osdep.h Tue Jan 27 20:28:01 2009 (r187788) +++ user/sam/wifi/sys/dev/ath/ah_osdep.h Tue Jan 27 20:34:14 2009 (r187789) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: user/sam/wifi/sys/dev/ath/ath_rate/amrr/amrr.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_rate/amrr/amrr.c Tue Jan 27 20:28:01 2009 (r187788) +++ user/sam/wifi/sys/dev/ath/ath_rate/amrr/amrr.c Tue Jan 27 20:34:14 2009 (r187789) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2004 INRIA - * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: user/sam/wifi/sys/dev/ath/ath_rate/amrr/amrr.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_rate/amrr/amrr.h Tue Jan 27 20:28:01 2009 (r187788) +++ user/sam/wifi/sys/dev/ath/ath_rate/amrr/amrr.h Tue Jan 27 20:34:14 2009 (r187789) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2004 INRIA - * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: user/sam/wifi/sys/dev/ath/ath_rate/onoe/onoe.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_rate/onoe/onoe.c Tue Jan 27 20:28:01 2009 (r187788) +++ user/sam/wifi/sys/dev/ath/ath_rate/onoe/onoe.c Tue Jan 27 20:34:14 2009 (r187789) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: user/sam/wifi/sys/dev/ath/ath_rate/onoe/onoe.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_rate/onoe/onoe.h Tue Jan 27 20:28:01 2009 (r187788) +++ user/sam/wifi/sys/dev/ath/ath_rate/onoe/onoe.h Tue Jan 27 20:34:14 2009 (r187789) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2007 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: user/sam/wifi/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_rate/sample/sample.c Tue Jan 27 20:28:01 2009 (r187788) +++ user/sam/wifi/sys/dev/ath/ath_rate/sample/sample.c Tue Jan 27 20:34:14 2009 (r187789) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2005 John Bicket + * Copyright (c) 2006-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: user/sam/wifi/sys/dev/ath/ath_rate/sample/sample.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_rate/sample/sample.h Tue Jan 27 20:28:01 2009 (r187788) +++ user/sam/wifi/sys/dev/ath/ath_rate/sample/sample.h Tue Jan 27 20:34:14 2009 (r187789) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2005 John Bicket + * Copyright (c) 2006-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: user/sam/wifi/sys/dev/ath/if_ath_pci.c ============================================================================== --- user/sam/wifi/sys/dev/ath/if_ath_pci.c Tue Jan 27 20:28:01 2009 (r187788) +++ user/sam/wifi/sys/dev/ath/if_ath_pci.c Tue Jan 27 20:34:14 2009 (r187789) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: user/sam/wifi/sys/dev/ath/if_athrate.h ============================================================================== --- user/sam/wifi/sys/dev/ath/if_athrate.h Tue Jan 27 20:28:01 2009 (r187788) +++ user/sam/wifi/sys/dev/ath/if_athrate.h Tue Jan 27 20:34:14 2009 (r187789) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2004-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2004-2009 Sam Leffler, Errno Consulting * Copyright (c) 2004 Video54 Technologies, Inc. * All rights reserved. * From owner-svn-src-user@FreeBSD.ORG Wed Jan 28 00:15:39 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C63D41065677; Wed, 28 Jan 2009 00:15:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B051F8FC12; Wed, 28 Jan 2009 00:15:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0S0Fdrl002050; Wed, 28 Jan 2009 00:15:39 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0S0FZe8001957; Wed, 28 Jan 2009 00:15:35 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901280015.n0S0FZe8001957@svn.freebsd.org> From: Sam Leffler Date: Wed, 28 Jan 2009 00:15:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187804 - in user/sam/wifi/sys/dev/ath/ath_hal: . ar5210 ar5211 ar5212 ar5312 ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 00:15:41 -0000 Author: sam Date: Wed Jan 28 00:15:35 2009 New Revision: 187804 URL: http://svn.freebsd.org/changeset/base/187804 Log: fix $FreeBSD$ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.h user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416desc.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416phy.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416reg.h user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar9160_attach.c Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AH_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_debug.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AH_DEBUG_H_ #define _ATH_AH_DEBUG_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_decode.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AH_DECODE_H_ #define _ATH_AH_DECODE_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_desc.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_DESC_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_devid.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_DEVID_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AH_EEPROM_H_ #define _ATH_AH_EEPROM_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v1.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AH_EEPROM_V1_H_ #define _ATH_AH_EEPROM_V1_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v14.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _AH_EEPROM_V14_H_ #define _AH_EEPROM_V14_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_eeprom_v3.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AH_EEPROM_V3_H_ #define _ATH_AH_EEPROM_V3_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Wed Jan 28 00:15:35 2009 (r187804) @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $FreeBSD + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_soc.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AH_SOC_H_ #define _ATH_AH_SOC_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AR5210_H_ #define _ATH_AR5210_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_interrupts.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_keycache.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_phy.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_power.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_recv.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210desc.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5210DESC_H #define _DEV_ATH_AR5210DESC_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210phy.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5210PHY_H #define _DEV_ATH_AR5210PHY_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5210REG_H #define _DEV_ATH_AR5210REG_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AR5211_H_ #define _ATH_AR5211_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_beacon.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_interrupts.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_keycache.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_phy.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_power.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_recv.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211desc.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5211DESC_H #define _DEV_ATH_AR5211DESC_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211phy.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5211PHY_H #define _DEV_ATH_AR5211PHY_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5211REG_H #define _DEV_ATH_AR5211REG_H Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2316.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2317.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2413.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar2425.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5112.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AR5212_H_ #define _ATH_AR5212_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_eeprom.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_gpio.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_keycache.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_power.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212desc.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AR5212_DESC_H_ #define _ATH_AR5212_DESC_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212phy.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5212PHY_H_ #define _DEV_ATH_AR5212PHY_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5212reg.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5212REG_H_ #define _DEV_ATH_AR5212REG_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5311reg.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5311REG_H_ #define _DEV_ATH_AR5311REG_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5212/ar5413.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_eeprom.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_gpio.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_interrupts.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_misc.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_power.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312phy.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5312PHY_H_ #define _DEV_ATH_AR5312PHY_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5312reg.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _DEV_ATH_AR5312REG_H_ #define _DEV_ATH_AR5312REG_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5312/ar5315_gpio.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar2133.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AR5416_H_ #define _ATH_AR5416_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #ifndef _ATH_AR5416_CAL_H_ #define _ATH_AR5416_CAL_H_ Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_eeprom.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_gpio.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_keycache.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_phy.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_power.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" Modified: user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Tue Jan 27 23:48:13 2009 (r187803) +++ user/sam/wifi/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Wed Jan 28 00:15:35 2009 (r187804) @@ -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 + * $FreeBSD$ */ #include "opt_ah.h" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Wed Jan 28 16:37:49 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9880310656D3; Wed, 28 Jan 2009 16:37:49 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A54C8FC30; Wed, 28 Jan 2009 16:37:49 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0SGbnCA026339; Wed, 28 Jan 2009 16:37:49 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0SGbnqo026334; Wed, 28 Jan 2009 16:37:49 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901281637.n0SGbnqo026334@svn.freebsd.org> From: Alan Cox Date: Wed, 28 Jan 2009 16:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187829 - in user/alc/zerocopy/sys: kern sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 16:38:37 -0000 Author: alc Date: Wed Jan 28 16:37:49 2009 New Revision: 187829 URL: http://svn.freebsd.org/changeset/base/187829 Log: Adapt the zero-copy transmit mechanism to work with a new explicit API. At the moment, the API is a straw man, and not a serious or complete proposal. However, it does allow for testing the implementation. Modified: user/alc/zerocopy/sys/kern/uipc_cow.c user/alc/zerocopy/sys/kern/uipc_socket.c user/alc/zerocopy/sys/kern/uipc_syscalls.c user/alc/zerocopy/sys/sys/socket.h user/alc/zerocopy/sys/sys/socketvar.h Modified: user/alc/zerocopy/sys/kern/uipc_cow.c ============================================================================== --- user/alc/zerocopy/sys/kern/uipc_cow.c Wed Jan 28 16:23:21 2009 (r187828) +++ user/alc/zerocopy/sys/kern/uipc_cow.c Wed Jan 28 16:37:49 2009 (r187829) @@ -63,39 +63,12 @@ struct netsend_cow_stats { int fail_not_mapped; int fail_sf_buf; int success; - int iodone; }; static struct netsend_cow_stats socow_stats; -static void socow_iodone(void *addr, void *args); - -static void -socow_iodone(void *addr, void *args) -{ - struct sf_buf *sf; - vm_page_t pp; - - sf = args; - pp = sf_buf_page(sf); - sf_buf_free(sf); - /* remove COW mapping */ - vm_page_lock_queues(); - vm_page_cowclear(pp); - vm_page_unwire(pp, 0); - /* - * Check for the object going away on us. This can - * happen since we don't hold a reference to it. - * If so, we're responsible for freeing the page. - */ - if (pp->wire_count == 0 && pp->object == NULL) - vm_page_free(pp); - vm_page_unlock_queues(); - socow_stats.iodone++; -} - int -socow_setup(struct mbuf *m0, struct uio *uio) +socow_setup(struct mbuf *m0, struct uio *uio, struct sendfile_sync *sfs) { struct sf_buf *sf; vm_page_t pp; @@ -125,19 +98,10 @@ socow_setup(struct mbuf *m0, struct uio return(0); } - /* - * set up COW - */ - vm_page_lock_queues(); - if (vm_page_cowsetup(pp) != 0) { - vm_page_unhold(pp); - vm_page_unlock_queues(); - return (0); - } - /* * wire the page for I/O */ + vm_page_lock_queues(); vm_page_wire(pp); vm_page_unhold(pp); vm_page_unlock_queues(); @@ -148,7 +112,6 @@ socow_setup(struct mbuf *m0, struct uio sf = sf_buf_alloc(pp, SFB_CATCH); if (!sf) { vm_page_lock_queues(); - vm_page_cowclear(pp); vm_page_unwire(pp, 0); /* * Check for the object going away on us. This can @@ -164,12 +127,17 @@ socow_setup(struct mbuf *m0, struct uio /* * attach to mbuf */ - MEXTADD(m0, sf_buf_kva(sf), PAGE_SIZE, socow_iodone, - (void*)sf_buf_kva(sf), sf, M_RDONLY, EXT_SFBUF); + MEXTADD(m0, sf_buf_kva(sf), PAGE_SIZE, sf_buf_mext, + sfs, sf, M_RDONLY, EXT_SFBUF); m0->m_len = PAGE_SIZE - offset; m0->m_data = (caddr_t)sf_buf_kva(sf) + offset; socow_stats.success++; + if (sfs != NULL) { + mtx_lock(&sfs->mtx); + sfs->count++; + mtx_unlock(&sfs->mtx); + } iov = uio->uio_iov; iov->iov_base = (char *)iov->iov_base + m0->m_len; iov->iov_len -= m0->m_len; Modified: user/alc/zerocopy/sys/kern/uipc_socket.c ============================================================================== --- user/alc/zerocopy/sys/kern/uipc_socket.c Wed Jan 28 16:23:21 2009 (r187828) +++ user/alc/zerocopy/sys/kern/uipc_socket.c Wed Jan 28 16:37:49 2009 (r187829) @@ -105,6 +105,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -176,14 +177,11 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, numopens &numopensockets, 0, "Number of open sockets"); #ifdef ZERO_COPY_SOCKETS /* These aren't static because they're used in other files. */ -int so_zero_copy_send = 1; int so_zero_copy_receive = 1; SYSCTL_NODE(_kern_ipc, OID_AUTO, zero_copy, CTLFLAG_RD, 0, "Zero copy controls"); SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO, receive, CTLFLAG_RW, &so_zero_copy_receive, 0, "Enable zero copy receive"); -SYSCTL_INT(_kern_ipc_zero_copy, OID_AUTO, send, CTLFLAG_RW, - &so_zero_copy_send, 0, "Enable zero copy send"); #endif /* ZERO_COPY_SOCKETS */ /* @@ -831,7 +829,7 @@ struct so_zerocopy_stats so_zerocp_stats */ static int sosend_copyin(struct uio *uio, struct mbuf **retmp, int atomic, long *space, - int flags) + int flags, struct sendfile_sync *sfs) { struct mbuf *m, **mp, *top; long len, resid; @@ -857,13 +855,13 @@ sosend_copyin(struct uio *uio, struct mb m->m_pkthdr.rcvif = NULL; } else m = m_get(M_WAITOK, MT_DATA); - if (so_zero_copy_send && + if ((flags & (MSG_AZCS | MSG_SZCS)) != 0 && resid>=PAGE_SIZE && *space>=PAGE_SIZE && uio->uio_iov->iov_len>=PAGE_SIZE) { so_zerocp_stats.size_ok++; so_zerocp_stats.align_ok++; - cow_send = socow_setup(m, uio); + cow_send = socow_setup(m, uio, sfs); len = cow_send; } if (!cow_send) { @@ -934,6 +932,7 @@ int sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, struct thread *td) { + struct sendfile_sync *sfs = NULL; long space, resid; int clen = 0, error, dontroute; #ifdef ZERO_COPY_SOCKETS @@ -963,6 +962,11 @@ sosend_dgram(struct socket *so, struct s goto out; } + if (flags & MSG_SZCS) { + sfs = malloc(sizeof *sfs, M_TEMP, M_WAITOK | M_ZERO); + mtx_init(&sfs->mtx, "sendfile", MTX_DEF, 0); + cv_init(&sfs->cv, "sendfile"); + } dontroute = (flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0; if (td != NULL) @@ -1025,7 +1029,7 @@ sosend_dgram(struct socket *so, struct s top->m_flags |= M_EOR; } else { #ifdef ZERO_COPY_SOCKETS - error = sosend_copyin(uio, &top, atomic, &space, flags); + error = sosend_copyin(uio, &top, atomic, &space, flags, sfs); if (error) goto out; #else @@ -1088,6 +1092,15 @@ out: m_freem(top); if (control != NULL) m_freem(control); + if (sfs != NULL) { + mtx_lock(&sfs->mtx); + if (sfs->count != 0) + cv_wait(&sfs->cv, &sfs->mtx); + KASSERT(sfs->count == 0, ("sendfile sync still busy")); + cv_destroy(&sfs->cv); + mtx_destroy(&sfs->mtx); + free(sfs, M_TEMP); + } return (error); } @@ -1108,6 +1121,7 @@ int sosend_generic(struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, struct thread *td) { + struct sendfile_sync *sfs = NULL; long space, resid; int clen = 0, error, dontroute; int atomic = sosendallatonce(so) || top; @@ -1131,6 +1145,11 @@ sosend_generic(struct socket *so, struct goto out; } + if (flags & MSG_SZCS) { + sfs = malloc(sizeof(*sfs), M_TEMP, M_WAITOK | M_ZERO); + mtx_init(&sfs->mtx, "sendfile", MTX_DEF, 0); + cv_init(&sfs->cv, "sendfile"); + } dontroute = (flags & MSG_DONTROUTE) && (so->so_options & SO_DONTROUTE) == 0 && (so->so_proto->pr_flags & PR_ATOMIC); @@ -1213,7 +1232,7 @@ restart: } else { #ifdef ZERO_COPY_SOCKETS error = sosend_copyin(uio, &top, atomic, - &space, flags); + &space, flags, sfs); if (error != 0) goto release; #else @@ -1283,6 +1302,15 @@ out: m_freem(top); if (control != NULL) m_freem(control); + if (sfs != NULL) { + mtx_lock(&sfs->mtx); + if (sfs->count != 0) + cv_wait(&sfs->cv, &sfs->mtx); + KASSERT(sfs->count == 0, ("sendfile sync still busy")); + cv_destroy(&sfs->cv); + mtx_destroy(&sfs->mtx); + free(sfs, M_TEMP); + } return (error); } Modified: user/alc/zerocopy/sys/kern/uipc_syscalls.c ============================================================================== --- user/alc/zerocopy/sys/kern/uipc_syscalls.c Wed Jan 28 16:23:21 2009 (r187828) +++ user/alc/zerocopy/sys/kern/uipc_syscalls.c Wed Jan 28 16:37:49 2009 (r187829) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1676,14 +1677,6 @@ getsockaddr(namp, uaddr, len) return (error); } -#include - -struct sendfile_sync { - struct mtx mtx; - struct cv cv; - unsigned count; -}; - /* * Detach mapped page and release resources back to the system. */ @@ -1867,8 +1860,7 @@ kern_sendfile(struct thread *td, struct mnw = 1; if (uap->flags & SF_SYNC) { - sfs = malloc(sizeof *sfs, M_TEMP, M_WAITOK); - memset(sfs, 0, sizeof *sfs); + sfs = malloc(sizeof *sfs, M_TEMP, M_WAITOK | M_ZERO); mtx_init(&sfs->mtx, "sendfile", MTX_DEF, 0); cv_init(&sfs->cv, "sendfile"); } Modified: user/alc/zerocopy/sys/sys/socket.h ============================================================================== --- user/alc/zerocopy/sys/sys/socket.h Wed Jan 28 16:23:21 2009 (r187828) +++ user/alc/zerocopy/sys/sys/socket.h Wed Jan 28 16:37:49 2009 (r187829) @@ -465,6 +465,8 @@ struct msghdr { #endif #if __BSD_VISIBLE #define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */ +#define MSG_AZCS 0x100000 /* asynchronous zero-copy send */ +#define MSG_SZCS 0x200000 /* synchronous zero-copy send */ #endif /* Modified: user/alc/zerocopy/sys/sys/socketvar.h ============================================================================== --- user/alc/zerocopy/sys/sys/socketvar.h Wed Jan 28 16:23:21 2009 (r187828) +++ user/alc/zerocopy/sys/sys/socketvar.h Wed Jan 28 16:37:49 2009 (r187829) @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #ifdef _KERNEL @@ -286,6 +287,12 @@ struct accept_filter { SLIST_ENTRY(accept_filter) accf_next; }; +struct sendfile_sync { + struct mtx mtx; + struct cv cv; + unsigned count; +}; + #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_ACCF); MALLOC_DECLARE(M_PCB); @@ -314,7 +321,8 @@ int sobind(struct socket *so, struct soc int soclose(struct socket *so); int soconnect(struct socket *so, struct sockaddr *nam, struct thread *td); int soconnect2(struct socket *so1, struct socket *so2); -int socow_setup(struct mbuf *m0, struct uio *uio); +int socow_setup(struct mbuf *m0, struct uio *uio, + struct sendfile_sync *sfs); int socreate(int dom, struct socket **aso, int type, int proto, struct ucred *cred, struct thread *td); int sodisconnect(struct socket *so); From owner-svn-src-user@FreeBSD.ORG Wed Jan 28 18:51:13 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E39C106574A; Wed, 28 Jan 2009 18:51:13 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 161368FC13; Wed, 28 Jan 2009 18:51:13 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0SIpDXU029182; Wed, 28 Jan 2009 18:51:13 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0SIpCLO029158; Wed, 28 Jan 2009 18:51:12 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901281851.n0SIpCLO029158@svn.freebsd.org> From: Andrew Thompson Date: Wed, 28 Jan 2009 18:51:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187837 - in user/thompsa/usb: . bin/chmod bin/dd cddl/contrib/opensolaris/lib/libdtrace/common contrib/gdtoa contrib/gdtoa/test contrib/gdtoa/test/obad contrib/smbfs/mount_smbfs contri... X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 18:51:14 -0000 Author: thompsa Date: Wed Jan 28 18:51:11 2009 New Revision: 187837 URL: http://svn.freebsd.org/changeset/base/187837 Log: MFH r187303-187835 Added: user/thompsa/usb/contrib/gdtoa/gdtoa_fltrnds.h - copied unchanged from r187835, head/contrib/gdtoa/gdtoa_fltrnds.h user/thompsa/usb/contrib/gdtoa/test/obad/ - copied from r187835, head/contrib/gdtoa/test/obad/ user/thompsa/usb/lib/libarchive/test/test_write_disk_failures.c - copied unchanged from r187835, head/lib/libarchive/test/test_write_disk_failures.c user/thompsa/usb/lib/libarchive/test/test_write_disk_sparse.c - copied unchanged from r187835, head/lib/libarchive/test/test_write_disk_sparse.c user/thompsa/usb/sbin/ipfw/dummynet.c - copied unchanged from r187835, head/sbin/ipfw/dummynet.c user/thompsa/usb/sbin/ipfw/ipfw2.h - copied unchanged from r187835, head/sbin/ipfw/ipfw2.h user/thompsa/usb/sbin/ipfw/ipv6.c - copied unchanged from r187835, head/sbin/ipfw/ipv6.c user/thompsa/usb/sbin/ipfw/main.c - copied unchanged from r187835, head/sbin/ipfw/main.c user/thompsa/usb/sbin/ipfw/nat.c - copied unchanged from r187835, head/sbin/ipfw/nat.c user/thompsa/usb/share/man/man4/man4.powerpc/snd_ai2s.4 - copied unchanged from r187835, head/share/man/man4/man4.powerpc/snd_ai2s.4 user/thompsa/usb/share/man/man4/man4.powerpc/snd_davbus.4 - copied unchanged from r187835, head/share/man/man4/man4.powerpc/snd_davbus.4 user/thompsa/usb/share/man/man4/urtw.4 - copied unchanged from r187835, head/share/man/man4/urtw.4 user/thompsa/usb/share/man/man5/portindex.5 - copied unchanged from r187835, head/share/man/man5/portindex.5 user/thompsa/usb/sys/dev/sound/macio/ - copied from r187835, head/sys/dev/sound/macio/ user/thompsa/usb/sys/dev/syscons/teken/teken_scs.h - copied unchanged from r187835, head/sys/dev/syscons/teken/teken_scs.h user/thompsa/usb/sys/dev/usb/if_urtw.c - copied unchanged from r187835, head/sys/dev/usb/if_urtw.c user/thompsa/usb/sys/dev/usb/if_urtwreg.h - copied unchanged from r187835, head/sys/dev/usb/if_urtwreg.h user/thompsa/usb/sys/dev/usb/if_urtwvar.h - copied unchanged from r187835, head/sys/dev/usb/if_urtwvar.h user/thompsa/usb/sys/modules/sound/driver/ai2s/ - copied from r187835, head/sys/modules/sound/driver/ai2s/ user/thompsa/usb/sys/modules/sound/driver/davbus/ - copied from r187835, head/sys/modules/sound/driver/davbus/ user/thompsa/usb/sys/modules/urtw/ - copied from r187835, head/sys/modules/urtw/ user/thompsa/usb/tools/regression/usr.bin/jot/regress.wX1.out - copied unchanged from r187835, head/tools/regression/usr.bin/jot/regress.wX1.out user/thompsa/usb/tools/tools/ath/athrd/ - copied from r187835, head/tools/tools/ath/athrd/ user/thompsa/usb/tools/tools/sysbuild/ - copied from r187835, head/tools/tools/sysbuild/ user/thompsa/usb/usr.bin/mail/util.c - copied unchanged from r187835, head/usr.bin/mail/util.c user/thompsa/usb/usr.sbin/i2c/ - copied from r187835, head/usr.sbin/i2c/ Deleted: user/thompsa/usb/sys/dev/digi/con.CX-IBM.h user/thompsa/usb/sys/dev/digi/con.CX.h user/thompsa/usb/sys/dev/digi/con.EPCX.h user/thompsa/usb/sys/dev/digi/con.MBank.h user/thompsa/usb/tools/regression/usr.bin/jot/regress.wX.out user/thompsa/usb/usr.bin/mail/aux.c Modified: user/thompsa/usb/ (props changed) user/thompsa/usb/Makefile.inc1 user/thompsa/usb/ObsoleteFiles.inc user/thompsa/usb/UPDATING user/thompsa/usb/bin/chmod/chmod.1 user/thompsa/usb/bin/dd/dd.1 user/thompsa/usb/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c user/thompsa/usb/contrib/gdtoa/ (props changed) user/thompsa/usb/contrib/gdtoa/README user/thompsa/usb/contrib/gdtoa/g_Qfmt.c user/thompsa/usb/contrib/gdtoa/g__fmt.c user/thompsa/usb/contrib/gdtoa/g_ddfmt.c user/thompsa/usb/contrib/gdtoa/g_dfmt.c user/thompsa/usb/contrib/gdtoa/g_ffmt.c user/thompsa/usb/contrib/gdtoa/g_xLfmt.c user/thompsa/usb/contrib/gdtoa/g_xfmt.c user/thompsa/usb/contrib/gdtoa/gdtoa.c user/thompsa/usb/contrib/gdtoa/gdtoa.h user/thompsa/usb/contrib/gdtoa/gdtoaimp.h user/thompsa/usb/contrib/gdtoa/gethex.c user/thompsa/usb/contrib/gdtoa/makefile user/thompsa/usb/contrib/gdtoa/smisc.c user/thompsa/usb/contrib/gdtoa/strtod.c user/thompsa/usb/contrib/gdtoa/strtodg.c user/thompsa/usb/contrib/gdtoa/strtof.c user/thompsa/usb/contrib/gdtoa/strtopQ.c user/thompsa/usb/contrib/gdtoa/strtopd.c user/thompsa/usb/contrib/gdtoa/strtopdd.c user/thompsa/usb/contrib/gdtoa/strtopf.c user/thompsa/usb/contrib/gdtoa/strtopx.c user/thompsa/usb/contrib/gdtoa/strtopxL.c user/thompsa/usb/contrib/gdtoa/test/README user/thompsa/usb/contrib/gdtoa/test/getround.c user/thompsa/usb/contrib/gdtoa/test/makefile user/thompsa/usb/contrib/gdtoa/test/xsum0.out user/thompsa/usb/contrib/gdtoa/xsum0.out user/thompsa/usb/contrib/smbfs/mount_smbfs/mount_smbfs.8 user/thompsa/usb/contrib/smbfs/mount_smbfs/mount_smbfs.c user/thompsa/usb/contrib/wpa_supplicant/ (props changed) user/thompsa/usb/contrib/wpa_supplicant/ChangeLog user/thompsa/usb/contrib/wpa_supplicant/Makefile user/thompsa/usb/contrib/wpa_supplicant/base64.c user/thompsa/usb/contrib/wpa_supplicant/ctrl_iface.c user/thompsa/usb/contrib/wpa_supplicant/ctrl_iface_dbus.c user/thompsa/usb/contrib/wpa_supplicant/ctrl_iface_unix.c user/thompsa/usb/contrib/wpa_supplicant/dbus_dict_helpers.c user/thompsa/usb/contrib/wpa_supplicant/doc/docbook/wpa_background.8 user/thompsa/usb/contrib/wpa_supplicant/doc/docbook/wpa_cli.8 user/thompsa/usb/contrib/wpa_supplicant/doc/docbook/wpa_cli.sgml user/thompsa/usb/contrib/wpa_supplicant/doc/docbook/wpa_passphrase.8 user/thompsa/usb/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.8 user/thompsa/usb/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.conf.5 user/thompsa/usb/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.conf.sgml user/thompsa/usb/contrib/wpa_supplicant/doc/docbook/wpa_supplicant.sgml user/thompsa/usb/contrib/wpa_supplicant/driver_ndis.c user/thompsa/usb/contrib/wpa_supplicant/eap.c user/thompsa/usb/contrib/wpa_supplicant/eap_aka.c user/thompsa/usb/contrib/wpa_supplicant/eap_gpsk.c user/thompsa/usb/contrib/wpa_supplicant/eap_gpsk_common.c user/thompsa/usb/contrib/wpa_supplicant/eap_ttls.c user/thompsa/usb/contrib/wpa_supplicant/eloop.c user/thompsa/usb/contrib/wpa_supplicant/eloop.h user/thompsa/usb/contrib/wpa_supplicant/eloop_none.c user/thompsa/usb/contrib/wpa_supplicant/mlme.c user/thompsa/usb/contrib/wpa_supplicant/os_unix.c user/thompsa/usb/contrib/wpa_supplicant/preauth_test.c user/thompsa/usb/contrib/wpa_supplicant/radius.c user/thompsa/usb/contrib/wpa_supplicant/sha1.c user/thompsa/usb/contrib/wpa_supplicant/tls_openssl.c user/thompsa/usb/contrib/wpa_supplicant/version.h user/thompsa/usb/contrib/wpa_supplicant/wpa.c user/thompsa/usb/contrib/wpa_supplicant/wpa.h user/thompsa/usb/contrib/wpa_supplicant/wpa_cli.c user/thompsa/usb/contrib/wpa_supplicant/wpa_gui-qt4/networkconfig.cpp user/thompsa/usb/contrib/wpa_supplicant/wpa_gui-qt4/scanresults.cpp user/thompsa/usb/contrib/wpa_supplicant/wpa_gui-qt4/wpagui.cpp user/thompsa/usb/contrib/wpa_supplicant/wpa_gui/networkconfig.ui.h user/thompsa/usb/contrib/wpa_supplicant/wpa_gui/userdatarequest.ui.h user/thompsa/usb/contrib/wpa_supplicant/wpa_gui/wpagui.ui.h user/thompsa/usb/contrib/wpa_supplicant/wpa_i.h user/thompsa/usb/contrib/wpa_supplicant/wpa_supplicant.c user/thompsa/usb/etc/defaults/rc.conf user/thompsa/usb/etc/devd.conf user/thompsa/usb/etc/rc.d/jail user/thompsa/usb/etc/rc.d/ntpd user/thompsa/usb/etc/rc.shutdown user/thompsa/usb/etc/regdomain.xml user/thompsa/usb/include/paths.h user/thompsa/usb/lib/libarchive/archive_write_disk.c user/thompsa/usb/lib/libarchive/test/Makefile user/thompsa/usb/lib/libarchive/test/test_write_disk_secure.c user/thompsa/usb/lib/libc/gen/sysctl.3 user/thompsa/usb/lib/libc/locale/wcsftime.c user/thompsa/usb/lib/libc/stdio/ferror.3 user/thompsa/usb/lib/libc/stdio/printf.3 user/thompsa/usb/lib/libc/stdio/vfprintf.c user/thompsa/usb/lib/libc/stdio/vfscanf.c user/thompsa/usb/lib/libc/stdio/vfwprintf.c user/thompsa/usb/lib/libc/stdio/vfwscanf.c user/thompsa/usb/lib/libc/string/strlen.c user/thompsa/usb/lib/libpmc/libpmc.c user/thompsa/usb/libexec/comsat/comsat.c user/thompsa/usb/sbin/dumpfs/dumpfs.8 user/thompsa/usb/sbin/dumpfs/dumpfs.c user/thompsa/usb/sbin/fsck_ffs/fsck.h user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8 user/thompsa/usb/sbin/fsck_ffs/fsutil.c user/thompsa/usb/sbin/fsck_ffs/main.c user/thompsa/usb/sbin/ifconfig/ifieee80211.c user/thompsa/usb/sbin/ipfw/Makefile user/thompsa/usb/sbin/ipfw/ipfw2.c user/thompsa/usb/sbin/mount_nfs/mount_nfs.c user/thompsa/usb/sbin/mount_ntfs/mount_ntfs.8 user/thompsa/usb/sbin/recoverdisk/recoverdisk.c user/thompsa/usb/sbin/restore/interactive.c user/thompsa/usb/sbin/route/route.c user/thompsa/usb/share/man/man4/Makefile user/thompsa/usb/share/man/man4/bce.4 user/thompsa/usb/share/man/man4/bge.4 user/thompsa/usb/share/man/man4/gem.4 user/thompsa/usb/share/man/man4/hme.4 user/thompsa/usb/share/man/man4/iic.4 user/thompsa/usb/share/man/man4/man4.powerpc/Makefile user/thompsa/usb/share/man/man4/nge.4 user/thompsa/usb/share/man/man4/sdhci.4 user/thompsa/usb/share/man/man4/sk.4 user/thompsa/usb/share/man/man5/Makefile user/thompsa/usb/share/man/man5/rc.conf.5 user/thompsa/usb/share/man/man7/build.7 user/thompsa/usb/share/man/man7/ports.7 user/thompsa/usb/share/man/man7/tuning.7 user/thompsa/usb/share/man/man9/kthread.9 user/thompsa/usb/share/zoneinfo/ (props changed) user/thompsa/usb/share/zoneinfo/asia user/thompsa/usb/share/zoneinfo/backward user/thompsa/usb/share/zoneinfo/europe user/thompsa/usb/share/zoneinfo/leapseconds user/thompsa/usb/share/zoneinfo/northamerica user/thompsa/usb/share/zoneinfo/zone.tab user/thompsa/usb/sys/ (props changed) user/thompsa/usb/sys/amd64/amd64/cpu_switch.S user/thompsa/usb/sys/amd64/amd64/identcpu.c user/thompsa/usb/sys/amd64/conf/GENERIC user/thompsa/usb/sys/arm/arm/cpufunc_asm_sheeva.S (props changed) user/thompsa/usb/sys/arm/at91/at91.c user/thompsa/usb/sys/arm/at91/at91_mci.c user/thompsa/usb/sys/arm/at91/at91_twi.c user/thompsa/usb/sys/arm/at91/at91_twireg.h user/thompsa/usb/sys/arm/at91/at91var.h user/thompsa/usb/sys/arm/at91/uart_bus_at91usart.c user/thompsa/usb/sys/arm/at91/uart_cpu_at91rm9200usart.c user/thompsa/usb/sys/arm/at91/uart_dev_at91usart.c user/thompsa/usb/sys/arm/include/vmparam.h user/thompsa/usb/sys/arm/xscale/i8134x/i81342_mcu.c user/thompsa/usb/sys/boot/forth/loader.conf user/thompsa/usb/sys/cam/cam_periph.c user/thompsa/usb/sys/cam/cam_xpt.c user/thompsa/usb/sys/cam/scsi/scsi_low.c user/thompsa/usb/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c user/thompsa/usb/sys/compat/linprocfs/linprocfs.c user/thompsa/usb/sys/compat/linux/linux_stats.c user/thompsa/usb/sys/compat/svr4/svr4_types.h user/thompsa/usb/sys/conf/NOTES user/thompsa/usb/sys/conf/files.amd64 user/thompsa/usb/sys/conf/files.i386 user/thompsa/usb/sys/conf/files.pc98 user/thompsa/usb/sys/conf/files.powerpc user/thompsa/usb/sys/conf/kmod.mk user/thompsa/usb/sys/conf/newvers.sh user/thompsa/usb/sys/conf/options user/thompsa/usb/sys/contrib/altq/altq/altq_subr.c user/thompsa/usb/sys/contrib/pf/ (props changed) user/thompsa/usb/sys/dev/acpica/acpi_battery.c user/thompsa/usb/sys/dev/agp/agp_via.c user/thompsa/usb/sys/dev/ath/ath_hal/ah.c user/thompsa/usb/sys/dev/ath/ath_hal/ah.h user/thompsa/usb/sys/dev/ath/ath_hal/ah_internal.h user/thompsa/usb/sys/dev/ath/ath_hal/ah_regdomain.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5210/ar5210.h user/thompsa/usb/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5210/ar5210_xmit.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5211/ar5211.h user/thompsa/usb/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5211/ar5211_misc.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5211/ar5211_xmit.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar2316.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar2317.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar2413.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar2425.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar5111.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar5112.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar5212.h user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar5212_xmit.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5212/ar5413.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5312/ar5312.h user/thompsa/usb/sys/dev/ath/ath_hal/ar5312/ar5312_reset.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5416/ar2133.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5416/ar5416.h user/thompsa/usb/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5416/ar5416_cal.h user/thompsa/usb/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c user/thompsa/usb/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c user/thompsa/usb/sys/dev/ath/if_ath.c user/thompsa/usb/sys/dev/ath/if_athvar.h user/thompsa/usb/sys/dev/bce/if_bce.c user/thompsa/usb/sys/dev/hwpmc/hwpmc_core.c user/thompsa/usb/sys/dev/hwpmc/hwpmc_intel.c user/thompsa/usb/sys/dev/hwpmc/pmc_events.h user/thompsa/usb/sys/dev/iicbus/iic.c user/thompsa/usb/sys/dev/iicbus/iic.h user/thompsa/usb/sys/dev/iicbus/iicbus.c user/thompsa/usb/sys/dev/mmc/mmc.c user/thompsa/usb/sys/dev/msk/if_msk.c user/thompsa/usb/sys/dev/msk/if_mskreg.h user/thompsa/usb/sys/dev/pci/pci.c user/thompsa/usb/sys/dev/ppbus/if_plip.c user/thompsa/usb/sys/dev/ppbus/immio.c user/thompsa/usb/sys/dev/ppbus/lpbb.c user/thompsa/usb/sys/dev/ppbus/lpt.c user/thompsa/usb/sys/dev/ppbus/pcfclock.c user/thompsa/usb/sys/dev/ppbus/ppb_1284.c user/thompsa/usb/sys/dev/ppbus/ppb_base.c user/thompsa/usb/sys/dev/ppbus/ppb_msq.c user/thompsa/usb/sys/dev/ppbus/ppbconf.c user/thompsa/usb/sys/dev/ppbus/ppbconf.h user/thompsa/usb/sys/dev/ppbus/ppi.c user/thompsa/usb/sys/dev/ppbus/pps.c user/thompsa/usb/sys/dev/ppbus/vpo.c user/thompsa/usb/sys/dev/ppbus/vpoio.c user/thompsa/usb/sys/dev/ppc/ppc.c user/thompsa/usb/sys/dev/ppc/ppc_acpi.c user/thompsa/usb/sys/dev/ppc/ppc_isa.c user/thompsa/usb/sys/dev/ppc/ppc_pci.c user/thompsa/usb/sys/dev/ppc/ppc_puc.c user/thompsa/usb/sys/dev/ppc/ppcreg.h user/thompsa/usb/sys/dev/ppc/ppcvar.h user/thompsa/usb/sys/dev/puc/pucdata.c user/thompsa/usb/sys/dev/re/if_re.c user/thompsa/usb/sys/dev/sound/pci/cmi.c user/thompsa/usb/sys/dev/sound/pci/hda/hdac.c user/thompsa/usb/sys/dev/speaker/spkr.c user/thompsa/usb/sys/dev/syscons/teken/sequences user/thompsa/usb/sys/dev/syscons/teken/teken.c user/thompsa/usb/sys/dev/syscons/teken/teken.h user/thompsa/usb/sys/dev/syscons/teken/teken_demo.c user/thompsa/usb/sys/dev/syscons/teken/teken_subr.h user/thompsa/usb/sys/dev/syscons/teken/teken_subr_compat.h user/thompsa/usb/sys/dev/usb/ehci_ixp4xx.c (props changed) user/thompsa/usb/sys/dev/usb/u3g.c user/thompsa/usb/sys/dev/usb/uftdi.c user/thompsa/usb/sys/dev/usb/usbdevs user/thompsa/usb/sys/dev/usb/usbdi.c user/thompsa/usb/sys/dev/usb2/bluetooth/ng_ubt2.c user/thompsa/usb/sys/dev/usb2/bluetooth/ng_ubt2_var.h user/thompsa/usb/sys/dev/usb2/controller/uhci2.c user/thompsa/usb/sys/dev/usb2/controller/usb2_controller.h user/thompsa/usb/sys/dev/usb2/core/usb2_hub.c user/thompsa/usb/sys/dev/usb2/include/usb2_devid.h user/thompsa/usb/sys/dev/usb2/include/usb2_devtable.h user/thompsa/usb/sys/dev/usb2/include/usb2_ioctl.h user/thompsa/usb/sys/dev/usb2/quirk/usb2_quirk.c user/thompsa/usb/sys/dev/usb2/serial/u3g2.c user/thompsa/usb/sys/dev/usb2/serial/ufoma2.c user/thompsa/usb/sys/dev/usb2/storage/umass2.c user/thompsa/usb/sys/dev/xen/blkback/blkback.c user/thompsa/usb/sys/fs/cd9660/cd9660_rrip.c user/thompsa/usb/sys/fs/fifofs/fifo_vnops.c user/thompsa/usb/sys/geom/geom_dev.c user/thompsa/usb/sys/gnu/fs/ext2fs/ext2_fs.h user/thompsa/usb/sys/gnu/fs/ext2fs/ext2_fs_sb.h user/thompsa/usb/sys/gnu/fs/ext2fs/ext2_inode.c user/thompsa/usb/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c user/thompsa/usb/sys/gnu/fs/ext2fs/ext2_vfsops.c user/thompsa/usb/sys/i386/conf/GENERIC user/thompsa/usb/sys/i386/cpufreq/smist.c user/thompsa/usb/sys/i386/i386/identcpu.c user/thompsa/usb/sys/ia64/ia64/pmap.c user/thompsa/usb/sys/kern/imgact_elf.c user/thompsa/usb/sys/kern/kern_clock.c user/thompsa/usb/sys/kern/kern_jail.c user/thompsa/usb/sys/kern/kern_malloc.c user/thompsa/usb/sys/kern/kern_proc.c user/thompsa/usb/sys/kern/kern_synch.c user/thompsa/usb/sys/kern/kern_sysctl.c user/thompsa/usb/sys/kern/kern_timeout.c user/thompsa/usb/sys/kern/sched_4bsd.c user/thompsa/usb/sys/kern/sched_ule.c user/thompsa/usb/sys/kern/subr_pcpu.c user/thompsa/usb/sys/kern/subr_smp.c user/thompsa/usb/sys/kern/subr_witness.c user/thompsa/usb/sys/kern/sys_generic.c user/thompsa/usb/sys/kern/tty.c user/thompsa/usb/sys/kern/tty_pty.c user/thompsa/usb/sys/kern/uipc_mbuf.c user/thompsa/usb/sys/kern/vfs_aio.c user/thompsa/usb/sys/kern/vfs_cache.c user/thompsa/usb/sys/kern/vfs_subr.c user/thompsa/usb/sys/kern/vfs_syscalls.c user/thompsa/usb/sys/kern/vfs_vnops.c user/thompsa/usb/sys/kern/vnode_if.src user/thompsa/usb/sys/mips/include/pmap.h user/thompsa/usb/sys/mips/mips/elf64_machdep.c (props changed) user/thompsa/usb/sys/mips/mips/machdep.c user/thompsa/usb/sys/mips/mips/pmap.c user/thompsa/usb/sys/modules/Makefile user/thompsa/usb/sys/modules/agp/Makefile user/thompsa/usb/sys/modules/sound/driver/Makefile user/thompsa/usb/sys/modules/usb2/Makefile user/thompsa/usb/sys/modules/usb2/controller_atmegadci/ (props changed) user/thompsa/usb/sys/net/if.c user/thompsa/usb/sys/net/rtsock.c user/thompsa/usb/sys/net80211/_ieee80211.h user/thompsa/usb/sys/net80211/ieee80211.c user/thompsa/usb/sys/net80211/ieee80211.h user/thompsa/usb/sys/net80211/ieee80211_crypto.h user/thompsa/usb/sys/net80211/ieee80211_ddb.c user/thompsa/usb/sys/net80211/ieee80211_ht.h user/thompsa/usb/sys/net80211/ieee80211_ioctl.c user/thompsa/usb/sys/net80211/ieee80211_ioctl.h user/thompsa/usb/sys/net80211/ieee80211_node.h user/thompsa/usb/sys/net80211/ieee80211_regdomain.c user/thompsa/usb/sys/net80211/ieee80211_regdomain.h user/thompsa/usb/sys/net80211/ieee80211_var.h user/thompsa/usb/sys/netgraph/bluetooth/l2cap/ng_l2cap_llpi.c user/thompsa/usb/sys/netgraph/ng_deflate.c user/thompsa/usb/sys/netgraph/ng_iface.c user/thompsa/usb/sys/netgraph/ng_iface.h user/thompsa/usb/sys/netgraph/ng_mppc.c user/thompsa/usb/sys/netgraph/ng_ppp.c user/thompsa/usb/sys/netgraph/ng_pred1.c user/thompsa/usb/sys/netinet/in.c user/thompsa/usb/sys/netinet/in_pcb.c user/thompsa/usb/sys/netinet/ip_fw2.c user/thompsa/usb/sys/netinet/libalias/alias_ftp.c user/thompsa/usb/sys/netinet/libalias/alias_irc.c user/thompsa/usb/sys/netinet/libalias/alias_nbt.c user/thompsa/usb/sys/netinet/raw_ip.c user/thompsa/usb/sys/netinet/tcp_var.h user/thompsa/usb/sys/netinet6/in6_ifattach.c user/thompsa/usb/sys/netinet6/raw_ip6.c user/thompsa/usb/sys/netipsec/ipsec_mbuf.c user/thompsa/usb/sys/nfs4client/nfs4_subs.c user/thompsa/usb/sys/nfsclient/nfs_vfsops.c user/thompsa/usb/sys/nfsclient/nfs_vnops.c user/thompsa/usb/sys/nfsserver/nfs_srvsubs.c user/thompsa/usb/sys/opencrypto/cryptosoft.c user/thompsa/usb/sys/pci/if_rlreg.h user/thompsa/usb/sys/powerpc/conf/GENERIC user/thompsa/usb/sys/powerpc/conf/NOTES user/thompsa/usb/sys/powerpc/powermac/ata_macio.c user/thompsa/usb/sys/powerpc/powerpc/intr_machdep.c user/thompsa/usb/sys/security/mac/mac_audit.c user/thompsa/usb/sys/security/mac/mac_framework.c user/thompsa/usb/sys/security/mac/mac_priv.c user/thompsa/usb/sys/sun4v/include/pcpu.h user/thompsa/usb/sys/sys/conf.h user/thompsa/usb/sys/sys/jail.h user/thompsa/usb/sys/sys/ktr.h user/thompsa/usb/sys/sys/lock.h user/thompsa/usb/sys/sys/param.h user/thompsa/usb/sys/sys/pcpu.h user/thompsa/usb/sys/sys/pmc.h user/thompsa/usb/sys/sys/sched.h user/thompsa/usb/sys/sys/sysctl.h user/thompsa/usb/sys/sys/types.h user/thompsa/usb/sys/sys/vnode.h user/thompsa/usb/sys/ufs/ffs/ffs_alloc.c user/thompsa/usb/sys/ufs/ffs/ffs_balloc.c user/thompsa/usb/sys/ufs/ffs/ffs_extern.h user/thompsa/usb/sys/ufs/ffs/ffs_inode.c user/thompsa/usb/sys/ufs/ffs/ffs_vnops.c user/thompsa/usb/sys/ufs/ufs/ufs_dirhash.c user/thompsa/usb/sys/ufs/ufs/ufs_lookup.c user/thompsa/usb/sys/ufs/ufs/ufs_vnops.c user/thompsa/usb/sys/vm/uma.h user/thompsa/usb/sys/vm/uma_core.c user/thompsa/usb/sys/vm/uma_dbg.c user/thompsa/usb/sys/vm/uma_int.h user/thompsa/usb/sys/vm/vm_meter.c user/thompsa/usb/sys/vm/vm_mmap.c user/thompsa/usb/tools/regression/fstest/tests/conf user/thompsa/usb/tools/regression/fstest/tests/misc.sh user/thompsa/usb/tools/regression/usr.bin/jot/regress.sh user/thompsa/usb/tools/sched/schedgraph.py user/thompsa/usb/tools/tools/ath/Makefile user/thompsa/usb/tools/tools/ath/Makefile.inc user/thompsa/usb/usr.bin/fetch/fetch.c user/thompsa/usb/usr.bin/mail/Makefile user/thompsa/usb/usr.bin/make/Makefile user/thompsa/usb/usr.bin/make/buf.c user/thompsa/usb/usr.bin/make/suff.c user/thompsa/usb/usr.bin/split/split.1 user/thompsa/usb/usr.bin/truss/truss.1 user/thompsa/usb/usr.sbin/Makefile user/thompsa/usb/usr.sbin/config/config.8 user/thompsa/usb/usr.sbin/jail/jail.8 user/thompsa/usb/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) user/thompsa/usb/usr.sbin/makefs/ffs/ffs_subr.c (props changed) user/thompsa/usb/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) user/thompsa/usb/usr.sbin/makefs/getid.c (props changed) user/thompsa/usb/usr.sbin/sysinstall/devices.c Modified: user/thompsa/usb/Makefile.inc1 ============================================================================== --- user/thompsa/usb/Makefile.inc1 Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/Makefile.inc1 Wed Jan 28 18:51:11 2009 (r187837) @@ -702,6 +702,10 @@ distrib-dirs distribution: NO_KERNELCLEAN= t NO_KERNELCONFIG= t NO_KERNELDEPEND= t +# Shortcut for KERNCONF=Blah -DKERNFAST is now KERNFAST=Blah +.if !defined(KERNCONF) && ${KERNFAST} != "1" +KERNCONF=${KERNFAST} +.endif .endif .if !defined(KERNCONF) && defined(KERNEL) KERNCONF= ${KERNEL} Modified: user/thompsa/usb/ObsoleteFiles.inc ============================================================================== --- user/thompsa/usb/ObsoleteFiles.inc Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/ObsoleteFiles.inc Wed Jan 28 18:51:11 2009 (r187837) @@ -14,6 +14,11 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20090122: tzdata2009a import +OLD_FILES+=usr/share/zoneinfo/Asia/Katmandu +# 20090102: file 4.26 import +OLD_FILES+=usr/share/misc/magic.mime +OLD_FILES+=usr/share/misc/magic.mime.mgc # 20081223: bind 9.4.3 import, nsupdate.8 moved to nsupdate.1 OLD_FILES+=usr/share/man/man8/nsupdate.8.gz # 20081223: ipprotosw.h removed Modified: user/thompsa/usb/UPDATING ============================================================================== --- user/thompsa/usb/UPDATING Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/UPDATING Wed Jan 28 18:51:11 2009 (r187837) @@ -22,6 +22,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090119: + NTFS has been removed from GENERIC kernel on amd64 to match + GENERIC on i386. Should not cause any issues since mount_ntfs(8) + will load ntfs.ko module automatically when NTFS support is + actually needed, unless ntfs.ko is not installed or security + level prohibits loading kernel modules. If either is the case, + "options NTFS" has to be added into kernel config. + 20090115: TCP Appropriate Byte Counting (RFC 3465) support added to kernel. New field in struct tcpcb breaks ABI, so bump __FreeBSD_version to Modified: user/thompsa/usb/bin/chmod/chmod.1 ============================================================================== --- user/thompsa/usb/bin/chmod/chmod.1 Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/bin/chmod/chmod.1 Wed Jan 28 18:51:11 2009 (r187837) @@ -32,7 +32,7 @@ .\" @(#)chmod.1 8.4 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd December 22, 2006 +.Dd January 26, 2009 .Dt CHMOD 1 .Os .Sh NAME @@ -281,6 +281,10 @@ Operations upon the other permissions on ``o'' by itself), in combination with the .Ar perm symbols ``s'' or ``t'', are ignored. +.Pp +The ``w'' permission on directories will permit file creation, relocation, +and copy into that directory. +Files created within the directory itself will inherit its group ID. .Sh EXAMPLES .Bl -tag -width "u=rwx,go=u-w" -compact .It Li 644 @@ -343,4 +347,4 @@ command appeared in .Sh BUGS There is no .Ar perm -option for the naughty bits. +option for the naughty bits of a horse. Modified: user/thompsa/usb/bin/dd/dd.1 ============================================================================== --- user/thompsa/usb/bin/dd/dd.1 Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/bin/dd/dd.1 Wed Jan 28 18:51:11 2009 (r187837) @@ -392,6 +392,11 @@ Remove parity bit from a file: Check for (even) parity errors on a file: .Pp .Dl "dd if=file conv=pareven | cmp -x - file" +.Pp +To create an image of a Mode-1 CD-ROM, which is a commonly used format +for data CD-ROM disks, use a block size of 2048 bytes: +.Pp +.Dl "dd if=/dev/acd0 of=filename.iso bs=2048" .Sh SEE ALSO .Xr cp 1 , .Xr mt 1 , Modified: user/thompsa/usb/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- user/thompsa/usb/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Wed Jan 28 18:51:11 2009 (r187837) @@ -1739,15 +1739,11 @@ dtrace_program_link(dtrace_hdl_t *dtp, d * Arches which are 32-bit only just use the normal * library path. */ -#if defined(__i386__) - int use_32 = 1; /* use /usr/lib/... -sson */ -#else int use_32 = 0; #endif -#endif (void) snprintf(drti, sizeof (drti), "/usr/lib%s/dtrace/drti.o", - use_32 ? "":"32"); + use_32 ? "32":""); len = snprintf(&tmp, 1, fmt, dtp->dt_ld_path, file, tfile, drti) + 1; Modified: user/thompsa/usb/contrib/gdtoa/README ============================================================================== --- user/thompsa/usb/contrib/gdtoa/README Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/README Wed Jan 28 18:51:11 2009 (r187837) @@ -56,7 +56,9 @@ two letters: whose sum is the desired value For decimal -> binary conversions, there are three families of -helper routines: one for round-nearest: +helper routines: one for round-nearest (or the current rounding +mode on IEEE-arithmetic systems that provide the C99 fegetround() +function, if compiled with -DHonor_FLT_ROUNDS): strtof strtod @@ -191,6 +193,9 @@ in the buffer, if the buffer was long en conversion are easily done with the help of gdtoa(), such as %e or %f style and conversions with direction of rounding specified (so that, if desired, the decimal value is either >= or <= the binary value). +On IEEE-arithmetic systems that provide the C99 fegetround() function, +if compiled with -DHonor_FLT_ROUNDS, these routines honor the current +rounding mode. For an example of more general conversions based on dtoa(), see netlib's "printf.c from ampl/solvers". @@ -342,5 +347,11 @@ standard says it should -- when Honor_FL current rounding mode is obtained from fegetround() rather than from FLT_ROUNDS, unless Trust_FLT_ROUNDS is also #defined. +Compile with -DUSE_LOCALE to use the current locale; otherwise +decimal points are assumed to be '.'. With -DUSE_LOCALE, unless +you also compile with -DNO_LOCALE_CACHE, the details about the +current "decimal point" character string are cached and assumed not +to change during the program's execution. + Please send comments to David M. Gay (dmg at acm dot org, with " at " changed at "@" and " dot " changed to "."). Modified: user/thompsa/usb/contrib/gdtoa/g_Qfmt.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/g_Qfmt.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/g_Qfmt.c Wed Jan 28 18:51:11 2009 (r187837) @@ -51,15 +51,20 @@ THIS SOFTWARE. char* #ifdef KR_headers -g_Qfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize; +g_Qfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize; #else -g_Qfmt(char *buf, void *V, int ndig, unsigned bufsize) +g_Qfmt(char *buf, void *V, int ndig, size_t bufsize) #endif { - static FPI fpi = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0 }; + static FPI fpi0 = { 113, 1-16383-113+1, 32766 - 16383 - 113 + 1, 1, 0 }; char *b, *s, *se; ULong bits[4], *L, sign; int decpt, ex, i, mode; +#ifdef Honor_FLT_ROUNDS +#include "gdtoa_fltrnds.h" +#else +#define fpi &fpi0 +#endif if (ndig < 0) ndig = 0; @@ -109,6 +114,6 @@ g_Qfmt(char *buf, void *V, int ndig, uns return 0; mode = 0; } - s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se); - return g__fmt(buf, s, se, decpt, sign); + s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se); + return g__fmt(buf, s, se, decpt, sign, bufsize); } Modified: user/thompsa/usb/contrib/gdtoa/g__fmt.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/g__fmt.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/g__fmt.c Wed Jan 28 18:51:11 2009 (r187837) @@ -37,24 +37,51 @@ THIS SOFTWARE. char * #ifdef KR_headers -g__fmt(b, s, se, decpt, sign) char *b; char *s; char *se; int decpt; ULong sign; +g__fmt(b, s, se, decpt, sign, blen) char *b; char *s; char *se; int decpt; ULong sign; size_t blen; #else -g__fmt(char *b, char *s, char *se, int decpt, ULong sign) +g__fmt(char *b, char *s, char *se, int decpt, ULong sign, size_t blen) #endif { int i, j, k; - char *s0 = s; + char *be, *s0; + size_t len; #ifdef USE_LOCALE - char decimalpoint = *localeconv()->decimal_point; +#ifdef NO_LOCALE_CACHE + char *decimalpoint = localeconv()->decimal_point; + size_t dlen = strlen(decimalpoint); #else -#define decimalpoint '.' + char *decimalpoint; + static char *decimalpoint_cache; + static size_t dlen; + if (!(s0 = decimalpoint_cache)) { + s0 = localeconv()->decimal_point; + dlen = strlen(s0); + if ((decimalpoint_cache = (char*)malloc(strlen(s0) + 1))) { + strcpy(decimalpoint_cache, s0); + s0 = decimalpoint_cache; + } + } + decimalpoint = s0; +#endif +#else +#define dlen 0 #endif + s0 = s; + len = (se-s) + dlen + 6; /* 6 = sign + e+dd + trailing null */ + if (blen < len) + goto ret0; + be = b + blen - 1; if (sign) *b++ = '-'; if (decpt <= -4 || decpt > se - s + 5) { *b++ = *s++; if (*s) { - *b++ = decimalpoint; +#ifdef USE_LOCALE + while((*b = *decimalpoint++)) + ++b; +#else + *b++ = '.'; +#endif while((*b = *s++) !=0) b++; } @@ -69,6 +96,8 @@ g__fmt(char *b, char *s, char *se, int d for(j = 2, k = 10; 10*k <= decpt; j++, k *= 10){} for(;;) { i = decpt / k; + if (b >= be) + goto ret0; *b++ = i + '0'; if (--j <= 0) break; @@ -78,22 +107,41 @@ g__fmt(char *b, char *s, char *se, int d *b = 0; } else if (decpt <= 0) { - *b++ = decimalpoint; +#ifdef USE_LOCALE + while((*b = *decimalpoint++)) + ++b; +#else + *b++ = '.'; +#endif + if (be < b - decpt + (se - s)) + goto ret0; for(; decpt < 0; decpt++) *b++ = '0'; - while((*b = *s++) !=0) + while((*b = *s++) != 0) b++; } else { - while((*b = *s++) !=0) { + while((*b = *s++) != 0) { b++; - if (--decpt == 0 && *s) - *b++ = decimalpoint; + if (--decpt == 0 && *s) { +#ifdef USE_LOCALE + while(*b = *decimalpoint++) + ++b; +#else + *b++ = '.'; +#endif + } + } + if (b + decpt > be) { + ret0: + b = 0; + goto ret; } for(; decpt > 0; decpt--) *b++ = '0'; *b = 0; } + ret: freedtoa(s0); return b; } Modified: user/thompsa/usb/contrib/gdtoa/g_ddfmt.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/g_ddfmt.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/g_ddfmt.c Wed Jan 28 18:51:11 2009 (r187837) @@ -33,9 +33,9 @@ THIS SOFTWARE. char * #ifdef KR_headers -g_ddfmt(buf, dd, ndig, bufsize) char *buf; double *dd; int ndig; unsigned bufsize; +g_ddfmt(buf, dd, ndig, bufsize) char *buf; double *dd; int ndig; size_t bufsize; #else -g_ddfmt(char *buf, double *dd, int ndig, unsigned bufsize) +g_ddfmt(char *buf, double *dd, int ndig, size_t bufsize) #endif { FPI fpi; @@ -44,6 +44,21 @@ g_ddfmt(char *buf, double *dd, int ndig, int bx, by, decpt, ex, ey, i, j, mode; Bigint *x, *y, *z; double ddx[2]; +#ifdef Honor_FLT_ROUNDS /*{{*/ + int Rounding; +#ifdef Trust_FLT_ROUNDS /*{{ only define this if FLT_ROUNDS really works! */ + Rounding = Flt_Rounds; +#else /*}{*/ + Rounding = 1; + switch(fegetround()) { + case FE_TOWARDZERO: Rounding = 0; break; + case FE_UPWARD: Rounding = 2; break; + case FE_DOWNWARD: Rounding = 3; + } +#endif /*}}*/ +#else /*}{*/ +#define Rounding FPI_Round_near +#endif /*}}*/ if (bufsize < 10 || bufsize < ndig + 8) return 0; @@ -144,11 +159,11 @@ g_ddfmt(char *buf, double *dd, int ndig, } fpi.emin = 1-1023-53+1; fpi.emax = 2046-1023-106+1; - fpi.rounding = FPI_Round_near; + fpi.rounding = Rounding; fpi.sudden_underflow = 0; i = STRTOG_Normal; s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se); - b = g__fmt(buf, s, se, decpt, z->sign); + b = g__fmt(buf, s, se, decpt, z->sign, bufsize); Bfree(z); return b; } Modified: user/thompsa/usb/contrib/gdtoa/g_dfmt.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/g_dfmt.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/g_dfmt.c Wed Jan 28 18:51:11 2009 (r187837) @@ -33,15 +33,20 @@ THIS SOFTWARE. char* #ifdef KR_headers -g_dfmt(buf, d, ndig, bufsize) char *buf; double *d; int ndig; unsigned bufsize; +g_dfmt(buf, d, ndig, bufsize) char *buf; double *d; int ndig; size_t bufsize; #else -g_dfmt(char *buf, double *d, int ndig, unsigned bufsize) +g_dfmt(char *buf, double *d, int ndig, size_t bufsize) #endif { - static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0 }; + static FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0 }; char *b, *s, *se; ULong bits[2], *L, sign; int decpt, ex, i, mode; +#ifdef Honor_FLT_ROUNDS +#include "gdtoa_fltrnds.h" +#else +#define fpi &fpi0 +#endif if (ndig < 0) ndig = 0; @@ -52,6 +57,8 @@ g_dfmt(char *buf, double *d, int ndig, u sign = L[_0] & 0x80000000L; if ((L[_0] & 0x7ff00000) == 0x7ff00000) { /* Infinity or NaN */ + if (bufsize < 10) + return 0; if (L[_0] & 0xfffff || L[_1]) { return strcp(buf, "NaN"); } @@ -78,12 +85,9 @@ g_dfmt(char *buf, double *d, int ndig, u ex = 1; ex -= 0x3ff + 52; mode = 2; - if (ndig <= 0) { - if (bufsize < 25) - return 0; + if (ndig <= 0) mode = 0; - } i = STRTOG_Normal; - s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se); - return g__fmt(buf, s, se, decpt, sign); + s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se); + return g__fmt(buf, s, se, decpt, sign, bufsize); } Modified: user/thompsa/usb/contrib/gdtoa/g_ffmt.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/g_ffmt.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/g_ffmt.c Wed Jan 28 18:51:11 2009 (r187837) @@ -33,15 +33,20 @@ THIS SOFTWARE. char* #ifdef KR_headers -g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; unsigned bufsize; +g_ffmt(buf, f, ndig, bufsize) char *buf; float *f; int ndig; size_t bufsize; #else -g_ffmt(char *buf, float *f, int ndig, unsigned bufsize) +g_ffmt(char *buf, float *f, int ndig, size_t bufsize) #endif { - static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, 0 }; + static FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, 0 }; char *b, *s, *se; ULong bits[1], *L, sign; int decpt, ex, i, mode; +#ifdef Honor_FLT_ROUNDS +#include "gdtoa_fltrnds.h" +#else +#define fpi &fpi0 +#endif if (ndig < 0) ndig = 0; @@ -83,6 +88,6 @@ g_ffmt(char *buf, float *f, int ndig, un mode = 0; } i = STRTOG_Normal; - s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se); - return g__fmt(buf, s, se, decpt, sign); + s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se); + return g__fmt(buf, s, se, decpt, sign, bufsize); } Modified: user/thompsa/usb/contrib/gdtoa/g_xLfmt.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/g_xLfmt.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/g_xLfmt.c Wed Jan 28 18:51:11 2009 (r187837) @@ -49,15 +49,20 @@ THIS SOFTWARE. char* #ifdef KR_headers -g_xLfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize; +g_xLfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize; #else -g_xLfmt(char *buf, void *V, int ndig, unsigned bufsize) +g_xLfmt(char *buf, void *V, int ndig, size_t bufsize) #endif { - static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 }; + static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 }; char *b, *s, *se; ULong bits[2], *L, sign; int decpt, ex, i, mode; +#ifdef Honor_FLT_ROUNDS +#include "gdtoa_fltrnds.h" +#else +#define fpi &fpi0 +#endif if (ndig < 0) ndig = 0; @@ -103,6 +108,6 @@ g_xLfmt(char *buf, void *V, int ndig, un return 0; mode = 0; } - s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se); - return g__fmt(buf, s, se, decpt, sign); + s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se); + return g__fmt(buf, s, se, decpt, sign, bufsize); } Modified: user/thompsa/usb/contrib/gdtoa/g_xfmt.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/g_xfmt.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/g_xfmt.c Wed Jan 28 18:51:11 2009 (r187837) @@ -53,16 +53,21 @@ THIS SOFTWARE. char* #ifdef KR_headers -g_xfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; unsigned bufsize; +g_xfmt(buf, V, ndig, bufsize) char *buf; char *V; int ndig; size_t bufsize; #else -g_xfmt(char *buf, void *V, int ndig, unsigned bufsize) +g_xfmt(char *buf, void *V, int ndig, size_t bufsize) #endif { - static FPI fpi = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 }; + static FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, 0 }; char *b, *s, *se; ULong bits[2], sign; UShort *L; int decpt, ex, i, mode; +#ifdef Honor_FLT_ROUNDS +#include "gdtoa_fltrnds.h" +#else +#define fpi &fpi0 +#endif if (ndig < 0) ndig = 0; @@ -109,6 +114,6 @@ g_xfmt(char *buf, void *V, int ndig, uns return 0; mode = 0; } - s = gdtoa(&fpi, ex, bits, &i, mode, ndig, &decpt, &se); - return g__fmt(buf, s, se, decpt, sign); + s = gdtoa(fpi, ex, bits, &i, mode, ndig, &decpt, &se); + return g__fmt(buf, s, se, decpt, sign, bufsize); } Modified: user/thompsa/usb/contrib/gdtoa/gdtoa.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/gdtoa.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/gdtoa.c Wed Jan 28 18:51:11 2009 (r187837) @@ -417,11 +417,9 @@ gdtoa if (dval(d) > ds + dval(eps)) goto bump_up; else if (dval(d) < ds - dval(eps)) { - while(*--s == '0'){} - s++; if (dval(d)) inex = STRTOG_Inexlo; - goto ret1; + goto clear_trailing0; } break; } @@ -479,8 +477,12 @@ gdtoa } ++*s++; } - else + else { inex = STRTOG_Inexlo; + clear_trailing0: + while(*--s == '0'){} + ++s; + } break; } } @@ -738,7 +740,7 @@ gdtoa if (b->wds > 1 || b->x[0]) inex = STRTOG_Inexlo; while(*--s == '0'){} - s++; + ++s; } ret: Bfree(S); Modified: user/thompsa/usb/contrib/gdtoa/gdtoa.h ============================================================================== --- user/thompsa/usb/contrib/gdtoa/gdtoa.h Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/gdtoa.h Wed Jan 28 18:51:11 2009 (r187837) @@ -33,6 +33,7 @@ THIS SOFTWARE. #define GDTOA_H_INCLUDED #include "arith.h" +#include /* for size_t */ #ifndef Long #define Long long @@ -111,12 +112,12 @@ extern float strtof ANSI((CONST char *, extern double strtod ANSI((CONST char *, char **)); extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*)); -extern char* g_ddfmt ANSI((char*, double*, int, unsigned)); -extern char* g_dfmt ANSI((char*, double*, int, unsigned)); -extern char* g_ffmt ANSI((char*, float*, int, unsigned)); -extern char* g_Qfmt ANSI((char*, void*, int, unsigned)); -extern char* g_xfmt ANSI((char*, void*, int, unsigned)); -extern char* g_xLfmt ANSI((char*, void*, int, unsigned)); +extern char* g_ddfmt ANSI((char*, double*, int, size_t)); +extern char* g_dfmt ANSI((char*, double*, int, size_t)); +extern char* g_ffmt ANSI((char*, float*, int, size_t)); +extern char* g_Qfmt ANSI((char*, void*, int, size_t)); +extern char* g_xfmt ANSI((char*, void*, int, size_t)); +extern char* g_xLfmt ANSI((char*, void*, int, size_t)); extern int strtoId ANSI((CONST char*, char**, double*, double*)); extern int strtoIdd ANSI((CONST char*, char**, double*, double*)); Copied: user/thompsa/usb/contrib/gdtoa/gdtoa_fltrnds.h (from r187835, head/contrib/gdtoa/gdtoa_fltrnds.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/thompsa/usb/contrib/gdtoa/gdtoa_fltrnds.h Wed Jan 28 18:51:11 2009 (r187837, copy of r187835, head/contrib/gdtoa/gdtoa_fltrnds.h) @@ -0,0 +1,18 @@ + FPI *fpi, fpi1; + int Rounding; +#ifdef Trust_FLT_ROUNDS /*{{ only define this if FLT_ROUNDS really works! */ + Rounding = Flt_Rounds; +#else /*}{*/ + Rounding = 1; + switch(fegetround()) { + case FE_TOWARDZERO: Rounding = 0; break; + case FE_UPWARD: Rounding = 2; break; + case FE_DOWNWARD: Rounding = 3; + } +#endif /*}}*/ + fpi = &fpi0; + if (Rounding != 1) { + fpi1 = fpi0; + fpi = &fpi1; + fpi1.rounding = Rounding; + } Modified: user/thompsa/usb/contrib/gdtoa/gdtoaimp.h ============================================================================== --- user/thompsa/usb/contrib/gdtoa/gdtoaimp.h Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/gdtoaimp.h Wed Jan 28 18:51:11 2009 (r187837) @@ -128,8 +128,10 @@ THIS SOFTWARE. * conversions of IEEE doubles in single-threaded executions with * 8-byte pointers, PRIVATE_MEM >= 7400 appears to suffice; with * 4-byte pointers, PRIVATE_MEM >= 7112 appears adequate. - * #define INFNAN_CHECK on IEEE systems to cause strtod to check for - * Infinity and NaN (case insensitively). + * #define NO_INFNAN_CHECK if you do not wish to have INFNAN_CHECK + * #defined automatically on IEEE systems. On such systems, + * when INFNAN_CHECK is #defined, strtod checks + * for Infinity and NaN (case insensitively). * When INFNAN_CHECK is #defined and No_Hex_NaN is not #defined, * strtodg also accepts (case insensitively) strings of the form * NaN(x), where x is a string of hexadecimal digits (optionally @@ -177,6 +179,9 @@ THIS SOFTWARE. #include "gdtoa.h" #include "gd_qnan.h" +#ifdef Honor_FLT_ROUNDS +#include +#endif #ifdef DEBUG #include "stdio.h" @@ -206,6 +211,7 @@ extern Char *MALLOC ANSI((size_t)); #define INFNAN_CHECK #define USE_LOCALE +#define NO_LOCALE_CACHE #define Honor_FLT_ROUNDS #define Trust_FLT_ROUNDS @@ -608,7 +614,7 @@ extern void memcpy_D2A ANSI((void*, cons extern void freedtoa ANSI((char*)); extern char *gdtoa ANSI((FPI *fpi, int be, ULong *bits, int *kindp, int mode, int ndigits, int *decpt, char **rve)); - extern char *g__fmt ANSI((char*, char*, char*, int, ULong)); + extern char *g__fmt ANSI((char*, char*, char*, int, ULong, size_t)); extern int gethex ANSI((CONST char**, FPI*, Long*, Bigint**, int)); extern void hexdig_init_D2A(Void); extern int hexnan ANSI((CONST char**, FPI*, ULong*)); @@ -626,7 +632,7 @@ extern void memcpy_D2A ANSI((void*, cons extern double ratio ANSI((Bigint*, Bigint*)); extern void rshift ANSI((Bigint*, int)); extern char *rv_alloc ANSI((int)); - extern Bigint *s2b ANSI((CONST char*, int, int, ULong)); + extern Bigint *s2b ANSI((CONST char*, int, int, ULong, int)); extern Bigint *set_ones ANSI((Bigint*, int)); extern char *strcp ANSI((char*, const char*)); extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*)); @@ -668,6 +674,10 @@ extern void memcpy_D2A ANSI((void*, cons * (On HP Series 700/800 machines, -DNAN_WORD0=0x7ff40000 works.) */ #ifdef IEEE_Arith +#ifndef NO_INFNAN_CHECK +#undef INFNAN_CHECK +#define INFNAN_CHECK +#endif #ifdef IEEE_MC68k #define _0 0 #define _1 1 Modified: user/thompsa/usb/contrib/gdtoa/gethex.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/gethex.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/gethex.c Wed Jan 28 18:51:11 2009 (r187837) @@ -49,9 +49,21 @@ gethex( CONST char **sp, FPI *fpi, Long ULong L, lostbits, *x; Long e, e1; #ifdef USE_LOCALE - unsigned char decimalpoint = *localeconv()->decimal_point; + int i; +#ifdef NO_LOCALE_CACHE + const unsigned char *decimalpoint = (unsigned char*)localeconv()->decimal_point; #else -#define decimalpoint '.' + const unsigned char *decimalpoint; + static unsigned char *decimalpoint_cache; + if (!(s0 = decimalpoint_cache)) { + s0 = (unsigned char*)localeconv()->decimal_point; + if ((decimalpoint_cache = (char*)malloc(strlen(s0) + 1))) { + strcpy(decimalpoint_cache, s0); + s0 = decimalpoint_cache; + } + } + decimalpoint = s0; +#endif #endif if (!hexdig['0']) @@ -66,11 +78,21 @@ gethex( CONST char **sp, FPI *fpi, Long decpt = 0; zret = 0; e = 0; - if (!hexdig[*s]) { + if (hexdig[*s]) + havedig++; + else { zret = 1; - if (*s != decimalpoint) +#ifdef USE_LOCALE + for(i = 0; decimalpoint[i]; ++i) { + if (s[i] != decimalpoint[i]) + goto pcheck; + } + decpt = s += i; +#else + if (*s != '.') goto pcheck; decpt = ++s; +#endif if (!hexdig[*s]) goto pcheck; while(*s == '0') @@ -82,11 +104,20 @@ gethex( CONST char **sp, FPI *fpi, Long } while(hexdig[*s]) s++; - if (*s == decimalpoint && !decpt) { +#ifdef USE_LOCALE + if (*s == *decimalpoint && !decpt) { + for(i = 1; decimalpoint[i]; ++i) { + if (s[i] != decimalpoint[i]) + goto pcheck; + } + decpt = s += i; +#else + if (*s == '.' && !decpt) { decpt = ++s; +#endif while(hexdig[*s]) s++; - } + }/*}*/ if (decpt) e = -(((Long)(s-decpt)) << 2); pcheck: @@ -118,7 +149,7 @@ gethex( CONST char **sp, FPI *fpi, Long } *sp = (char*)s; if (!havedig) - *sp = s0 - 1; + *sp = (char*)s0 - 1; if (zret) return STRTOG_Zero; if (big) { @@ -168,16 +199,26 @@ gethex( CONST char **sp, FPI *fpi, Long return STRTOG_Normal | STRTOG_Inexlo; } n = s1 - s0 - 1; - for(k = 0; n > 7; n >>= 1) + for(k = 0; n > (1 << kshift-2) - 1; n >>= 1) k++; b = Balloc(k); x = b->x; n = 0; L = 0; +#ifdef USE_LOCALE + for(i = 0; decimalpoint[i+1]; ++i); +#endif while(s1 > s0) { - if (*--s1 == decimalpoint) +#ifdef USE_LOCALE + if (*--s1 == decimalpoint[i]) { + s1 -= i; continue; - if (n == 32) { + } +#else + if (*--s1 == '.') + continue; +#endif + if (n == ULbits) { *x++ = L; L = 0; n = 0; @@ -187,7 +228,7 @@ gethex( CONST char **sp, FPI *fpi, Long } *x++ = L; b->wds = n = x - b->x; - n = 32*n - hi0bits(L); + n = ULbits*n - hi0bits(L); nbits = fpi->nbits; lostbits = 0; x = b->x; Modified: user/thompsa/usb/contrib/gdtoa/makefile ============================================================================== --- user/thompsa/usb/contrib/gdtoa/makefile Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/makefile Wed Jan 28 18:51:11 2009 (r187837) @@ -25,7 +25,7 @@ .SUFFIXES: .c .o CC = cc -CFLAGS = -g -DINFNAN_CHECK +CFLAGS = -g .c.o: $(CC) -c $(CFLAGS) $*.c @@ -55,9 +55,9 @@ gdtoa.a: dmisc.c dtoa.c g_Qfmt.c g__fmt. # If your system lacks ranlib, you do not need it. xs0 = README arithchk.c dmisc.c dtoa.c g_Qfmt.c g__fmt.c g_ddfmt.c g_dfmt.c\ - g_ffmt.c g_xLfmt.c g_xfmt.c gdtoa.c gdtoa.h gdtoaimp.h gethex.c\ - gmisc.c hd_init.c hexnan.c makefile misc.c qnan.c smisc.c strtoIQ.c\ - strtoId.c strtoIdd.c strtoIf.c strtoIg.c strtoIx.c strtoIxL.c\ + g_ffmt.c g_xLfmt.c g_xfmt.c gdtoa.c gdtoa.h gdtoa_fltrnds.h gdtoaimp.h\ + gethex.c gmisc.c hd_init.c hexnan.c makefile misc.c qnan.c smisc.c\ + strtoIQ.c strtoId.c strtoIdd.c strtoIf.c strtoIg.c strtoIx.c strtoIxL.c\ strtod.c strtodI.c strtodg.c strtodnrp.c strtof.c strtopQ.c strtopd.c\ strtopdd.c strtopf.c strtopx.c strtopxL.c strtorQ.c strtord.c strtordd.c\ strtorf.c strtorx.c strtorxL.c sum.c ulp.c Modified: user/thompsa/usb/contrib/gdtoa/smisc.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/smisc.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/smisc.c Wed Jan 28 18:51:11 2009 (r187837) @@ -34,9 +34,9 @@ THIS SOFTWARE. Bigint * s2b #ifdef KR_headers - (s, nd0, nd, y9) CONST char *s; int nd0, nd; ULong y9; + (s, nd0, nd, y9, dplen) CONST char *s; int dplen, nd0, nd; ULong y9; #else - (CONST char *s, int nd0, int nd, ULong y9) + (CONST char *s, int nd0, int nd, ULong y9, int dplen) #endif { Bigint *b; @@ -60,10 +60,10 @@ s2b s += 9; do b = multadd(b, 10, *s++ - '0'); while(++i < nd0); - s++; + s += dplen; } else - s += 10; + s += dplen + 9; for(; i < nd; i++) b = multadd(b, 10, *s++ - '0'); return b; Modified: user/thompsa/usb/contrib/gdtoa/strtod.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/strtod.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/strtod.c Wed Jan 28 18:51:11 2009 (r187837) @@ -80,6 +80,28 @@ strtod #ifdef SET_INEXACT int inexact, oldinexact; #endif +#ifdef USE_LOCALE /*{{*/ +#ifdef NO_LOCALE_CACHE + char *decimalpoint = localeconv()->decimal_point; + int dplen = strlen(decimalpoint); +#else + char *decimalpoint; + static char *decimalpoint_cache; + static int dplen; + if (!(s0 = decimalpoint_cache)) { + s0 = localeconv()->decimal_point; + if ((decimalpoint_cache = (char*)malloc(strlen(s0) + 1))) { + strcpy(decimalpoint_cache, s0); + s0 = decimalpoint_cache; + } + dplen = strlen(s0); + } + decimalpoint = (char*)s0; +#endif /*NO_LOCALE_CACHE*/ +#else /*USE_LOCALE}{*/ +#define dplen 1 +#endif /*USE_LOCALE}}*/ + #ifdef Honor_FLT_ROUNDS /*{*/ int Rounding; #ifdef Trust_FLT_ROUNDS /*{{ only define this if FLT_ROUNDS really works! */ @@ -118,7 +140,7 @@ strtod } break2: if (*s == '0') { -#ifndef NO_HEX_FP /*{{*/ +#ifndef NO_HEX_FP /*{*/ { static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI }; Long exp; @@ -157,7 +179,7 @@ strtod goto ret; } } -#endif +#endif /*}*/ nz0 = 1; while(*++s == '0') ; if (!*s) @@ -172,13 +194,17 @@ strtod z = 10*z + c - '0'; nd0 = nd; #ifdef USE_LOCALE - if (c == *localeconv()->decimal_point) + if (c == *decimalpoint) { + for(i = 1; decimalpoint[i]; ++i) + if (s[i] != decimalpoint[i]) + goto dig_done; + s += i; + c = *s; #else - if (c == '.') + if (c == '.') { + c = *++s; #endif - { decpt = 1; - c = *++s; if (!nd) { for(; c == '0'; c = *++s) nz++; @@ -207,7 +233,7 @@ strtod nz = 0; } } - } + }/*}*/ dig_done: e = 0; if (c == 'e' || c == 'E') { @@ -527,7 +553,7 @@ strtod /* Put digits into bd: true value = bd * 10^e */ - bd0 = s2b(s0, nd0, nd, y); + bd0 = s2b(s0, nd0, nd, y, dplen); for(;;) { bd = Balloc(bd0->k); @@ -974,7 +1000,11 @@ strtod dval(rv) *= dval(rv0); #ifndef NO_ERRNO /* try to avoid the bug of testing an 8087 register value */ +#ifdef IEEE_Arith + if (!(word0(rv) & Exp_mask)) +#else if (word0(rv) == 0 && word1(rv) == 0) +#endif errno = ERANGE; #endif } Modified: user/thompsa/usb/contrib/gdtoa/strtodg.c ============================================================================== --- user/thompsa/usb/contrib/gdtoa/strtodg.c Wed Jan 28 18:46:29 2009 (r187836) +++ user/thompsa/usb/contrib/gdtoa/strtodg.c Wed Jan 28 18:51:11 2009 (r187837) @@ -331,6 +331,27 @@ strtodg Long L; ULong *b, *be, y, z; Bigint *ab, *bb, *bb1, *bd, *bd0, *bs, *delta, *rvb, *rvb0; +#ifdef USE_LOCALE /*{{*/ +#ifdef NO_LOCALE_CACHE + char *decimalpoint = localeconv()->decimal_point; + int dplen = strlen(decimalpoint); +#else + char *decimalpoint; + static char *decimalpoint_cache; + static int dplen; + if (!(s0 = decimalpoint_cache)) { + s0 = localeconv()->decimal_point; + if ((decimalpoint_cache = (char*)malloc(strlen(s0) + 1))) { + strcpy(decimalpoint_cache, s0); + s0 = decimalpoint_cache; + } + dplen = strlen(s0); + } + decimalpoint = (char*)s0; +#endif /*NO_LOCALE_CACHE*/ +#else /*USE_LOCALE}{*/ +#define dplen 1 +#endif /*USE_LOCALE}}*/ irv = STRTOG_Zero; denorm = sign = nz0 = nz = 0; @@ -389,13 +410,17 @@ strtodg z = 10*z + c - '0'; nd0 = nd; #ifdef USE_LOCALE - if (c == *localeconv()->decimal_point) + if (c == *decimalpoint) { + for(i = 1; decimalpoint[i]; ++i) + if (s[i] != decimalpoint[i]) + goto dig_done; + s += i; + c = *s; #else - if (c == '.') + if (c == '.') { + c = *++s; #endif - { decpt = 1; - c = *++s; if (!nd) { for(; c == '0'; c = *++s) nz++; @@ -424,7 +449,7 @@ strtodg nz = 0; } } - } + }/*}*/ dig_done: e = 0; if (c == 'e' || c == 'E') { @@ -683,7 +708,7 @@ strtodg /* Put digits into bd: true value = bd * 10^e */ - bd0 = s2b(s0, nd0, nd, y); + bd0 = s2b(s0, nd0, nd, y, dplen); for(;;) { bd = Balloc(bd0->k); @@ -992,7 +1017,7 @@ strtodg irv = STRTOG_Normal | STRTOG_Inexlo; *exp = fpi->emax; b = bits; - be = b + (fpi->nbits >> 5) + 1; + be = b + ((fpi->nbits + 31) >> 5); while(b < be) *b++ = -1; if ((j = fpi->nbits & 0x1f)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Wed Jan 28 19:32:20 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46A8C1065673; Wed, 28 Jan 2009 19:32:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3609F8FC16; Wed, 28 Jan 2009 19:32:20 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0SJWJvQ030483; Wed, 28 Jan 2009 19:32:19 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0SJWJqO030482; Wed, 28 Jan 2009 19:32:19 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901281932.n0SJWJqO030482@svn.freebsd.org> From: Andrew Thompson Date: Wed, 28 Jan 2009 19:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187847 - user/thompsa/usb/sys/i386/conf X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jan 2009 19:32:20 -0000 Author: thompsa Date: Wed Jan 28 19:32:19 2009 New Revision: 187847 URL: http://svn.freebsd.org/changeset/base/187847 Log: For some reason subversion hasnt properly merged OpenBSM alpha 5 in r187214 from head, just disable audit locally. Modified: user/thompsa/usb/sys/i386/conf/GENERIC Modified: user/thompsa/usb/sys/i386/conf/GENERIC ============================================================================== --- user/thompsa/usb/sys/i386/conf/GENERIC Wed Jan 28 19:25:51 2009 (r187846) +++ user/thompsa/usb/sys/i386/conf/GENERIC Wed Jan 28 19:32:19 2009 (r187847) @@ -70,7 +70,7 @@ options _KPOSIX_PRIORITY_SCHEDULING # P options KBD_INSTALL_CDEV # install a CDEV entry in /dev options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) -options AUDIT # Security event auditing +#options AUDIT # Security event auditing #options KDTRACE_HOOKS # Kernel DTrace hooks # Debugging for use in -current From owner-svn-src-user@FreeBSD.ORG Sat Jan 31 20:47:28 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AD8D1065827; Sat, 31 Jan 2009 20:47:28 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3728D8FC16; Sat, 31 Jan 2009 20:47:28 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0VKlSIp033729; Sat, 31 Jan 2009 20:47:28 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0VKlSuP033725; Sat, 31 Jan 2009 20:47:28 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901312047.n0VKlSuP033725@svn.freebsd.org> From: Andrew Thompson Date: Sat, 31 Jan 2009 20:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187965 - user/thompsa/usb/sys/dev/usb2/ethernet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2009 20:47:29 -0000 Author: thompsa Date: Sat Jan 31 20:47:27 2009 New Revision: 187965 URL: http://svn.freebsd.org/changeset/base/187965 Log: Move most of the ifnet logic into the usb2_ethernet module, this includes, - make all usb ethernet interfaces named ue%d - handle all threading in usb2_ethernet - provide default ioctl handler - handle mbuf rx - provide locked callbacks for init,start,stop,etc The drivers are not much more than data pushers now. Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_axereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_cdce2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_cue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_cuereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_kue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_kuereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_rue2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_ruereg.h user/thompsa/usb/sys/dev/usb2/ethernet/if_udav2.c user/thompsa/usb/sys/dev/usb2/ethernet/if_udavreg.h user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c Sat Jan 31 20:46:01 2009 (r187964) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_aue2.c Sat Jan 31 20:47:27 2009 (r187965) @@ -185,13 +185,6 @@ static usb2_callback_t aue_bulk_read_cal static usb2_callback_t aue_bulk_write_clear_stall_callback; static usb2_callback_t aue_bulk_write_callback; -static usb2_task_fn_t aue_promisc_task; -static usb2_task_fn_t aue_ifmedia_task; -static usb2_task_fn_t aue_setmulti_task; -static usb2_task_fn_t aue_tick_task; - -static int aue_do_request(struct aue_softc *, - struct usb2_device_request *, void *); static uint8_t aue_csr_read_1(struct aue_softc *, uint16_t); static uint16_t aue_csr_read_2(struct aue_softc *, uint16_t); static int aue_csr_write_1(struct aue_softc *, uint16_t, uint8_t); @@ -199,19 +192,16 @@ static int aue_csr_write_2(struct aue_so static void aue_eeprom_getword(struct aue_softc *, int, uint16_t *); static void aue_read_eeprom(struct aue_softc *, uint8_t *, uint16_t, uint16_t); -static void aue_setmulti(struct aue_softc *); -static void aue_setpromisc(struct aue_softc *); static void aue_reset(struct aue_softc *); static void aue_reset_pegasus_II(struct aue_softc *); -static void aue_start(struct ifnet *); -static void aue_init(void *); -static void aue_init_locked(struct aue_softc *); -static void aue_stop(struct aue_softc *); -static void aue_start_transfers(struct aue_softc *); +static void aue_init(struct usb2_ether *); +static void aue_stop(struct usb2_ether *); +static void aue_start(struct usb2_ether *); +static void aue_tick(struct usb2_ether *); +static void aue_setmulti(struct usb2_ether *); +static void aue_setpromisc(struct usb2_ether *); static int aue_ifmedia_upd(struct ifnet *); static void aue_ifmedia_sts(struct ifnet *, struct ifmediareq *); -static int aue_ioctl(struct ifnet *, u_long, caddr_t); -static void aue_watchdog(void *); static const struct usb2_config aue_config[AUE_N_TRANSFER] = { @@ -311,18 +301,6 @@ MODULE_DEPEND(aue, usb2_core, 1, 1, 1); MODULE_DEPEND(aue, ether, 1, 1, 1); MODULE_DEPEND(aue, miibus, 1, 1, 1); -static int -aue_do_request(struct aue_softc *sc, struct usb2_device_request *req, - void *data) -{ - usb2_error_t err; - - err = usb2_do_request_flags(sc->sc_udev, &sc->sc_mtx, req, data, 0, - NULL, 1000); - - return (err); -} - #define AUE_SETBIT(sc, reg, x) \ aue_csr_write_1(sc, reg, aue_csr_read_1(sc, reg) | (x)) @@ -342,7 +320,7 @@ aue_csr_read_1(struct aue_softc *sc, uin USETW(req.wIndex, reg); USETW(req.wLength, 1); - err = aue_do_request(sc, &req, &val); + err = usb2_do_request(sc->sc_udev, &sc->sc_mtx, &req, &val); if (err) return (0); return (val); @@ -361,7 +339,7 @@ aue_csr_read_2(struct aue_softc *sc, uin USETW(req.wIndex, reg); USETW(req.wLength, 2); - err = aue_do_request(sc, &req, &val); + err = usb2_do_request(sc->sc_udev, &sc->sc_mtx, &req, &val); if (err) return (0); return (le16toh(val)); @@ -379,7 +357,7 @@ aue_csr_write_1(struct aue_softc *sc, ui USETW(req.wIndex, reg); USETW(req.wLength, 1); - return (aue_do_request(sc, &req, &val)); + return (usb2_do_request(sc->sc_udev, &sc->sc_mtx, &req, &val)); } static int @@ -395,7 +373,7 @@ aue_csr_write_2(struct aue_softc *sc, ui val = htole16(val); - return (aue_do_request(sc, &req, &val)); + return (usb2_do_request(sc->sc_udev, &sc->sc_mtx, &req, &val)); } /* @@ -440,16 +418,12 @@ static int aue_miibus_readreg(device_t dev, int phy, int reg) { struct aue_softc *sc = device_get_softc(dev); - int i, do_unlock; + int i, locked; uint16_t val = 0; - /* avoid recursive locking */ - if (mtx_owned(&sc->sc_mtx)) { - do_unlock = 0; - } else { + locked = mtx_owned(&sc->sc_mtx); + if (!locked) AUE_LOCK(sc); - do_unlock = 1; - } /* * The Am79C901 HomePNA PHY actually contains two transceivers: a 1Mbps @@ -480,7 +454,7 @@ aue_miibus_readreg(device_t dev, int phy val = aue_csr_read_2(sc, AUE_PHY_DATA); done: - if (do_unlock) + if (!locked) AUE_UNLOCK(sc); return (val); } @@ -489,18 +463,14 @@ static int aue_miibus_writereg(device_t dev, int phy, int reg, int data) { struct aue_softc *sc = device_get_softc(dev); - int i, do_unlock; + int i, locked; if (phy == 3) return (0); - /* avoid recursive locking */ - if (mtx_owned(&sc->sc_mtx)) { - do_unlock = 0; - } else { + locked = mtx_owned(&sc->sc_mtx); + if (!locked) AUE_LOCK(sc); - do_unlock = 1; - } aue_csr_write_2(sc, AUE_PHY_DATA, data); aue_csr_write_1(sc, AUE_PHY_ADDR, phy); @@ -514,7 +484,7 @@ aue_miibus_writereg(device_t dev, int ph if (i == AUE_TIMEOUT) device_printf(sc->sc_dev, "MII read timed out\n"); - if (do_unlock) + if (!locked) AUE_UNLOCK(sc); return (0); } @@ -524,15 +494,11 @@ aue_miibus_statchg(device_t dev) { struct aue_softc *sc = device_get_softc(dev); struct mii_data *mii = GET_MII(sc); - uint8_t do_unlock; + int locked; - /* avoid recursive locking */ - if (mtx_owned(&sc->sc_mtx)) { - do_unlock = 0; - } else { + locked = mtx_owned(&sc->sc_mtx); + if (!locked) AUE_LOCK(sc); - do_unlock = 1; - } AUE_CLRBIT(sc, AUE_CTL0, AUE_CTL0_RX_ENB | AUE_CTL0_TX_ENB); if (IFM_SUBTYPE(mii->mii_media_active) == IFM_100_TX) @@ -558,27 +524,22 @@ aue_miibus_statchg(device_t dev) auxmode = aue_miibus_readreg(dev, 0, 0x1b); aue_miibus_writereg(dev, 0, 0x1b, auxmode | 0x04); } - if (do_unlock) + if (!locked) AUE_UNLOCK(sc); } -static void -aue_setmulti_task(void *context, struct usb2_task *task) -{ - struct aue_softc *sc = context; - - aue_setmulti(sc); -} - #define AUE_BITS 6 static void -aue_setmulti(struct aue_softc *sc) +aue_setmulti(struct usb2_ether *ue) { - struct ifnet *ifp = sc->sc_ifp; + struct aue_softc *sc = usb2_ether_getsc(ue); + struct ifnet *ifp = usb2_ether_getifp(ue); struct ifmultiaddr *ifma; uint32_t h = 0, i; uint8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + AUE_LOCK_ASSERT(sc, MA_OWNED); + if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) { AUE_SETBIT(sc, AUE_CTL0, AUE_CTL0_ALLMULTI); return; @@ -692,7 +653,7 @@ aue_attach(device_t dev) { struct usb2_attach_arg *uaa = device_get_ivars(dev); struct aue_softc *sc = device_get_softc(dev); - struct ifnet *ifp; + struct usb2_ether *ue = &sc->sc_ue; uint8_t eaddr[ETHER_ADDR_LEN]; uint8_t iface_index; int error; @@ -705,14 +666,7 @@ aue_attach(device_t dev) sc->sc_flags |= AUE_FLAG_VER_2; /* XXX currently undocumented */ device_set_usb2_desc(dev); - mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); - usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); - - USB_TASK_INIT(&sc->sc_promisc_task, aue_promisc_task, sc, &sc->sc_mtx); - USB_TASK_INIT(&sc->sc_multi_task, aue_setmulti_task, sc, &sc->sc_mtx); - USB_TASK_INIT(&sc->sc_media_task, aue_ifmedia_task, sc, &sc->sc_mtx); - USB_TASK_INIT(&sc->sc_tick_task, aue_tick_task, sc, &sc->sc_mtx); iface_index = AUE_IFACE_IDX; error = usb2_transfer_setup(uaa->device, &iface_index, @@ -722,12 +676,6 @@ aue_attach(device_t dev) device_printf(dev, "allocating USB transfers failed!\n"); goto detach; } - error = usb2_proc_create(&sc->sc_tq, USB_PRI_MED, - device_get_nameunit(dev)); - if (error) { - device_printf(dev, "could not setup config thread!\n"); - goto detach; - } AUE_LOCK(sc); /* reset the adapter */ @@ -737,45 +685,23 @@ aue_attach(device_t dev) aue_read_eeprom(sc, eaddr, 0, 3); AUE_UNLOCK(sc); - ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "could not if_alloc()\n"); - goto detach; - } - ifp->if_softc = sc; - if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - ifp->if_mtu = ETHERMTU; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_ioctl = aue_ioctl; - ifp->if_start = aue_start; - ifp->if_init = aue_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; - IFQ_SET_READY(&ifp->if_snd); - sc->sc_ifp = ifp; + ue->ue_sc = sc; + ue->ue_dev = dev; + ue->ue_mtx = &sc->sc_mtx; + ue->ue_start = aue_start; + ue->ue_init = aue_init; + ue->ue_stop = aue_stop; + ue->ue_tick = aue_tick; + ue->ue_setmulti = aue_setmulti; + ue->ue_setpromisc = aue_setpromisc; + ue->ue_mii_upd = aue_ifmedia_upd; + ue->ue_mii_sts = aue_ifmedia_sts; - /* - * Do MII setup. - * NOTE: Doing this causes child devices to be attached to us, - * which we would normally disconnect at in the detach routine - * using device_delete_child(). However the USB code is set up - * such that when this driver is removed, all children devices - * are removed as well. In effect, the USB code ends up detaching - * all of our children for us, so we don't have to do is ourselves - * in aue_detach(). It's important to point this out since if - * we *do* try to detach the child devices ourselves, we will - * end up getting the children deleted twice, which will crash - * the system. - */ - error = mii_phy_probe(dev, &sc->sc_miibus, - aue_ifmedia_upd, aue_ifmedia_sts); + error = usb2_ether_ifattach(ue, eaddr); if (error) { - device_printf(dev, "MII without any PHY!\n"); + device_printf(dev, "could not attach interface\n"); goto detach; } - - ether_ifattach(ifp, eaddr); - return (0); /* success */ detach: @@ -787,23 +713,15 @@ static int aue_detach(device_t dev) { struct aue_softc *sc = device_get_softc(dev); - struct ifnet *ifp = sc->sc_ifp; + struct usb2_ether *ue = &sc->sc_ue; AUE_LOCK(sc); sc->sc_flags |= AUE_FLAG_DETACH; - aue_stop(sc); + aue_stop(ue); AUE_UNLOCK(sc); usb2_transfer_unsetup(sc->sc_xfer, AUE_N_TRANSFER); - usb2_proc_free(&sc->sc_tq); - - if (sc->sc_miibus) - device_delete_child(dev, sc->sc_miibus); - if (ifp) { - ether_ifdetach(ifp); - if_free(ifp); - } - usb2_callout_drain(&sc->sc_watchdog); + usb2_ether_ifdetach(ue); mtx_destroy(&sc->sc_mtx); return (0); @@ -826,25 +744,24 @@ static void aue_intr_callback(struct usb2_xfer *xfer) { struct aue_softc *sc = xfer->priv_sc; - struct ifnet *ifp = sc->sc_ifp; + struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue); struct aue_intrpkt pkt; switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - if (ifp && (ifp->if_drv_flags & IFF_DRV_RUNNING) && - (xfer->actlen >= sizeof(pkt))) { + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && + xfer->actlen >= sizeof(pkt)) { usb2_copy_out(xfer->frbuffers, 0, &pkt, sizeof(pkt)); - if (pkt.aue_txstat0) { + if (pkt.aue_txstat0) ifp->if_oerrors++; - } if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL & - AUE_TXSTAT0_EXCESSCOLL)) { + AUE_TXSTAT0_EXCESSCOLL)) ifp->if_collisions++; - } } + /* FALLTHROUGH */ case USB_ST_SETUP: if (sc->sc_flags & AUE_FLAG_INTR_STALL) { usb2_transfer_start(sc->sc_xfer[AUE_INTR_CS_RD]); @@ -881,8 +798,9 @@ static void aue_bulk_read_callback(struct usb2_xfer *xfer) { struct aue_softc *sc = xfer->priv_sc; - struct ifnet *ifp = sc->sc_ifp; - struct mbuf *m = NULL; + struct usb2_ether *ue = &sc->sc_ue; + struct ifnet *ifp = usb2_ether_getifp(ue); + struct aue_rxpkt stat; switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: @@ -896,41 +814,28 @@ aue_bulk_read_callback(struct usb2_xfer } } else { - if (xfer->actlen <= (4 + ETHER_CRC_LEN)) { + if (xfer->actlen <= (sizeof(stat) + ETHER_CRC_LEN)) { ifp->if_ierrors++; goto tr_setup; } - usb2_copy_out(xfer->frbuffers, xfer->actlen - 4, &sc->sc_rxpkt, - sizeof(sc->sc_rxpkt)); + usb2_copy_out(xfer->frbuffers, + xfer->actlen - sizeof(stat), &stat, sizeof(stat)); /* * turn off all the non-error bits in the rx status * word: */ - sc->sc_rxpkt.aue_rxstat &= AUE_RXSTAT_MASK; - - if (sc->sc_rxpkt.aue_rxstat) { + stat.aue_rxstat &= AUE_RXSTAT_MASK; + if (stat.aue_rxstat) { ifp->if_ierrors++; goto tr_setup; } /* No errors; receive the packet. */ - xfer->actlen -= (4 + ETHER_CRC_LEN); + xfer->actlen -= (sizeof(stat) + ETHER_CRC_LEN); } + usb2_ether_rxbuf(ue, xfer, 0, xfer->actlen); - m = usb2_ether_get_mbuf(); - - if (m == NULL) { - ifp->if_ierrors++; - goto tr_setup; - } - xfer->actlen = min(xfer->actlen, m->m_len); - - usb2_copy_out(xfer->frbuffers, 0, m->m_data, xfer->actlen); - - ifp->if_ipackets++; - m->m_pkthdr.rcvif = ifp; - m->m_pkthdr.len = m->m_len = xfer->actlen; - + /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: @@ -940,17 +845,7 @@ tr_setup: xfer->frlengths[0] = xfer->max_data_length; usb2_start_hardware(xfer); } - - /* - * At the end of a USB callback it is always safe to unlock - * the private mutex of a device! That is why we do the - * "if_input" here, and not some lines up! - */ - if (m) { - AUE_UNLOCK(sc); - (ifp->if_input) (ifp, m); - AUE_LOCK(sc); - } + usb2_ether_rxflush(ue); return; default: /* Error */ @@ -983,16 +878,16 @@ static void aue_bulk_write_callback(struct usb2_xfer *xfer) { struct aue_softc *sc = xfer->priv_sc; - struct ifnet *ifp = sc->sc_ifp; + struct ifnet *ifp = usb2_ether_getifp(&sc->sc_ue); struct mbuf *m; uint8_t buf[2]; switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: DPRINTFN(11, "transfer of %d bytes complete\n", xfer->actlen); - ifp->if_opackets++; + /* FALLTHROUGH */ case USB_ST_SETUP: if (sc->sc_flags & AUE_FLAG_WRITE_STALL) { @@ -1068,9 +963,9 @@ done: } static void -aue_tick_task(void *context, struct usb2_task *task) +aue_tick(struct usb2_ether *ue) { - struct aue_softc *sc = context; + struct aue_softc *sc = usb2_ether_getsc(ue); struct mii_data *mii = GET_MII(sc); AUE_LOCK_ASSERT(sc, MA_OWNED); @@ -1080,27 +975,14 @@ aue_tick_task(void *context, struct usb2 && mii->mii_media_status & IFM_ACTIVE && IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { sc->sc_flags |= AUE_FLAG_LINK; - aue_start_transfers(sc); + aue_start(ue); } } static void -aue_start(struct ifnet *ifp) +aue_start(struct usb2_ether *ue) { - struct aue_softc *sc = ifp->if_softc; - - AUE_LOCK(sc); - aue_start_transfers(sc); - AUE_UNLOCK(sc); -} - -static void -aue_start_transfers(struct aue_softc *sc) -{ - struct ifnet *ifp = sc->sc_ifp; - - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - return; + struct aue_softc *sc = usb2_ether_getsc(ue); /* * start the USB transfers, if not already started: @@ -1111,19 +993,10 @@ aue_start_transfers(struct aue_softc *sc } static void -aue_init(void *xsc) +aue_init(struct usb2_ether *ue) { - struct aue_softc *sc = xsc; - - AUE_LOCK(sc); - aue_init_locked(sc); - AUE_UNLOCK(sc); -} - -static void -aue_init_locked(struct aue_softc *sc) -{ - struct ifnet *ifp = sc->sc_ifp; + struct aue_softc *sc = usb2_ether_getsc(ue); + struct ifnet *ifp = usb2_ether_getifp(ue); int i; AUE_LOCK_ASSERT(sc, MA_OWNED); @@ -1140,10 +1013,10 @@ aue_init_locked(struct aue_softc *sc) aue_csr_write_1(sc, AUE_PAR0 + i, IF_LLADDR(ifp)[i]); /* update promiscuous setting */ - aue_setpromisc(sc); + aue_setpromisc(ue); /* Load the multicast filter. */ - aue_setmulti(sc); + aue_setmulti(ue); /* Enable RX and TX */ aue_csr_write_1(sc, AUE_CTL0, AUE_CTL0_RXSTAT_APPEND | AUE_CTL0_RX_ENB); @@ -1153,22 +1026,16 @@ aue_init_locked(struct aue_softc *sc) sc->sc_flags |= AUE_FLAG_READ_STALL | AUE_FLAG_WRITE_STALL; ifp->if_drv_flags |= IFF_DRV_RUNNING; - aue_start_transfers(sc); - usb2_callout_reset(&sc->sc_watchdog, hz, aue_watchdog, sc); + aue_start(ue); } static void -aue_promisc_task(void *context, struct usb2_task *task) +aue_setpromisc(struct usb2_ether *ue) { - struct aue_softc *sc = context; + struct aue_softc *sc = usb2_ether_getsc(ue); + struct ifnet *ifp = usb2_ether_getifp(ue); - aue_setpromisc(sc); -} - -static void -aue_setpromisc(struct aue_softc *sc) -{ - struct ifnet *ifp = sc->sc_ifp; + AUE_LOCK_ASSERT(sc, MA_OWNED); /* if we want promiscuous mode, set the allframes bit: */ if (ifp->if_flags & IFF_PROMISC) @@ -1184,17 +1051,10 @@ static int aue_ifmedia_upd(struct ifnet *ifp) { struct aue_softc *sc = ifp->if_softc; - - usb2_proc_enqueue(&sc->sc_tq, &sc->sc_media_task); - return (0); -} - -static void -aue_ifmedia_task(void *context, struct usb2_task *task) -{ - struct aue_softc *sc = context; struct mii_data *mii = GET_MII(sc); + AUE_LOCK_ASSERT(sc, MA_OWNED); + sc->sc_flags &= ~AUE_FLAG_LINK; if (mii->mii_instance) { struct mii_softc *miisc; @@ -1203,6 +1063,7 @@ aue_ifmedia_task(void *context, struct u mii_phy_reset(miisc); } mii_mediachg(mii); + return (0); } /* @@ -1221,70 +1082,21 @@ aue_ifmedia_sts(struct ifnet *ifp, struc ifmr->ifm_status = mii->mii_media_status; } -static int -aue_ioctl(struct ifnet *ifp, u_long command, caddr_t data) -{ - struct aue_softc *sc = ifp->if_softc; - struct ifreq *ifr = (struct ifreq *)data; - struct mii_data *mii; - int error = 0; - - switch (command) { - case SIOCSIFFLAGS: - AUE_LOCK(sc); - if (ifp->if_flags & IFF_UP) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - usb2_proc_enqueue(&sc->sc_tq, - &sc->sc_promisc_task); - else - aue_init_locked(sc); - } else { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) - aue_stop(sc); - } - AUE_UNLOCK(sc); - break; - case SIOCADDMULTI: - case SIOCDELMULTI: - usb2_proc_enqueue(&sc->sc_tq, &sc->sc_multi_task); - break; - case SIOCGIFMEDIA: - case SIOCSIFMEDIA: - mii = GET_MII(sc); - error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); - break; - default: - error = ether_ioctl(ifp, command, data); - break; - } - return (error); -} - -static void -aue_watchdog(void *arg) -{ - struct aue_softc *sc = arg; - - usb2_proc_enqueue(&sc->sc_tq, &sc->sc_tick_task); - usb2_callout_reset(&sc->sc_watchdog, hz, aue_watchdog, sc); -} - /* * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ static void -aue_stop(struct aue_softc *sc) +aue_stop(struct usb2_ether *ue) { - struct ifnet *ifp = sc->sc_ifp; + struct aue_softc *sc = usb2_ether_getsc(ue); + struct ifnet *ifp = usb2_ether_getifp(ue); AUE_LOCK_ASSERT(sc, MA_OWNED); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; sc->sc_flags &= ~AUE_FLAG_LINK; - usb2_callout_stop(&sc->sc_watchdog); - /* * stop all the transfers, if not already stopped: */ @@ -1308,9 +1120,10 @@ static int aue_shutdown(device_t dev) { struct aue_softc *sc = device_get_softc(dev); + struct usb2_ether *ue = &sc->sc_ue; AUE_LOCK(sc); - aue_stop(sc); + aue_stop(ue); AUE_UNLOCK(sc); return (0); } Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h Sat Jan 31 20:46:01 2009 (r187964) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_auereg.h Sat Jan 31 20:47:27 2009 (r187965) @@ -186,8 +186,7 @@ enum { #define AUE_RXSTAT_DRIBBLE 0x10 #define AUE_RXSTAT_MASK 0x1E -#define GET_MII(sc) ((sc)->sc_miibus ? \ - device_get_softc((sc)->sc_miibus) : NULL) +#define GET_MII(sc) usb2_ether_getmii(&(sc)->sc_ue) struct aue_intrpkt { uint8_t aue_txstat0; @@ -202,26 +201,17 @@ struct aue_intrpkt { struct aue_rxpkt { uint16_t aue_pktlen; uint8_t aue_rxstat; + uint8_t pad; } __packed; struct aue_softc { - struct ifnet *sc_ifp; - struct usb2_process sc_tq; - struct usb2_callout sc_watchdog; - struct mtx sc_mtx; - struct aue_rxpkt sc_rxpkt; - - struct usb2_device *sc_udev; - struct usb2_xfer *sc_xfer[AUE_N_TRANSFER]; - device_t sc_miibus; - device_t sc_dev; - - struct usb2_task sc_media_task; - struct usb2_task sc_multi_task; - struct usb2_task sc_promisc_task; - struct usb2_task sc_tick_task; + struct usb2_ether sc_ue; + struct mtx sc_mtx; + struct usb2_device *sc_udev; + struct usb2_xfer *sc_xfer[AUE_N_TRANSFER]; + device_t sc_dev; - uint16_t sc_flags; + int sc_flags; #define AUE_FLAG_LSYS 0x0001 /* use Linksys reset */ #define AUE_FLAG_PNA 0x0002 /* has Home PNA */ #define AUE_FLAG_PII 0x0004 /* Pegasus II chip */ Modified: user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c Sat Jan 31 20:46:01 2009 (r187964) +++ user/thompsa/usb/sys/dev/usb2/ethernet/if_axe2.c Sat Jan 31 20:47:27 2009 (r187965) @@ -164,21 +164,15 @@ static miibus_readreg_t axe_miibus_readr static miibus_writereg_t axe_miibus_writereg; static miibus_statchg_t axe_miibus_statchg; -static usb2_task_fn_t axe_promisc_task; -static usb2_task_fn_t axe_setmulti_task; -static usb2_task_fn_t axe_ifmedia_task; -static usb2_task_fn_t axe_tick_task; - -static int axe_ioctl(struct ifnet *, u_long, caddr_t); -static void axe_init(void *); -static void axe_init_locked(struct axe_softc *); -static void axe_stop(struct axe_softc *); -static int axe_cmd(struct axe_softc *, int, int, int, void *); +static void axe_init(struct usb2_ether *); +static void axe_stop(struct usb2_ether *); +static void axe_start(struct usb2_ether *); +static void axe_tick(struct usb2_ether *); +static void axe_setmulti(struct usb2_ether *); +static void axe_setpromisc(struct usb2_ether *); static int axe_ifmedia_upd(struct ifnet *); static void axe_ifmedia_sts(struct ifnet *, struct ifmediareq *); -static void axe_start(struct ifnet *); -static void axe_start_transfers(struct axe_softc *); -static void axe_watchdog(void *); +static int axe_cmd(struct axe_softc *, int, int, int, void *); static void axe_ax88178_init(struct axe_softc *); static void axe_ax88772_init(struct axe_softc *); static int axe_get_phyno(struct axe_softc *, int); @@ -312,20 +306,14 @@ axe_miibus_readreg(device_t dev, int phy { struct axe_softc *sc = device_get_softc(dev); uint16_t val; - int do_unlock; + int locked; - /* avoid recursive locking */ - if (mtx_owned(&sc->sc_mtx)) { - do_unlock = 0; - } else { - AXE_LOCK(sc); - do_unlock = 1; - } + if (sc->sc_phyno != phy) + return (0); - if (sc->sc_phyno != phy) { - val = 0; - goto done; - } + locked = mtx_owned(&sc->sc_mtx); + if (!locked) + AXE_LOCK(sc); axe_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL); axe_cmd(sc, AXE_CMD_MII_READ_REG, reg, phy, &val); @@ -342,8 +330,7 @@ axe_miibus_readreg(device_t dev, int phy val &= ~BMSR_EXTCAP; } -done: - if (do_unlock) + if (!locked) AXE_UNLOCK(sc); return (val); } @@ -352,29 +339,23 @@ static int axe_miibus_writereg(device_t dev, int phy, int reg, int val) { struct axe_softc *sc = device_get_softc(dev); - int do_unlock; + int locked; val = htole16(val); - /* avoid recursive locking */ - if (mtx_owned(&sc->sc_mtx)) { - do_unlock = 0; - } else { - AXE_LOCK(sc); - do_unlock = 1; - } - if (sc->sc_phyno != phy) - goto done; + return (val); + + locked = mtx_owned(&sc->sc_mtx); + if (!locked) + AXE_LOCK(sc); axe_cmd(sc, AXE_CMD_MII_OPMODE_SW, 0, 0, NULL); axe_cmd(sc, AXE_CMD_MII_WRITE_REG, reg, phy, &val); axe_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL); -done: - if (do_unlock) { + if (!locked) AXE_UNLOCK(sc); - } return (0); } @@ -384,15 +365,11 @@ axe_miibus_statchg(device_t dev) struct axe_softc *sc = device_get_softc(dev); struct mii_data *mii = GET_MII(sc); uint16_t val; - int err, do_unlock; + int err, locked; - /* avoid recursive locking */ - if (mtx_owned(&sc->sc_mtx)) { - do_unlock = 0; - } else { + locked = mtx_owned(&sc->sc_mtx); + if (!locked) AXE_LOCK(sc); - do_unlock = 1; - } val = (mii->mii_media_active & IFM_GMASK) == IFM_FDX ? AXE_MEDIA_FULL_DUPLEX : 0; @@ -415,7 +392,7 @@ axe_miibus_statchg(device_t dev) if (err) device_printf(dev, "media change failed, error %d\n", err); - if (do_unlock) + if (!locked) AXE_UNLOCK(sc); } @@ -426,17 +403,10 @@ static int axe_ifmedia_upd(struct ifnet *ifp) { struct axe_softc *sc = ifp->if_softc; - - usb2_proc_enqueue(&sc->sc_tq, &sc->sc_media_task); - return (0); -} - -static void -axe_ifmedia_task(void *context, struct usb2_task *task) -{ - struct axe_softc *sc = context; struct mii_data *mii = GET_MII(sc); + AXE_LOCK_ASSERT(sc, MA_OWNED); + sc->sc_flags &= ~AXE_FLAG_LINK; if (mii->mii_instance) { struct mii_softc *miisc; @@ -445,6 +415,7 @@ axe_ifmedia_task(void *context, struct u mii_phy_reset(miisc); } mii_mediachg(mii); + return (0); } /* @@ -464,14 +435,17 @@ axe_ifmedia_sts(struct ifnet *ifp, struc } static void -axe_setmulti(struct axe_softc *sc) +axe_setmulti(struct usb2_ether *ue) { - struct ifnet *ifp = sc->sc_ifp; + struct axe_softc *sc = usb2_ether_getsc(ue); + struct ifnet *ifp = usb2_ether_getifp(ue); struct ifmultiaddr *ifma; uint32_t h = 0; uint16_t rxmode; uint8_t hashtbl[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + AXE_LOCK_ASSERT(sc, MA_OWNED); + axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, &rxmode); rxmode = le16toh(rxmode); @@ -661,7 +635,7 @@ axe_attach(device_t dev) { struct usb2_attach_arg *uaa = device_get_ivars(dev); struct axe_softc *sc = device_get_softc(dev); - struct ifnet *ifp; + struct usb2_ether *ue = &sc->sc_ue; uint8_t eaddr[ETHER_ADDR_LEN]; uint8_t iface_index; int error; @@ -673,27 +647,14 @@ axe_attach(device_t dev) device_set_usb2_desc(dev); mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); - usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); - - USB_TASK_INIT(&sc->sc_promisc_task, axe_promisc_task, sc, &sc->sc_mtx); - USB_TASK_INIT(&sc->sc_multi_task, axe_setmulti_task, sc, &sc->sc_mtx); - USB_TASK_INIT(&sc->sc_media_task, axe_ifmedia_task, sc, &sc->sc_mtx); - USB_TASK_INIT(&sc->sc_tick_task, axe_tick_task, sc, &sc->sc_mtx); iface_index = AXE_IFACE_IDX; - error = usb2_transfer_setup(uaa->device, &iface_index, - sc->sc_xfer, axe_config, AXE_N_TRANSFER, - sc, &sc->sc_mtx); + error = usb2_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, + axe_config, AXE_N_TRANSFER, sc, &sc->sc_mtx); if (error) { device_printf(dev, "allocating USB transfers failed!\n"); goto detach; } - error = usb2_proc_create(&sc->sc_tq, USB_PRI_MED, - device_get_nameunit(dev)); - if (error) { - device_printf(dev, "could not setup config thread\n"); - goto detach; - } /* * Load PHY indexes first. Needed by axe_xxx_init(). @@ -732,34 +693,23 @@ axe_attach(device_t dev) axe_cmd(sc, AXE_CMD_READ_IPG012, 0, 0, sc->sc_ipgs); AXE_UNLOCK(sc); - ifp = if_alloc(IFT_ETHER); - + ue->ue_sc = sc; + ue->ue_dev = dev; + ue->ue_mtx = &sc->sc_mtx; + ue->ue_start = axe_start; + ue->ue_init = axe_init; + ue->ue_stop = axe_stop; + ue->ue_tick = axe_tick; + ue->ue_setmulti = axe_setmulti; + ue->ue_setpromisc = axe_setpromisc; + ue->ue_mii_upd = axe_ifmedia_upd; + ue->ue_mii_sts = axe_ifmedia_sts; - if (ifp == NULL) { - device_printf(dev, "could not if_alloc()\n"); - goto detach; - } - ifp->if_softc = sc; - if_initname(ifp, device_get_name(dev), device_get_unit(dev)); - ifp->if_mtu = ETHERMTU; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_ioctl = axe_ioctl; - ifp->if_start = axe_start; - ifp->if_init = axe_init; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; - IFQ_SET_READY(&ifp->if_snd); - sc->sc_ifp = ifp; - - error = mii_phy_probe(dev, &sc->sc_miibus, - axe_ifmedia_upd, axe_ifmedia_sts); + error = usb2_ether_ifattach(ue, eaddr); if (error) { - device_printf(dev, "MII without any PHY!\n"); + device_printf(dev, "could not attach interface\n"); goto detach; } - - ether_ifattach(ifp, eaddr); - return (0); /* success */ detach: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@FreeBSD.ORG Sat Jan 31 22:39:03 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA43310656D6; Sat, 31 Jan 2009 22:39:03 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF4CA8FC30; Sat, 31 Jan 2009 22:39:03 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0VMd3Qb035849; Sat, 31 Jan 2009 22:39:03 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0VMd3wc035847; Sat, 31 Jan 2009 22:39:03 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901312239.n0VMd3wc035847@svn.freebsd.org> From: Andrew Thompson Date: Sat, 31 Jan 2009 22:39:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187967 - user/thompsa/usb/sys/dev/usb2/ethernet X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jan 2009 22:39:04 -0000 Author: thompsa Date: Sat Jan 31 22:39:03 2009 New Revision: 187967 URL: http://svn.freebsd.org/changeset/base/187967 Log: Add sysctl information for the parent device. Suggested by: sam Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c Sat Jan 31 21:40:27 2009 (r187966) +++ user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.c Sat Jan 31 22:39:03 2009 (r187967) @@ -29,6 +29,8 @@ #include #include +SYSCTL_NODE(_net, OID_AUTO, ue, CTLFLAG_RD, 0, "USB Ethernet parameters"); + #define UE_LOCK(_ue) mtx_lock((_ue)->ue_mtx) #define UE_UNLOCK(_ue) mtx_unlock((_ue)->ue_mtx) #define UE_LOCK_ASSERT(_ue, t) mtx_assert((_ue)->ue_mtx, t) @@ -76,10 +78,21 @@ usb2_ether_getsc(struct usb2_ether *ue) return (ue->ue_sc); } +static int +ue_sysctl_parent(SYSCTL_HANDLER_ARGS) +{ + struct usb2_ether *ue = arg1; + const char *name; + + name = device_get_nameunit(ue->ue_dev); + return SYSCTL_OUT(req, name, strlen(name)); +} + int usb2_ether_ifattach(struct usb2_ether *ue, const u_int8_t *eaddr) { struct ifnet *ifp; + char num[14]; /* sufficient for 32 bits */ int error; ue->ue_unit = alloc_unr(ueunit); @@ -88,6 +101,7 @@ usb2_ether_ifattach(struct usb2_ether *u USB_TASK_INIT(&ue->ue_media_task, ue_ifmedia_task, ue, ue->ue_mtx); USB_TASK_INIT(&ue->ue_tick_task, ue_tick_task, ue, ue->ue_mtx); usb2_callout_init_mtx(&ue->ue_watchdog, ue->ue_mtx, 0); + sysctl_ctx_init(&ue->ue_sysctl_ctx); error = usb2_proc_create(&ue->ue_tq, USB_PRI_MED, device_get_nameunit(ue->ue_dev)); @@ -126,6 +140,15 @@ usb2_ether_ifattach(struct usb2_ether *u if_printf(ifp, " on %s\n", device_get_nameunit(ue->ue_dev)); ether_ifattach(ifp, eaddr); + + snprintf(num, sizeof(num), "%u", ue->ue_unit); + ue->ue_sysctl_oid = SYSCTL_ADD_NODE(&ue->ue_sysctl_ctx, + &SYSCTL_NODE_CHILDREN(_net, ue), + OID_AUTO, num, CTLFLAG_RD, NULL, ""); + SYSCTL_ADD_PROC(&ue->ue_sysctl_ctx, + SYSCTL_CHILDREN(ue->ue_sysctl_oid), OID_AUTO, + "%parent", CTLFLAG_RD, ue, 0, + ue_sysctl_parent, "A", "parent device"); return (0); error: @@ -155,6 +178,7 @@ usb2_ether_ifdetach(struct usb2_ether *u device_delete_child(ue->ue_dev, ue->ue_miibus); ether_ifdetach(ifp); if_free(ifp); + sysctl_ctx_free(&ue->ue_sysctl_ctx); free_unr(ueunit, ue->ue_unit); } Modified: user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h ============================================================================== --- user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h Sat Jan 31 21:40:27 2009 (r187966) +++ user/thompsa/usb/sys/dev/usb2/ethernet/usb2_ethernet.h Sat Jan 31 22:39:03 2009 (r187967) @@ -58,6 +58,8 @@ struct usb2_ether { void *ue_sc; int ue_unit; + struct sysctl_ctx_list ue_sysctl_ctx; + struct sysctl_oid *ue_sysctl_oid; struct ifqueue ue_rxq;