extern const struct dev_pm_ops stmmac_simple_pm_ops;
-static inline bool stmmac_wol_enabled_phy(struct stmmac_priv *priv)
-{
- return !priv->plat->pmt && device_may_wakeup(priv->device);
-}
-
int stmmac_mdio_unregister(struct net_device *ndev);
int stmmac_mdio_register(struct net_device *ndev);
int stmmac_mdio_reset(struct mii_bus *mii);
static int stmmac_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
struct stmmac_priv *priv = netdev_priv(dev);
- int ret;
- ret = phylink_ethtool_set_wol(priv->phylink, wol);
- if (!ret)
- device_set_wakeup_enable(priv->device, !!wol->wolopts);
-
- return ret;
+ return phylink_ethtool_set_wol(priv->phylink, wol);
}
static int stmmac_ethtool_op_get_eee(struct net_device *dev,
phylink_ethtool_set_eee(priv->phylink, &eee);
}
- if (!priv->plat->pmt) {
- struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL };
-
- phylink_ethtool_get_wol(priv->phylink, &wol);
- device_set_wakeup_capable(priv->device, !!wol.supported);
- device_set_wakeup_enable(priv->device, !!wol.wolopts);
- }
-
return 0;
}
config->eee_enabled_default = true;
}
+ config->wol_phy_speed_ctrl = true;
if (priv->plat->flags & STMMAC_FLAG_USE_PHY_WOL) {
config->wol_phy_legacy = true;
} else {
mutex_unlock(&priv->lock);
rtnl_lock();
- if (stmmac_wol_enabled_phy(priv))
- phylink_speed_down(priv->phylink, false);
-
phylink_suspend(priv->phylink, !!priv->wolopts);
rtnl_unlock();
* workqueue thread, which will race with initialisation.
*/
phylink_resume(priv->phylink);
- if (stmmac_wol_enabled_phy(priv))
- phylink_speed_up(priv->phylink);
-
rtnl_unlock();
netif_device_attach(ndev);