@@ -1229,7 +1229,7 @@ static int dsa_user_set_eee(struct net_device *dev, struct ethtool_keee *e)
int ret;
/* Check whether the switch supports EEE */
- if (ds->ops->support_eee && !ds->ops->support_eee(ds, dp->index))
+ if (!ds->ops->support_eee || !ds->ops->support_eee(ds, dp->index))
return -EOPNOTSUPP;
/* Port's PHY and MAC both need to be EEE capable */
@@ -1253,7 +1253,7 @@ static int dsa_user_get_eee(struct net_device *dev, struct ethtool_keee *e)
int ret;
/* Check whether the switch supports EEE */
- if (ds->ops->support_eee && !ds->ops->support_eee(ds, dp->index))
+ if (!ds->ops->support_eee || !ds->ops->support_eee(ds, dp->index))
return -EOPNOTSUPP;
/* Port's PHY and MAC both need to be EEE capable */
Now that we have updated all drivers, switch DSA to require an implementation of the .support_eee() method for EEE to be usable, rather than defaulting to being permissive when not implemented. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> --- net/dsa/user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)