aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2007-12-21 01:20:23 -0500
committerJeff Garzik <jeff@garzik.org>2007-12-22 22:53:05 -0500
commit73eac0640ebfb30fee99e06ee029444af0d7ae8d (patch)
treec1cfa0f0e45dfb5bd899f156f41237134ce78e71 /drivers/net
parent5b825ed22b02691e39774e8b2a077d1807969ec7 (diff)
typhoon: endianness bug in tx/rx byte counters
txBytes and rxBytesGood are both 64bit; using le32_to_cpu() won't work on big-endian for obvious reasons. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/typhoon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 94ac5869bb18..67f31a21beba 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -977,12 +977,12 @@ typhoon_do_get_stats(struct typhoon *tp)
977 * ethtool_ops->get_{strings,stats}() 977 * ethtool_ops->get_{strings,stats}()
978 */ 978 */
979 stats->tx_packets = le32_to_cpu(s->txPackets); 979 stats->tx_packets = le32_to_cpu(s->txPackets);
980 stats->tx_bytes = le32_to_cpu(s->txBytes); 980 stats->tx_bytes = le64_to_cpu(s->txBytes);
981 stats->tx_errors = le32_to_cpu(s->txCarrierLost); 981 stats->tx_errors = le32_to_cpu(s->txCarrierLost);
982 stats->tx_carrier_errors = le32_to_cpu(s->txCarrierLost); 982 stats->tx_carrier_errors = le32_to_cpu(s->txCarrierLost);
983 stats->collisions = le32_to_cpu(s->txMultipleCollisions); 983 stats->collisions = le32_to_cpu(s->txMultipleCollisions);
984 stats->rx_packets = le32_to_cpu(s->rxPacketsGood); 984 stats->rx_packets = le32_to_cpu(s->rxPacketsGood);
985 stats->rx_bytes = le32_to_cpu(s->rxBytesGood); 985 stats->rx_bytes = le64_to_cpu(s->rxBytesGood);
986 stats->rx_fifo_errors = le32_to_cpu(s->rxFifoOverruns); 986 stats->rx_fifo_errors = le32_to_cpu(s->rxFifoOverruns);
987 stats->rx_errors = le32_to_cpu(s->rxFifoOverruns) + 987 stats->rx_errors = le32_to_cpu(s->rxFifoOverruns) +
988 le32_to_cpu(s->BadSSD) + le32_to_cpu(s->rxCrcErrors); 988 le32_to_cpu(s->BadSSD) + le32_to_cpu(s->rxCrcErrors);