patch-1.3.6 linux/drivers/net/3c505.c

Next file: linux/drivers/net/3c507.c
Previous file: linux/drivers/net/3c501.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.5/linux/drivers/net/3c505.c linux/drivers/net/3c505.c
@@ -560,7 +560,7 @@
 
 	rlen = (len+1) & ~1;
 
-	skb = alloc_skb(rlen, GFP_ATOMIC);
+	skb = dev_alloc_skb(rlen);
 
 	/*
 	 * make sure the data register is going the right way
@@ -587,13 +587,12 @@
 		adapter->stats.rx_dropped++;
 
 	} else {
-		skb->len = rlen;
 		skb->dev = dev;
 
 		/*
 		 * now read the data from the adapter
 		 */
-		ptr = (unsigned short *)(skb->data);
+		ptr = (unsigned short *)skb_put(skb,len);
 		for (i = 0; i < (rlen/2); i++) { 
 			timeout = 0;
 			while ((inb_status(dev->base_addr)&HRDY) == 0 && timeout++ < 20000) 

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