]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
net: dsa: rename switch EEE ops
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Tue, 1 Aug 2017 20:32:41 +0000 (16:32 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Aug 2017 03:09:10 +0000 (20:09 -0700)
To avoid confusion with the PHY EEE settings, rename the .set_eee and
.get_eee ops to respectively .set_mac_eee and .get_mac_eee.

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>
drivers/net/dsa/bcm_sf2.c
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/qca8k.c
include/net/dsa.h
net/dsa/slave.c

index ce886345d8d29331460d7c989fb548ad052a6b39..6bbfa6ea1efb0e9b8730307f678dacf76f0923be 100644 (file)
@@ -338,8 +338,8 @@ static int bcm_sf2_eee_init(struct dsa_switch *ds, int port,
        return 1;
 }
 
-static int bcm_sf2_sw_get_eee(struct dsa_switch *ds, int port,
-                             struct ethtool_eee *e)
+static int bcm_sf2_sw_get_mac_eee(struct dsa_switch *ds, int port,
+                                 struct ethtool_eee *e)
 {
        struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
        struct ethtool_eee *p = &priv->port_sts[port].eee;
@@ -352,8 +352,8 @@ static int bcm_sf2_sw_get_eee(struct dsa_switch *ds, int port,
        return 0;
 }
 
-static int bcm_sf2_sw_set_eee(struct dsa_switch *ds, int port,
-                             struct ethtool_eee *e)
+static int bcm_sf2_sw_set_mac_eee(struct dsa_switch *ds, int port,
+                                 struct ethtool_eee *e)
 {
        struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
        struct ethtool_eee *p = &priv->port_sts[port].eee;
@@ -1011,8 +1011,8 @@ static const struct dsa_switch_ops bcm_sf2_ops = {
        .set_wol                = bcm_sf2_sw_set_wol,
        .port_enable            = bcm_sf2_port_setup,
        .port_disable           = bcm_sf2_port_disable,
-       .get_eee                = bcm_sf2_sw_get_eee,
-       .set_eee                = bcm_sf2_sw_set_eee,
+       .get_mac_eee            = bcm_sf2_sw_get_mac_eee,
+       .set_mac_eee            = bcm_sf2_sw_set_mac_eee,
        .port_bridge_join       = b53_br_join,
        .port_bridge_leave      = b53_br_leave,
        .port_stp_state_set     = b53_br_set_stp_state,
index aa0c5493fb9d4d1254cd6edfc98a0caf61903a97..521738c4cd171e7aadcf07f26195241a9d133cd7 100644 (file)
@@ -810,15 +810,15 @@ static void mv88e6xxx_get_regs(struct dsa_switch *ds, int port,
        mutex_unlock(&chip->reg_lock);
 }
 
-static int mv88e6xxx_get_eee(struct dsa_switch *ds, int port,
-                            struct ethtool_eee *e)
+static int mv88e6xxx_get_mac_eee(struct dsa_switch *ds, int port,
+                                struct ethtool_eee *e)
 {
        /* Nothing to do on the port's MAC */
        return 0;
 }
 
-static int mv88e6xxx_set_eee(struct dsa_switch *ds, int port,
-                            struct ethtool_eee *e)
+static int mv88e6xxx_set_mac_eee(struct dsa_switch *ds, int port,
+                                struct ethtool_eee *e)
 {
        /* Nothing to do on the port's MAC */
        return 0;
@@ -3890,8 +3890,8 @@ static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
        .get_sset_count         = mv88e6xxx_get_sset_count,
        .port_enable            = mv88e6xxx_port_enable,
        .port_disable           = mv88e6xxx_port_disable,
-       .set_eee                = mv88e6xxx_set_eee,
-       .get_eee                = mv88e6xxx_get_eee,
+       .get_mac_eee            = mv88e6xxx_get_mac_eee,
+       .set_mac_eee            = mv88e6xxx_set_mac_eee,
        .get_eeprom_len         = mv88e6xxx_get_eeprom_len,
        .get_eeprom             = mv88e6xxx_get_eeprom,
        .set_eeprom             = mv88e6xxx_set_eeprom,
index e209e229ed4c2997687d9fee5e552913b03823d6..36c169b0c705b2b0e2c43d1572e891104c6f7ad7 100644 (file)
@@ -638,7 +638,7 @@ qca8k_get_sset_count(struct dsa_switch *ds)
 }
 
 static int
-qca8k_set_eee(struct dsa_switch *ds, int port, struct ethtool_eee *eee)
+qca8k_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *eee)
 {
        struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
        u32 lpi_en = QCA8K_REG_EEE_CTRL_LPI_EN(port);
@@ -657,8 +657,7 @@ qca8k_set_eee(struct dsa_switch *ds, int port, struct ethtool_eee *eee)
 }
 
 static int
-qca8k_get_eee(struct dsa_switch *ds, int port,
-             struct ethtool_eee *e)
+qca8k_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e)
 {
        /* Nothing to do on the port's MAC */
        return 0;
@@ -863,8 +862,8 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
        .phy_write              = qca8k_phy_write,
        .get_ethtool_stats      = qca8k_get_ethtool_stats,
        .get_sset_count         = qca8k_get_sset_count,
-       .get_eee                = qca8k_get_eee,
-       .set_eee                = qca8k_set_eee,
+       .get_mac_eee            = qca8k_get_mac_eee,
+       .set_mac_eee            = qca8k_set_mac_eee,
        .port_enable            = qca8k_port_enable,
        .port_disable           = qca8k_port_disable,
        .port_stp_state_set     = qca8k_port_stp_state_set,
index ce46db323394a5eefe12e1618f035e65e3fc1546..0b1a0622b33ccb0941d8b8121d74450709f40acb 100644 (file)
@@ -332,12 +332,12 @@ struct dsa_switch_ops {
                                struct phy_device *phy);
 
        /*
-        * EEE setttings
+        * Port's MAC EEE settings
         */
-       int     (*set_eee)(struct dsa_switch *ds, int port,
-                          struct ethtool_eee *e);
-       int     (*get_eee)(struct dsa_switch *ds, int port,
-                          struct ethtool_eee *e);
+       int     (*set_mac_eee)(struct dsa_switch *ds, int port,
+                              struct ethtool_eee *e);
+       int     (*get_mac_eee)(struct dsa_switch *ds, int port,
+                              struct ethtool_eee *e);
 
        /* EEPROM access */
        int     (*get_eeprom_len)(struct dsa_switch *ds);
index 9ddc584e70b0f630e319440e22619256531d9e74..cc4bad3dadb4e755a1fe386d5b4e8a4674028ac1 100644 (file)
@@ -652,10 +652,10 @@ static int dsa_slave_set_eee(struct net_device *dev, struct ethtool_eee *e)
        if (!p->phy)
                return -ENODEV;
 
-       if (!ds->ops->set_eee)
+       if (!ds->ops->set_mac_eee)
                return -EOPNOTSUPP;
 
-       ret = ds->ops->set_eee(ds, p->dp->index, e);
+       ret = ds->ops->set_mac_eee(ds, p->dp->index, e);
        if (ret)
                return ret;
 
@@ -678,10 +678,10 @@ static int dsa_slave_get_eee(struct net_device *dev, struct ethtool_eee *e)
        if (!p->phy)
                return -ENODEV;
 
-       if (!ds->ops->get_eee)
+       if (!ds->ops->get_mac_eee)
                return -EOPNOTSUPP;
 
-       ret = ds->ops->get_eee(ds, p->dp->index, e);
+       ret = ds->ops->get_mac_eee(ds, p->dp->index, e);
        if (ret)
                return ret;