Message ID | 200912031525.49001.oliver@neukum.org |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
From: Oliver Neukum <oliver@neukum.org> Date: Thu, 3 Dec 2009 15:25:48 +0100 > this uses the generic framework of usbnet to implement USB autosuspend > for cdc-eem. Comments? Please compose this patch posting properly as I described in my previous email to you. Thanks. -- 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/cdc_eem.c b/drivers/net/usb/cdc_eem.c index 2330065..d6c16a9 100644 --- a/drivers/net/usb/cdc_eem.c +++ b/drivers/net/usb/cdc_eem.c @@ -335,10 +335,17 @@ next: return 1; } +static int eem_manage_power(struct usbnet *dev, int on) +{ + dev->intf->needs_remote_wakeup = on; + return 0; +} + static const struct driver_info eem_info = { .description = "CDC EEM Device", .flags = FLAG_ETHER, .bind = eem_bind, + .manage_power = eem_manage_power, .rx_fixup = eem_rx_fixup, .tx_fixup = eem_tx_fixup, }; @@ -364,6 +371,7 @@ static struct usb_driver eem_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .supports_autosuspend = 1, };