patch-2.4.0-test9 linux/arch/ppc/8xx_io/enet.c
Next file: linux/arch/ppc/8xx_io/fec.c
Previous file: linux/arch/ppc/8260_io/uart.c
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Sun Sep 17 09:48:05 2000
- Orig file:
v2.4.0-test8/linux/arch/ppc/8xx_io/enet.c
- Orig date:
Thu Jul 13 09:42:50 2000
diff -u --recursive --new-file v2.4.0-test8/linux/arch/ppc/8xx_io/enet.c linux/arch/ppc/8xx_io/enet.c
@@ -484,8 +484,11 @@
cep->stats.rx_bytes += pkt_len;
/* This does 16 byte alignment, much more than we need.
- */
- skb = dev_alloc_skb(pkt_len);
+ * The packet length includes FCS, but we don't want to
+ * include that when passing upstream as it messes up
+ * bridging applications.
+ */
+ skb = dev_alloc_skb(pkt_len-4);
if (skb == NULL) {
printk("%s: Memory squeeze, dropping packet.\n", dev->name);
@@ -493,10 +496,10 @@
}
else {
skb->dev = dev;
- skb_put(skb,pkt_len); /* Make room */
+ skb_put(skb,pkt_len-4); /* Make room */
eth_copy_and_sum(skb,
(unsigned char *)__va(bdp->cbd_bufaddr),
- pkt_len, 0);
+ pkt_len-4, 0);
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 (who was at: slshen@lbl.gov)