aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/net/usbnet.h
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2005-08-31 12:52:45 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-08 19:28:31 -0400
commit38bde1d4699af45e6a4167a72e2e512e45c35ca8 (patch)
tree9a133b9c7f7d6d2ecbf99b14a9ce8bfd5b0ceea7 /drivers/usb/net/usbnet.h
parentf29fc259976e9f4dd1fe8ed59ccdd50e4ea61db0 (diff)
[PATCH] USB: usbnet (2/9) module for simple network links
This patch creates the first of several separate "minidriver" modules for "usbnet". This one handles only the very simplest hardware, which can be handled almost entirely by the "usbnet" core. - Move device-specific bits into new "cdc_subset.c" driver, shrinking "usbnet" by a bunch; - Export the functions needed to support this minidriver (with EXPORT_SYMBOL_GPL); - Update Kconfig and kbuild accordingly. This one handles about a dozen different device types, with the most notable ones being Gumstix and most Linux-based PDAs (except Zaurus running that ancient code from Sharp). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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 44026189a8a1..d903b4617563 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 {