aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/gianfar_ethtool.c
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2009-02-01 00:52:34 -0800
committerDavid S. Miller <davem@davemloft.net>2009-02-01 00:52:34 -0800
commit2884e5cc9283d541977bdf5dc344849af94cd639 (patch)
tree937a66410637f6298ad038d173316edf27def66b /drivers/net/gianfar_ethtool.c
parent09640e6365c679b5642b1c41b6d7078f51689ddf (diff)
gianfar: Implement proper, per netdevice wakeup management
This patch implements wakeup management for the gianfar driver. The driver should set wakeup enable if WOL is enabled, so that phylib won't power off an attached PHY. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gianfar_ethtool.c')
-rw-r--r--drivers/net/gianfar_ethtool.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c
index 59b3b5d98ef..dbf06e9313c 100644
--- a/drivers/net/gianfar_ethtool.c
+++ b/drivers/net/gianfar_ethtool.c
@@ -600,6 +600,7 @@ static int gfar_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
spin_lock_irqsave(&priv->bflock, flags);
priv->wol_en = wol->wolopts & WAKE_MAGIC ? 1 : 0;
+ device_set_wakeup_enable(&dev->dev, priv->wol_en);
spin_unlock_irqrestore(&priv->bflock, flags);
return 0;