Lines Matching +full:no +full:- +full:ether +full:- +full:link
1 // SPDX-License-Identifier: GPL-2.0+
3 * ether.c -- Ethernet gadget driver, with CDC and non-CDC options
5 * Copyright (C) 2003-2005,2008 David Brownell
6 * Copyright (C) 2003-2004 Robert Schwebel, Benedikt Spranger
26 * Ethernet gadget driver -- with CDC and non-CDC options
27 * Builds on hardware support for a full duplex link.
32 * this USB-IF standard as its open-systems interoperability solution;
36 * TLA-soup. "CDC ACM" (Abstract Control Model) is for modems, and a new
40 * implement a "minimalist" vendor-agnostic CDC core: same framing, but
41 * link-level setup only requires activating the configuration. Only the
42 * endpoint descriptors, and product/vendor IDs, are relevant; no control
50 * those MS-Windows drivers. Those added descriptors make it resemble a
75 * that returns true; most hardware has no problems with CDC ECM, that's
76 * a good default. Previous versions of this driver had no default; this
103 /*-------------------------------------------------------------------------*/
108 /* DO NOT REUSE THESE IDs with a protocol-incompatible driver!! Ever!!
109 * Instead: allocate your own, using normal USB-IF procedures.
116 #define CDC_PRODUCT_NUM 0xa4a1 /* Linux-USB Ethernet Gadget */
119 * ARM Linux has used for ethernet-over-usb, both with sa1100 and
120 * with pxa250. We're protocol-compatible, if the host-side drivers
122 * drivers that need to hard-wire endpoint numbers have a hook.
124 * The protocol is a minimal subset of CDC Ether, which works on any bulk
126 * RNDIS (like SA-1100, with no interrupt endpoint, or anything that
127 * doesn't handle control-OUT).
135 * the non-RNDIS configuration.
144 /*-------------------------------------------------------------------------*/
166 /* NO SERIAL NUMBER */
180 .language = 0x0409, /* en-us */
201 /*-------------------------------------------------------------------------*/
212 /* FIXME alloc iConfiguration string, set it in c->strings */ in rndis_do_config()
214 if (gadget_is_otg(c->cdev->gadget)) { in rndis_do_config()
215 c->descriptors = otg_desc; in rndis_do_config()
216 c->bmAttributes |= USB_CONFIG_ATT_WAKEUP; in rndis_do_config()
237 /*-------------------------------------------------------------------------*/
254 /* FIXME alloc iConfiguration string, set it in c->strings */ in eth_do_config()
256 if (gadget_is_otg(c->cdev->gadget)) { in eth_do_config()
257 c->descriptors = otg_desc; in eth_do_config()
258 c->bmAttributes |= USB_CONFIG_ATT_WAKEUP; in eth_do_config()
271 } else if (can_support_ecm(c->cdev->gadget)) { in eth_do_config()
302 /*-------------------------------------------------------------------------*/
306 struct usb_gadget *gadget = cdev->gadget; in eth_bind()
322 net = eem_opts->net; in eth_bind()
336 net = ecm_opts->net; in eth_bind()
349 net = geth_opts->net; in eth_bind()
366 /* RNDIS plus ECM-or-Subset */ in eth_bind()
367 gether_set_gadget(net, cdev->gadget); in eth_bind()
373 eem_opts->bound = true; in eth_bind()
375 ecm_opts->bound = true; in eth_bind()
377 geth_opts->bound = true; in eth_bind()
407 status = -ENOMEM; in eth_bind()
428 dev_info(&gadget->dev, "%s, version: " DRIVER_VERSION "\n", in eth_bind()
458 } else if (can_support_ecm(cdev->gadget)) { in eth_unbind()