aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/u_ether.h
diff options
context:
space:
mode:
authorBrian Niebuhr <bniebuhr@efjohnson.com>2009-08-14 11:04:22 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-23 09:46:35 -0400
commit9b39e9ddedeef48569f8aac60a7b4c1fbb127c7d (patch)
treed2cc583190e18fa03298e84093c3346e1646007c /drivers/usb/gadget/u_ether.h
parent877accca79b706afe5d78b9a92cf4f22919fb2b0 (diff)
USB: gadget: Add EEM gadget driver
This patch adds a CDC EEM ethernet gadget driver. CDC EEM is a newer USB ethernet specification that uses a simpler interface than the older CDC ECM. This makes CDC EEM usable by a wider set of USB hardware. By default the ethernet gadget will still use CDC ECM/Subset, but kernel configuration and/or a module parameter will allow alternative use of the CDC EEM protocol. Changes since last version: - Brought in missing RNDIS changes that caused compile error - Modified 'sentinel CRC' checking to match EEM host driver Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/u_ether.h')
-rw-r--r--drivers/usb/gadget/u_ether.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/gadget/u_ether.h b/drivers/usb/gadget/u_ether.h
index 0d1f7ae3b071..91b39ffdf6ea 100644
--- a/drivers/usb/gadget/u_ether.h
+++ b/drivers/usb/gadget/u_ether.h
@@ -60,12 +60,13 @@ struct gether {
60 60
61 u16 cdc_filter; 61 u16 cdc_filter;
62 62
63 /* hooks for added framing, as needed for RNDIS and EEM. 63 /* hooks for added framing, as needed for RNDIS and EEM. */
64 * we currently don't support multiple frames per SKB.
65 */
66 u32 header_len; 64 u32 header_len;
67 struct sk_buff *(*wrap)(struct sk_buff *skb); 65 struct sk_buff *(*wrap)(struct gether *port,
68 int (*unwrap)(struct sk_buff *skb); 66 struct sk_buff *skb);
67 int (*unwrap)(struct gether *port,
68 struct sk_buff *skb,
69 struct sk_buff_head *list);
69 70
70 /* called on network open/close */ 71 /* called on network open/close */
71 void (*open)(struct gether *); 72 void (*open)(struct gether *);
@@ -109,6 +110,7 @@ static inline bool can_support_ecm(struct usb_gadget *gadget)
109/* each configuration may bind one instance of an ethernet link */ 110/* each configuration may bind one instance of an ethernet link */
110int geth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]); 111int geth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]);
111int ecm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]); 112int ecm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]);
113int eem_bind_config(struct usb_configuration *c);
112 114
113#ifdef CONFIG_USB_ETH_RNDIS 115#ifdef CONFIG_USB_ETH_RNDIS
114 116