Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

asix: Check for supported Wake-on-LAN modes

The driver currently silently accepts unsupported Wake-on-LAN modes
(other than WAKE_PHY or WAKE_MAGIC) without reporting that to the user,
which is confusing.

Fixes: 2e55cc7210fe ("[PATCH] USB: usbnet (3/9) module for ASIX Ethernet adapters")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Florian Fainelli and committed by
David S. Miller
c4ce446e 982d608f

+3
+3
drivers/net/usb/asix_common.c
··· 607 607 struct usbnet *dev = netdev_priv(net); 608 608 u8 opt = 0; 609 609 610 + if (wolinfo->wolopts & ~(WAKE_PHY | WAKE_MAGIC)) 611 + return -EINVAL; 612 + 610 613 if (wolinfo->wolopts & WAKE_PHY) 611 614 opt |= AX_MONITOR_LINK; 612 615 if (wolinfo->wolopts & WAKE_MAGIC)