net: dsa: mv88e6xxx: Create API to read a single stat counter
authorTobias Waldekranz <tobias@waldekranz.com>
Thu, 14 Dec 2023 13:50:23 +0000 (14:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Dec 2023 11:05:02 +0000 (11:05 +0000)
commit3def80e52db3ab5e1097b13a87a7a65b909630d3
treee78d2e00f62ea5bff85837092a3e5b849c2f58de
parentd624afaf4c792457d5ffa0037156f66cdfc1df18
net: dsa: mv88e6xxx: Create API to read a single stat counter

This change contains no functional change. We simply push the hardware
specific stats logic to a function reading a single counter, rather
than the whole set.

This is a preparatory change for the upcoming standard ethtool
statistics support (i.e. "eth-mac", "eth-ctrl" etc.).

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h