mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: dsa: call phy_init_eee in DSA layer
All DSA drivers are calling phy_init_eee if eee_enabled is true. Move up this statement in the DSA layer to simplify the DSA drivers. qca8k does not require to cache the ethtool_eee structures from now on. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7f5c6d7cdd
commit
c48f7eb302
5 changed files with 9 additions and 44 deletions
|
@ -659,6 +659,12 @@ static int dsa_slave_set_eee(struct net_device *dev, struct ethtool_eee *e)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (e->eee_enabled) {
|
||||
ret = phy_init_eee(p->phy, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return phy_ethtool_set_eee(p->phy, e);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue