Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-10-04 10:07:24 +0200
committerTakashi Iwai <tiwai@suse.de>2018-10-04 10:11:00 +0200
commit8df7004dc3d0e86ba1214f2501b137546e789e85 (patch)
treebf5f1f2e34e7b48424d18f814d9d92d72e1a179f
parent0f1a8ca20158da16d3c58fb86417715b5912b1e7 (diff)
smsc95xx: Check for Wake-on-LAN modes (bsc#1051510).
-rw-r--r--drivers/net/usb/smsc95xx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 51e8b9b936d1..4086223dcc0f 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -774,6 +774,9 @@ static int smsc95xx_ethtool_set_wol(struct net_device *net,
struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0]);
int ret;
+ if (wolinfo->wolopts & ~SUPPORTED_WAKE)
+ return -EINVAL;
+
pdata->wolopts = wolinfo->wolopts & SUPPORTED_WAKE;
ret = device_set_wakeup_enable(&dev->udev->dev, pdata->wolopts);