patch-1.3.7 linux/drivers/net/de620.c

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

diff -u --recursive --new-file v1.3.6/linux/drivers/net/de620.c linux/drivers/net/de620.c
@@ -678,13 +678,14 @@
 		printk("%s: Illegal packet size: %d!\n", dev->name, size);
 	}
 	else { /* Good packet? */
-		skb = dev_alloc_skb(size);
+		skb = dev_alloc_skb(size+2);
 		if (skb == NULL) { /* Yeah, but no place to put it... */
 			printk("%s: Couldn't allocate a sk_buff of size %d.\n",
 				dev->name, size);
 			((struct netstats *)(dev->priv))->rx_dropped++;
 		}
 		else { /* Yep! Go get it! */
+			skb_reserve(skb,2);	/* Align */
 			skb->dev = dev;
 			skb->free = 1;
 			/* skb->data points to the start of sk_buff data area */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this