diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-02-04 12:13:07 +0000 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-02-07 09:03:37 -0800 |
commit | d0d8c548789d45391c7c592fb763fab2fee0f632 (patch) | |
tree | 5ed9b4caf869254f69dabd629b8893b85dbf96bf /drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | |
parent | 0cb6daf549f99cc978fe4dd531d2426313fc08e4 (diff) |
net: sxgbe: remove eee_enabled/eee_active in sxgbe_get_eee()
sxgbe_get_eee() sets edata->eee_active and edata->eee_enabled from its
own copy, and then calls phy_ethtool_get_eee() which in turn will call
genphy_c45_ethtool_get_eee().
genphy_c45_ethtool_get_eee() will overwrite eee_enabled and eee_active
with its own interpretation from the PHYs settings and negotiation
result.
Therefore, setting these members in sxgbe_get_eee() is redundant.
Remove this, and remove the priv->eee_active member which then becomes
a write-only variable.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/E1rWbMx-002cCb-IU@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c')
-rw-r--r-- | drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c index 71439825ea4e..ecbe3994f2b1 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c @@ -130,7 +130,6 @@ bool sxgbe_eee_init(struct sxgbe_priv_data * const priv) if (phy_init_eee(ndev->phydev, true)) return false; - priv->eee_active = 1; timer_setup(&priv->eee_ctrl_timer, sxgbe_eee_ctrl_timer, 0); priv->eee_ctrl_timer.expires = SXGBE_LPI_TIMER(eee_timer); add_timer(&priv->eee_ctrl_timer); |