diff -urN linux-2.6.27-rc6.orig/drivers/net/arm/at91_ether.c linux-2.6.27-rc6/drivers/net/arm/at91_ether.c --- linux-2.6.27-rc6.orig/drivers/net/arm/at91_ether.c 2008-09-16 21:11:39.000000000 +0200 +++ linux-2.6.27-rc6/drivers/net/arm/at91_ether.c 2008-09-16 21:13:48.000000000 +0200 @@ -843,7 +843,7 @@ */ static struct net_device_stats *at91ether_stats(struct net_device *dev) { - int ale, lenerr, seqe, lcol, ecol; + int ale, lenerr, seqe, ecol; if (netif_running(dev)) { dev->stats.rx_packets += at91_emac_read(AT91_EMAC_OK); /* Good frames received */ @@ -862,12 +862,11 @@ dev->stats.tx_carrier_errors += at91_emac_read(AT91_EMAC_CSE); /* Carrier Sense errors */ dev->stats.tx_heartbeat_errors += at91_emac_read(AT91_EMAC_SQEE);/* Heartbeat error */ - lcol = at91_emac_read(AT91_EMAC_LCOL); + dev->stats.tx_window_errors += at91_emac_read(AT91_EMAC_LCOL); /* Late collisions */ ecol = at91_emac_read(AT91_EMAC_ECOL); - dev->stats.tx_window_errors += lcol; /* Late collisions */ - dev->stats.tx_aborted_errors += ecol; /* 16 collisions */ + dev->stats.tx_aborted_errors += ecol; /* 16 collisions */ - dev->stats.collisions += (at91_emac_read(AT91_EMAC_SCOL) + at91_emac_read(AT91_EMAC_MCOL) + lcol + ecol); + dev->stats.collisions += (at91_emac_read(AT91_EMAC_SCOL) + at91_emac_read(AT91_EMAC_MCOL) + ecol); } return &dev->stats; }