Module Name: src Committed By: riz Date: Mon Aug 13 23:18:24 UTC 2012
Modified Files: src/distrib/sets/lists/base [netbsd-6]: mi src/etc/mtree [netbsd-6]: NetBSD.dist.base src/external [netbsd-6]: Makefile README src/share/man/man4 [netbsd-6]: urtwn.4 src/sys/dev/usb [netbsd-6]: if_urtwn.c Added Files: src/external/realtek [netbsd-6]: Makefile Makefile.inc src/external/realtek/urtwn [netbsd-6]: Makefile src/external/realtek/urtwn/dist [netbsd-6]: Realtek-Firmware-License.txt rtl8192cfw.bin rtl8192cfwU.bin Log Message: Pull up following revision(s) (requested by abs in ticket #497): external/realtek/urtwn/Makefile: revision 1.1 external/realtek/Makefile.inc: revision 1.1 external/realtek/urtwn/dist/rtl8192cfw.bin: revision 1.1 distrib/sets/lists/base/mi: revision 1.997 external/README: revision 1.15 etc/mtree/NetBSD.dist.base: revision 1.101 external/realtek/urtwn/dist/Realtek-Firmware-License.txt: revision 1.1 share/man/man4/urtwn.4: revision 1.4 external/realtek/Makefile: revision 1.1 external/realtek/urtwn/dist/rtl8192cfwU.bin: revision 1.1 sys/dev/usb/if_urtwn.c: revision 1.5 external/Makefile: revision 1.18 Add firmware for the RealTek RTL8192CU family of wireless chipsets, and adapt the urtwn(4) driver to use the new files. The firmware files were extracted from the Linux driver at www.realtek.com, version 0005.1230.2011 and the license permits redistribution without modification. While I'm here, install the files in /libdata/firmware/if_urtwn, like most of the other network adapter firmware. urtwn(4) can now operate without needing external files installed. Tested on my Edimax adapter. To generate a diff of this commit: cvs rdiff -u -r1.984.2.7 -r1.984.2.8 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.97.2.2 -r1.97.2.3 src/etc/mtree/NetBSD.dist.base cvs rdiff -u -r1.16 -r1.16.6.1 src/external/Makefile cvs rdiff -u -r1.14 -r1.14.8.1 src/external/README cvs rdiff -u -r0 -r1.1.2.2 src/external/realtek/Makefile \ src/external/realtek/Makefile.inc cvs rdiff -u -r0 -r1.1.2.2 src/external/realtek/urtwn/Makefile cvs rdiff -u -r0 -r1.1.2.2 \ src/external/realtek/urtwn/dist/Realtek-Firmware-License.txt \ src/external/realtek/urtwn/dist/rtl8192cfw.bin \ src/external/realtek/urtwn/dist/rtl8192cfwU.bin cvs rdiff -u -r1.4.2.2 -r1.4.2.3 src/share/man/man4/urtwn.4 cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/dev/usb/if_urtwn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.984.2.7 src/distrib/sets/lists/base/mi:1.984.2.8 --- src/distrib/sets/lists/base/mi:1.984.2.7 Sat Jun 23 22:54:57 2012 +++ src/distrib/sets/lists/base/mi Mon Aug 13 23:18:22 2012 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.984.2.7 2012/06/23 22:54:57 riz Exp $ +# $NetBSD: mi,v 1.984.2.8 2012/08/13 23:18:22 riz Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -166,6 +166,10 @@ ./libdata/firmware/if_otus/otus-init base-firmware-root ./libdata/firmware/if_otus/otus-license base-firmware-root ./libdata/firmware/if_otus/otus-main base-firmware-root +./libdata/firmware/if_urtwn base-firmware-root +./libdata/firmware/if_urtwn/Realtek-Firmware-License.txt base-firmware-root +./libdata/firmware/if_urtwn/rtl8192cfw.bin base-firmware-root +./libdata/firmware/if_urtwn/rtl8192cfwU.bin base-firmware-root ./libdata/firmware/if_wpi base-firmware-root ./libdata/firmware/if_wpi/LICENSE.ipw3945-ucode base-obsolete obsolete ./libdata/firmware/if_wpi/LICENSE.iwlwifi-3945-ucode base-firmware-root @@ -182,7 +186,7 @@ ./libdata/firmware/rum/rum-license base-firmware-root ./libdata/firmware/rum/rum-rt2573 base-firmware-root ./libdata/firmware/upgt base-firmware-root -./libdata/firmware/urtwn base-firmware-root +./libdata/firmware/urtwn base-firmware-root obsolete ./libdata/firmware/zyd base-firmware-root ./libdata/firmware/zyd/zd1211-licence base-obsolete obsolete ./libdata/firmware/zyd/zd1211-license base-firmware-root Index: src/etc/mtree/NetBSD.dist.base diff -u src/etc/mtree/NetBSD.dist.base:1.97.2.2 src/etc/mtree/NetBSD.dist.base:1.97.2.3 --- src/etc/mtree/NetBSD.dist.base:1.97.2.2 Sun Aug 12 13:38:48 2012 +++ src/etc/mtree/NetBSD.dist.base Mon Aug 13 23:18:23 2012 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.base,v 1.97.2.2 2012/08/12 13:38:48 martin Exp $ +# $NetBSD: NetBSD.dist.base,v 1.97.2.3 2012/08/13 23:18:23 riz Exp $ # @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93 # Do not customize this file as it may be overwritten on upgrades. @@ -67,11 +67,11 @@ ./libdata/firmware/if_iwi ./libdata/firmware/if_iwn ./libdata/firmware/if_otus +./libdata/firmware/if_urtwn ./libdata/firmware/if_wpi ./libdata/firmware/ral ./libdata/firmware/rum ./libdata/firmware/upgt -./libdata/firmware/urtwn ./libdata/firmware/zyd ./libexec ./libexec/dhcpcd-hooks Index: src/external/Makefile diff -u src/external/Makefile:1.16 src/external/Makefile:1.16.6.1 --- src/external/Makefile:1.16 Thu Feb 17 07:52:10 2011 +++ src/external/Makefile Mon Aug 13 23:18:23 2012 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.16 2011/02/17 07:52:10 jruoho Exp $ +# $NetBSD: Makefile,v 1.16.6.1 2012/08/13 23:18:23 riz Exp $ SUBDIR+= apache2 atheros bsd intel-fw-eula intel-fw-public gpl2 gpl3 historical -SUBDIR+= ibm-public public-domain cddl mit +SUBDIR+= ibm-public public-domain cddl mit realtek .include <bsd.subdir.mk> Index: src/external/README diff -u src/external/README:1.14 src/external/README:1.14.8.1 --- src/external/README:1.14 Wed Nov 3 18:52:44 2010 +++ src/external/README Mon Aug 13 23:18:23 2012 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.14 2010/11/03 18:52:44 christos Exp $ +$NetBSD: README,v 1.14.8.1 2012/08/13 23:18:23 riz Exp $ Organization of Sources: @@ -82,6 +82,8 @@ The licenses currently used are: public-domain Non-license for code that has been explicitly put into the Public Domain. + realtek RealTek license. + zlib Zlib (BSD-like) license. http://www.zlib.net/zlib_license.html Index: src/share/man/man4/urtwn.4 diff -u src/share/man/man4/urtwn.4:1.4.2.2 src/share/man/man4/urtwn.4:1.4.2.3 --- src/share/man/man4/urtwn.4:1.4.2.2 Thu Jun 14 09:48:46 2012 +++ src/share/man/man4/urtwn.4 Mon Aug 13 23:18:23 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: urtwn.4,v 1.4.2.2 2012/06/14 09:48:46 sborrill Exp $ +.\" $NetBSD: urtwn.4,v 1.4.2.3 2012/08/13 23:18:23 riz Exp $ .\" $OpenBSD: urtwn.4,v 1.15 2011/11/26 06:39:33 ckuethe Exp $ .\" .\" Copyright (c) 2010 Damien Bergamini <damien.bergam...@free.fr> @@ -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. .\" -.Dd $Mdocdate: November 26 2011 $ +.Dd June 13, 2012 .Dt URTWN 4 .Os .Sh NAME @@ -77,20 +77,13 @@ driver can be configured at runtime with or on boot with .Xr ifconfig.if 5 . .Sh FILES -The driver needs at least version 1.1p0 of the following firmware files, +The driver needs the following firmware files, which are loaded when an interface is attached: .Pp .Bl -tag -width Ds -offset indent -compact -.It /libdata/firmware/urtwn/urtwn-rtl8192cfwT -.It /libdata/firmware/urtwn/urtwn-rtl8192cfwU -.It /libdata/firmware/urtwn/urtwn-rtl8723fw +.It /libdata/firmware/if_urtwn/rtl8192cfw.bin +.It /libdata/firmware/if_urtwn/rtl8192cfwU.bin .El -.Pp -A prepackaged version of the firmware, designed to be used with -.Xr pkg_add 1 , -can be found at: -.Bd -literal -offset 3n -http://firmware.openbsd.org/firmware/urtwn-firmware-1.1p0.tgz .Ed .Sh HARDWARE The following adapters should work: Index: src/sys/dev/usb/if_urtwn.c diff -u src/sys/dev/usb/if_urtwn.c:1.5.2.2 src/sys/dev/usb/if_urtwn.c:1.5.2.3 --- src/sys/dev/usb/if_urtwn.c:1.5.2.2 Thu Jun 14 09:48:47 2012 +++ src/sys/dev/usb/if_urtwn.c Mon Aug 13 23:18:24 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_urtwn.c,v 1.5.2.2 2012/06/14 09:48:47 sborrill Exp $ */ +/* $NetBSD: if_urtwn.c,v 1.5.2.3 2012/08/13 23:18:24 riz Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $ */ /*- @@ -22,7 +22,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.5.2.2 2012/06/14 09:48:47 sborrill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.5.2.3 2012/08/13 23:18:24 riz Exp $"); #include <sys/param.h> #include <sys/sockio.h> @@ -2600,10 +2600,10 @@ urtwn_load_firmware(struct urtwn_softc * /* Read firmware image from the filesystem. */ if ((sc->chip & (URTWN_CHIP_UMC_A_CUT | URTWN_CHIP_92C)) == URTWN_CHIP_UMC_A_CUT) - name = "urtwn-rtl8192cfwU"; + name = "rtl8192cfwU.bin"; else - name = "urtwn-rtl8192cfwT"; - if ((error = firmware_open("urtwn", name, &fwh)) != 0) { + name = "rtl8192cfw.bin"; + if ((error = firmware_open("if_urtwn", name, &fwh)) != 0) { aprint_error_dev(sc->sc_dev, "failed loadfirmware of file %s (error %d)\n", name, error); return (error); Added files: Index: src/external/realtek/Makefile diff -u /dev/null src/external/realtek/Makefile:1.1.2.2 --- /dev/null Mon Aug 13 23:18:24 2012 +++ src/external/realtek/Makefile Mon Aug 13 23:18:21 2012 @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1.2.2 2012/08/13 23:18:21 riz Exp $ + +SUBDIR+= urtwn + +.include <bsd.subdir.mk> Index: src/external/realtek/Makefile.inc diff -u /dev/null src/external/realtek/Makefile.inc:1.1.2.2 --- /dev/null Mon Aug 13 23:18:24 2012 +++ src/external/realtek/Makefile.inc Mon Aug 13 23:18:21 2012 @@ -0,0 +1,9 @@ +# $NetBSD: Makefile.inc,v 1.1.2.2 2012/08/13 23:18:21 riz Exp $ + +FILESOWN= ${FIRMWAREOWN} +FILESGRP= ${FIRMWAREGRP} +FILESMODE= ${FIRMWAREMODE} + +includes: +clean: +cleandir: Index: src/external/realtek/urtwn/Makefile diff -u /dev/null src/external/realtek/urtwn/Makefile:1.1.2.2 --- /dev/null Mon Aug 13 23:18:24 2012 +++ src/external/realtek/urtwn/Makefile Mon Aug 13 23:18:21 2012 @@ -0,0 +1,10 @@ +# $NetBSD: Makefile,v 1.1.2.2 2012/08/13 23:18:21 riz Exp $ + +NOMAN= # define + +FILES= dist/Realtek-Firmware-License.txt dist/rtl8192cfw.bin +FILES+= dist/rtl8192cfwU.bin + +FILESDIR= /libdata/firmware/if_urtwn + +.include <bsd.files.mk> Index: src/external/realtek/urtwn/dist/Realtek-Firmware-License.txt diff -u /dev/null src/external/realtek/urtwn/dist/Realtek-Firmware-License.txt:1.1.2.2 --- /dev/null Mon Aug 13 23:18:24 2012 +++ src/external/realtek/urtwn/dist/Realtek-Firmware-License.txt Mon Aug 13 23:18:22 2012 @@ -0,0 +1,39 @@ +Copyright (c) 2009, Realtek Semiconductor Corporation +All rights reserved. + +Redistribution. Redistribution and use in binary form, without +modification, are permitted provided that the following conditions are +met: + +* Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. +* Neither the name of Realtek Semiconductor Corporation nor the names of its + suppliers may be used to endorse or promote products derived from this + software without specific prior written permission. +* No reverse engineering, decompilation, or disassembly of this software + is permitted. + +Limited patent license. Realtek Semiconductor Corporation grants a world-wide, +royalty-free, non-exclusive license under patents it now or hereafter +owns or controls to make, have made, use, import, offer to sell and +sell ("Utilize") this software, but solely to the extent that any +such patent is necessary to Utilize the software alone, or in +combination with an operating system licensed under an approved Open +Source license as listed by the Open Source Initiative at +http://opensource.org/licenses. The patent license shall not apply to +any other combinations which include this software. No hardware per +se is licensed hereunder. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. Index: src/external/realtek/urtwn/dist/rtl8192cfw.bin Index: src/external/realtek/urtwn/dist/rtl8192cfwU.bin