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

Next file: linux/drivers/net/README.wavelan
Previous file: linux/drivers/net/3c509.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.6/linux/drivers/net/8390.c linux/drivers/net/8390.c
@@ -455,7 +455,7 @@
 		} else if ((rx_frame.status & 0x0F) == ENRSR_RXOK) {
 			struct sk_buff *skb;
 			
-			skb = dev_alloc_skb(pkt_len);
+			skb = dev_alloc_skb(pkt_len+2);
 			if (skb == NULL) {
 				if (ei_debug > 1)
 					printk("%s: Couldn't allocate a sk_buff of size %d.\n",
@@ -463,6 +463,7 @@
 				ei_local->stat.rx_dropped++;
 				break;
 			} else {
+				skb_reserve(skb,2);	/* IP headers on 16 byte boundaries */
 				skb->dev = dev;
 				
 				ei_block_input(dev, pkt_len, skb_put(skb,pkt_len),

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