]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: dsa: no longer call ds->ops->get_mac_eee()
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Mon, 6 Jan 2025 11:58:53 +0000 (11:58 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 8 Jan 2025 02:06:17 +0000 (18:06 -0800)
All implementations of get_mac_eee() now just return zero without doing
anything useful. Remove the call to this method in preparation to
removing the method from each DSA driver.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1tUlkz-007Uyl-UA@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/dsa/user.c

index 4a8de48a6f249d2001d1de5f602c0b53cbdb627d..c74f2b2b92dec480dc7009d9a4c3be3676e9dc0a 100644 (file)
@@ -1251,7 +1251,6 @@ static int dsa_user_get_eee(struct net_device *dev, struct ethtool_keee *e)
 {
        struct dsa_port *dp = dsa_user_to_port(dev);
        struct dsa_switch *ds = dp->ds;
-       int ret;
 
        /* Check whether the switch supports EEE */
        if (!ds->ops->support_eee || !ds->ops->support_eee(ds, dp->index))
@@ -1261,13 +1260,6 @@ static int dsa_user_get_eee(struct net_device *dev, struct ethtool_keee *e)
        if (!dev->phydev)
                return -ENODEV;
 
-       if (!ds->ops->get_mac_eee)
-               return -EOPNOTSUPP;
-
-       ret = ds->ops->get_mac_eee(ds, dp->index, e);
-       if (ret)
-               return ret;
-
        return phylink_ethtool_get_eee(dp->pl, e);
 }