patch-1.3.6 linux/drivers/net/eepro.c

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

diff -u --recursive --new-file v1.3.5/linux/drivers/net/eepro.c linux/drivers/net/eepro.c
@@ -1046,16 +1046,15 @@
 			struct sk_buff *skb;
 
 			rcv_size &= 0x3fff;
-			skb = alloc_skb(rcv_size, GFP_ATOMIC);
+			skb = dev_alloc_skb(rcv_size);
 			if (skb == NULL) {
 				printk("%s: Memory squeeze, dropping packet.\n", dev->name);
 				lp->stats.rx_dropped++;
 				break;
 			}
-			skb->len = rcv_size;
 			skb->dev = dev;
 
-			insw(ioaddr+IO_PORT, skb->data, (rcv_size + 1) >> 1);
+			insw(ioaddr+IO_PORT, skb_put(skb,rcv_size), (rcv_size + 1) >> 1);
 	
 			skb->protocol = eth_type_trans(skb,dev);	
 			netif_rx(skb);

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