summaryrefslogtreecommitdiffstats
path: root/sys/modules/usb
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2014-02-06 08:47:14 +0000
committerhselasky <hselasky@FreeBSD.org>2014-02-06 08:47:14 +0000
commit4a51eb79394a0fc7fc01cc2d6b16d989adc815c1 (patch)
tree724e6cf074baf21ceff872b8b9864a24e1159e91 /sys/modules/usb
parenta6a173909d79f12a0c86dcc0d1be7164392c427f (diff)
downloadFreeBSD-src-4a51eb79394a0fc7fc01cc2d6b16d989adc815c1.zip
FreeBSD-src-4a51eb79394a0fc7fc01cc2d6b16d989adc815c1.tar.gz
Import USB RNDIS driver to FreeBSD from OpenBSD.
Useful for so-called USB tethering. - Imported code from OpenBSD - Adapted code to FreeBSD - Removed some unused functions - Fixed some buffer encoding and decoding issues - Optimised data transport path a bit, by sending multiple packets at a time - Increased receive buffer to 16K Obtained from: OpenBSD Requested by: eadler @ MFC after: 2 weeks
Diffstat (limited to 'sys/modules/usb')
-rw-r--r--sys/modules/usb/Makefile1
-rw-r--r--sys/modules/usb/urndis/Makefile37
2 files changed, 38 insertions, 0 deletions
diff --git a/sys/modules/usb/Makefile b/sys/modules/usb/Makefile
index 626f4b4..eacd2eb 100644
--- a/sys/modules/usb/Makefile
+++ b/sys/modules/usb/Makefile
@@ -51,6 +51,7 @@ SUBDIR += atp uhid ukbd ums udbp ufm uep wsp
SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \
umct umcs umodem umoscom uplcom uslcom uvisor uvscom
SUBDIR += uether aue axe axge cdce cue ${_kue} mos rue smsc udav uhso ipheth
+SUBDIR += urndis
SUBDIR += usfs umass urio
SUBDIR += quirk template
SUBDIR += ${_g_audio} ${_g_keyboard} ${_g_modem} ${_g_mouse}
diff --git a/sys/modules/usb/urndis/Makefile b/sys/modules/usb/urndis/Makefile
new file mode 100644
index 0000000..929572d
--- /dev/null
+++ b/sys/modules/usb/urndis/Makefile
@@ -0,0 +1,37 @@
+#
+# $FreeBSD$
+#
+# Copyright (c) 2014 Hans Petter Selasky. 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.
+#
+
+S= ${.CURDIR}/../../..
+
+.PATH: $S/dev/usb/net
+
+KMOD= if_urndis
+SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h usbdevs.h \
+ miibus_if.h opt_inet.h \
+ if_urndis.c
+
+.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud