From 5c1168dbc508282f7717a4472477d52d64403060 Mon Sep 17 00:00:00 2001 From: Yauheni Kaliuta Date: Wed, 8 Dec 2010 13:12:04 +0200 Subject: usb: gadget: u_ether: prepare for NCM NCM is a Network Control Model, subclass of USB CDC class, specification is available at http://www.usb.org/developers/devclass_docs This patch makes possible for u_ether to use multiply of wMaxPacketSize predefined size transfers without ZLP (Zero Length Packet), required by NCM spec. Signed-off-by: Yauheni Kaliuta Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/u_ether.h | 4 ++++ 1 file changed, 4 insertions(+) (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 3c8c0c9..7521970 100644 --- a/drivers/usb/gadget/u_ether.h +++ b/drivers/usb/gadget/u_ether.h @@ -62,6 +62,10 @@ struct gether { /* hooks for added framing, as needed for RNDIS and EEM. */ u32 header_len; + /* NCM requires fixed size bundles */ + bool is_fixed; + u32 fixed_out_len; + u32 fixed_in_len; struct sk_buff *(*wrap)(struct gether *port, struct sk_buff *skb); int (*unwrap)(struct gether *port, -- cgit v1.1 From 9f6ce4240a2bf456402c15c06768059e5973f28c Mon Sep 17 00:00:00 2001 From: Yauheni Kaliuta Date: Wed, 8 Dec 2010 13:12:05 +0200 Subject: usb: gadget: f_ncm.c added Initial submittion of NCM link function driver. The driver's logic is based on f_ecm driver and does not use most of the NCM advantages like frame grouping and alignment. Signed-off-by: Yauheni Kaliuta Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/u_ether.h | 1 + 1 file changed, 1 insertion(+) (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 7521970..b56e1e7 100644 --- a/drivers/usb/gadget/u_ether.h +++ b/drivers/usb/gadget/u_ether.h @@ -107,6 +107,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 ncm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]); int eem_bind_config(struct usb_configuration *c); #ifdef USB_ETH_RNDIS -- cgit v1.1