diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/isa/if_ed.c | 10 | ||||
-rw-r--r-- | sys/dev/isa/if_ef_isapnp.c | 8 | ||||
-rw-r--r-- | sys/dev/isa/if_eg.c | 10 | ||||
-rw-r--r-- | sys/dev/isa/if_el.c | 10 | ||||
-rw-r--r-- | sys/dev/isa/if_fe.c | 8 | ||||
-rw-r--r-- | sys/dev/isa/if_iy.c | 8 |
6 files changed, 12 insertions, 42 deletions
diff --git a/sys/dev/isa/if_ed.c b/sys/dev/isa/if_ed.c index 1ebaf99fdda..9a56c092f28 100644 --- a/sys/dev/isa/if_ed.c +++ b/sys/dev/isa/if_ed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ed.c,v 1.43 2001/06/23 21:54:47 fgsch Exp $ */ +/* $OpenBSD: if_ed.c,v 1.44 2001/06/25 04:44:27 fgsch Exp $ */ /* $NetBSD: if_ed.c,v 1.105 1996/10/21 22:40:45 thorpej Exp $ */ /* @@ -2527,7 +2527,6 @@ edread(sc, buf, len) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct mbuf *m; - struct ether_header *eh; /* Pull packet off interface. */ m = edget(sc, buf, len); @@ -2538,9 +2537,6 @@ edread(sc, buf, len) ifp->if_ipackets++; - /* We assume that the header fit entirely in one mbuf. */ - eh = mtod(m, struct ether_header *); - #if NBPFILTER > 0 /* * Check if there's a BPF listener on this interface. @@ -2550,9 +2546,7 @@ edread(sc, buf, len) bpf_mtap(ifp->if_bpf, m); #endif - /* We assume that the header fit entirely in one mbuf. */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + ether_input_mbuf(ifp, m); } /* diff --git a/sys/dev/isa/if_ef_isapnp.c b/sys/dev/isa/if_ef_isapnp.c index 9762d802b09..cf9e28652c8 100644 --- a/sys/dev/isa/if_ef_isapnp.c +++ b/sys/dev/isa/if_ef_isapnp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ef_isapnp.c,v 1.11 2001/06/23 21:54:48 fgsch Exp $ */ +/* $OpenBSD: if_ef_isapnp.c,v 1.12 2001/06/25 04:44:28 fgsch Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -693,7 +693,6 @@ efread(sc) bus_space_handle_t ioh = sc->sc_ioh; struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct mbuf *m; - struct ether_header *eh; int len; len = bus_space_read_2(iot, ioh, EF_W1_RX_STATUS); @@ -742,15 +741,12 @@ efread(sc) ifp->if_ipackets++; - eh = mtod(m, struct ether_header *); - #if NBPFILTER > 0 if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); #endif - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + ether_input_mbuf(ifp, m); } struct mbuf * diff --git a/sys/dev/isa/if_eg.c b/sys/dev/isa/if_eg.c index d21ffad6a85..e6784ec5e64 100644 --- a/sys/dev/isa/if_eg.c +++ b/sys/dev/isa/if_eg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_eg.c,v 1.19 2001/06/23 21:54:49 fgsch Exp $ */ +/* $OpenBSD: if_eg.c,v 1.20 2001/06/25 04:44:28 fgsch Exp $ */ /* $NetBSD: if_eg.c,v 1.26 1996/05/12 23:52:27 mycroft Exp $ */ /* @@ -681,7 +681,6 @@ egread(sc, buf, len) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct mbuf *m; - struct ether_header *eh; if (len <= sizeof(struct ether_header) || len > ETHER_MAX_LEN) { @@ -700,9 +699,6 @@ egread(sc, buf, len) ifp->if_ipackets++; - /* We assume the header fit entirely in one mbuf. */ - eh = mtod(m, struct ether_header *); - #if NBPFILTER > 0 /* * Check if there's a BPF listener on this interface. @@ -712,9 +708,7 @@ egread(sc, buf, len) bpf_mtap(ifp->if_bpf, m); #endif - /* We assume the header fit entirely in one mbuf. */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + ether_input_mbuf(ifp, m); } /* diff --git a/sys/dev/isa/if_el.c b/sys/dev/isa/if_el.c index 0701018b504..f49bd8bef2e 100644 --- a/sys/dev/isa/if_el.c +++ b/sys/dev/isa/if_el.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_el.c,v 1.14 2001/06/23 21:54:49 fgsch Exp $ */ +/* $OpenBSD: if_el.c,v 1.15 2001/06/25 04:44:28 fgsch Exp $ */ /* $NetBSD: if_el.c,v 1.39 1996/05/12 23:52:32 mycroft Exp $ */ /* @@ -493,7 +493,6 @@ elread(sc, len) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct mbuf *m; - struct ether_header *eh; if (len <= sizeof(struct ether_header) || len > ETHER_MAX_LEN) { @@ -512,9 +511,6 @@ elread(sc, len) ifp->if_ipackets++; - /* We assume that the header fit entirely in one mbuf. */ - eh = mtod(m, struct ether_header *); - #if NBPFILTER > 0 /* * Check if there's a BPF listener on this interface. @@ -524,9 +520,7 @@ elread(sc, len) bpf_mtap(ifp->if_bpf, m); #endif - /* We assume that the header fit entirely in one mbuf. */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + ether_input_mbuf(ifp, m); } /* diff --git a/sys/dev/isa/if_fe.c b/sys/dev/isa/if_fe.c index 6ae43f97751..95cf28caa77 100644 --- a/sys/dev/isa/if_fe.c +++ b/sys/dev/isa/if_fe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fe.c,v 1.14 2001/06/23 21:54:50 fgsch Exp $ */ +/* $OpenBSD: if_fe.c,v 1.15 2001/06/25 04:44:28 fgsch Exp $ */ /* * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 @@ -2017,7 +2017,6 @@ fe_get_packet(sc, len) struct fe_softc *sc; int len; { - struct ether_header *eh; struct mbuf *m; struct ifnet *ifp = &sc->sc_arpcom.ac_if; @@ -2057,7 +2056,6 @@ fe_get_packet(sc, len) * header mbuf. */ m->m_data += EOFF; - eh = mtod(m, struct ether_header *); /* Set the length of this packet. */ m->m_len = len; @@ -2074,9 +2072,7 @@ fe_get_packet(sc, len) bpf_mtap(ifp->if_bpf, m); #endif - /* Fix up data start offset in mbuf to point past ether header. */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + ether_input_mbuf(ifp, m); return (1); } diff --git a/sys/dev/isa/if_iy.c b/sys/dev/isa/if_iy.c index f14874df114..8315a07113d 100644 --- a/sys/dev/isa/if_iy.c +++ b/sys/dev/isa/if_iy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iy.c,v 1.12 2001/06/23 22:03:10 fgsch Exp $ */ +/* $OpenBSD: if_iy.c,v 1.13 2001/06/25 04:44:28 fgsch Exp $ */ /* $NetBSD: if_iy.c,v 1.4 1996/05/12 23:52:53 mycroft Exp $ */ /* #define IYDEBUG */ /* #define IYMEMDEBUG */ @@ -775,7 +775,6 @@ struct iy_softc *sc; int iobase, rxlen; { struct mbuf *m, *top, **mp; - struct ether_header *eh; struct ifnet *ifp; int len; @@ -839,14 +838,11 @@ int iobase, rxlen; /* XXX receive the top here */ ++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; dropped: |