patch-2.4.21 linux-2.4.21/drivers/net/declance.c

Next file: linux-2.4.21/drivers/net/depca.c
Previous file: linux-2.4.21/drivers/net/de620.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/drivers/net/declance.c linux-2.4.21/drivers/net/declance.c
@@ -870,7 +870,15 @@
 
 	skblen = skb->len;
 
-	len = (skblen <= ETH_ZLEN) ? ETH_ZLEN : skblen;
+	len = skblen;
+	
+	if(len < ETH_ZLEN)
+	{
+		skb = skb_padto(skb, ETH_ZLEN);
+		if(skb == NULL)
+			return 0;
+		len = ETH_ZLEN;
+	}
 
 	lp->stats.tx_bytes += len;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)