Module Name:    src
Committed By:   riz
Date:           Thu Jun 14 04:14:37 UTC 2012

Modified Files:
        src/distrib/sets/lists/base: mi
        src/etc/mtree: NetBSD.dist.base
        src/external: Makefile README
        src/share/man/man4: urtwn.4
        src/sys/dev/usb: if_urtwn.c
Added Files:
        src/external/realtek: Makefile Makefile.inc
        src/external/realtek/urtwn: Makefile
        src/external/realtek/urtwn/dist: Realtek-Firmware-License.txt
            rtl8192cfw.bin rtl8192cfwU.bin

Log Message:
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.996 -r1.997 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.100 -r1.101 src/etc/mtree/NetBSD.dist.base
cvs rdiff -u -r1.17 -r1.18 src/external/Makefile
cvs rdiff -u -r1.14 -r1.15 src/external/README
cvs rdiff -u -r0 -r1.1 src/external/realtek/Makefile \
    src/external/realtek/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/external/realtek/urtwn/Makefile
cvs rdiff -u -r0 -r1.1 \
    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.3 -r1.4 src/share/man/man4/urtwn.4
cvs rdiff -u -r1.4 -r1.5 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.996 src/distrib/sets/lists/base/mi:1.997
--- src/distrib/sets/lists/base/mi:1.996	Sun Jun  3 23:19:09 2012
+++ src/distrib/sets/lists/base/mi	Thu Jun 14 04:14:35 2012
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.996 2012/06/03 23:19:09 joerg Exp $
+# $NetBSD: mi,v 1.997 2012/06/14 04:14:35 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
@@ -188,7 +192,7 @@
 ./libdata/firmware/run/run-rt2870		base-firmware-root
 ./libdata/firmware/run/run-rt3071		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.100 src/etc/mtree/NetBSD.dist.base:1.101
--- src/etc/mtree/NetBSD.dist.base:1.100	Fri Jun  1 13:19:38 2012
+++ src/etc/mtree/NetBSD.dist.base	Thu Jun 14 04:14:36 2012
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.100 2012/06/01 13:19:38 nonaka Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.101 2012/06/14 04:14:36 riz Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -67,12 +67,12 @@
 ./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/run
 ./libdata/firmware/upgt
-./libdata/firmware/urtwn
 ./libdata/firmware/zyd
 ./libexec
 ./libexec/dhcpcd-hooks

Index: src/external/Makefile
diff -u src/external/Makefile:1.17 src/external/Makefile:1.18
--- src/external/Makefile:1.17	Wed Jun 13 23:41:09 2012
+++ src/external/Makefile	Thu Jun 14 04:14:36 2012
@@ -1,6 +1,6 @@
-#	$NetBSD: Makefile,v 1.17 2012/06/13 23:41:09 riz Exp $
+#	$NetBSD: Makefile,v 1.18 2012/06/14 04:14:36 riz Exp $
 
 SUBDIR+= apache2 atheros bsd cddl gpl2 gpl3 historical intel-fw-eula
-SUBDIR+= intel-fw-public ibm-public mit public-domain
+SUBDIR+= intel-fw-public ibm-public mit public-domain realtek
 
 .include <bsd.subdir.mk>

Index: src/external/README
diff -u src/external/README:1.14 src/external/README:1.15
--- src/external/README:1.14	Wed Nov  3 18:52:44 2010
+++ src/external/README	Thu Jun 14 04:14:36 2012
@@ -1,4 +1,4 @@
-$NetBSD: README,v 1.14 2010/11/03 18:52:44 christos Exp $
+$NetBSD: README,v 1.15 2012/06/14 04:14:36 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.3 src/share/man/man4/urtwn.4:1.4
--- src/share/man/man4/urtwn.4:1.3	Thu May 31 12:10:10 2012
+++ src/share/man/man4/urtwn.4	Thu Jun 14 04:14:36 2012
@@ -1,4 +1,4 @@
-.\" $NetBSD: urtwn.4,v 1.3 2012/05/31 12:10:10 nonaka Exp $
+.\" $NetBSD: urtwn.4,v 1.4 2012/06/14 04:14:36 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 March 25, 2012
+.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.4 src/sys/dev/usb/if_urtwn.c:1.5
--- src/sys/dev/usb/if_urtwn.c:1.4	Fri Jun  1 12:38:25 2012
+++ src/sys/dev/usb/if_urtwn.c	Thu Jun 14 04:14:36 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_urtwn.c,v 1.4 2012/06/01 12:38:25 nonaka Exp $	*/
+/*	$NetBSD: if_urtwn.c,v 1.5 2012/06/14 04:14:36 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.4 2012/06/01 12:38:25 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.5 2012/06/14 04:14:36 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
--- /dev/null	Thu Jun 14 04:14:37 2012
+++ src/external/realtek/Makefile	Thu Jun 14 04:14:36 2012
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2012/06/14 04:14:36 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
--- /dev/null	Thu Jun 14 04:14:37 2012
+++ src/external/realtek/Makefile.inc	Thu Jun 14 04:14:36 2012
@@ -0,0 +1,9 @@
+# $NetBSD: Makefile.inc,v 1.1 2012/06/14 04:14:36 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
--- /dev/null	Thu Jun 14 04:14:37 2012
+++ src/external/realtek/urtwn/Makefile	Thu Jun 14 04:14:36 2012
@@ -0,0 +1,10 @@
+# $NetBSD: Makefile,v 1.1 2012/06/14 04:14:36 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
--- /dev/null	Thu Jun 14 04:14:37 2012
+++ src/external/realtek/urtwn/dist/Realtek-Firmware-License.txt	Thu Jun 14 04:14:37 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

Reply via email to