OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ax88179_178a: Check for supported Wake-on-LAN modes
[uclinux-h8/linux.git]
/
drivers
/
net
/
usb
/
ax88179_178a.c
diff --git
a/drivers/net/usb/ax88179_178a.c
b/drivers/net/usb/ax88179_178a.c
index
9e8ad37
..
2207f7a
100644
(file)
--- a/
drivers/net/usb/ax88179_178a.c
+++ b/
drivers/net/usb/ax88179_178a.c
@@
-566,6
+566,9
@@
ax88179_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)
struct usbnet *dev = netdev_priv(net);
u8 opt = 0;
+ if (wolinfo->wolopts & ~(WAKE_PHY | WAKE_MAGIC))
+ return -EINVAL;
+
if (wolinfo->wolopts & WAKE_PHY)
opt |= AX_MONITOR_MODE_RWLC;
if (wolinfo->wolopts & WAKE_MAGIC)