16 #include <linux/kernel.h>
18 #if defined USB_ETH_RNDIS
21 #ifdef CONFIG_USB_ETH_RNDIS
22 # define USB_ETH_RNDIS y
63 #define DRIVER_DESC "Ethernet Gadget"
64 #define DRIVER_VERSION "Memorial Day 2008"
67 #define PREFIX "RNDIS/"
85 static inline bool has_rndis(
void)
122 #define CDC_VENDOR_NUM 0x0525
123 #define CDC_PRODUCT_NUM 0xa4a1
136 #define SIMPLE_VENDOR_NUM 0x049f
137 #define SIMPLE_PRODUCT_NUM 0x505a
144 #define RNDIS_VENDOR_NUM 0x0525
145 #define RNDIS_PRODUCT_NUM 0xa4a2
148 #define EEM_VENDOR_NUM 0x1d6b
149 #define EEM_PRODUCT_NUM 0x0102
154 .bLength =
sizeof device_desc,
160 .bDeviceSubClass = 0,
161 .bDeviceProtocol = 0,
174 .bNumConfigurations = 1,
178 .bLength =
sizeof otg_descriptor,
201 .strings = strings_dev,
222 if (gadget_is_otg(c->
cdev->gadget)) {
227 return rndis_bind_config(c, hostaddr);
232 .bConfigurationValue = 2,
239 #ifdef CONFIG_USB_ETH_EEM
240 static bool use_eem = 1;
254 if (gadget_is_otg(c->
cdev->gadget)) {
261 else if (can_support_ecm(c->
cdev->gadget))
269 .bConfigurationValue = 1,
289 eth_config_driver.
label =
"CDC Ethernet (EEM)";
292 }
else if (can_support_ecm(cdev->
gadget)) {
294 eth_config_driver.
label =
"CDC Ethernet (ECM)";
297 eth_config_driver.
label =
"CDC Subset/SAFE";
354 .strings = dev_strings,
370 static void __exit cleanup(
void)