summaryrefslogtreecommitdiff
path: root/sys/dev/ic/elink3.c
diff options
context:
space:
mode:
authorPer Fogelstrom <pefo@cvs.openbsd.org>1996-09-25 21:46:01 +0000
committerPer Fogelstrom <pefo@cvs.openbsd.org>1996-09-25 21:46:01 +0000
commitcaf52855abb7d8fd02128f033b5b88bf2662713f (patch)
tree73810b4c57a17c8037e333449a8f42f9061f0440 /sys/dev/ic/elink3.c
parente0574b850a7cb796c5e30c1f8c5a8d7dac870f72 (diff)
Alignment fix, another aproach as the previous broke bpf..
Diffstat (limited to 'sys/dev/ic/elink3.c')
-rw-r--r--sys/dev/ic/elink3.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/sys/dev/ic/elink3.c b/sys/dev/ic/elink3.c
index e4d71fcff9f..66f8c6922a1 100644
--- a/sys/dev/ic/elink3.c
+++ b/sys/dev/ic/elink3.c
@@ -84,7 +84,7 @@ void epstart __P((struct ifnet *));
void epwatchdog __P((struct ifnet *));
void epreset __P((struct ep_softc *));
void epread __P((struct ep_softc *));
-struct mbuf *epget __P((struct ep_softc *, struct ether_header *, int));
+struct mbuf *epget __P((struct ep_softc *, int));
void epmbuffill __P((void *));
void epmbufempty __P((struct ep_softc *));
void epsetfilter __P((struct ep_softc *));
@@ -620,7 +620,7 @@ again:
len &= RX_BYTES_MASK; /* Lower 11 bits = RX bytes. */
/* Pull packet off interface. */
- m = epget(sc, &eh, len);
+ m = epget(sc, len);
if (m == 0) {
ifp->if_ierrors++;
goto abort;
@@ -651,6 +651,8 @@ again:
}
#endif
+ bcopy(m->m_data, &eh, sizeof(struct ether_header));
+ m_adj(m, sizeof(struct ether_header));
ether_input(ifp, &eh, m);
/*
@@ -691,9 +693,8 @@ abort:
}
struct mbuf *
-epget(sc, eh, totlen)
+epget(sc, totlen)
struct ep_softc *sc;
- struct ether_header *eh;
int totlen;
{
bus_chipset_tag_t bc = sc->sc_bc;
@@ -719,6 +720,7 @@ epget(sc, eh, totlen)
m->m_flags = M_PKTHDR;
}
m->m_pkthdr.rcvif = ifp;
+ m->m_pkthdr.len = totlen;
len = MHLEN;
top = 0;
mp = &top;
@@ -730,13 +732,6 @@ epget(sc, eh, totlen)
*/
sh = splhigh();
- if(totlen > sizeof(struct ether_header)) {
- bus_io_read_multi_2(bc, ioh,
- EP_W1_RX_PIO_RD_1, eh, sizeof(struct ether_header) / 2);
- totlen -= sizeof(struct ether_header);
- }
- m->m_pkthdr.len = totlen;
-
while (totlen > 0) {
if (top) {
m = sc->mb[sc->next_mb];