diff options
author | Ingo Molnar <[email protected]> | 2018-10-09 08:50:10 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2018-10-09 08:50:10 +0200 |
commit | fc8eaa85681fa72dc6a4e46f01c92e4fba83d0ab (patch) | |
tree | b044fab426f2167ceeb37ed6fe58f7f11b10cebd /drivers/net/usb/lan78xx.c | |
parent | 2cc81c6992248ea37d0241bc325977bab310bc3b (diff) | |
parent | 49e00eee00612b1357596fed8a88b621a7648c14 (diff) |
Merge branch 'x86/urgent' into x86/cache, to pick up dependent fix
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/net/usb/lan78xx.c')
-rw-r--r-- | drivers/net/usb/lan78xx.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index a9991c5f4736..c3c9ba44e2a1 100644 --- a/drivers/net/usb/lan78xx.c +++ b/drivers/net/usb/lan78xx.c @@ -1401,19 +1401,10 @@ static int lan78xx_set_wol(struct net_device *netdev, if (ret < 0) return ret; - pdata->wol = 0; - if (wol->wolopts & WAKE_UCAST) - pdata->wol |= WAKE_UCAST; - if (wol->wolopts & WAKE_MCAST) - pdata->wol |= WAKE_MCAST; - if (wol->wolopts & WAKE_BCAST) - pdata->wol |= WAKE_BCAST; - if (wol->wolopts & WAKE_MAGIC) - pdata->wol |= WAKE_MAGIC; - if (wol->wolopts & WAKE_PHY) - pdata->wol |= WAKE_PHY; - if (wol->wolopts & WAKE_ARP) - pdata->wol |= WAKE_ARP; + if (wol->wolopts & ~WAKE_ALL) + return -EINVAL; + + pdata->wol = wol->wolopts; device_set_wakeup_enable(&dev->udev->dev, (bool)wol->wolopts); |