diff options
author | Ming Lei <ming.lei@canonical.com> | 2012-10-24 19:46:54 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-26 03:36:50 -0400 |
commit | 877bd862f32b815d54ab5fc10a4fd903d7bf3012 (patch) | |
tree | 83242b70bcf295b189ac4afa5ba115755bc9a66a /include/linux/usb/usbnet.h | |
parent | 02c38d0a0b7b973911e66d38e369d0fcfce2c186 (diff) | |
download | linux-stable-877bd862f32b815d54ab5fc10a4fd903d7bf3012.tar.gz linux-stable-877bd862f32b815d54ab5fc10a4fd903d7bf3012.tar.bz2 linux-stable-877bd862f32b815d54ab5fc10a4fd903d7bf3012.zip |
usbnet: introduce usbnet 3 command helpers
This patch introduces the below 3 usb command helpers:
usbnet_read_cmd / usbnet_write_cmd / usbnet_write_cmd_async
so that each low level driver doesn't need to implement them
by itself, and the dma buffer allocation for usb transfer and
runtime PM things can be handled just in one place.
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/usb/usbnet.h')
-rw-r--r-- | include/linux/usb/usbnet.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index ddbbb7de894b..4410e4166c6c 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h @@ -163,6 +163,12 @@ extern int usbnet_resume(struct usb_interface *); extern void usbnet_disconnect(struct usb_interface *); extern void usbnet_device_suggests_idle(struct usbnet *dev); +extern int usbnet_read_cmd(struct usbnet *dev, u8 cmd, u8 reqtype, + u16 value, u16 index, void *data, u16 size); +extern int usbnet_write_cmd(struct usbnet *dev, u8 cmd, u8 reqtype, + u16 value, u16 index, const void *data, u16 size); +extern int usbnet_write_cmd_async(struct usbnet *dev, u8 cmd, u8 reqtype, + u16 value, u16 index, const void *data, u16 size); /* Drivers that reuse some of the standard USB CDC infrastructure * (notably, using multiple interfaces according to the CDC |