summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/if_upl.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c
index 92e14c10336..784b33a9a5d 100644
--- a/sys/dev/usb/if_upl.c
+++ b/sys/dev/usb/if_upl.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: if_upl.c,v 1.11 2002/07/25 02:18:10 nate Exp $ */
-/* $NetBSD: if_upl.c,v 1.15 2001/06/14 05:44:27 itojun Exp $ */
+/* $OpenBSD: if_upl.c,v 1.12 2002/07/29 02:56:56 nate Exp $ */
+/* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -78,27 +78,19 @@
#include <net/bpf.h>
#endif
-#if defined(__NetBSD__)
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_var.h>
+#if defined(__NetBSD__)
#include <netinet/if_inarp.h>
-#else
-#error upl without INET?
-#endif
-#endif
-
-#if defined(__OpenBSD__)
-#ifdef INET
-#include <netinet/in.h>
+#elif defined(__OpenBSD__)
#include <netinet/in_systm.h>
-#include <netinet/in_var.h>
#include <netinet/ip.h>
#include <netinet/if_ether.h>
+#endif
#else
#error upl without INET?
#endif
-#endif
#ifdef NS
#include <netns/ns.h>
@@ -333,21 +325,20 @@ USB_ATTACH(upl)
ifp->if_addrlen = 0;
ifp->if_hdrlen = 0;
ifp->if_output = upl_output;
+ ifp->if_baudrate = 12000000;
#if defined(__NetBSD__)
ifp->if_input = upl_input;
+ ifp->if_dlt = DLT_RAW;
#endif
- ifp->if_baudrate = 12000000;
IFQ_SET_READY(&ifp->if_snd);
/* Attach the interface. */
if_attach(ifp);
if_alloc_sadl(ifp);
-#if NBPFILTER > 0
-#if defined(__NetBSD__) || defined(__FreeBSD__)
+#if defined(__NetBSD__) && NBPFILTER > 0
bpfattach(ifp, DLT_RAW, 0);
#endif
-#endif
#if NRND > 0
rnd_attach_source(&sc->sc_rnd_source, USBDEVNAME(sc->sc_dev),
RND_TYPE_NET, 0);