Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Add firmware for the RealTek RTL8192CU family of wireless ch...



details:   https://anonhg.NetBSD.org/src/rev/ebbced5dcbcc
branches:  trunk
changeset: 779730:ebbced5dcbcc
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Jun 14 04:14:35 2012 +0000

description:
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.

diffstat:

 distrib/sets/lists/base/mi                               |    8 ++-
 etc/mtree/NetBSD.dist.base                               |    4 +-
 external/Makefile                                        |    4 +-
 external/README                                          |    4 +-
 external/realtek/Makefile                                |    5 +
 external/realtek/Makefile.inc                            |    9 +++
 external/realtek/urtwn/Makefile                          |   10 +++
 external/realtek/urtwn/dist/Realtek-Firmware-License.txt |   39 +++++++++++++++
 external/realtek/urtwn/dist/rtl8192cfw.bin               |  Bin 
 external/realtek/urtwn/dist/rtl8192cfwU.bin              |  Bin 
 share/man/man4/urtwn.4                                   |   17 +----
 sys/dev/usb/if_urtwn.c                                   |   10 +-
 12 files changed, 86 insertions(+), 24 deletions(-)

diffs (239 lines):

diff -r 542c1b0df1da -r ebbced5dcbcc distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi        Thu Jun 14 01:08:22 2012 +0000
+++ b/distrib/sets/lists/base/mi        Thu Jun 14 04:14:35 2012 +0000
@@ -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
diff -r 542c1b0df1da -r ebbced5dcbcc etc/mtree/NetBSD.dist.base
--- a/etc/mtree/NetBSD.dist.base        Thu Jun 14 01:08:22 2012 +0000
+++ b/etc/mtree/NetBSD.dist.base        Thu Jun 14 04:14:35 2012 +0000
@@ -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
diff -r 542c1b0df1da -r ebbced5dcbcc external/Makefile
--- a/external/Makefile Thu Jun 14 01:08:22 2012 +0000
+++ b/external/Makefile Thu Jun 14 04:14:35 2012 +0000
@@ -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>
diff -r 542c1b0df1da -r ebbced5dcbcc external/README
--- a/external/README   Thu Jun 14 01:08:22 2012 +0000
+++ b/external/README   Thu Jun 14 04:14:35 2012 +0000
@@ -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 @@
        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
 
diff -r 542c1b0df1da -r ebbced5dcbcc external/realtek/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/realtek/Makefile Thu Jun 14 04:14:35 2012 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2012/06/14 04:14:36 riz Exp $
+
+SUBDIR+=       urtwn
+
+.include <bsd.subdir.mk>
diff -r 542c1b0df1da -r ebbced5dcbcc external/realtek/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/realtek/Makefile.inc     Thu Jun 14 04:14:35 2012 +0000
@@ -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:
diff -r 542c1b0df1da -r ebbced5dcbcc external/realtek/urtwn/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/realtek/urtwn/Makefile   Thu Jun 14 04:14:35 2012 +0000
@@ -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>
diff -r 542c1b0df1da -r ebbced5dcbcc external/realtek/urtwn/dist/Realtek-Firmware-License.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/realtek/urtwn/dist/Realtek-Firmware-License.txt  Thu Jun 14 04:14:35 2012 +0000
@@ -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.
diff -r 542c1b0df1da -r ebbced5dcbcc external/realtek/urtwn/dist/rtl8192cfw.bin
Binary file external/realtek/urtwn/dist/rtl8192cfw.bin has changed
diff -r 542c1b0df1da -r ebbced5dcbcc external/realtek/urtwn/dist/rtl8192cfwU.bin
Binary file external/realtek/urtwn/dist/rtl8192cfwU.bin has changed
diff -r 542c1b0df1da -r ebbced5dcbcc share/man/man4/urtwn.4
--- a/share/man/man4/urtwn.4    Thu Jun 14 01:08:22 2012 +0000
+++ b/share/man/man4/urtwn.4    Thu Jun 14 04:14:35 2012 +0000
@@ -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.bergamini%free.fr@localhost>
@@ -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 @@
 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:
diff -r 542c1b0df1da -r ebbced5dcbcc sys/dev/usb/if_urtwn.c
--- a/sys/dev/usb/if_urtwn.c    Thu Jun 14 01:08:22 2012 +0000
+++ b/sys/dev/usb/if_urtwn.c    Thu Jun 14 04:14:35 2012 +0000
@@ -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 @@
        /* 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);



Home | Main Index | Thread Index | Old Index