diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 852e917778f8..30ccbb6d097a 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -9948,16 +9948,16 @@ static int tg3_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
9948 | !((tp->tg3_flags & TG3_FLAG_WOL_CAP) && device_can_wakeup(dp))) | 9948 | !((tp->tg3_flags & TG3_FLAG_WOL_CAP) && device_can_wakeup(dp))) |
9949 | return -EINVAL; | 9949 | return -EINVAL; |
9950 | 9950 | ||
9951 | device_set_wakeup_enable(dp, wol->wolopts & WAKE_MAGIC); | ||
9952 | |||
9951 | spin_lock_bh(&tp->lock); | 9953 | spin_lock_bh(&tp->lock); |
9952 | if (wol->wolopts & WAKE_MAGIC) { | 9954 | if (device_may_wakeup(dp)) |
9953 | tp->tg3_flags |= TG3_FLAG_WOL_ENABLE; | 9955 | tp->tg3_flags |= TG3_FLAG_WOL_ENABLE; |
9954 | device_set_wakeup_enable(dp, true); | 9956 | else |
9955 | } else { | ||
9956 | tp->tg3_flags &= ~TG3_FLAG_WOL_ENABLE; | 9957 | tp->tg3_flags &= ~TG3_FLAG_WOL_ENABLE; |
9957 | device_set_wakeup_enable(dp, false); | ||
9958 | } | ||
9959 | spin_unlock_bh(&tp->lock); | 9958 | spin_unlock_bh(&tp->lock); |
9960 | 9959 | ||
9960 | |||
9961 | return 0; | 9961 | return 0; |
9962 | } | 9962 | } |
9963 | 9963 | ||