patch-2.4.0-test9 linux/arch/ppc/8xx_io/fec.c
Next file: linux/arch/ppc/amiga/time.c
Previous file: linux/arch/ppc/8xx_io/enet.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Sun Sep 17 09:48:06 2000
- Orig file:
v2.4.0-test8/linux/arch/ppc/8xx_io/fec.c
- Orig date:
Mon Jun 19 13:25:06 2000
diff -u --recursive --new-file v2.4.0-test8/linux/arch/ppc/8xx_io/fec.c linux/arch/ppc/8xx_io/fec.c
@@ -669,18 +669,21 @@
#endif
/* This does 16 byte alignment, exactly what we need.
+ * 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);
+ skb = dev_alloc_skb(pkt_len-4);
if (skb == NULL) {
printk("%s: Memory squeeze, dropping packet.\n", dev->name);
fep->stats.rx_dropped++;
} 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)