From 9b39e9ddedeef48569f8aac60a7b4c1fbb127c7d Mon Sep 17 00:00:00 2001 From: Brian Niebuhr Date: Fri, 14 Aug 2009 10:04:22 -0500 Subject: 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 Cc: David Brownell Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/u_ether.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'drivers/usb/gadget/u_ether.h') diff --git a/drivers/usb/gadget/u_ether.h b/drivers/usb/gadget/u_ether.h index 0d1f7ae..91b39ff 100644 --- a/drivers/usb/gadget/u_ether.h +++ b/drivers/usb/gadget/u_ether.h @@ -60,12 +60,13 @@ struct gether { u16 cdc_filter; - /* hooks for added framing, as needed for RNDIS and EEM. - * we currently don't support multiple frames per SKB. - */ + /* hooks for added framing, as needed for RNDIS and EEM. */ u32 header_len; - struct sk_buff *(*wrap)(struct sk_buff *skb); - int (*unwrap)(struct sk_buff *skb); + struct sk_buff *(*wrap)(struct gether *port, + struct sk_buff *skb); + int (*unwrap)(struct gether *port, + struct sk_buff *skb, + struct sk_buff_head *list); /* called on network open/close */ void (*open)(struct gether *); @@ -109,6 +110,7 @@ static inline bool can_support_ecm(struct usb_gadget *gadget) /* each configuration may bind one instance of an ethernet link */ int geth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]); int ecm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]); +int eem_bind_config(struct usb_configuration *c); #ifdef CONFIG_USB_ETH_RNDIS -- cgit v1.1