mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
net: stmmac: remove redundant code from ethtool EEE ops
Setting edata->tx_lpi_enabled in stmmac_ethtool_op_get_eee() gets overwritten by phylib, so there's no point setting this. In stmmac_ethtool_op_set_eee(), now that stmmac is using the result of phylib's evaluation of EEE, there is no need to handle anything in the ethtool EEE ops other than calling through to the appropriate phylink function, which will pass on to phylib the users request. As stmmac_disable_eee_mode() is now no longer called from outside stmmac_main.c, make it static. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1tVZDr-0002KF-Cv@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
beb1e0148e
commit
80fada6c0d
|
|
@ -405,7 +405,6 @@ void stmmac_dvr_remove(struct device *dev);
|
|||
int stmmac_dvr_probe(struct device *device,
|
||||
struct plat_stmmacenet_data *plat_dat,
|
||||
struct stmmac_resources *res);
|
||||
void stmmac_disable_eee_mode(struct stmmac_priv *priv);
|
||||
int stmmac_reinit_queues(struct net_device *dev, u32 rx_cnt, u32 tx_cnt);
|
||||
int stmmac_reinit_ringparam(struct net_device *dev, u32 rx_size, u32 tx_size);
|
||||
int stmmac_bus_clks_config(struct stmmac_priv *priv, bool enabled);
|
||||
|
|
|
|||
|
|
@ -898,8 +898,6 @@ static int stmmac_ethtool_op_get_eee(struct net_device *dev,
|
|||
if (!priv->dma_cap.eee)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
edata->tx_lpi_enabled = priv->tx_lpi_enabled;
|
||||
|
||||
return phylink_ethtool_get_eee(priv->phylink, edata);
|
||||
}
|
||||
|
||||
|
|
@ -911,13 +909,6 @@ static int stmmac_ethtool_op_set_eee(struct net_device *dev,
|
|||
if (!priv->dma_cap.eee)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (priv->tx_lpi_enabled != edata->tx_lpi_enabled)
|
||||
netdev_warn(priv->dev,
|
||||
"Setting EEE tx-lpi is not supported\n");
|
||||
|
||||
if (!edata->eee_enabled)
|
||||
stmmac_disable_eee_mode(priv);
|
||||
|
||||
return phylink_ethtool_set_eee(priv->phylink, edata);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ static int stmmac_enable_eee_mode(struct stmmac_priv *priv)
|
|||
* Description: this function is to exit and disable EEE in case of
|
||||
* LPI state is true. This is called by the xmit.
|
||||
*/
|
||||
void stmmac_disable_eee_mode(struct stmmac_priv *priv)
|
||||
static void stmmac_disable_eee_mode(struct stmmac_priv *priv)
|
||||
{
|
||||
if (!priv->eee_sw_timer_en) {
|
||||
stmmac_lpi_entry_timer_config(priv, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user