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

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

diff -u --recursive --new-file v1.3.5/linux/drivers/net/3c509.c linux/drivers/net/3c509.c
@@ -591,16 +591,15 @@
 			short pkt_len = rx_status & 0x7ff;
 			struct sk_buff *skb;
 
-			skb = alloc_skb(pkt_len+3, GFP_ATOMIC);
+			skb = dev_alloc_skb(pkt_len+3);
 			if (el3_debug > 4)
 				printk("Receiving packet size %d status %4.4x.\n",
 					   pkt_len, rx_status);
 			if (skb != NULL) {
-				skb->len = pkt_len;
 				skb->dev = dev;
 
 				/* 'skb->data' points to the start of sk_buff data area. */
-				insl(ioaddr+RX_FIFO, skb->data,
+				insl(ioaddr+RX_FIFO, skb_put(skb,pkt_len),
 							(pkt_len + 3) >> 2);
 
 				skb->protocol=eth_type_trans(skb,dev);

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