net: dsa: mv88e6xxx: Give each hw stat an ID
authorTobias Waldekranz <tobias@waldekranz.com>
Thu, 14 Dec 2023 13:50:25 +0000 (14:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Dec 2023 11:05:02 +0000 (11:05 +0000)
commit5780acbd249911fa101c53f3616d0aec5906211e
tree6d51f51abcf56c18b155ac07acc3013a4dd5d96f
parentfc82a08ae795ee6b73fb6b50785f7be248bec7b5
net: dsa: mv88e6xxx: Give each hw stat an ID

With the upcoming standard counter group support, we are no longer
reading out the whole set of counters, but rather mapping a subset to
the requested group.

Therefore, create an enum with an ID for each stat, such that
mv88e6xxx_hw_stats[] can be subscripted with a human-readable ID
corresponding to the counter's name.

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