diff options
-rw-r--r-- | sys/dev/pcmcia/if_cnw.c | 6 | ||||
-rw-r--r-- | sys/dev/pcmcia/if_ray.c | 6 | ||||
-rw-r--r-- | sys/dev/pcmcia/if_xe.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/usb_port.h | 10 |
4 files changed, 9 insertions, 21 deletions
diff --git a/sys/dev/pcmcia/if_cnw.c b/sys/dev/pcmcia/if_cnw.c index c735a0aa557..005432fafe6 100644 --- a/sys/dev/pcmcia/if_cnw.c +++ b/sys/dev/pcmcia/if_cnw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cnw.c,v 1.7 2001/02/20 19:39:46 mickey Exp $ */ +/* $OpenBSD: if_cnw.c,v 1.8 2001/06/25 04:05:50 fgsch Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -683,9 +683,7 @@ cnw_recv(sc) continue; } - /* Pass the packet up, with the ether header sort-of removed */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + ether_input_mbuf(ifp, m); } } diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c index 00d531c7508..e5d677dae07 100644 --- a/sys/dev/pcmcia/if_ray.c +++ b/sys/dev/pcmcia/if_ray.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ray.c,v 1.14 2001/06/23 21:54:56 fgsch Exp $ */ +/* $OpenBSD: if_ray.c,v 1.15 2001/06/25 04:05:51 fgsch Exp $ */ /* $NetBSD: if_ray.c,v 1.21 2000/07/05 02:35:54 onoe Exp $ */ /* @@ -1675,8 +1675,8 @@ done: #endif /* XXX doesn't appear to be included m->m_flags |= M_HASFCS; */ ifp->if_ipackets++; - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + + ether_input_mbuf(ifp, m); } /* receive an auth packet diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c index cba55cbebab..5ab49083ea2 100644 --- a/sys/dev/pcmcia/if_xe.c +++ b/sys/dev/pcmcia/if_xe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xe.c,v 1.19 2001/06/23 21:54:57 fgsch Exp $ */ +/* $OpenBSD: if_xe.c,v 1.20 2001/06/25 04:05:51 fgsch Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas @@ -769,7 +769,6 @@ xe_get(sc) struct ifnet *ifp = &sc->sc_arpcom.ac_if; u_int16_t pktlen, len, recvcount = 0; u_int8_t *data; - struct ether_header *eh; PAGE(sc, 0); rsr = bus_space_read_1(sc->sc_bst, sc->sc_bsh, sc->sc_offset + RSR); @@ -842,15 +841,12 @@ xe_get(sc) ifp->if_ipackets++; - eh = mtod(top, struct ether_header *); - #if NBPFILTER > 0 if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, top); #endif - m_adj(top, sizeof(struct ether_header)); - ether_input(ifp, eh, top); + ether_input_mbuf(ifp, top); return (recvcount); } diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index 4f561eb86cc..ec564ed14ce 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_port.h,v 1.26 2001/06/24 21:29:05 mickey Exp $ */ +/* $OpenBSD: usb_port.h,v 1.27 2001/06/25 04:05:51 fgsch Exp $ */ /* $NetBSD: usb_port.h,v 1.42 2001/03/28 19:00:39 ichiro Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -252,13 +252,7 @@ typedef int usb_malloc_type; #define Ether_ifattach(ifp, eaddr) ether_ifattach(ifp) #define if_deactivate(x) -#define IF_INPUT(ifp, m) do { \ - struct ether_header *eh; \ - \ - eh = mtod(m, struct ether_header *); \ - m_adj(m, sizeof(struct ether_header)); \ - ether_input((ifp), (eh), (m)); \ -} while (0) +#define IF_INPUT(ifp, m) ether_input_mbuf((ifp), (m)) #define usbpoll usbselect #define uhidpoll uhidselect |