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

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

diff -u --recursive --new-file v1.3.6/linux/drivers/net/eexpress.c linux/drivers/net/eexpress.c
@@ -941,13 +941,14 @@
 			struct sk_buff *skb;
 
 			pkt_len &= 0x3fff;
-			skb = dev_alloc_skb(pkt_len);
+			skb = dev_alloc_skb(pkt_len+2);
 			if (skb == NULL) {
 				printk("%s: Memory squeeze, dropping packet.\n", dev->name);
 				lp->stats.rx_dropped++;
 				break;
 			}
 			skb->dev = dev;
+			skb_reserve(skb,2);
 
 			outw(data_buffer_addr + 10, ioaddr + READ_PTR);
 

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