From: "allan" <allan@asix.com.tw>
To: <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"'Freddy Xin'" <freddy@asix.com.tw>,
"'Grant Grundler'" <grundler@chromium.org>,
'Eugene' <elubarsky@gmail.com>,
"'ASIX Louis [蘇威陸]'" <louis@asix.com.tw>
Subject: [PATCH v2] drivers/net/usb/asix: fixed asix_get_wol reported wrong wol status issue
Date: Fri, 23 Dec 2011 14:38:51 +0800 [thread overview]
Message-ID: <005001ccc13d$8c9850e0$a5c8f2a0$@com.tw> (raw)
Fixed the asix_get_wol() routine reported wrong wol status issue.
Signed-off-by: Allan Chou <allan@asix.com.tw>
Tested-by: Eugene <elubarsky@gmail.com>; Allan Chou <allan@asix.com.tw>
---
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).
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
--- a/drivers/net/usb/asix.c 2011-12-15 14:01:49.000000000 +0800
+++ b/drivers/net/usb/asix.c 2011-12-22 18:20:39.000000000 +0800
@@ -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
next reply other threads:[~2011-12-23 6:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-23 6:38 allan [this message]
2011-12-23 21:53 ` [PATCH v2] drivers/net/usb/asix: fixed asix_get_wol reported wrong wol status issue David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='005001ccc13d$8c9850e0$a5c8f2a0$@com.tw' \
--to=allan@asix.com.tw \
--cc=davem@davemloft.net \
--cc=elubarsky@gmail.com \
--cc=freddy@asix.com.tw \
--cc=grundler@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=louis@asix.com.tw \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).