Commit 70fbf327 authored by Maxime Bizon's avatar Maxime Bizon Committed by Jeff Garzik

[PATCH] mv643xx_eth: Fix ethtool stats

Some stats reported by ethtool -S on mv643xx_eth device are cleared
between each call.  This patch fixes it.
Signed-off-by: default avatarMaxime Bizon <mbizon@freebox.fr>
Signed-off-by: default avatarDale Farnsworth <dale@farnsworth.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 751ae21c
...@@ -2156,7 +2156,7 @@ static void eth_update_mib_counters(struct mv643xx_private *mp) ...@@ -2156,7 +2156,7 @@ static void eth_update_mib_counters(struct mv643xx_private *mp)
for (offset = ETH_MIB_BAD_OCTETS_RECEIVED; for (offset = ETH_MIB_BAD_OCTETS_RECEIVED;
offset <= ETH_MIB_FRAMES_1024_TO_MAX_OCTETS; offset <= ETH_MIB_FRAMES_1024_TO_MAX_OCTETS;
offset += 4) offset += 4)
*(u32 *)((char *)p + offset) = read_mib(mp, offset); *(u32 *)((char *)p + offset) += read_mib(mp, offset);
p->good_octets_sent += read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_LOW); p->good_octets_sent += read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_LOW);
p->good_octets_sent += p->good_octets_sent +=
...@@ -2165,7 +2165,7 @@ static void eth_update_mib_counters(struct mv643xx_private *mp) ...@@ -2165,7 +2165,7 @@ static void eth_update_mib_counters(struct mv643xx_private *mp)
for (offset = ETH_MIB_GOOD_FRAMES_SENT; for (offset = ETH_MIB_GOOD_FRAMES_SENT;
offset <= ETH_MIB_LATE_COLLISION; offset <= ETH_MIB_LATE_COLLISION;
offset += 4) offset += 4)
*(u32 *)((char *)p + offset) = read_mib(mp, offset); *(u32 *)((char *)p + offset) += read_mib(mp, offset);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment