From: Russell King (Oracle) Date: Wed, 8 Jan 2025 16:48:14 +0000 (+0000) Subject: net: stmmac: report EEE error statistics if EEE is supported X-Git-Tag: v6.14-rc1~162^2~101^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=517dc0450675f1bc16a805e6dfe16129ada88e6c;p=thirdparty%2Fkernel%2Flinux.git net: stmmac: report EEE error statistics if EEE is supported Report the number of EEE error statistics in the xstats even when EEE is not enabled in hardware, but is supported. The PHY maintains this counter even when EEE is not enabled. Reviewed-by: Andrew Lunn Tested-by: Choong Yong Liang Signed-off-by: Russell King (Oracle) Link: https://patch.msgid.link/E1tVZE6-0002KY-Nx@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index 693f59c3c47af..918a32f8fda80 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c @@ -654,7 +654,7 @@ static void stmmac_get_ethtool_stats(struct net_device *dev, (*(u32 *)p); } } - if (priv->eee_enabled) { + if (priv->dma_cap.eee) { int val = phylink_get_eee_err(priv->phylink); if (val) priv->xstats.phy_eee_wakeup_error_n = val;