Source-Changes-HG archive

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

[src/trunk]: src Added rtwn(4) for Realtek RTL8188CE/RTL8192CE PCIe 802.11b/g...



details:   https://anonhg.NetBSD.org/src/rev/0dd14bcb560c
branches:  trunk
changeset: 340211:0dd14bcb560c
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Thu Aug 27 14:04:07 2015 +0000

description:
Added rtwn(4) for Realtek RTL8188CE/RTL8192CE PCIe 802.11b/g/n wireless network
devices.  Ported from OpenBSD.

diffstat:

 distrib/sets/lists/base/mi                              |     7 +-
 distrib/sets/lists/man/mi                               |     5 +-
 etc/mtree/NetBSD.dist.base                              |     3 +-
 external/realtek/Makefile                               |     4 +-
 external/realtek/rtwn/Makefile                          |    12 +
 external/realtek/rtwn/dist/Realtek-Firmware-License.txt |    39 +
 external/realtek/rtwn/dist/rtl8192cfw.bin               |   Bin 
 external/realtek/rtwn/dist/rtl8192cfwU.bin              |   Bin 
 external/realtek/rtwn/dist/rtl8192cfwU_B.bin            |   Bin 
 share/man/man4/Makefile                                 |     4 +-
 share/man/man4/pci.4                                    |     5 +-
 share/man/man4/rtwn.4                                   |   155 +
 sys/arch/amd64/conf/GENERIC                             |     5 +-
 sys/arch/i386/conf/GENERIC                              |     5 +-
 sys/dev/DEVNAMES                                        |     3 +-
 sys/dev/pci/files.pci                                   |     7 +-
 sys/dev/pci/if_rtwn.c                                   |  3541 +++++++++++++++
 sys/dev/pci/if_rtwnreg.h                                |  2106 ++++++++
 18 files changed, 5887 insertions(+), 14 deletions(-)

diffs (truncated from 6095 to 300 lines):

diff -r 917082e6ce66 -r 0dd14bcb560c distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi        Thu Aug 27 12:59:36 2015 +0000
+++ b/distrib/sets/lists/base/mi        Thu Aug 27 14:04:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1112 2015/08/23 18:28:40 mrg Exp $
+# $NetBSD: mi,v 1.1113 2015/08/27 14:04:07 nonaka Exp $
 #
 # Note:        Don't delete entries from here - mark them as "obsolete" instead,
 #      unless otherwise stated below.
@@ -201,6 +201,11 @@
 ./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_rtwn                     base-firmware-root
+./libdata/firmware/if_rtwn/Realtek-Firmware-License.txt        base-firmware-root
+./libdata/firmware/if_rtwn/rtl8192cfw.bin      base-firmware-root
+./libdata/firmware/if_rtwn/rtl8192cfwU.bin     base-firmware-root
+./libdata/firmware/if_rtwn/rtl8192cfwU_B.bin   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/rtl8188eufw.bin    base-firmware-root
diff -r 917082e6ce66 -r 0dd14bcb560c distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Thu Aug 27 12:59:36 2015 +0000
+++ b/distrib/sets/lists/man/mi Thu Aug 27 14:04:07 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1507 2015/08/23 19:09:02 rkujawa Exp $
+# $NetBSD: mi,v 1.1508 2015/08/27 14:04:07 nonaka Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1583,6 +1583,7 @@
 ./usr/share/man/cat4/rtpphy.0                  man-obsolete            obsolete
 ./usr/share/man/cat4/rtsx.0                    man-sys-catman          .cat
 ./usr/share/man/cat4/rtw.0                     man-sys-catman          .cat
+./usr/share/man/cat4/rtwn.0                    man-sys-catman          .cat
 ./usr/share/man/cat4/rum.0                     man-sys-catman          .cat
 ./usr/share/man/cat4/rumpfs.0                  man-sys-catman          .cat,rump
 ./usr/share/man/cat4/run.0                     man-sys-catman          .cat
@@ -4581,6 +4582,7 @@
 ./usr/share/man/html4/rtk.html                 man-sys-htmlman         html
 ./usr/share/man/html4/rtsx.html                        man-sys-htmlman         html
 ./usr/share/man/html4/rtw.html                 man-sys-htmlman         html
+./usr/share/man/html4/rtwn.html                        man-sys-htmlman         html
 ./usr/share/man/html4/rum.html                 man-sys-htmlman         html
 ./usr/share/man/html4/rumpfs.html                      man-sys-htmlman         html,rump
 ./usr/share/man/html4/run.html                 man-sys-htmlman         html
@@ -7485,6 +7487,7 @@
 ./usr/share/man/man4/rtpphy.4                  man-obsolete            obsolete
 ./usr/share/man/man4/rtsx.4                    man-sys-man             .man
 ./usr/share/man/man4/rtw.4                     man-sys-man             .man
+./usr/share/man/man4/rtwn.4                    man-sys-man             .man
 ./usr/share/man/man4/rum.4                     man-sys-man             .man
 ./usr/share/man/man4/rumpfs.4                  man-sys-man             .man,rump
 ./usr/share/man/man4/run.4                     man-sys-man             .man
diff -r 917082e6ce66 -r 0dd14bcb560c etc/mtree/NetBSD.dist.base
--- a/etc/mtree/NetBSD.dist.base        Thu Aug 27 12:59:36 2015 +0000
+++ b/etc/mtree/NetBSD.dist.base        Thu Aug 27 14:04:07 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: NetBSD.dist.base,v 1.147 2015/08/12 21:55:05 nakayama Exp $
+#      $NetBSD: NetBSD.dist.base,v 1.148 2015/08/27 14:04:07 nonaka Exp $
 #      @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -71,6 +71,7 @@
 ./libdata/firmware/if_iwm
 ./libdata/firmware/if_iwn
 ./libdata/firmware/if_otus
+./libdata/firmware/if_rtwn
 ./libdata/firmware/if_urtwn
 ./libdata/firmware/if_wpi
 ./libdata/firmware/radeon
diff -r 917082e6ce66 -r 0dd14bcb560c external/realtek/Makefile
--- a/external/realtek/Makefile Thu Aug 27 12:59:36 2015 +0000
+++ b/external/realtek/Makefile Thu Aug 27 14:04:07 2015 +0000
@@ -1,5 +1,5 @@
-# $NetBSD: Makefile,v 1.1 2012/06/14 04:14:36 riz Exp $
+# $NetBSD: Makefile,v 1.2 2015/08/27 14:04:07 nonaka Exp $
 
-SUBDIR+=       urtwn
+SUBDIR+=       rtwn urtwn
 
 .include <bsd.subdir.mk>
diff -r 917082e6ce66 -r 0dd14bcb560c external/realtek/rtwn/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/realtek/rtwn/Makefile    Thu Aug 27 14:04:07 2015 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: Makefile,v 1.1 2015/08/27 14:04:07 nonaka Exp $
+
+NOMAN= # define
+
+FILES= dist/Realtek-Firmware-License.txt
+FILES+=        dist/rtl8192cfw.bin
+FILES+=        dist/rtl8192cfwU.bin
+FILES+=        dist/rtl8192cfwU_B.bin
+
+FILESDIR= /libdata/firmware/if_rtwn
+
+.include <bsd.files.mk>
diff -r 917082e6ce66 -r 0dd14bcb560c external/realtek/rtwn/dist/Realtek-Firmware-License.txt
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/realtek/rtwn/dist/Realtek-Firmware-License.txt   Thu Aug 27 14:04:07 2015 +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 917082e6ce66 -r 0dd14bcb560c external/realtek/rtwn/dist/rtl8192cfw.bin
Binary file external/realtek/rtwn/dist/rtl8192cfw.bin has changed
diff -r 917082e6ce66 -r 0dd14bcb560c external/realtek/rtwn/dist/rtl8192cfwU.bin
Binary file external/realtek/rtwn/dist/rtl8192cfwU.bin has changed
diff -r 917082e6ce66 -r 0dd14bcb560c external/realtek/rtwn/dist/rtl8192cfwU_B.bin
Binary file external/realtek/rtwn/dist/rtl8192cfwU_B.bin has changed
diff -r 917082e6ce66 -r 0dd14bcb560c share/man/man4/Makefile
--- a/share/man/man4/Makefile   Thu Aug 27 12:59:36 2015 +0000
+++ b/share/man/man4/Makefile   Thu Aug 27 14:04:07 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.622 2015/08/23 19:09:02 rkujawa Exp $
+#      $NetBSD: Makefile,v 1.623 2015/08/27 14:04:07 nonaka Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/18/93
 
 MAN=   aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -50,7 +50,7 @@
        pseye.4 ptcd.4 ptm.4 pty.4 puc.4 pud.4 puffs.4 pwdog.4 px.4 pxg.4 \
        qe.4 qec.4 qsphy.4 \
        raid.4 ral.4 ray.4 rcons.4 rdcphy.4 re.4 rgephy.4 rlphy.4 \
-       rnd.4 route.4 rs5c372rtc.4 rtk.4 rtsx.4 rtw.4 rum.4 run.4 \
+       rnd.4 route.4 rs5c372rtc.4 rtk.4 rtsx.4 rtw.4 rtwn.4 rum.4 run.4 \
        s390rtc.4 satalink.4 sbus.4 scc.4 schide.4 \
        scsi.4 sd.4 se.4 seeprom.4 sem.4 \
        ses.4 sf.4 sfb.4 sgsmix.4 shb.4 shmif.4 \
diff -r 917082e6ce66 -r 0dd14bcb560c share/man/man4/pci.4
--- a/share/man/man4/pci.4      Thu Aug 27 12:59:36 2015 +0000
+++ b/share/man/man4/pci.4      Thu Aug 27 14:04:07 2015 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: pci.4,v 1.93 2012/10/13 15:28:34 njoly Exp $
+.\"    $NetBSD: pci.4,v 1.94 2015/08/27 14:04:07 nonaka Exp $
 .\"
 .\" Copyright (c) 1997 Jason R. Thorpe.  All rights reserved.
 .\" Copyright (c) 1997 Jonathan Stone
@@ -292,6 +292,8 @@
 Realtek 8129/8139 based
 .Tn Ethernet
 interfaces.
+.It rtwn
+Realtek RTL8188CE/RTL8192CE 802.11b/g/n wireless network interfaces.
 .It sf
 Adaptec AIC-6915 10/100
 .Tn Ethernet
@@ -491,6 +493,7 @@
 .Xr puc 4 ,
 .Xr ral 4 ,
 .Xr rtk 4 ,
+.Xr rtwn 4 ,
 .Xr sf 4 ,
 .Xr siisata 4 ,
 .Xr siop 4 ,
diff -r 917082e6ce66 -r 0dd14bcb560c share/man/man4/rtwn.4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/rtwn.4     Thu Aug 27 14:04:07 2015 +0000
@@ -0,0 +1,155 @@
+.\" $NetBSD: rtwn.4,v 1.1 2015/08/27 14:04:07 nonaka Exp $
+.\" $OpenBSD: rtwn.4,v 1.2 2015/07/09 11:28:53 stsp Exp $
+.\"
+.\" Copyright (c) 2010 Damien Bergamini <damien.bergamini%free.fr@localhost>
+.\" Copyright (c) 2015 Stefan Sperling <stsp%openbsd.org@localhost>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd August 27, 2015
+.Dt RTWN 4
+.Os
+.Sh NAME
+.Nm rtwn
+.Nd Realtek RTL8188CE/RTL8192CE PCIe IEEE 802.11b/g/n wireless network device
+.Sh SYNOPSIS
+.Cd "rtwn* at pci? dev ? function ?"
+.Sh DESCRIPTION
+The
+.Nm
+driver supports PCIe wireless network devices based on the Realtek
+RTL8188CE and RTL8192CE chipset.
+.Pp
+The RTL8188CE is a highly integrated 802.11n adapter that combines a MAC,
+a 1T1R capable baseband and an RF in a single chip.
+It operates in the 2GHz spectrum only.
+.Pp
+The RTL8192CE is a highly integrated multiple-in, multiple-out (MIMO)
+802.11n adapter that combines a MAC, a 2T2R capable baseband and an
+RF in a single chip.
+It operates in the 2GHz spectrum only.
+.Pp
+These are the modes the
+.Nm
+driver can operate in:
+.Bl -tag -width "IBSS-masterXX"
+.It BSS mode
+Also known as
+.Em infrastructure
+mode, this is used when associating with an access point, through
+which all traffic passes.
+This mode is the default.
+.It monitor mode
+In this mode the driver is able to receive packets without
+associating with an access point.
+This disables the internal receive filter and enables the card to
+capture packets from networks which it wouldn't normally have access to,
+or to scan for access points.
+.El
+.Pp
+The
+.Nm
+driver can be configured to use
+Wired Equivalent Privacy (WEP) or
+Wi-Fi Protected Access (WPA-PSK and WPA2-PSK).
+WPA is the current encryption standard for wireless networks.
+It is strongly recommended that WEP
+not be used as the sole mechanism
+to secure wireless communication,
+due to serious weaknesses in it.
+.Pp
+The
+.Nm
+driver can be configured at runtime with
+.Xr ifconfig 8
+or on boot with
+.Xr ifconfig.if 5 .
+.Sh FILES
+The driver needs the following firmware files,
+which are loaded when an interface is brought up:
+.Pp
+.Bl -tag -width Ds -offset indent -compact
+.It /libdata/firmware/if_rtwn/rtl8192cfw.bin
+.It /libdata/firmware/if_rtwn/rtl8192cfwU.bin
+.It /libdata/firmware/if_rtwn/rtl8192cfwU_B.bin
+.El
+.Sh EXAMPLES
+The following
+.Xr ifconfig.if 5
+example configures rtwn0 to join whatever network is available on boot,
+using WEP key
+.Dq 0x1deadbeef1 ,
+channel 11, obtaining an IP address using DHCP:
+.Bd -literal -offset indent
+nwkey 0x1deadbeef1 chan 11
+dhcp
+.Ed
+.Pp
+Join an existing BSS network,
+.Dq my_net :
+.Bd -literal -offset indent
+# ifconfig rtwn0 192.168.1.1 netmask 0xffffff00 nwid my_net
+.Ed
+.Sh DIAGNOSTICS
+.Bl -diag
+.It "rtwn%d: could not read firmware ..."



Home | Main Index | Thread Index | Old Index