aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/usb
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2014-02-06 08:47:14 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2014-02-06 08:47:14 +0000
commit2931122745f8de9b4d370e5e6030c5a922368d35 (patch)
tree724e6cf074baf21ceff872b8b9864a24e1159e91 /sys/modules/usb
parente0c2f97550449b4c0363ecf6ced526b61f4bacb6 (diff)
downloadsrc-2931122745f8de9b4d370e5e6030c5a922368d35.tar.gz
src-2931122745f8de9b4d370e5e6030c5a922368d35.zip
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
Notes
Notes: svn path=/head/; revision=261541
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 626f4b40ea94..eacd2ebcc1d0 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 000000000000..929572dd6152
--- /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>