]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: remove unnecessary stat reading from ethtool
authorColin Foster <colin.foster@in-advantage.com>
Sun, 13 Feb 2022 19:12:51 +0000 (11:12 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Feb 2022 13:24:29 +0000 (13:24 +0000)
commit9bbd51188001f1d452157d274e6aa882be3ddcc9
treee84ed92d54584f6ec78e689f9023abfb6b1c517a
parent5d4372ef3c6604cd5f70d9a3b758039a38bb394e
net: mscc: ocelot: remove unnecessary stat reading from ethtool

The ocelot_update_stats function only needs to read from one port, yet it
was updating the stats for all ports. Update to only read the stats that
are necessary.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c