aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar_ethtool.c
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-12-01 07:13:56 -0500
committerMichal Marek <mmarek@suse.cz>2010-12-01 07:13:56 -0500
commit307991055b0ce65d53dc1eb501c456c10eb36360 (patch)
tree71bb9263dc71344e5d7b97ca6d5cf223f1f1a856 /drivers/net/gianfar_ethtool.c
parent1198c6d45a1ef5f4f7fdfbf33ef7d270493ec575 (diff)
parent9b4320b77bab4031649c484da1c595f39c2e43cd (diff)
Merge branch 'kconfig_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-next into kbuild/rc-fixes
Diffstat (limited to 'drivers/net/gianfar_ethtool.c')
-rw-r--r--drivers/net/gianfar_ethtool.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c
index 5c566ebc54b8..3bc8e276ba4d 100644
--- a/drivers/net/gianfar_ethtool.c
+++ b/drivers/net/gianfar_ethtool.c
@@ -635,9 +635,10 @@ static int gfar_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
635 if (wol->wolopts & ~WAKE_MAGIC) 635 if (wol->wolopts & ~WAKE_MAGIC)
636 return -EINVAL; 636 return -EINVAL;
637 637
638 device_set_wakeup_enable(&dev->dev, wol->wolopts & WAKE_MAGIC);
639
638 spin_lock_irqsave(&priv->bflock, flags); 640 spin_lock_irqsave(&priv->bflock, flags);
639 priv->wol_en = wol->wolopts & WAKE_MAGIC ? 1 : 0; 641 priv->wol_en = !!device_may_wakeup(&dev->dev);
640 device_set_wakeup_enable(&dev->dev, priv->wol_en);
641 spin_unlock_irqrestore(&priv->bflock, flags); 642 spin_unlock_irqrestore(&priv->bflock, flags);
642 643
643 return 0; 644 return 0;