diff options
Diffstat (limited to 'drivers/usb/gadget/ether.c')
-rw-r--r-- | drivers/usb/gadget/ether.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 3f783cbdc7c3..a766c29c3ec9 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -94,8 +94,9 @@ static const char driver_desc [] = DRIVER_DESC; | |||
94 | #ifdef CONFIG_USB_ETH_RNDIS | 94 | #ifdef CONFIG_USB_ETH_RNDIS |
95 | #include "rndis.h" | 95 | #include "rndis.h" |
96 | #else | 96 | #else |
97 | #define rndis_init() 0 | 97 | #define rndis_init() 0 |
98 | #define rndis_exit() do{}while(0) | 98 | #define rndis_uninit(x) do{}while(0) |
99 | #define rndis_exit() do{}while(0) | ||
99 | #endif | 100 | #endif |
100 | 101 | ||
101 | /* CDC and RNDIS support the same host-chosen outgoing packet filters. */ | 102 | /* CDC and RNDIS support the same host-chosen outgoing packet filters. */ |
@@ -395,7 +396,8 @@ static inline int BITRATE(struct usb_gadget *g) | |||
395 | #define STRING_SUBSET 8 | 396 | #define STRING_SUBSET 8 |
396 | #define STRING_RNDIS 9 | 397 | #define STRING_RNDIS 9 |
397 | 398 | ||
398 | #define USB_BUFSIZ 256 /* holds our biggest descriptor */ | 399 | /* holds our biggest descriptor (or RNDIS response) */ |
400 | #define USB_BUFSIZ 256 | ||
399 | 401 | ||
400 | /* | 402 | /* |
401 | * This device advertises one configuration, eth_config, unless RNDIS | 403 | * This device advertises one configuration, eth_config, unless RNDIS |
@@ -1124,6 +1126,7 @@ static void eth_reset_config (struct eth_dev *dev) | |||
1124 | 1126 | ||
1125 | netif_stop_queue (dev->net); | 1127 | netif_stop_queue (dev->net); |
1126 | netif_carrier_off (dev->net); | 1128 | netif_carrier_off (dev->net); |
1129 | rndis_uninit(dev->rndis_config); | ||
1127 | 1130 | ||
1128 | /* disable endpoints, forcing (synchronous) completion of | 1131 | /* disable endpoints, forcing (synchronous) completion of |
1129 | * pending i/o. then free the requests. | 1132 | * pending i/o. then free the requests. |
@@ -2565,7 +2568,7 @@ fail0: | |||
2565 | /* these set up a lot of the OIDs that RNDIS needs */ | 2568 | /* these set up a lot of the OIDs that RNDIS needs */ |
2566 | rndis_set_host_mac (dev->rndis_config, dev->host_mac); | 2569 | rndis_set_host_mac (dev->rndis_config, dev->host_mac); |
2567 | if (rndis_set_param_dev (dev->rndis_config, dev->net, | 2570 | if (rndis_set_param_dev (dev->rndis_config, dev->net, |
2568 | &dev->stats)) | 2571 | &dev->stats, &dev->cdc_filter)) |
2569 | goto fail0; | 2572 | goto fail0; |
2570 | if (rndis_set_param_vendor (dev->rndis_config, vendorID, | 2573 | if (rndis_set_param_vendor (dev->rndis_config, vendorID, |
2571 | manufacturer)) | 2574 | manufacturer)) |