patch-1.3.7 linux/drivers/net/lance.c
Next file: linux/drivers/net/ne.c
Previous file: linux/drivers/net/i82586.h
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Wed Jul 5 13:06:26 1995
- Orig file:
v1.3.6/linux/drivers/net/lance.c
- Orig date:
Fri Jun 30 16:22:28 1995
diff -u --recursive --new-file v1.3.6/linux/drivers/net/lance.c linux/drivers/net/lance.c
@@ -984,7 +984,7 @@
short pkt_len = (lp->rx_ring[entry].msg_length & 0xfff)-4;
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);
for (i=0; i < RX_RING_SIZE; i++)
@@ -999,9 +999,11 @@
break;
}
skb->dev = dev;
- memcpy(skb_put(skb,pkt_len),
+ skb_reserve(skb,2); /* 16 byte align */
+ skb_put(skb,pkt_len); /* Make room */
+ eth_copy_and_sum(skb_put(skb,pkt_len),
(unsigned char *)(lp->rx_ring[entry].base & 0x00ffffff),
- pkt_len);
+ pkt_len,0);
skb->protocol=eth_type_trans(skb,dev);
netif_rx(skb);
lp->stats.rx_packets++;
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