Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752549AbbGWHJM (ORCPT ); Thu, 23 Jul 2015 03:09:12 -0400 Received: from rtits2.realtek.com ([60.250.210.242]:40236 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173AbbGWHIF (ORCPT ); Thu, 23 Jul 2015 03:08:05 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.54 with qID t6N781MG001275, This message is accepted by code: ctloc85258 From: Hayes Wang To: CC: , , , Hayes Wang Subject: [PATCH net 2/3] r8152: fix remote wakeup Date: Thu, 23 Jul 2015 15:09:06 +0800 Message-ID: <1394712342-15778-150-Taiwan-albertk@realtek.com> X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1394712342-15778-148-Taiwan-albertk@realtek.com> References: <1394712342-15778-148-Taiwan-albertk@realtek.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.71.126] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 879 Lines: 29 Set needs_remote_wakeup only when the device supports it. Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index e3a0110..eff1f25 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -4059,7 +4059,8 @@ static int rtl8152_probe(struct usb_interface *intf, break; } - intf->needs_remote_wakeup = 1; + if (udev->actconfig->desc.bmAttributes & USB_CONFIG_ATT_WAKEUP) + intf->needs_remote_wakeup = 1; tp->rtl_ops.init(tp); set_ethernet_addr(tp); -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/