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

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

diff -urN linux-2.4.20/drivers/net/seeq8005.c linux-2.4.21/drivers/net/seeq8005.c
@@ -378,9 +378,16 @@
 static int seeq8005_send_packet(struct sk_buff *skb, struct net_device *dev)
 {
 	struct net_local *lp = (struct net_local *)dev->priv;
-	short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
+	short length = skb->len;
 	unsigned char *buf = skb->data;
 
+	if(length < ETH_ZLEN)
+	{
+		skb = skb_padto(skb, ETH_ZLEN);
+		if(skb == NULL)
+			return 0;
+		length = ETH_ZLEN;
+	}
 	/* Block a timer-based transmit from overlapping */
 	netif_stop_queue(dev);
 	

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