summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@openbsd.org>2003-03-12 19:11:02 +0000
committerjason <jason@openbsd.org>2003-03-12 19:11:02 +0000
commitca390db4e90a137118f45c7e8054e55db0161878 (patch)
tree8ebb7f944c6934d654bc3c6830ef112525e7d55d
parentuse .Li more (diff)
downloadwireguard-openbsd-ca390db4e90a137118f45c7e8054e55db0161878.tar.xz
wireguard-openbsd-ca390db4e90a137118f45c7e8054e55db0161878.zip
backout the two previous patches, it breaks the 3com ae card and I don't
understand it enough to fix.
-rw-r--r--sys/arch/mac68k/dev/if_ae.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/mac68k/dev/if_ae.c b/sys/arch/mac68k/dev/if_ae.c
index 79d72a2b491..6cf639e4821 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.20 2003/01/28 04:15:38 jason Exp $ */
+/* $OpenBSD: if_ae.c,v 1.21 2003/03/12 19:11:02 jason Exp $ */
/* $NetBSD: if_ae.c,v 1.62 1997/04/24 16:52:05 scottr Exp $ */
/*
@@ -425,8 +425,15 @@ outloop:
buffer = (sc->txb_new * ED_TXBUF_SIZE) << ED_PAGE_SHIFT;
len = ae_put(sc, m0, buffer);
+#if DIAGNOSTIC
+ if (len != m0->m_pkthdr.len)
+ printf("aestart: len %d != m0->m_pkthdr.len %d.\n",
+ len, m0->m_pkthdr.len);
+#endif
+ len = m0->m_pkthdr.len;
+
m_freem(m0);
- sc->txb_len[sc->txb_new] = len;
+ sc->txb_len[sc->txb_new] = max(len, ETHER_MIN_LEN);
/* Start the first packet transmitting. */
if (sc->txb_inuse == 0)
@@ -1072,13 +1079,6 @@ ae_put(sc, m, buf)
savebyte[1] = 0;
bus_space_write_region_2(sc->sc_buft, sc->sc_bufh,
buf, savebyte, 1);
- buf += 2;
}
- if (totlen < ETHER_MIN_LEN - ETHER_CRC_LEN) {
- bus_space_set_region_2(sc->sc_buft, sc->sc_bufh, buf, 0,
- (ETHER_MIN_LEN - ETHER_CRC_LEN - totlen) >> 1);
- totlen = ETHERMIN - ETHER_CRC_LEN;
- }
-
return (totlen);
}