diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2013-03-11 09:56:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-12 11:40:53 -0400 |
commit | 42e836eb4527fb635cb799a701fe4c9fe741c03a (patch) | |
tree | 45045b51aa37a09b3ba0f45e17e38e659473fbcb /drivers/net/phy/phy.c | |
parent | 9b717a8d245075ffb8e95a2dfb4ee97ce4747457 (diff) |
phy: add set_wol/get_wol functions
This allows ethernet drivers (such as the mv643xx_eth) to support
Wake on LAN on platforms where PHY registers have to be configured
for Wake on LAN (e.g. the Marvell Kirkwood based qnap TS-119P II).
Signed-off-by: Michael Stapelberg <michael@stapelberg.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index ef9ea9248223..298b4c201733 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -1188,3 +1188,19 @@ int phy_ethtool_set_eee(struct phy_device *phydev, struct ethtool_eee *data) | |||
1188 | return 0; | 1188 | return 0; |
1189 | } | 1189 | } |
1190 | EXPORT_SYMBOL(phy_ethtool_set_eee); | 1190 | EXPORT_SYMBOL(phy_ethtool_set_eee); |
1191 | |||
1192 | int phy_ethtool_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) | ||
1193 | { | ||
1194 | if (phydev->drv->set_wol) | ||
1195 | return phydev->drv->set_wol(phydev, wol); | ||
1196 | |||
1197 | return -EOPNOTSUPP; | ||
1198 | } | ||
1199 | EXPORT_SYMBOL(phy_ethtool_set_wol); | ||
1200 | |||
1201 | void phy_ethtool_get_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) | ||
1202 | { | ||
1203 | if (phydev->drv->get_wol) | ||
1204 | phydev->drv->get_wol(phydev, wol); | ||
1205 | } | ||
1206 | EXPORT_SYMBOL(phy_ethtool_get_wol); | ||