Skip to content

Commit 08f5006

Browse files
viviendavem330
authored andcommitted
net: dsa: rename switch EEE ops
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>
1 parent 5480db6 commit 08f5006

File tree

5 files changed

+25
-26
lines changed

5 files changed

+25
-26
lines changed

drivers/net/dsa/bcm_sf2.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ static int bcm_sf2_eee_init(struct dsa_switch *ds, int port,
338338
return 1;
339339
}
340340

341-
static int bcm_sf2_sw_get_eee(struct dsa_switch *ds, int port,
342-
struct ethtool_eee *e)
341+
static int bcm_sf2_sw_get_mac_eee(struct dsa_switch *ds, int port,
342+
struct ethtool_eee *e)
343343
{
344344
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
345345
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,
352352
return 0;
353353
}
354354

355-
static int bcm_sf2_sw_set_eee(struct dsa_switch *ds, int port,
356-
struct ethtool_eee *e)
355+
static int bcm_sf2_sw_set_mac_eee(struct dsa_switch *ds, int port,
356+
struct ethtool_eee *e)
357357
{
358358
struct bcm_sf2_priv *priv = bcm_sf2_to_priv(ds);
359359
struct ethtool_eee *p = &priv->port_sts[port].eee;
@@ -1011,8 +1011,8 @@ static const struct dsa_switch_ops bcm_sf2_ops = {
10111011
.set_wol = bcm_sf2_sw_set_wol,
10121012
.port_enable = bcm_sf2_port_setup,
10131013
.port_disable = bcm_sf2_port_disable,
1014-
.get_eee = bcm_sf2_sw_get_eee,
1015-
.set_eee = bcm_sf2_sw_set_eee,
1014+
.get_mac_eee = bcm_sf2_sw_get_mac_eee,
1015+
.set_mac_eee = bcm_sf2_sw_set_mac_eee,
10161016
.port_bridge_join = b53_br_join,
10171017
.port_bridge_leave = b53_br_leave,
10181018
.port_stp_state_set = b53_br_set_stp_state,

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -810,15 +810,15 @@ static void mv88e6xxx_get_regs(struct dsa_switch *ds, int port,
810810
mutex_unlock(&chip->reg_lock);
811811
}
812812

813-
static int mv88e6xxx_get_eee(struct dsa_switch *ds, int port,
814-
struct ethtool_eee *e)
813+
static int mv88e6xxx_get_mac_eee(struct dsa_switch *ds, int port,
814+
struct ethtool_eee *e)
815815
{
816816
/* Nothing to do on the port's MAC */
817817
return 0;
818818
}
819819

820-
static int mv88e6xxx_set_eee(struct dsa_switch *ds, int port,
821-
struct ethtool_eee *e)
820+
static int mv88e6xxx_set_mac_eee(struct dsa_switch *ds, int port,
821+
struct ethtool_eee *e)
822822
{
823823
/* Nothing to do on the port's MAC */
824824
return 0;
@@ -3890,8 +3890,8 @@ static const struct dsa_switch_ops mv88e6xxx_switch_ops = {
38903890
.get_sset_count = mv88e6xxx_get_sset_count,
38913891
.port_enable = mv88e6xxx_port_enable,
38923892
.port_disable = mv88e6xxx_port_disable,
3893-
.set_eee = mv88e6xxx_set_eee,
3894-
.get_eee = mv88e6xxx_get_eee,
3893+
.get_mac_eee = mv88e6xxx_get_mac_eee,
3894+
.set_mac_eee = mv88e6xxx_set_mac_eee,
38953895
.get_eeprom_len = mv88e6xxx_get_eeprom_len,
38963896
.get_eeprom = mv88e6xxx_get_eeprom,
38973897
.set_eeprom = mv88e6xxx_set_eeprom,

drivers/net/dsa/qca8k.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ qca8k_get_sset_count(struct dsa_switch *ds)
638638
}
639639

640640
static int
641-
qca8k_set_eee(struct dsa_switch *ds, int port, struct ethtool_eee *eee)
641+
qca8k_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *eee)
642642
{
643643
struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
644644
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)
657657
}
658658

659659
static int
660-
qca8k_get_eee(struct dsa_switch *ds, int port,
661-
struct ethtool_eee *e)
660+
qca8k_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_eee *e)
662661
{
663662
/* Nothing to do on the port's MAC */
664663
return 0;
@@ -863,8 +862,8 @@ static const struct dsa_switch_ops qca8k_switch_ops = {
863862
.phy_write = qca8k_phy_write,
864863
.get_ethtool_stats = qca8k_get_ethtool_stats,
865864
.get_sset_count = qca8k_get_sset_count,
866-
.get_eee = qca8k_get_eee,
867-
.set_eee = qca8k_set_eee,
865+
.get_mac_eee = qca8k_get_mac_eee,
866+
.set_mac_eee = qca8k_set_mac_eee,
868867
.port_enable = qca8k_port_enable,
869868
.port_disable = qca8k_port_disable,
870869
.port_stp_state_set = qca8k_port_stp_state_set,

include/net/dsa.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,12 @@ struct dsa_switch_ops {
332332
struct phy_device *phy);
333333

334334
/*
335-
* EEE setttings
335+
* Port's MAC EEE settings
336336
*/
337-
int (*set_eee)(struct dsa_switch *ds, int port,
338-
struct ethtool_eee *e);
339-
int (*get_eee)(struct dsa_switch *ds, int port,
340-
struct ethtool_eee *e);
337+
int (*set_mac_eee)(struct dsa_switch *ds, int port,
338+
struct ethtool_eee *e);
339+
int (*get_mac_eee)(struct dsa_switch *ds, int port,
340+
struct ethtool_eee *e);
341341

342342
/* EEPROM access */
343343
int (*get_eeprom_len)(struct dsa_switch *ds);

net/dsa/slave.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -652,10 +652,10 @@ static int dsa_slave_set_eee(struct net_device *dev, struct ethtool_eee *e)
652652
if (!p->phy)
653653
return -ENODEV;
654654

655-
if (!ds->ops->set_eee)
655+
if (!ds->ops->set_mac_eee)
656656
return -EOPNOTSUPP;
657657

658-
ret = ds->ops->set_eee(ds, p->dp->index, e);
658+
ret = ds->ops->set_mac_eee(ds, p->dp->index, e);
659659
if (ret)
660660
return ret;
661661

@@ -678,10 +678,10 @@ static int dsa_slave_get_eee(struct net_device *dev, struct ethtool_eee *e)
678678
if (!p->phy)
679679
return -ENODEV;
680680

681-
if (!ds->ops->get_eee)
681+
if (!ds->ops->get_mac_eee)
682682
return -EOPNOTSUPP;
683683

684-
ret = ds->ops->get_eee(ds, p->dp->index, e);
684+
ret = ds->ops->get_mac_eee(ds, p->dp->index, e);
685685
if (ret)
686686
return ret;
687687

0 commit comments

Comments
 (0)