patch-1.3.7 linux/drivers/net/tulip.c
Next file: linux/drivers/net/wavelan.c
Previous file: linux/drivers/net/slip.c
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
Wed Jul 5 13:06:27 1995
- Orig file:
v1.3.6/linux/drivers/net/tulip.c
- Orig date:
Fri Jun 30 16:22:29 1995
diff -u --recursive --new-file v1.3.6/linux/drivers/net/tulip.c linux/drivers/net/tulip.c
@@ -600,7 +600,7 @@
short pkt_len = lp->rx_ring[entry].status >> 16;
struct sk_buff *skb;
- skb = dev_alloc_skb(pkt_len);
+ skb = dev_alloc_skb(pkt_len+2);
if (skb == NULL) {
printk("%s: Memory squeeze, deferring packet.\n", dev->name);
/* Check that at least two ring entries are free.
@@ -617,6 +617,7 @@
break;
}
skb->dev = dev;
+ skb_reserve(skb,2); /* 16 byte align the data fields */
memcpy(skb_put(skb,pkt_len), lp->rx_ring[entry].buffer1, pkt_len);
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