diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-09-24 20:05:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-28 17:14:09 -0400 |
commit | 7905288f093ad924004609bb89a7ce1597892726 (patch) | |
tree | da6ce32338f5e7c2e617864552e91691dc44aed3 /include/net | |
parent | b6d045db59210476323caef042c5b50884e4675f (diff) |
net: dsa: allow switches driver to implement get/set EEE
Allow switches driver to query and enable/disable EEE on a per-port
basis by implementing the ethtool_{get,set}_eee settings and delegating
these operations to the switch driver.
set_eee() will need to coordinate with the PHY driver to make sure that
EEE is enabled, the link-partner supports it and the auto-negotiation
result is satisfactory.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/dsa.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 4f664fe0e42c..58ad8c6492db 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h | |||
@@ -232,6 +232,15 @@ struct dsa_switch_driver { | |||
232 | struct phy_device *phy); | 232 | struct phy_device *phy); |
233 | void (*port_disable)(struct dsa_switch *ds, int port, | 233 | void (*port_disable)(struct dsa_switch *ds, int port, |
234 | struct phy_device *phy); | 234 | struct phy_device *phy); |
235 | |||
236 | /* | ||
237 | * EEE setttings | ||
238 | */ | ||
239 | int (*set_eee)(struct dsa_switch *ds, int port, | ||
240 | struct phy_device *phydev, | ||
241 | struct ethtool_eee *e); | ||
242 | int (*get_eee)(struct dsa_switch *ds, int port, | ||
243 | struct ethtool_eee *e); | ||
235 | }; | 244 | }; |
236 | 245 | ||
237 | void register_switch_driver(struct dsa_switch_driver *type); | 246 | void register_switch_driver(struct dsa_switch_driver *type); |