/** * phylink_init_eee() - init and check the EEE features * @pl: a pointer to a &struct phylink returned from phylink_create() * @clk_stop_enable: allow PHY to stop receive clock * * Must be called either with RTNL held or within mac_link_up() */ int phylink_init_eee(struct phylink *pl, bool clk_stop_enable) { int ret = -EOPNOTSUPP; if (pl->phydev) ret = phy_init_eee(pl->phydev, clk_stop_enable); return ret; }
int phylink_init_eee(struct phylink *pl, bool clk_stop_enable) { int ret = -EPROTONOSUPPORT; WARN_ON(!lockdep_rtnl_is_held()); if (pl->phydev) ret = phy_init_eee(pl->phydev, clk_stop_enable); return ret; }
/* Returns 0 if EEE was not enabled, or 1 otherwise */ static int bcm_sf2_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy) { struct bcm_sf2_priv *priv = ds_to_priv(ds); struct ethtool_eee *p = &priv->port_sts[port].eee; int ret; p->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full); ret = phy_init_eee(phy, 0); if (ret) return 0; bcm_sf2_eee_enable_set(ds, port, true); return 1; }