aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/net/usbnet.h
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2005-08-31 09:52:45 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-08 16:28:31 -0700
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 44026189a8a..d903b461756 100644
--- a/drivers/usb/net/usbnet.h
+++ b/drivers/usb/net/usbnet.h
@@ -24,7 +24,7 @@
#define __USBNET_H
-/* interface from usbnet core to each USB networking device we handle */
+/* interface from usbnet core to each USB networking link we handle */
struct usbnet {
/* housekeeping */
struct usb_device *udev;
@@ -62,6 +62,10 @@ struct usbnet {
# define EVENT_LINK_RESET 4
};
+static inline struct usb_driver *driver_of(struct usb_interface *intf)
+{
+ return to_usb_driver(intf->dev.driver);
+}
/* interface from the device/framing level "minidriver" to core */
struct driver_info {
@@ -111,6 +115,15 @@ struct driver_info {
unsigned long data; /* Misc driver specific data */
};
+/* Minidrivers are just drivers using the "usbnet" core as a powerful
+ * network-specific subroutine library ... that happens to do pretty
+ * much everything except custom framing and chip-specific stuff.
+ */
+extern int usbnet_probe(struct usb_interface *, const struct usb_device_id *);
+extern int usbnet_suspend (struct usb_interface *, pm_message_t );
+extern int usbnet_resume (struct usb_interface *);
+extern void usbnet_disconnect(struct usb_interface *);
+
/* we record the state for each of our queued skbs */
enum skb_state {