From patchwork Fri Dec 23 06:38:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "ASIX_Allan [Office]" X-Patchwork-Id: 132967 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 468C1B6FDF for ; Fri, 23 Dec 2011 17:39:48 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753786Ab1LWGjQ (ORCPT ); Fri, 23 Dec 2011 01:39:16 -0500 Received: from asix.com.tw ([113.196.140.82]:50594 "EHLO asix.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751515Ab1LWGjP convert rfc822-to-8bit (ORCPT ); Fri, 23 Dec 2011 01:39:15 -0500 Received: from AllanPC (175-181-134-231.adsl.dynamic.seed.net.tw [175.181.134.231] (may be forged)) (authenticated bits=0) by asix.com.tw (8.14.1/8.14.1) with ESMTP id pBN6jMJO019838; Fri, 23 Dec 2011 14:45:23 +0800 (CST) (envelope-from allan@asix.com.tw) From: "allan" To: Cc: , , "'Freddy Xin'" , "'Grant Grundler'" , "'Eugene'" , "=?utf-8?Q?'ASIX_Louis_=5B=E8=98=87=E5=A8=81=E9=99=B8=5D'?=" 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 Message-ID: <005001ccc13d$8c9850e0$a5c8f2a0$@com.tw> MIME-Version: 1.0 X-Priority: 1 (Highest) X-MSMail-Priority: High X-Mailer: Microsoft Office Outlook 12.0 thread-index: AczBPYhAF7QIiFH4T+iduZtxrZDECw== Importance: High Content-Language: zh-tw Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fixed the asix_get_wol() routine reported wrong wol status issue. Signed-off-by: Allan Chou Tested-by: Eugene ; Allan Chou --- 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). -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 #include -#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