mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 15:29:16 +00:00
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>
This commit is contained in:
parent
0cb6daf549
commit
d0d8c54878
@ -503,7 +503,6 @@ struct sxgbe_priv_data {
|
||||
bool tx_path_in_lpi_mode;
|
||||
int lpi_irq;
|
||||
int eee_enabled;
|
||||
int eee_active;
|
||||
int tx_lpi_timer;
|
||||
};
|
||||
|
||||
|
@ -140,8 +140,6 @@ static int sxgbe_get_eee(struct net_device *dev,
|
||||
if (!priv->hw_cap.eee)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
edata->eee_enabled = priv->eee_enabled;
|
||||
edata->eee_active = priv->eee_active;
|
||||
edata->tx_lpi_timer = priv->tx_lpi_timer;
|
||||
|
||||
return phy_ethtool_get_eee(dev->phydev, edata);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user