patch-1.3.6 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.5/linux/drivers/net/de620.c linux/drivers/net/de620.c
@@ -678,16 +678,17 @@
 		printk("%s: Illegal packet size: %d!\n", dev->name, size);
 	}
 	else { /* Good packet? */
-		skb = alloc_skb(size, GFP_ATOMIC);
+		skb = dev_alloc_skb(size);
 		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->len = size; skb->dev = dev; skb->free = 1;
+			skb->dev = dev;
+			skb->free = 1;
 			/* skb->data points to the start of sk_buff data area */
-			buffer = skb->data;
+			buffer = skb_put(skb,size);
 			/* copy the packet into the buffer */
 			de620_read_block(buffer, size);
 			PRINTK(("Read %d bytes\n", size));

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