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

Next file: linux-2.4.21/drivers/net/starfire.c
Previous file: linux-2.4.21/drivers/net/skfp/h/skfbi.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/drivers/net/smc9194.c linux-2.4.21/drivers/net/smc9194.c
@@ -483,10 +483,20 @@
 		printk(CARDNAME": Bad Craziness - sent packet while busy.\n" );
 		return 1;
 	}
-	lp->saved_skb = skb;
 
-	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)
+		{
+			netif_wake_queue(dev);
+			return 0;
+		}
+		length = ETH_ZLEN;
+	}
+	lp->saved_skb = skb;
 		
 	/*
 	** The MMU wants the number of pages to be the number of 256 bytes

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