diff options
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_sk.c | 9 | ||||
-rw-r--r-- | sys/dev/pci/if_ste.c | 9 | ||||
-rw-r--r-- | sys/dev/pci/if_tx.c | 10 |
3 files changed, 8 insertions, 20 deletions
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index d85086a94d0..9c27992fc6a 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sk.c,v 1.12 2001/03/29 16:02:18 jason Exp $ */ +/* $OpenBSD: if_sk.c,v 1.13 2001/06/25 02:18:47 fgsch Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1327,7 +1327,6 @@ void sk_shutdown(v) void sk_rxeof(sc_if) struct sk_if_softc *sc_if; { - struct ether_header *eh; struct mbuf *m; struct ifnet *ifp; struct sk_chain *cur_rx; @@ -1381,15 +1380,13 @@ void sk_rxeof(sc_if) } ifp->if_ipackets++; - eh = mtod(m, struct ether_header *); #if NBPFILTER > 0 if (ifp->if_bpf) bpf_mtap(ifp->if_bpf, m); #endif - /* Remove header from mbuf and pass it on. */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + /* pass it on. */ + ether_input_mbuf(ifp, m); } sc_if->sk_cdata.sk_rx_prod = i; diff --git a/sys/dev/pci/if_ste.c b/sys/dev/pci/if_ste.c index 9a136100a37..a72d091fa53 100644 --- a/sys/dev/pci/if_ste.c +++ b/sys/dev/pci/if_ste.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ste.c,v 1.10 2001/02/20 19:39:45 mickey Exp $ */ +/* $OpenBSD: if_ste.c,v 1.11 2001/06/25 02:18:47 fgsch Exp $ */ /* * Copyright (c) 1997, 1998, 1999 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. @@ -617,7 +617,6 @@ int ste_intr(xsc) void ste_rxeof(sc) struct ste_softc *sc; { - struct ether_header *eh; struct mbuf *m; struct ifnet *ifp; struct ste_chain_onefrag *cur_rx; @@ -675,7 +674,6 @@ again: } ifp->if_ipackets++; - eh = mtod(m, struct ether_header *); m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = total_len; @@ -684,9 +682,8 @@ again: bpf_mtap(ifp->if_bpf, m); #endif - /* Remove header from mbuf and pass it on. */ - m_adj(m, sizeof(struct ether_header)); - ether_input(ifp, eh, m); + /* pass it on. */ + ether_input_mbuf(ifp, m); } /* diff --git a/sys/dev/pci/if_tx.c b/sys/dev/pci/if_tx.c index 770eefda1d4..9f8c070e74c 100644 --- a/sys/dev/pci/if_tx.c +++ b/sys/dev/pci/if_tx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tx.c,v 1.15 2001/06/12 15:40:31 niklas Exp $ */ +/* $OpenBSD: if_tx.c,v 1.16 2001/06/25 02:18:48 fgsch Exp $ */ /* $FreeBSD: src/sys/pci/if_tx.c,v 1.45 2001/02/07 20:11:02 semenu Exp $ */ /*- @@ -890,7 +890,6 @@ epic_rx_done(sc) struct epic_rx_buffer *buf; struct epic_rx_desc *desc; struct mbuf *m; - struct ether_header *eh; while( !(sc->rx_desc[sc->cur_rx].status & 0x8000) ) { buf = sc->rx_buffer + sc->cur_rx; @@ -931,7 +930,6 @@ epic_rx_done(sc) * First mbuf in packet holds the ethernet and * packet headers. */ - eh = mtod( m, struct ether_header * ); m->m_pkthdr.rcvif = &(sc->sc_if); m->m_pkthdr.len = m->m_len = len; @@ -943,12 +941,8 @@ epic_rx_done(sc) #endif /* NBPFILTER > 0 */ #endif /* !__FreeBSD__ */ - /* Second mbuf holds packet ifself */ - m->m_pkthdr.len = m->m_len = len - sizeof(struct ether_header); - m->m_data += sizeof( struct ether_header ); - /* Give mbuf to OS */ - ether_input(&sc->sc_if, eh, m); + ether_input_mbuf(&sc->sc_if, m); /* Successfuly received frame */ sc->sc_if.if_ipackets++; |