Commit 45fe3b8e authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

usb ethernet gadget: split RNDIS function

This is a RNDIS function driver, extracted from the all-in-one
Ethernet gadget driver.

Lightly tested ... there seems to be a pre-existing problem when
talking to Windows XP SP2, not quite sure what's up with that yet.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent da741b8c
...@@ -35,7 +35,7 @@ g_printer-objs := printer.o usbstring.o config.o \ ...@@ -35,7 +35,7 @@ g_printer-objs := printer.o usbstring.o config.o \
epautoconf.o epautoconf.o
ifeq ($(CONFIG_USB_ETH_RNDIS),y) ifeq ($(CONFIG_USB_ETH_RNDIS),y)
g_ether-objs += rndis.o g_ether-objs += f_rndis.o rndis.o
endif endif
obj-$(CONFIG_USB_ZERO) += g_zero.o obj-$(CONFIG_USB_ZERO) += g_zero.o
......
This diff is collapsed.
...@@ -34,10 +34,13 @@ ...@@ -34,10 +34,13 @@
/* /*
* This represents the USB side of an "ethernet" link, managed by a USB * This represents the USB side of an "ethernet" link, managed by a USB
* function which provides control and (maybe) framing. Two functions * function which provides control and (maybe) framing. Two functions
* in different configurations could share the same ethernet link/netdev. * in different configurations could share the same ethernet link/netdev,
* using different host interaction models.
* *
* There is currently a limitation that one instance of this function * There is a current limitation that only one instance of this link may
* may be present in any given configuration. * be present in any given configuration. When that's a problem, network
* layer facilities can be used to package multiple logical links on this
* single "physical" one.
*/ */
struct gether { struct gether {
struct usb_function func; struct usb_function func;
...@@ -107,4 +110,18 @@ static inline bool can_support_ecm(struct usb_gadget *gadget) ...@@ -107,4 +110,18 @@ static inline bool can_support_ecm(struct usb_gadget *gadget)
int geth_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]); 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 ecm_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]);
#ifdef CONFIG_USB_ETH_RNDIS
int rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN]);
#else
static inline int
rndis_bind_config(struct usb_configuration *c, u8 ethaddr[ETH_ALEN])
{
return 0;
}
#endif
#endif /* __U_ETHER_H */ #endif /* __U_ETHER_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment