summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2015-03-26 21:36:42 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-29 16:23:56 -0400
commitbaae51d5242d7e4e94ce4cce6d4bca639eec07e0 (patch)
treee3c689d68be45d8d9382f9a19f85a87adda07cf3 /drivers/net/dsa
parent464caa2f5ba8d937ce3d434b1be4179fefb011e5 (diff)
net: dsa: mv88e6171: Add EEE support to the mv88e6172
The mv88e6172 has support for EEE. Check for the product ID and call the common code if applicable. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r--drivers/net/dsa/mv88e6171.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6171.c b/drivers/net/dsa/mv88e6171.c
index 54ebfed1b938..e1700cd8badc 100644
--- a/drivers/net/dsa/mv88e6171.c
+++ b/drivers/net/dsa/mv88e6171.c
@@ -390,6 +390,28 @@ static int mv88e6171_get_sset_count(struct dsa_switch *ds)
390 return ARRAY_SIZE(mv88e6171_hw_stats); 390 return ARRAY_SIZE(mv88e6171_hw_stats);
391} 391}
392 392
393static int mv88e6171_get_eee(struct dsa_switch *ds, int port,
394 struct ethtool_eee *e)
395{
396 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
397
398 if (ps->id == ID_6172)
399 return mv88e6xxx_get_eee(ds, port, e);
400
401 return -EOPNOTSUPP;
402}
403
404static int mv88e6171_set_eee(struct dsa_switch *ds, int port,
405 struct phy_device *phydev, struct ethtool_eee *e)
406{
407 struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
408
409 if (ps->id == ID_6172)
410 return mv88e6xxx_set_eee(ds, port, phydev, e);
411
412 return -EOPNOTSUPP;
413}
414
393struct dsa_switch_driver mv88e6171_switch_driver = { 415struct dsa_switch_driver mv88e6171_switch_driver = {
394 .tag_protocol = DSA_TAG_PROTO_EDSA, 416 .tag_protocol = DSA_TAG_PROTO_EDSA,
395 .priv_size = sizeof(struct mv88e6xxx_priv_state), 417 .priv_size = sizeof(struct mv88e6xxx_priv_state),
@@ -402,6 +424,8 @@ struct dsa_switch_driver mv88e6171_switch_driver = {
402 .get_strings = mv88e6171_get_strings, 424 .get_strings = mv88e6171_get_strings,
403 .get_ethtool_stats = mv88e6171_get_ethtool_stats, 425 .get_ethtool_stats = mv88e6171_get_ethtool_stats,
404 .get_sset_count = mv88e6171_get_sset_count, 426 .get_sset_count = mv88e6171_get_sset_count,
427 .set_eee = mv88e6171_set_eee,
428 .get_eee = mv88e6171_get_eee,
405#ifdef CONFIG_NET_DSA_HWMON 429#ifdef CONFIG_NET_DSA_HWMON
406 .get_temp = mv88e6xxx_get_temp, 430 .get_temp = mv88e6xxx_get_temp,
407#endif 431#endif