[Midnightbsd-cvs] src [10050] trunk/sys/dev/usb/net: sync with freebsd 10 stable

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun May 27 18:42:35 EDT 2018


Revision: 10050
          http://svnweb.midnightbsd.org/src/?rev=10050
Author:   laffer1
Date:     2018-05-27 18:42:34 -0400 (Sun, 27 May 2018)
Log Message:
-----------
sync with freebsd 10 stable

Modified Paths:
--------------
    trunk/sys/dev/usb/net/if_aue.c
    trunk/sys/dev/usb/net/if_auereg.h
    trunk/sys/dev/usb/net/if_axe.c
    trunk/sys/dev/usb/net/if_axereg.h
    trunk/sys/dev/usb/net/if_axge.c
    trunk/sys/dev/usb/net/if_axgereg.h
    trunk/sys/dev/usb/net/if_cdce.c
    trunk/sys/dev/usb/net/if_cdcereg.h
    trunk/sys/dev/usb/net/if_cue.c
    trunk/sys/dev/usb/net/if_cuereg.h
    trunk/sys/dev/usb/net/if_ipheth.c
    trunk/sys/dev/usb/net/if_iphethvar.h
    trunk/sys/dev/usb/net/if_kue.c
    trunk/sys/dev/usb/net/if_kuefw.h
    trunk/sys/dev/usb/net/if_kuereg.h
    trunk/sys/dev/usb/net/if_mos.c
    trunk/sys/dev/usb/net/if_mosreg.h
    trunk/sys/dev/usb/net/if_rue.c
    trunk/sys/dev/usb/net/if_ruereg.h
    trunk/sys/dev/usb/net/if_udav.c
    trunk/sys/dev/usb/net/if_udavreg.h
    trunk/sys/dev/usb/net/if_urndis.c
    trunk/sys/dev/usb/net/if_urndisreg.h
    trunk/sys/dev/usb/net/if_usie.c
    trunk/sys/dev/usb/net/if_usievar.h
    trunk/sys/dev/usb/net/ruephy.c
    trunk/sys/dev/usb/net/ruephyreg.h
    trunk/sys/dev/usb/net/uhso.c
    trunk/sys/dev/usb/net/usb_ethernet.c
    trunk/sys/dev/usb/net/usb_ethernet.h

Modified: trunk/sys/dev/usb/net/if_aue.c
===================================================================
--- trunk/sys/dev/usb/net/if_aue.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_aue.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000
  *	Bill Paul <wpaul at ee.columbia.edu>.  All rights reserved.
@@ -34,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_aue.c 271356 2014-09-10 06:54:05Z hselasky $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_aue.c 271355 2014-09-10 06:48:23Z hselasky $");
 
 /*
  * ADMtek AN986 Pegasus and AN8511 Pegasus II USB to ethernet driver.
@@ -1006,6 +1007,7 @@
 	struct aue_softc *sc = ifp->if_softc;
 	struct mii_data *mii = GET_MII(sc);
 	struct mii_softc *miisc;
+	int error;
 
 	AUE_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -1012,8 +1014,8 @@
         sc->sc_flags &= ~AUE_FLAG_LINK;
 	LIST_FOREACH(miisc, &mii->mii_phys, mii_list)
 		PHY_RESET(miisc);
-	mii_mediachg(mii);
-	return (0);
+	error = mii_mediachg(mii);
+	return (error);
 }
 
 /*

Modified: trunk/sys/dev/usb/net/if_auereg.h
===================================================================
--- trunk/sys/dev/usb/net/if_auereg.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_auereg.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1997, 1998, 1999
  *	Bill Paul <wpaul at ee.columbia.edu>.  All rights reserved.
@@ -29,7 +30,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: stable/9/sys/dev/usb/net/if_auereg.h 196219 2009-08-14 20:03:53Z jhb $
+ * $FreeBSD: stable/10/sys/dev/usb/net/if_auereg.h 196219 2009-08-14 20:03:53Z jhb $
  */
 
 /*

Modified: trunk/sys/dev/usb/net/if_axe.c
===================================================================
--- trunk/sys/dev/usb/net/if_axe.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_axe.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000-2003
  *	Bill Paul <wpaul at windriver.com>.  All rights reserved.
@@ -31,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_axe.c 263166 2014-03-14 10:18:53Z hselasky $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_axe.c 252185 2013-06-25 00:26:30Z yongari $");
 
 /*
  * ASIX Electronics AX88172/AX88178/AX88778 USB 2.0 ethernet driver.
@@ -834,19 +835,15 @@
 	/* Initialize controller and get station address. */
 	if (sc->sc_flags & AXE_FLAG_178) {
 		axe_ax88178_init(sc);
-		sc->sc_tx_bufsz = 16 * 1024;
 		axe_cmd(sc, AXE_178_CMD_READ_NODEID, 0, 0, ue->ue_eaddr);
 	} else if (sc->sc_flags & AXE_FLAG_772) {
 		axe_ax88772_init(sc);
-		sc->sc_tx_bufsz = 8 * 1024;
 		axe_cmd(sc, AXE_178_CMD_READ_NODEID, 0, 0, ue->ue_eaddr);
 	} else if (sc->sc_flags & AXE_FLAG_772A) {
 		axe_ax88772a_init(sc);
-		sc->sc_tx_bufsz = 8 * 1024;
 		axe_cmd(sc, AXE_178_CMD_READ_NODEID, 0, 0, ue->ue_eaddr);
 	} else if (sc->sc_flags & AXE_FLAG_772B) {
 		axe_ax88772b_init(sc);
-		sc->sc_tx_bufsz = 8 * 1024;
 	} else
 		axe_cmd(sc, AXE_172_CMD_READ_NODEID, 0, 0, ue->ue_eaddr);
 

Modified: trunk/sys/dev/usb/net/if_axereg.h
===================================================================
--- trunk/sys/dev/usb/net/if_axereg.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_axereg.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000-2003
  *	Bill Paul <wpaul at windriver.com>.  All rights reserved.
@@ -29,7 +30,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: stable/9/sys/dev/usb/net/if_axereg.h 229106 2011-12-31 14:47:35Z hselasky $
+ * $FreeBSD: stable/10/sys/dev/usb/net/if_axereg.h 251679 2013-06-13 05:46:19Z kevlo $
  */
 
 /*
@@ -349,7 +350,6 @@
 	uint8_t			sc_phyaddrs[2];
 	uint16_t		sc_pwrcfg;
 	uint16_t		sc_lenmask;
-	int			sc_tx_bufsz;
 };
 
 #define	AXE_IS_178_FAMILY(sc)						  \

Modified: trunk/sys/dev/usb/net/if_axge.c
===================================================================
--- trunk/sys/dev/usb/net/if_axge.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_axge.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2013-2014 Kevin Lo
  * All rights reserved.
@@ -25,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_axge.c 268736 2014-07-16 06:18:02Z hselasky $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_axge.c 268737 2014-07-16 06:20:18Z hselasky $");
 
 /*
  * ASIX Electronics AX88178A/AX88179 USB 2.0/3.0 gigabit ethernet driver.

Modified: trunk/sys/dev/usb/net/if_axgereg.h
===================================================================
--- trunk/sys/dev/usb/net/if_axgereg.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_axgereg.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2013-2014 Kevin Lo
  * All rights reserved.
@@ -23,7 +24,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: stable/9/sys/dev/usb/net/if_axgereg.h 268222 2014-07-03 16:34:01Z hselasky $
+ * $FreeBSD: stable/10/sys/dev/usb/net/if_axgereg.h 266991 2014-06-03 01:39:55Z kevlo $
  */
 
 #define	AXGE_ACCESS_MAC			0x01

Modified: trunk/sys/dev/usb/net/if_cdce.c
===================================================================
--- trunk/sys/dev/usb/net/if_cdce.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_cdce.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*	$NetBSD: if_cdce.c,v 1.4 2004/10/24 12:50:54 augustss Exp $ */
 
 /*-
@@ -46,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_cdce.c 290608 2015-11-09 11:27:31Z hselasky $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_cdce.c 290607 2015-11-09 11:24:59Z hselasky $");
 
 #include <sys/stdint.h>
 #include <sys/stddef.h>
@@ -237,7 +238,7 @@
 	DEVMETHOD(device_suspend, cdce_suspend),
 	DEVMETHOD(device_resume, cdce_resume),
 
-	{0, 0}
+	DEVMETHOD_END
 };
 
 static driver_t cdce_driver = {

Modified: trunk/sys/dev/usb/net/if_cdcereg.h
===================================================================
--- trunk/sys/dev/usb/net/if_cdcereg.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_cdcereg.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2003-2005 Craig Boston
  * All rights reserved.
@@ -29,7 +30,7 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: stable/9/sys/dev/usb/net/if_cdcereg.h 221077 2011-04-26 19:40:37Z hselasky $
+ * $FreeBSD: stable/10/sys/dev/usb/net/if_cdcereg.h 221077 2011-04-26 19:40:37Z hselasky $
  */
 
 #ifndef _USB_IF_CDCEREG_H_

Modified: trunk/sys/dev/usb/net/if_cue.c
===================================================================
--- trunk/sys/dev/usb/net/if_cue.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_cue.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000
  *	Bill Paul <wpaul at ee.columbia.edu>.  All rights reserved.
@@ -31,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_cue.c 248085 2013-03-09 02:36:32Z marius $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_cue.c 246128 2013-01-30 18:01:20Z sbz $");
 
 /*
  * CATC USB-EL1210A USB to ethernet driver. Used in the CATC Netmate
@@ -157,7 +158,7 @@
 	DEVMETHOD(device_attach, cue_attach),
 	DEVMETHOD(device_detach, cue_detach),
 
-	{0, 0}
+	DEVMETHOD_END
 };
 
 static driver_t cue_driver = {

Modified: trunk/sys/dev/usb/net/if_cuereg.h
===================================================================
--- trunk/sys/dev/usb/net/if_cuereg.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_cuereg.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000
  *	Bill Paul <wpaul at ee.columbia.edu>.  All rights reserved.
@@ -29,7 +30,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: stable/9/sys/dev/usb/net/if_cuereg.h 196219 2009-08-14 20:03:53Z jhb $
+ * $FreeBSD: stable/10/sys/dev/usb/net/if_cuereg.h 251674 2013-06-13 01:33:01Z kevlo $
  */
 
 /*
@@ -111,7 +112,7 @@
 #define	CUE_CONFIG_IDX		0	/* config number 1 */
 #define	CUE_IFACE_IDX		0
 
-/* The interrupt endpoint is currently unused by the KLSI part. */
+/* The interrupt endpoint is currently unused by the CATC part. */
 enum {
 	CUE_BULK_DT_WR,
 	CUE_BULK_DT_RD,

Modified: trunk/sys/dev/usb/net/if_ipheth.c
===================================================================
--- trunk/sys/dev/usb/net/if_ipheth.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_ipheth.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
  * Copyright (c) 2009 Diego Giagio. All rights reserved.
@@ -30,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_ipheth.c 251701 2013-06-13 20:40:39Z eadler $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_ipheth.c 253670 2013-07-26 09:58:56Z hselasky $");
 
 #include <sys/stdint.h>
 #include <sys/stddef.h>
@@ -116,7 +117,7 @@
 	DEVMETHOD(device_attach, ipheth_attach),
 	DEVMETHOD(device_detach, ipheth_detach),
 
-	{0, 0}
+	DEVMETHOD_END
 };
 
 static driver_t ipheth_driver = {
@@ -149,6 +150,7 @@
     USB_IFACE_PROTOCOL(pt)
 
 static const STRUCT_USB_HOST_ID ipheth_devs[] = {
+#if 0
 	{IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE,
 	    IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
 	    IPHETH_USBINTF_PROTO)},
@@ -167,6 +169,13 @@
 	{IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_5,
 	    IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
 	    IPHETH_USBINTF_PROTO)},
+#else
+	/* product agnostic interface match */
+	{USB_VENDOR(USB_VENDOR_APPLE),
+	 USB_IFACE_CLASS(IPHETH_USBINTF_CLASS),
+	 USB_IFACE_SUBCLASS(IPHETH_USBINTF_SUBCLASS),
+	 USB_IFACE_PROTOCOL(IPHETH_USBINTF_PROTO)},
+#endif
 };
 
 static int

Modified: trunk/sys/dev/usb/net/if_iphethvar.h
===================================================================
--- trunk/sys/dev/usb/net/if_iphethvar.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_iphethvar.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,4 +1,5 @@
-/* $FreeBSD: stable/9/sys/dev/usb/net/if_iphethvar.h 213805 2010-10-13 21:36:42Z hselasky $ */
+/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/sys/dev/usb/net/if_iphethvar.h 213805 2010-10-13 21:36:42Z hselasky $ */
 /*-
  * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.
  * Copyright (c) 2009 Diego Giagio. All rights reserved.

Modified: trunk/sys/dev/usb/net/if_kue.c
===================================================================
--- trunk/sys/dev/usb/net/if_kue.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_kue.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000
  *	Bill Paul <wpaul at ee.columbia.edu>.  All rights reserved.
@@ -31,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_kue.c 248085 2013-03-09 02:36:32Z marius $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_kue.c 246128 2013-01-30 18:01:20Z sbz $");
 
 /*
  * Kawasaki LSI KL5KUSB101B USB to ethernet adapter driver.
@@ -199,7 +200,7 @@
 	DEVMETHOD(device_attach, kue_attach),
 	DEVMETHOD(device_detach, kue_detach),
 
-	{0, 0}
+	DEVMETHOD_END
 };
 
 static driver_t kue_driver = {

Modified: trunk/sys/dev/usb/net/if_kuefw.h
===================================================================
--- trunk/sys/dev/usb/net/if_kuefw.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_kuefw.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000
  *	Bill Paul <wpaul at ee.columbia.edu>.  All rights reserved.
@@ -29,7 +30,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: stable/9/sys/dev/usb/net/if_kuefw.h 196219 2009-08-14 20:03:53Z jhb $
+ * $FreeBSD: stable/10/sys/dev/usb/net/if_kuefw.h 196219 2009-08-14 20:03:53Z jhb $
  */
 
 /*

Modified: trunk/sys/dev/usb/net/if_kuereg.h
===================================================================
--- trunk/sys/dev/usb/net/if_kuereg.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_kuereg.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000
  *	Bill Paul <wpaul at ee.columbia.edu>.  All rights reserved.
@@ -29,7 +30,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: stable/9/sys/dev/usb/net/if_kuereg.h 196219 2009-08-14 20:03:53Z jhb $
+ * $FreeBSD: stable/10/sys/dev/usb/net/if_kuereg.h 196219 2009-08-14 20:03:53Z jhb $
  */
 
 /*

Modified: trunk/sys/dev/usb/net/if_mos.c
===================================================================
--- trunk/sys/dev/usb/net/if_mos.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_mos.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2011 Rick van der Zwet <info at rickvanderzwet.nl>
  *
@@ -79,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_mos.c 248085 2013-03-09 02:36:32Z marius $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_mos.c 251734 2013-06-14 05:36:47Z kevlo $");
 
 /*
  * Moschip MCS7730/MCS7830/MCS7832 USB to Ethernet controller
@@ -526,16 +527,15 @@
 	struct mos_softc *sc = ifp->if_softc;
 	struct mii_data *mii = GET_MII(sc);
 	struct mii_softc *miisc;
+	int error;
 
 	MOS_LOCK_ASSERT(sc, MA_OWNED);
 
 	sc->mos_link = 0;
-	if (mii->mii_instance) {
-		LIST_FOREACH(miisc, &mii->mii_phys, mii_list)
-		    mii_phy_reset(miisc);
-	}
-	mii_mediachg(mii);
-	return (0);
+	LIST_FOREACH(miisc, &mii->mii_phys, mii_list)
+		PHY_RESET(miisc);
+	error = mii_mediachg(mii);
+	return (error);
 }
 
 /*

Modified: trunk/sys/dev/usb/net/if_mosreg.h
===================================================================
--- trunk/sys/dev/usb/net/if_mosreg.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_mosreg.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,4 +1,5 @@
-/* $FreeBSD: stable/9/sys/dev/usb/net/if_mosreg.h 232876 2012-03-12 18:22:04Z hselasky $ */
+/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/sys/dev/usb/net/if_mosreg.h 232257 2012-02-28 15:45:42Z kevlo $ */
 /*-
  * Copyright (c) 2010, 2011 Rick van der Zwet <info at rickvanderzwet.nl>
  *

Modified: trunk/sys/dev/usb/net/if_rue.c
===================================================================
--- trunk/sys/dev/usb/net/if_rue.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_rue.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2001-2003, Shunsuke Akiyama <akiyama at FreeBSD.org>.
  * Copyright (c) 1997, 1998, 1999, 2000 Bill Paul <wpaul at ee.columbia.edu>.
@@ -57,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_rue.c 248085 2013-03-09 02:36:32Z marius $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_rue.c 251734 2013-06-14 05:36:47Z kevlo $");
 
 /*
  * RealTek RTL8150 USB to fast ethernet controller driver.
@@ -866,6 +867,7 @@
 	struct rue_softc *sc = ifp->if_softc;
 	struct mii_data *mii = GET_MII(sc);
 	struct mii_softc *miisc;
+	int error;
 
 	RUE_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -872,8 +874,8 @@
         sc->sc_flags &= ~RUE_FLAG_LINK;
 	LIST_FOREACH(miisc, &mii->mii_phys, mii_list)
 		PHY_RESET(miisc);
-	mii_mediachg(mii);
-	return (0);
+	error = mii_mediachg(mii);
+	return (error);
 }
 
 /*

Modified: trunk/sys/dev/usb/net/if_ruereg.h
===================================================================
--- trunk/sys/dev/usb/net/if_ruereg.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_ruereg.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2001-2003, Shunsuke Akiyama <akiyama at FreeBSD.org>.
  * All rights reserved.
@@ -23,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: stable/9/sys/dev/usb/net/if_ruereg.h 215335 2010-11-15 06:04:25Z kevlo $
+ * $FreeBSD: stable/10/sys/dev/usb/net/if_ruereg.h 215335 2010-11-15 06:04:25Z kevlo $
  */
 
 #define	RUE_CONFIG_IDX		0	/* config number 1 */

Modified: trunk/sys/dev/usb/net/if_udav.c
===================================================================
--- trunk/sys/dev/usb/net/if_udav.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_udav.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,6 +1,7 @@
+/* $MidnightBSD$ */
 /*	$NetBSD: if_udav.c,v 1.2 2003/09/04 15:17:38 tsutsui Exp $	*/
 /*	$nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $	*/
-/*	$FreeBSD: stable/9/sys/dev/usb/net/if_udav.c 248085 2013-03-09 02:36:32Z marius $	*/
+/*	$FreeBSD: stable/10/sys/dev/usb/net/if_udav.c 254404 2013-08-16 07:42:06Z kevlo $	*/
 /*-
  * Copyright (c) 2003
  *     Shingo WATANABE <nabe at nabechan.org>.  All rights reserved.
@@ -34,7 +35,7 @@
 /*
  * DM9601(DAVICOM USB to Ethernet MAC Controller with Integrated 10/100 PHY)
  * The spec can be found at the following url.
- *   http://www.davicom.com.tw/big5/download/Data%20Sheet/DM9601-DS-P01-930914.pdf
+ *   http://ptm2.cc.utu.fi/ftp/network/cards/DM9601/From_NET/DM9601-DS-P01-930914.pdf
  */
 
 /*
@@ -44,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_udav.c 248085 2013-03-09 02:36:32Z marius $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_udav.c 254404 2013-08-16 07:42:06Z kevlo $");
 
 #include <sys/stdint.h>
 #include <sys/stddef.h>
@@ -750,6 +751,7 @@
 	struct udav_softc *sc = ifp->if_softc;
 	struct mii_data *mii = GET_MII(sc);
 	struct mii_softc *miisc;
+	int error;
 
 	UDAV_LOCK_ASSERT(sc, MA_OWNED);
 
@@ -756,8 +758,8 @@
         sc->sc_flags &= ~UDAV_FLAG_LINK;
 	LIST_FOREACH(miisc, &mii->mii_phys, mii_list)
 		PHY_RESET(miisc);
-	mii_mediachg(mii);
-	return (0);
+	error = mii_mediachg(mii);
+	return (error);
 }
 
 static void

Modified: trunk/sys/dev/usb/net/if_udavreg.h
===================================================================
--- trunk/sys/dev/usb/net/if_udavreg.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_udavreg.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,6 +1,7 @@
+/* $MidnightBSD$ */
 /*	$NetBSD: if_udavreg.h,v 1.2 2003/09/04 15:17:39 tsutsui Exp $	*/
 /*	$nabe: if_udavreg.h,v 1.2 2003/08/21 16:26:40 nabe Exp $	*/
-/*	$FreeBSD: stable/9/sys/dev/usb/net/if_udavreg.h 242819 2012-11-09 06:58:23Z hselasky $	*/
+/*	$FreeBSD: stable/10/sys/dev/usb/net/if_udavreg.h 238466 2012-07-15 05:49:02Z rpaulo $	*/
 /*-
  * Copyright (c) 2003
  *     Shingo WATANABE <nabe at nabechan.org>.  All rights reserved.

Modified: trunk/sys/dev/usb/net/if_urndis.c
===================================================================
--- trunk/sys/dev/usb/net/if_urndis.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_urndis.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*	$OpenBSD: if_urndis.c,v 1.46 2013/12/09 15:45:29 pirofti Exp $ */
 
 /*
@@ -21,7 +22,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_urndis.c 292793 2015-12-27 20:49:36Z marius $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_urndis.c 307184 2016-10-13 06:34:18Z sephe $");
 
 #include <sys/stdint.h>
 #include <sys/stddef.h>
@@ -45,6 +46,7 @@
 
 #include <net/if.h>
 #include <net/if_var.h>
+#include <net/rndis.h>
 
 #include <dev/usb/usb.h>
 #include <dev/usb/usbdi.h>
@@ -79,17 +81,17 @@
 static uether_fn_t urndis_setpromisc;
 
 static uint32_t	urndis_ctrl_query(struct urndis_softc *sc, uint32_t oid,
-		    struct urndis_query_req *msg, uint16_t len,
+		    struct rndis_query_req *msg, uint16_t len,
 		    const void **rbuf, uint16_t *rbufsz);
 static uint32_t	urndis_ctrl_set(struct urndis_softc *sc, uint32_t oid,
-		    struct urndis_set_req *msg, uint16_t len);
+		    struct rndis_set_req *msg, uint16_t len);
 static uint32_t	urndis_ctrl_handle_init(struct urndis_softc *sc,
-		    const struct urndis_comp_hdr *hdr);
+		    const struct rndis_comp_hdr *hdr);
 static uint32_t	urndis_ctrl_handle_query(struct urndis_softc *sc,
-		    const struct urndis_comp_hdr *hdr, const void **buf,
+		    const struct rndis_comp_hdr *hdr, const void **buf,
 		    uint16_t *bufsz);
 static uint32_t	urndis_ctrl_handle_reset(struct urndis_softc *sc,
-		    const struct urndis_comp_hdr *hdr);
+		    const struct rndis_comp_hdr *hdr);
 static uint32_t	urndis_ctrl_init(struct urndis_softc *sc);
 static uint32_t	urndis_ctrl_halt(struct urndis_softc *sc);
 
@@ -211,8 +213,8 @@
 {
 	static struct {
 		union {
-			struct urndis_query_req query;
-			struct urndis_set_req set;
+			struct rndis_query_req query;
+			struct rndis_set_req set;
 		} hdr;
 		union {
 			uint8_t eaddr[ETHER_ADDR_LEN];
@@ -290,8 +292,8 @@
 	memcpy(&sc->sc_ue.ue_eaddr, buf, ETHER_ADDR_LEN);
 
 	/* Initialize packet filter */
-	sc->sc_filter = RNDIS_PACKET_TYPE_BROADCAST |
-	    RNDIS_PACKET_TYPE_ALL_MULTICAST;
+	sc->sc_filter = NDIS_PACKET_TYPE_BROADCAST |
+	    NDIS_PACKET_TYPE_ALL_MULTICAST;
 	msg.ibuf.filter = htole32(sc->sc_filter);
 	URNDIS_LOCK(sc);
 	error = urndis_ctrl_set(sc, OID_GEN_CURRENT_PACKET_FILTER,
@@ -452,10 +454,10 @@
 	return (err);
 }
 
-static struct urndis_comp_hdr *
+static struct rndis_comp_hdr *
 urndis_ctrl_recv(struct urndis_softc *sc)
 {
-	struct urndis_comp_hdr *hdr;
+	struct rndis_comp_hdr *hdr;
 	usb_error_t err;
 
 	err = urndis_ctrl_msg(sc, UT_READ_CLASS_INTERFACE,
@@ -465,7 +467,7 @@
 	if (err != USB_ERR_NORMAL_COMPLETION)
 		return (NULL);
 
-	hdr = (struct urndis_comp_hdr *)sc->sc_response_buf;
+	hdr = (struct rndis_comp_hdr *)sc->sc_response_buf;
 
 	DPRINTF("type 0x%x len %u\n", le32toh(hdr->rm_type),
 	    le32toh(hdr->rm_len));
@@ -479,7 +481,7 @@
 }
 
 static uint32_t
-urndis_ctrl_handle(struct urndis_softc *sc, struct urndis_comp_hdr *hdr,
+urndis_ctrl_handle(struct urndis_softc *sc, struct rndis_comp_hdr *hdr,
     const void **buf, uint16_t *bufsz)
 {
 	uint32_t rval;
@@ -520,11 +522,11 @@
 
 static uint32_t
 urndis_ctrl_handle_init(struct urndis_softc *sc,
-    const struct urndis_comp_hdr *hdr)
+    const struct rndis_comp_hdr *hdr)
 {
-	const struct urndis_init_comp *msg;
+	const struct rndis_init_comp *msg;
 
-	msg = (const struct urndis_init_comp *)hdr;
+	msg = (const struct rndis_init_comp *)hdr;
 
 	DPRINTF("len %u rid %u status 0x%x "
 	    "ver_major %u ver_minor %u devflags 0x%x medium 0x%x pktmaxcnt %u "
@@ -563,12 +565,12 @@
 
 static uint32_t
 urndis_ctrl_handle_query(struct urndis_softc *sc,
-    const struct urndis_comp_hdr *hdr, const void **buf, uint16_t *bufsz)
+    const struct rndis_comp_hdr *hdr, const void **buf, uint16_t *bufsz)
 {
-	const struct urndis_query_comp *msg;
+	const struct rndis_query_comp *msg;
 	uint64_t limit;
 
-	msg = (const struct urndis_query_comp *)hdr;
+	msg = (const struct rndis_query_comp *)hdr;
 
 	DPRINTF("len %u rid %u status 0x%x "
 	    "buflen %u bufoff %u\n",
@@ -608,12 +610,12 @@
 
 static uint32_t
 urndis_ctrl_handle_reset(struct urndis_softc *sc,
-    const struct urndis_comp_hdr *hdr)
+    const struct rndis_comp_hdr *hdr)
 {
-	const struct urndis_reset_comp *msg;
+	const struct rndis_reset_comp *msg;
 	uint32_t rval;
 
-	msg = (const struct urndis_reset_comp *)hdr;
+	msg = (const struct rndis_reset_comp *)hdr;
 
 	rval = le32toh(msg->rm_status);
 
@@ -629,7 +631,7 @@
 	}
 	if (msg->rm_adrreset != 0) {
 		struct {
-			struct urndis_set_req hdr;
+			struct rndis_set_req hdr;
 			uint32_t filter;
 		} msg_filter;
 
@@ -649,14 +651,14 @@
 static uint32_t
 urndis_ctrl_init(struct urndis_softc *sc)
 {
-	struct urndis_init_req msg;
-	struct urndis_comp_hdr *hdr;
+	struct rndis_init_req msg;
+	struct rndis_comp_hdr *hdr;
 	uint32_t rval;
 
 	msg.rm_type = htole32(REMOTE_NDIS_INITIALIZE_MSG);
 	msg.rm_len = htole32(sizeof(msg));
 	msg.rm_rid = 0;
-	msg.rm_ver_major = htole32(1);
+	msg.rm_ver_major = htole32(RNDIS_VERSION_MAJOR);
 	msg.rm_ver_minor = htole32(1);
 	msg.rm_max_xfersz = htole32(RNDIS_RX_MAXLEN);
 
@@ -687,7 +689,7 @@
 static uint32_t
 urndis_ctrl_halt(struct urndis_softc *sc)
 {
-	struct urndis_halt_req msg;
+	struct rndis_halt_req msg;
 	uint32_t rval;
 
 	msg.rm_type = htole32(REMOTE_NDIS_HALT_MSG);
@@ -713,10 +715,10 @@
  */
 static uint32_t
 urndis_ctrl_query(struct urndis_softc *sc, uint32_t oid,
-    struct urndis_query_req *msg, uint16_t len, const void **rbuf,
+    struct rndis_query_req *msg, uint16_t len, const void **rbuf,
     uint16_t *rbufsz)
 {
-	struct urndis_comp_hdr *hdr;
+	struct rndis_comp_hdr *hdr;
 	uint32_t datalen, rval;
 
 	msg->rm_type = htole32(REMOTE_NDIS_QUERY_MSG);
@@ -760,9 +762,9 @@
 
 static uint32_t
 urndis_ctrl_set(struct urndis_softc *sc, uint32_t oid,
-    struct urndis_set_req *msg, uint16_t len)
+    struct rndis_set_req *msg, uint16_t len)
 {
-	struct urndis_comp_hdr *hdr;
+	struct rndis_comp_hdr *hdr;
 	uint32_t datalen, rval;
 
 	msg->rm_type = htole32(REMOTE_NDIS_SET_MSG);
@@ -812,7 +814,7 @@
 	struct urndis_softc *sc = usbd_xfer_softc(xfer);
 	struct usb_page_cache *pc = usbd_xfer_get_frame(xfer, 0);
 	struct ifnet *ifp = uether_getifp(&sc->sc_ue);
-	struct urndis_packet_msg msg;
+	struct rndis_packet_msg msg;
 	struct mbuf *m;
 	int actlen;
 	int aframes;
@@ -872,11 +874,11 @@
 				    "datalen %u\n", msg.rm_datalen, actlen);
 				goto tr_setup;
 			} else if ((msg.rm_dataoffset + msg.rm_datalen +
-			    (uint32_t)__offsetof(struct urndis_packet_msg,
+			    (uint32_t)__offsetof(struct rndis_packet_msg,
 			    rm_dataoffset)) > (uint32_t)actlen) {
 				DPRINTF("invalid dataoffset %u larger than %u\n",
 				    msg.rm_dataoffset + msg.rm_datalen +
-				    (uint32_t)__offsetof(struct urndis_packet_msg,
+				    (uint32_t)__offsetof(struct rndis_packet_msg,
 				    rm_dataoffset), actlen);
 				goto tr_setup;
 			} else if (msg.rm_datalen < (uint32_t)sizeof(struct ether_header)) {
@@ -902,7 +904,7 @@
 				m_adj(m, ETHER_ALIGN);
 
 				usbd_copy_out(pc, offset + msg.rm_dataoffset +
-				    __offsetof(struct urndis_packet_msg,
+				    __offsetof(struct rndis_packet_msg,
 				    rm_dataoffset), m->m_data, msg.rm_datalen);
 
 				/* enqueue */
@@ -938,7 +940,7 @@
 static void
 urndis_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error)
 {
-	struct urndis_packet_msg msg;
+	struct rndis_packet_msg msg;
 	struct urndis_softc *sc = usbd_xfer_softc(xfer);
 	struct ifnet *ifp = uether_getifp(&sc->sc_ue);
 	struct mbuf *m;

Modified: trunk/sys/dev/usb/net/if_urndisreg.h
===================================================================
--- trunk/sys/dev/usb/net/if_urndisreg.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_urndisreg.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,4 +1,5 @@
-/*	$FreeBSD: stable/9/sys/dev/usb/net/if_urndisreg.h 262362 2014-02-23 13:20:08Z hselasky $ */
+/* $MidnightBSD$ */
+/*	$FreeBSD: stable/10/sys/dev/usb/net/if_urndisreg.h 307175 2016-10-13 03:23:43Z sephe $ */
 /*	$OpenBSD: if_urndisreg.h,v 1.19 2013/11/21 14:08:05 mpi Exp $ */
 
 /*
@@ -55,242 +56,4 @@
 #define	URNDIS_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx)
 #define	URNDIS_LOCK_ASSERT(sc, what) mtx_assert(&(sc)->sc_mtx, (what))
 
-#define	RNDIS_STATUS_BUFFER_OVERFLOW 	0x80000005L
-#define	RNDIS_STATUS_FAILURE 		0xC0000001L
-#define	RNDIS_STATUS_INVALID_DATA 	0xC0010015L
-#define	RNDIS_STATUS_MEDIA_CONNECT 	0x4001000BL
-#define	RNDIS_STATUS_MEDIA_DISCONNECT 	0x4001000CL
-#define	RNDIS_STATUS_NOT_SUPPORTED 	0xC00000BBL
-#define	RNDIS_STATUS_PENDING 		STATUS_PENDING	/* XXX */
-#define	RNDIS_STATUS_RESOURCES 		0xC000009AL
-#define	RNDIS_STATUS_SUCCESS 		0x00000000L
-
-#define	OID_GEN_SUPPORTED_LIST		0x00010101
-#define	OID_GEN_HARDWARE_STATUS		0x00010102
-#define	OID_GEN_MEDIA_SUPPORTED		0x00010103
-#define	OID_GEN_MEDIA_IN_USE		0x00010104
-#define	OID_GEN_MAXIMUM_LOOKAHEAD	0x00010105
-#define	OID_GEN_MAXIMUM_FRAME_SIZE	0x00010106
-#define	OID_GEN_LINK_SPEED		0x00010107
-#define	OID_GEN_TRANSMIT_BUFFER_SPACE	0x00010108
-#define	OID_GEN_RECEIVE_BUFFER_SPACE	0x00010109
-#define	OID_GEN_TRANSMIT_BLOCK_SIZE	0x0001010A
-#define	OID_GEN_RECEIVE_BLOCK_SIZE	0x0001010B
-#define	OID_GEN_VENDOR_ID		0x0001010C
-#define	OID_GEN_VENDOR_DESCRIPTION	0x0001010D
-#define	OID_GEN_CURRENT_PACKET_FILTER	0x0001010E
-#define	OID_GEN_CURRENT_LOOKAHEAD	0x0001010F
-#define	OID_GEN_DRIVER_VERSION		0x00010110
-#define	OID_GEN_MAXIMUM_TOTAL_SIZE	0x00010111
-#define	OID_GEN_PROTOCOL_OPTIONS	0x00010112
-#define	OID_GEN_MAC_OPTIONS		0x00010113
-#define	OID_GEN_MEDIA_CONNECT_STATUS	0x00010114
-#define	OID_GEN_MAXIMUM_SEND_PACKETS	0x00010115
-#define	OID_GEN_VENDOR_DRIVER_VERSION	0x00010116
-#define	OID_GEN_SUPPORTED_GUIDS		0x00010117
-#define	OID_GEN_NETWORK_LAYER_ADDRESSES	0x00010118
-#define	OID_GEN_TRANSPORT_HEADER_OFFSET	0x00010119
-#define	OID_GEN_MACHINE_NAME		0x0001021A
-#define	OID_GEN_RNDIS_CONFIG_PARAMETER	0x0001021B
-#define	OID_GEN_VLAN_ID			0x0001021C
-
-#define	OID_802_3_PERMANENT_ADDRESS	0x01010101
-#define	OID_802_3_CURRENT_ADDRESS	0x01010102
-#define	OID_802_3_MULTICAST_LIST	0x01010103
-#define	OID_802_3_MAXIMUM_LIST_SIZE	0x01010104
-#define	OID_802_3_MAC_OPTIONS		0x01010105
-#define	OID_802_3_RCV_ERROR_ALIGNMENT	0x01020101
-#define	OID_802_3_XMIT_ONE_COLLISION	0x01020102
-#define	OID_802_3_XMIT_MORE_COLLISIONS	0x01020103
-#define	OID_802_3_XMIT_DEFERRED		0x01020201
-#define	OID_802_3_XMIT_MAX_COLLISIONS	0x01020202
-#define	OID_802_3_RCV_OVERRUN		0x01020203
-#define	OID_802_3_XMIT_UNDERRUN		0x01020204
-#define	OID_802_3_XMIT_HEARTBEAT_FAILURE	0x01020205
-#define	OID_802_3_XMIT_TIMES_CRS_LOST	0x01020206
-#define	OID_802_3_XMIT_LATE_COLLISIONS	0x01020207
-
-#define	RNDIS_MEDIUM_802_3		0x00000000
-
-/* Device flags */
-#define	RNDIS_DF_CONNECTIONLESS		0x00000001
-#define	RNDIS_DF_CONNECTION_ORIENTED	0x00000002
-
-/*
- * RNDIS data message
- */
-#define	REMOTE_NDIS_PACKET_MSG		0x00000001
-
-struct urndis_packet_msg {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_dataoffset;
-	uint32_t rm_datalen;
-	uint32_t rm_oobdataoffset;
-	uint32_t rm_oobdatalen;
-	uint32_t rm_oobdataelements;
-	uint32_t rm_pktinfooffset;
-	uint32_t rm_pktinfolen;
-	uint32_t rm_vchandle;
-	uint32_t rm_reserved;
-};
-
-/*
- * RNDIS control messages
- */
-struct urndis_comp_hdr {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_rid;
-	uint32_t rm_status;
-};
-
-/* Initialize the device. */
-#define	REMOTE_NDIS_INITIALIZE_MSG	0x00000002
-#define	REMOTE_NDIS_INITIALIZE_CMPLT	0x80000002
-
-struct urndis_init_req {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_rid;
-	uint32_t rm_ver_major;
-	uint32_t rm_ver_minor;
-	uint32_t rm_max_xfersz;
-};
-
-struct urndis_init_comp {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_rid;
-	uint32_t rm_status;
-	uint32_t rm_ver_major;
-	uint32_t rm_ver_minor;
-	uint32_t rm_devflags;
-	uint32_t rm_medium;
-	uint32_t rm_pktmaxcnt;
-	uint32_t rm_pktmaxsz;
-	uint32_t rm_align;
-	uint32_t rm_aflistoffset;
-	uint32_t rm_aflistsz;
-};
-
-/* Halt the device.  No response sent. */
-#define	REMOTE_NDIS_HALT_MSG		0x00000003
-
-struct urndis_halt_req {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_rid;
-};
-
-/* Send a query object. */
-#define	REMOTE_NDIS_QUERY_MSG		0x00000004
-#define	REMOTE_NDIS_QUERY_CMPLT		0x80000004
-
-struct urndis_query_req {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_rid;
-	uint32_t rm_oid;
-	uint32_t rm_infobuflen;
-	uint32_t rm_infobufoffset;
-	uint32_t rm_devicevchdl;
-};
-
-struct urndis_query_comp {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_rid;
-	uint32_t rm_status;
-	uint32_t rm_infobuflen;
-	uint32_t rm_infobufoffset;
-};
-
-/* Send a set object request. */
-#define	REMOTE_NDIS_SET_MSG		0x00000005
-#define	REMOTE_NDIS_SET_CMPLT		0x80000005
-
-struct urndis_set_req {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_rid;
-	uint32_t rm_oid;
-	uint32_t rm_infobuflen;
-	uint32_t rm_infobufoffset;
-	uint32_t rm_devicevchdl;
-};
-
-struct urndis_set_comp {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_rid;
-	uint32_t rm_status;
-};
-
-#define	REMOTE_NDIS_SET_PARAM_NUMERIC	0x00000000
-#define	REMOTE_NDIS_SET_PARAM_STRING	0x00000002
-
-struct urndis_set_parameter {
-	uint32_t rm_nameoffset;
-	uint32_t rm_namelen;
-	uint32_t rm_type;
-	uint32_t rm_valueoffset;
-	uint32_t rm_valuelen;
-};
-
-/* Perform a soft reset on the device. */
-#define	REMOTE_NDIS_RESET_MSG		0x00000006
-#define	REMOTE_NDIS_RESET_CMPLT		0x80000006
-
-struct urndis_reset_req {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_rid;
-};
-
-struct urndis_reset_comp {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_status;
-	uint32_t rm_adrreset;
-};
-
-/* 802.3 link-state or undefined message error. */
-#define	REMOTE_NDIS_INDICATE_STATUS_MSG	0x00000007
-
-/* Keepalive messsage.  May be sent by device. */
-#define	REMOTE_NDIS_KEEPALIVE_MSG	0x00000008
-#define	REMOTE_NDIS_KEEPALIVE_CMPLT	0x80000008
-
-struct urndis_keepalive_req {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_rid;
-};
-
-struct urndis_keepalive_comp {
-	uint32_t rm_type;
-	uint32_t rm_len;
-	uint32_t rm_rid;
-	uint32_t rm_status;
-};
-
-/* packet filter bits used by OID_GEN_CURRENT_PACKET_FILTER */
-#define	RNDIS_PACKET_TYPE_DIRECTED		0x00000001
-#define	RNDIS_PACKET_TYPE_MULTICAST		0x00000002
-#define	RNDIS_PACKET_TYPE_ALL_MULTICAST		0x00000004
-#define	RNDIS_PACKET_TYPE_BROADCAST		0x00000008
-#define	RNDIS_PACKET_TYPE_SOURCE_ROUTING	0x00000010
-#define	RNDIS_PACKET_TYPE_PROMISCUOUS		0x00000020
-#define	RNDIS_PACKET_TYPE_SMT			0x00000040
-#define	RNDIS_PACKET_TYPE_ALL_LOCAL		0x00000080
-#define	RNDIS_PACKET_TYPE_GROUP			0x00001000
-#define	RNDIS_PACKET_TYPE_ALL_FUNCTIONAL	0x00002000
-#define	RNDIS_PACKET_TYPE_FUNCTIONAL		0x00004000
-#define	RNDIS_PACKET_TYPE_MAC_FRAME		0x00008000
-
-/* RNDIS offsets */
-#define	RNDIS_HEADER_OFFSET	8	/* bytes */
-#define	RNDIS_DATA_OFFSET	((uint32_t)(sizeof(struct urndis_packet_msg) - RNDIS_HEADER_OFFSET))
-
 #endif					/* _IF_URNDISREG_H_ */

Modified: trunk/sys/dev/usb/net/if_usie.c
===================================================================
--- trunk/sys/dev/usb/net/if_usie.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_usie.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2011 Anybots Inc
  * written by Akinori Furukoshi <moonlightakkiy at yahoo.ca>
@@ -26,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/if_usie.c 248085 2013-03-09 02:36:32Z marius $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/if_usie.c 255471 2013-09-11 09:19:44Z glebius $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -121,7 +122,8 @@
 static void usie_if_status_cb(void *, int);
 
 static void usie_if_start(struct ifnet *);
-static int usie_if_output(struct ifnet *, struct mbuf *, struct sockaddr *, struct route *);
+static int usie_if_output(struct ifnet *, struct mbuf *,
+	const struct sockaddr *, struct route *);
 static void usie_if_init(void *);
 static void usie_if_stop(struct usie_softc *);
 static int usie_if_ioctl(struct ifnet *, u_long, caddr_t);
@@ -1181,7 +1183,7 @@
 }
 
 static int
-usie_if_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
+usie_if_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst,
     struct route *ro)
 {
 	int err;
@@ -1323,7 +1325,6 @@
 		break;
 
 	case SIOCSIFADDR:
-	case SIOCSIFDSTADDR:
 		break;
 
 	default:

Modified: trunk/sys/dev/usb/net/if_usievar.h
===================================================================
--- trunk/sys/dev/usb/net/if_usievar.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/if_usievar.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,4 +1,5 @@
-/* $FreeBSD: stable/9/sys/dev/usb/net/if_usievar.h 223864 2011-07-08 10:58:56Z hselasky $ */
+/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/sys/dev/usb/net/if_usievar.h 223864 2011-07-08 10:58:56Z hselasky $ */
 
 /*-
  * Copyright (c) 2011 Anybots Inc

Modified: trunk/sys/dev/usb/net/ruephy.c
===================================================================
--- trunk/sys/dev/usb/net/ruephy.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/ruephy.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2001-2003, Shunsuke Akiyama <akiyama at FreeBSD.org>.
  * All rights reserved.
@@ -26,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/ruephy.c 235000 2012-05-04 15:05:30Z hselasky $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/ruephy.c 233774 2012-04-02 10:50:42Z hselasky $");
 
 /*
  * driver for RealTek RTL8150 internal PHY

Modified: trunk/sys/dev/usb/net/ruephyreg.h
===================================================================
--- trunk/sys/dev/usb/net/ruephyreg.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/ruephyreg.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2001-2003, Shunsuke Akiyama <akiyama at FreeBSD.org>.
  * All rights reserved.
@@ -23,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: stable/9/sys/dev/usb/net/ruephyreg.h 227229 2011-11-06 17:23:49Z marius $
+ * $FreeBSD: stable/10/sys/dev/usb/net/ruephyreg.h 226154 2011-10-08 12:33:10Z marius $
  */
 
 #ifndef _RUEPHYREG_H_

Modified: trunk/sys/dev/usb/net/uhso.c
===================================================================
--- trunk/sys/dev/usb/net/uhso.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/uhso.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
 /*-
  * Copyright (c) 2010 Fredrik Lindberg <fli at shapeshifter.se>
  * All rights reserved.
@@ -24,7 +25,7 @@
  *
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/uhso.c 301447 2016-06-05 15:05:53Z pfg $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/uhso.c 301446 2016-06-05 15:03:55Z pfg $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -469,8 +470,8 @@
 static void uhso_if_start(struct ifnet *);
 static void uhso_if_stop(struct uhso_softc *);
 static int  uhso_if_ioctl(struct ifnet *, u_long, caddr_t);
-static int  uhso_if_output(struct ifnet *, struct mbuf *, struct sockaddr *,
-    struct route *);
+static int  uhso_if_output(struct ifnet *, struct mbuf *,
+    const struct sockaddr *, struct route *);
 static void uhso_if_rxflush(void *);
 
 static device_probe_t uhso_probe;
@@ -1857,7 +1858,6 @@
 		}
 		break;
 	case SIOCSIFADDR:
-	case SIOCSIFDSTADDR:
 	case SIOCADDMULTI:
 	case SIOCDELMULTI:
 		break;
@@ -1884,7 +1884,7 @@
 }
 
 static int
-uhso_if_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
+uhso_if_output(struct ifnet *ifp, struct mbuf *m0, const struct sockaddr *dst,
     struct route *ro)
 {
 	int error;

Modified: trunk/sys/dev/usb/net/usb_ethernet.c
===================================================================
--- trunk/sys/dev/usb/net/usb_ethernet.c	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/usb_ethernet.c	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,4 +1,5 @@
-/* $FreeBSD: stable/9/sys/dev/usb/net/usb_ethernet.c 262594 2014-02-28 01:35:24Z rodrigc $ */
+/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.c 262436 2014-02-24 08:50:06Z rodrigc $ */
 /*-
  * Copyright (c) 2009 Andrew Thompson (thompsa at FreeBSD.org)
  *
@@ -25,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: stable/9/sys/dev/usb/net/usb_ethernet.c 262594 2014-02-28 01:35:24Z rodrigc $");
+__FBSDID("$FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.c 262436 2014-02-24 08:50:06Z rodrigc $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -220,7 +221,6 @@
 		ue->ue_ifp = ifp;
 		error = ue->ue_methods->ue_attach_post_sub(ue);
 	} else {
-		ifp->if_mtu = ETHERMTU;
 		ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 		if (ue->ue_methods->ue_ioctl != NULL)
 			ifp->if_ioctl = ue->ue_methods->ue_ioctl;

Modified: trunk/sys/dev/usb/net/usb_ethernet.h
===================================================================
--- trunk/sys/dev/usb/net/usb_ethernet.h	2018-05-27 22:42:18 UTC (rev 10049)
+++ trunk/sys/dev/usb/net/usb_ethernet.h	2018-05-27 22:42:34 UTC (rev 10050)
@@ -1,4 +1,5 @@
-/* $FreeBSD: stable/9/sys/dev/usb/net/usb_ethernet.h 229105 2011-12-31 14:45:43Z hselasky $ */
+/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.h 226709 2011-10-24 23:38:11Z yongari $ */
 /*-
  * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
  *
@@ -23,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: stable/9/sys/dev/usb/net/usb_ethernet.h 229105 2011-12-31 14:45:43Z hselasky $
+ * $FreeBSD: stable/10/sys/dev/usb/net/usb_ethernet.h 226709 2011-10-24 23:38:11Z yongari $
  */
 
 #ifndef _USB_ETHERNET_H_



More information about the Midnightbsd-cvs mailing list