aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/net/usbnet.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/net/usbnet.h')
-rw-r--r--drivers/usb/net/usbnet.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/usb/net/usbnet.h b/drivers/usb/net/usbnet.h
index 44026189a8a..d903b461756 100644
--- a/drivers/usb/net/usbnet.h
+++ b/drivers/usb/net/usbnet.h
@@ -24,7 +24,7 @@
24#define __USBNET_H 24#define __USBNET_H
25 25
26 26
27/* interface from usbnet core to each USB networking device we handle */ 27/* interface from usbnet core to each USB networking link we handle */
28struct usbnet { 28struct usbnet {
29 /* housekeeping */ 29 /* housekeeping */
30 struct usb_device *udev; 30 struct usb_device *udev;
@@ -62,6 +62,10 @@ struct usbnet {
62# define EVENT_LINK_RESET 4 62# define EVENT_LINK_RESET 4
63}; 63};
64 64
65static inline struct usb_driver *driver_of(struct usb_interface *intf)
66{
67 return to_usb_driver(intf->dev.driver);
68}
65 69
66/* interface from the device/framing level "minidriver" to core */ 70/* interface from the device/framing level "minidriver" to core */
67struct driver_info { 71struct driver_info {
@@ -111,6 +115,15 @@ struct driver_info {
111 unsigned long data; /* Misc driver specific data */ 115 unsigned long data; /* Misc driver specific data */
112}; 116};
113 117
118/* Minidrivers are just drivers using the "usbnet" core as a powerful
119 * network-specific subroutine library ... that happens to do pretty
120 * much everything except custom framing and chip-specific stuff.
121 */
122extern int usbnet_probe(struct usb_interface *, const struct usb_device_id *);
123extern int usbnet_suspend (struct usb_interface *, pm_message_t );
124extern int usbnet_resume (struct usb_interface *);
125extern void usbnet_disconnect(struct usb_interface *);
126
114 127
115/* we record the state for each of our queued skbs */ 128/* we record the state for each of our queued skbs */
116enum skb_state { 129enum skb_state {