Commit 4afc9831 authored by Andrew Lunn's avatar Andrew Lunn Committed by Greg Kroah-Hartman

net: dsa: mv88e6xxx: Fix u64 statistics

[ Upstream commit 6e46e2d8 ]

The switch maintains u64 counters for the number of octets sent and
received. These are kept as two u32's which need to be combined.  Fix
the combing, which wrongly worked on u16's.

Fixes: 80c4627b ("dsa: mv88x6xxx: Refactor getting a single statistic")
Reported-by: default avatarChris Healy <Chris.Healy@zii.aero>
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 05d9f554
...@@ -884,7 +884,7 @@ static uint64_t _mv88e6xxx_get_ethtool_stat(struct mv88e6xxx_chip *chip, ...@@ -884,7 +884,7 @@ static uint64_t _mv88e6xxx_get_ethtool_stat(struct mv88e6xxx_chip *chip,
default: default:
return U64_MAX; return U64_MAX;
} }
value = (((u64)high) << 16) | low; value = (((u64)high) << 32) | low;
return value; return value;
} }
......
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