From 89d077595aaffab48b71bb571eb1fcd1a55de18a Mon Sep 17 00:00:00 2001 From: martin Date: Sat, 6 Jan 2007 13:25:19 +0000 Subject: [PATCH] If we have a single byte left over after filling in all mbuf data, we need to increase the "totlen" count too. From Sungwon Chung. --- sys/arch/mac68k/dev/if_ae.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/arch/mac68k/dev/if_ae.c b/sys/arch/mac68k/dev/if_ae.c index 1f55aa92fbe0..61cb818a5bf5 100644 --- a/sys/arch/mac68k/dev/if_ae.c +++ b/sys/arch/mac68k/dev/if_ae.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_ae.c,v 1.78 2006/09/09 06:25:08 tsutsui Exp $ */ +/* $NetBSD: if_ae.c,v 1.79 2007/01/06 13:25:19 martin Exp $ */ /* * Device driver for National Semiconductor DS8390/WD83C690 based ethernet @@ -14,7 +14,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.78 2006/09/09 06:25:08 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.79 2007/01/06 13:25:19 martin Exp $"); #include "bpfilter.h" @@ -173,8 +173,7 @@ ae_write_mbuf(struct dp8390_softc *sc, struct mbuf *m, int buf) bus_space_write_region_2(sc->sc_buft, sc->sc_bufh, buf, (u_int16_t *)savebyte, 1); buf += 2; - if (len > 0) - totlen++; + totlen++; len--; } /* if sent data is shorter than EHTER_PAD_LEN, put 0 to padding */