From 668a46f9422befd412d83225e77a533d9aade7b5 Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Mon, 9 Jul 2001 22:41:15 +0000 Subject: Trivial ether_input_mbuf(). --- sys/arch/mac68k/dev/if_ae.c | 10 ++-------- sys/arch/mac68k/dev/if_mc.c | 8 +++----- 2 files changed, 5 insertions(+), 13 deletions(-) (limited to 'sys/arch/mac68k/dev') diff --git a/sys/arch/mac68k/dev/if_ae.c b/sys/arch/mac68k/dev/if_ae.c index d412299da32..b95764ec73b 100644 --- a/sys/arch/mac68k/dev/if_ae.c +++ b/sys/arch/mac68k/dev/if_ae.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ae.c,v 1.15 2001/02/20 19:39:31 mickey Exp $ */ +/* $OpenBSD: if_ae.c,v 1.16 2001/07/09 22:41:14 fgsch Exp $ */ /* $NetBSD: if_ae.c,v 1.62 1997/04/24 16:52:05 scottr Exp $ */ /* @@ -841,7 +841,6 @@ aeread(sc, buf, len) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct mbuf *m; - struct ether_header *eh; /* Pull packet off interface. */ m = aeget(sc, buf, len); @@ -852,9 +851,6 @@ aeread(sc, buf, len) ifp->if_ipackets++; - /* We assume that the header fits entirely in one mbuf. */ - eh = mtod(m, struct ether_header *); - #if NBPFILTER > 0 /* * Check if there's a BPF listener on this interface. @@ -864,9 +860,7 @@ aeread(sc, buf, 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); } /* diff --git a/sys/arch/mac68k/dev/if_mc.c b/sys/arch/mac68k/dev/if_mc.c index e9b95dd5101..4439338e255 100644 --- a/sys/arch/mac68k/dev/if_mc.c +++ b/sys/arch/mac68k/dev/if_mc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mc.c,v 1.3 2001/02/20 19:39:31 mickey Exp $ */ +/* $OpenBSD: if_mc.c,v 1.4 2001/07/09 22:41:14 fgsch Exp $ */ /* $NetBSD: if_mc.c,v 1.4 1998/01/12 19:22:09 thorpej Exp $ */ /*- @@ -618,7 +618,6 @@ mace_read(sc, pkt, len) int len; { struct ifnet *ifp = &sc->sc_if; - struct ether_header *eh = (struct ether_header *)pkt; struct mbuf *m; if (len <= sizeof(struct ether_header) || @@ -647,9 +646,8 @@ mace_read(sc, pkt, len) ifp->if_ipackets++; - /* Pass the packet up, with the ether header sort-of removed. */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + /* Pass the packet up. */ + ether_input_mbuf(ifp, m); } /* -- cgit v1.2.3