Source-Changes-HG archive

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

[src/netbsd-6]: src Pull up the following revisions(s) (requested by riz in t...



details:   https://anonhg.NetBSD.org/src/rev/ee93b63e6ff4
branches:  netbsd-6
changeset: 774228:ee93b63e6ff4
user:      sborrill <sborrill%NetBSD.org@localhost>
date:      Fri Jun 15 08:48:45 2012 +0000

description:
Pull up the following revisions(s) (requested by riz in ticket #343):
        sys/dev/usb/files.usb:          revision 1.122
        sys/dev/usb/if_urtw.c:          revision 1.1
        sys/dev/usb/if_urtwreg.h:       revision 1.1
        share/man/man4/Makefile:        revision 1.586
        share/man/man4/urtw.4:          revision 1.1
        distrib/sets/lists/man/mi:      revision 1.1393
        sys/dev/usb/usbdevs:            revision 1.617
        sys/arch/i386/conf/GENERIC:     revision 1.357
        sys/arch/amd64/conf/GENERIC:    revision 1.1075 via patch

Add urtw(4) driver for Realtek RTL8187/RTL8187B 802.11b/g USB wireless
adapter. From OpenBSD.

diffstat:

 distrib/sets/lists/man/mi   |     5 +-
 share/man/man4/Makefile     |     4 +-
 share/man/man4/urtw.4       |   120 +
 sys/arch/amd64/conf/GENERIC |     5 +-
 sys/arch/i386/conf/GENERIC  |     5 +-
 sys/dev/usb/files.usb       |     7 +-
 sys/dev/usb/if_urtw.c       |  4089 +++++++++++++++++++++++++++++++++++++++++++
 sys/dev/usb/if_urtwreg.h    |   400 ++++
 sys/dev/usb/usbdevs         |     7 +-
 9 files changed, 4633 insertions(+), 9 deletions(-)

diffs (truncated from 4785 to 300 lines):

diff -r 6af996c4d1a1 -r ee93b63e6ff4 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Thu Jun 14 09:51:26 2012 +0000
+++ b/distrib/sets/lists/man/mi Fri Jun 15 08:48:45 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1379.2.6 2012/06/14 09:48:44 sborrill Exp $
+# $NetBSD: mi,v 1.1379.2.7 2012/06/15 08:48:47 sborrill Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1717,6 +1717,7 @@
 ./usr/share/man/cat4/url.0                     man-sys-catman          .cat
 ./usr/share/man/cat4/urlphy.0                  man-sys-catman          .cat
 ./usr/share/man/cat4/urndis.0                  man-sys-catman          .cat
+./usr/share/man/cat4/urtw.0                    man-sys-catman          .cat
 ./usr/share/man/cat4/urtwn.0                   man-sys-catman          .cat
 ./usr/share/man/cat4/usb.0                     man-sys-catman          .cat
 ./usr/share/man/cat4/usbtask.0                 man-sys-catman          .cat
@@ -4513,6 +4514,7 @@
 ./usr/share/man/html4/url.html                 man-sys-htmlman         html
 ./usr/share/man/html4/urlphy.html              man-sys-htmlman         html
 ./usr/share/man/html4/urndis.html              man-sys-htmlman         html
+./usr/share/man/html4/urtw.html                        man-sys-htmlman         html
 ./usr/share/man/html4/urtwn.html               man-sys-htmlman         html
 ./usr/share/man/html4/usb.html                 man-sys-htmlman         html
 ./usr/share/man/html4/usbtask.html             man-sys-htmlman         html
@@ -7236,6 +7238,7 @@
 ./usr/share/man/man4/url.4                     man-sys-man             .man
 ./usr/share/man/man4/urlphy.4                  man-sys-man             .man
 ./usr/share/man/man4/urndis.4                  man-sys-man             .man
+./usr/share/man/man4/urtw.4                    man-sys-man             .man
 ./usr/share/man/man4/urtwn.4                   man-sys-man             .man
 ./usr/share/man/man4/usb.4                     man-sys-man             .man
 ./usr/share/man/man4/usbtask.4                 man-sys-man             .man
diff -r 6af996c4d1a1 -r ee93b63e6ff4 share/man/man4/Makefile
--- a/share/man/man4/Makefile   Thu Jun 14 09:51:26 2012 +0000
+++ b/share/man/man4/Makefile   Fri Jun 15 08:48:45 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.581.2.2 2012/06/14 09:48:46 sborrill Exp $
+#      $NetBSD: Makefile,v 1.581.2.3 2012/06/15 08:48:47 sborrill Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/18/93
 
 MAN=   aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -75,7 +75,7 @@
        ucycom.4 udav.4 udsbr.4 uftdi.4 ugen.4 ugensa.4 uhci.4 uhid.4 \
        uhidev.4 uhmodem.4 uhso.4 uipaq.4 uirda.4 ukbd.4 ukyopon.4 ulpt.4 \
        umass.4 umct.4 umidi.4 umodem.4 ums.4 upgt.4 upl.4 uplcom.4 \
-       urio.4 url.4 urndis.4 urtwn.4 usb.4 uscanner.4 uslsa.4 usscanner.4 \
+       urio.4 url.4 urndis.4 urtw.4 urtwn.4 usb.4 uscanner.4 uslsa.4 usscanner.4 \
        ustir.4 uthum.4 utoppy.4 uts.4 uvideo.4 uvisor.4 uvscom.4 uyap.4 \
        uyurex.4
 
diff -r 6af996c4d1a1 -r ee93b63e6ff4 share/man/man4/urtw.4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/urtw.4     Fri Jun 15 08:48:45 2012 +0000
@@ -0,0 +1,120 @@
+.\"    $NetBSD: urtw.4,v 1.2.2.2 2012/06/15 08:48:47 sborrill Exp $
+.\" Copyright (c) 2008 Weongyo Jeong
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd October 17, 2009
+.Dt URTW 4
+.Os
+.Sh NAME
+.Nm urtw
+.Nd Realtek RTL8187B/L USB IEEE 802.11b/g wireless network device
+.Sh SYNOPSIS
+To compile this driver into the kernel,
+place the following lines in your kernel configuration file:
+.Bd -ragged -offset indent
+.Cd "urtw* at uhub? port ?"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver supports USB 802.11b/g wireless adapters based on the
+Realtek RTL8187B/L.
+.Pp
+.Nm
+supports
+.Cm station
+and
+.Cm monitor
+mode operation.
+Only one virtual interface may be configured at any time.
+For more information on configuring this device, see
+.Xr ifconfig 8 .
+.Sh HARDWARE
+The
+.Nm
+driver supports Realtek RTL8187B/L based wireless network devices, including:
+.Pp
+.Bl -column "Shuttle XPC Accessory PN20" "RTL8225" "USB" -compact -offset 6n
+.It Em "Card Radio Bus"
+.It "Belkin F5D7050E RTL8225 USB"
+.It "Linksys WUSB54GCv2 RTL8225 USB"
+.It "Netgear WG111v2 RTL8225 USB"
+.It "Netgear WG111v3 RTL8225 USB"
+.It "Safehome WLG-1500SMA5 RTL8225 USB"
+.It "Shuttle XPC Accessory PN20 RTL8225 USB"
+.It "Sitecom WL168v1 RTL8225 USB"
+.It "Sitecom WL168v4 RTL8225 USB"
+.It "SureCom EP-9001-g(2A) RTL8225 USB"
+.It "TRENDnet TEW-424UB V3.xR RTL8225 USB"
+.El
+.Sh EXAMPLES
+.Xr ifconfig.if 5
+example configures urtw0 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
+Configure urtw0 to join network
+.Dq my_net
+using WPA with passphrase
+.Dq my_passphrase :
+.Bd -literal -offset indent
+# ifconfig urtw0 nwid my_net wpakey my_passphrase
+.Ed
+.Pp
+Join an existing BSS network,
+.Dq my_net :
+.Bd -literal -offset indent
+# ifconfig urtw0 192.168.1.1 netmask 0xffffff00 nwid my_net
+.Ed
+.Sh SEE ALSO
+.Xr arp 4 ,
+.Xr netintro 4 ,
+.Xr usb 4 ,
+.Xr ifconfig.if 5 ,
+.Xr wpa_supplicant.conf 5 ,
+.Xr ifconfig 8 ,
+.Xr wpa_supplicant 8
+.Rs
+.%T Realtek
+.%U http://www.realtek.com.tw
+.Re
+.Sh HISTORY
+The
+.Nm
+device driver first appeared in
+.Fx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An Weongyo Jeong
+.Aq weongyo%FreeBSD.org@localhost .
diff -r 6af996c4d1a1 -r ee93b63e6ff4 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Thu Jun 14 09:51:26 2012 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Fri Jun 15 08:48:45 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.348.2.4 2012/06/14 09:48:46 sborrill Exp $
+# $NetBSD: GENERIC,v 1.348.2.5 2012/06/15 08:48:45 sborrill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.348.2.4 $"
+#ident                 "GENERIC-$Revision: 1.348.2.5 $"
 
 maxusers       64              # estimated number of users
 
@@ -962,6 +962,7 @@
 otus*  at uhub? port ?         # Atheros AR9001U
 ral*   at uhub? port ?         # Ralink Technology RT25x0 802.11a/b/g
 rum*   at uhub? port ?         # Ralink Technology RT2501/RT2601 802.11a/b/g
+urtw*  at uhub? port ?         # Realtek RTL8187/RTL8187B 802.11b/g
 urtwn* at uhub? port ?         # Realtek RTL8188CU/RTL8192CU 802.11b/g/n
 zyd*   at uhub? port ?         # Zydas ZD1211
 
diff -r 6af996c4d1a1 -r ee93b63e6ff4 sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC        Thu Jun 14 09:51:26 2012 +0000
+++ b/sys/arch/i386/conf/GENERIC        Fri Jun 15 08:48:45 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1066.2.4 2012/06/14 09:48:46 sborrill Exp $
+# $NetBSD: GENERIC,v 1.1066.2.5 2012/06/15 08:48:46 sborrill Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.1066.2.4 $"
+#ident                 "GENERIC-$Revision: 1.1066.2.5 $"
 
 maxusers       64              # estimated number of users
 
@@ -1226,6 +1226,7 @@
 ral*   at uhub? port ?         # Ralink Technology RT25x0 802.11a/b/g
 rum*   at uhub? port ?         # Ralink Technology RT2501/RT2601 802.11a/b/g
 upgt*  at uhub? port ?         # Intersil PrismGT
+urtw*  at uhub? port ?         # Realtek RTL8187/RTL8187B 802.11b/g
 urtwn* at uhub? port ?         # Realtek RTL8188CU/RTL8192CU 802.11b/g/n
 zyd*   at uhub? port ?         # Zydas ZD1211
 
diff -r 6af996c4d1a1 -r ee93b63e6ff4 sys/dev/usb/files.usb
--- a/sys/dev/usb/files.usb     Thu Jun 14 09:51:26 2012 +0000
+++ b/sys/dev/usb/files.usb     Fri Jun 15 08:48:45 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.usb,v 1.120.2.1 2012/06/14 09:48:47 sborrill Exp $
+#      $NetBSD: files.usb,v 1.120.2.2 2012/06/15 08:48:46 sborrill Exp $
 #
 # Config file and device description for machine-independent USB code.
 # Included by ports that need it.  Ports that use it must provide
@@ -415,3 +415,8 @@
 device urtwn: ether, ifnet, arp, wlan, firmload
 attach urtwn at usbdevif
 file   dev/usb/if_urtwn.c              urtwn
+
+# Realtek RTL8187/RTL8187B 802.11b/g USB wireless adapter
+device urtw: ether, ifnet, arp, wlan
+attach urtw at usbdevif
+file   dev/usb/if_urtw.c               urtw
diff -r 6af996c4d1a1 -r ee93b63e6ff4 sys/dev/usb/if_urtw.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/usb/if_urtw.c     Fri Jun 15 08:48:45 2012 +0000
@@ -0,0 +1,4089 @@
+/*     $NetBSD: if_urtw.c,v 1.1.4.2 2012/06/15 08:48:46 sborrill Exp $ */
+/*     $OpenBSD: if_urtw.c,v 1.39 2011/07/03 15:47:17 matthew Exp $    */
+
+/*-
+ * Copyright (c) 2009 Martynas Venckus <martynas%openbsd.org@localhost>
+ * Copyright (c) 2008 Weongyo Jeong <weongyo%FreeBSD.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.
+ */
+
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: if_urtw.c,v 1.1.4.2 2012/06/15 08:48:46 sborrill Exp $");
+
+#include <sys/param.h>
+#include <sys/sockio.h>
+#include <sys/proc.h>
+#include <sys/mbuf.h>
+#include <sys/kernel.h>
+#include <sys/socket.h>
+#include <sys/systm.h>
+#include <sys/malloc.h>
+#include <sys/callout.h>
+#include <sys/conf.h>
+#include <sys/device.h>
+#include <sys/module.h>
+#include <sys/bus.h>
+
+#include <machine/endian.h>
+#include <net/bpf.h>
+#include <net/if.h>
+#include <net/if_arp.h>
+#include <net/if_dl.h>
+#include <net/if_ether.h>
+#include <net/if_media.h>
+#include <net/if_types.h>
+
+#include <netinet/in.h>
+#include <netinet/in_systm.h>
+#include <netinet/in_var.h>
+#include <netinet/if_inarp.h>
+#include <netinet/ip.h>



Home | Main Index | Thread Index | Old Index