diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2003-02-03 19:45:54 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2003-02-03 19:45:54 +0000 |
commit | 62d083f2c5e53a0860b0464451f56cd8269121b9 (patch) | |
tree | daaef6e35c9031bbb64097e37aa768bae03ec2e3 /sys/arch | |
parent | e833d6e3ca9f6d12cc33c23560330c709b6d7e26 (diff) |
pad tx buffer out to minimum framelength; based on NetBSD
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/sparc/dev/if_ie.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/sparc/dev/if_ie.c b/sys/arch/sparc/dev/if_ie.c index 1f3830ec657..2de0e608274 100644 --- a/sys/arch/sparc/dev/if_ie.c +++ b/sys/arch/sparc/dev/if_ie.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ie.c,v 1.25 2002/11/10 21:23:06 miod Exp $ */ +/* $OpenBSD: if_ie.c,v 1.26 2003/02/03 19:45:53 jason Exp $ */ /* $NetBSD: if_ie.c,v 1.33 1997/07/29 17:55:38 fair Exp $ */ /*- @@ -1444,7 +1444,12 @@ iestart(ifp) printf("%s: tbuf overflow\n", sc->sc_dev.dv_xname); m_freem(m0); - len = max(len, ETHER_MIN_LEN); + + if (len < ETHER_MIN_LEN - ETHER_CRC_LEN) { + bzero(buffer, ETHER_MIN_LEN - ETHER_CRC_LEN - len); + len = ETHER_MIN_LEN - ETHER_CRC_LEN; + buffer += ETHER_MIN_LEN - ETHER_CRC_LEN; + } sc->xmit_buffs[sc->xchead]->ie_xmit_flags = SWAP(len); sc->xmit_free--; |