diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-09-08 18:48:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-09 11:59:12 +0200 |
commit | 776b71e553841f9cde87c21078ce2d9772e6da7a (patch) | |
tree | c528d43870c623ebb66c32c993a13bbc108f16da /drivers/net/dsa/ocelot/felix.c | |
parent | net: mscc: ocelot: move more PTP code from the lib to ocelot_ptp.c (diff) | |
download | linux-776b71e553841f9cde87c21078ce2d9772e6da7a.tar.xz linux-776b71e553841f9cde87c21078ce2d9772e6da7a.zip |
net: dsa: felix: use ocelot's ndo_get_stats64 method
Move the logic from the ocelot switchdev driver's ocelot_get_stats64()
method to the common switch lib and reuse it for the DSA driver.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/ocelot/felix.c')
-rw-r--r-- | drivers/net/dsa/ocelot/felix.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index ee19ed96f284..71e22990aa67 100644 --- a/drivers/net/dsa/ocelot/felix.c +++ b/drivers/net/dsa/ocelot/felix.c @@ -1034,6 +1034,14 @@ static void felix_port_qos_map_init(struct ocelot *ocelot, int port) } } +static void felix_get_stats64(struct dsa_switch *ds, int port, + struct rtnl_link_stats64 *stats) +{ + struct ocelot *ocelot = ds->priv; + + ocelot_port_get_stats64(ocelot, port, stats); +} + static void felix_get_strings(struct dsa_switch *ds, int port, u32 stringset, u8 *data) { @@ -1848,6 +1856,7 @@ const struct dsa_switch_ops felix_switch_ops = { .setup = felix_setup, .teardown = felix_teardown, .set_ageing_time = felix_set_ageing_time, + .get_stats64 = felix_get_stats64, .get_strings = felix_get_strings, .get_ethtool_stats = felix_get_ethtool_stats, .get_sset_count = felix_get_sset_count, |