Skip to contentSkip to conversation

drivers/net/usb/asix: fixed asix_get_wol reported wrong wol status issue

PATCH Applied allan 2 participants 2 messages Dec 23, 2011

Subsystems (3)
lore
Share & tools
lore

allan

author
#0 lore raw

PATCH v2 1/1 drivers/net/usb/asix: fixed asix_get_wol reported wrong wol status issue

Fixed the asix_get_wol() routine reported wrong wol status issue.

---
This fix had been verified on x86 Linux kernel 3.0.0-12-generic system with AX88772A/AX88772/Belkin AX88178 USB dongles, and the wol function works fine (can be waked up by receiving the magic packets).

drivers/net/usb/asix.c +5 -1
@@ -36,7 +36,7 @@
 #include <linux/usb/usbnet.h>
 #include <linux/slab.h>
 
-#define DRIVER_VERSION "08-Nov-2011"
+#define DRIVER_VERSION "22-Dec-2011"
 #define DRIVER_NAME "asix"
 
 /* ASIX AX8817X based USB 2.0 Ethernet Devices */
@@ -689,6 +689,10 @@ asix_get_wol(struct net_device *net, str
 	}
 	wolinfo->supported = WAKE_PHY | WAKE_MAGIC;
 	wolinfo->wolopts = 0;
+	if (opt & AX_MONITOR_LINK)
+		wolinfo->wolopts |= WAKE_PHY;
+	if (opt & AX_MONITOR_MAGIC)
+		wolinfo->wolopts |= WAKE_MAGIC;
 }
 
 static int