--- linux/drivers/net/3c507.c 2002-02-25 20:37:58.000000000 +0100 +++ linux.new/drivers/net/3c507.c 2003-01-10 13:02:02.000000000 +0100 @@ -19,6 +19,10 @@ Mark Salazar made the changes for cards with only 16K packet buffers. + + Maciej Soltysiak: Padding of ethernet frames of length less + than ETH_ZLEN (RFC 894, RFC 1042) + Things remaining to do: Verify that the tx and rx buffers don't have fencepost errors. Move the theory of operation and memory map documentation. @@ -26,8 +30,8 @@ */ #define DRV_NAME "3c507" -#define DRV_VERSION "1.10a" -#define DRV_RELDATE "11/17/2001" +#define DRV_VERSION "1.11" +#define DRV_RELDATE "01/10/2003" static const char version[] = DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Donald Becker (becker@scyld.com)\n"; @@ -494,9 +498,16 @@ struct net_local *lp = (struct net_local *) dev->priv; int ioaddr = dev->base_addr; unsigned long flags; - short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN; + short length; unsigned char *buf = skb->data; + if (ETH_ZLEN < skb->len) { + length = skb->len; + } else { + length = ETH_ZLEN; + memset(buf + skb->len, 0, length - skb->len); + } + netif_stop_queue (dev); spin_lock_irqsave (&lp->lock, flags);