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

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

diff -urN linux-2.4.20/drivers/net/lp486e.c linux-2.4.21/drivers/net/lp486e.c
@@ -886,7 +886,16 @@
 	if (skb->len <= 0)
 		return 0;
 
-	length = (ETH_ZLEN < skb->len) ? skb->len : ETH_ZLEN;
+	length = skb->len;
+	
+	if(length < ETH_ZLEN)
+	{
+		skb = skb_padto(skb, ETH_ZLEN);
+		if(skb == NULL)
+			return 0;
+		length = ETH_ZLEN;
+	}
+	
 	dev->trans_start = jiffies;
 
 	tx_cmd = (struct tx_cmd *)

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