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>
This commit is contained in:
committed by
David S. Miller
parent
09640e6365
commit
2884e5cc92
@@ -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;
|
||||
|
Reference in New Issue
Block a user