diff options
-rw-r--r-- | drivers/usb/gadget/ether.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index c3d8e5c5bf28..9c4422ac9de4 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -2338,6 +2338,9 @@ autoconf_fail: | |||
2338 | hs_subset_descriptors(); | 2338 | hs_subset_descriptors(); |
2339 | } | 2339 | } |
2340 | 2340 | ||
2341 | device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; | ||
2342 | usb_gadget_set_selfpowered (gadget); | ||
2343 | |||
2341 | /* For now RNDIS is always a second config */ | 2344 | /* For now RNDIS is always a second config */ |
2342 | if (rndis) | 2345 | if (rndis) |
2343 | device_desc.bNumConfigurations = 2; | 2346 | device_desc.bNumConfigurations = 2; |
@@ -2361,9 +2364,6 @@ autoconf_fail: | |||
2361 | #endif | 2364 | #endif |
2362 | #endif /* DUALSPEED */ | 2365 | #endif /* DUALSPEED */ |
2363 | 2366 | ||
2364 | device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; | ||
2365 | usb_gadget_set_selfpowered (gadget); | ||
2366 | |||
2367 | if (gadget->is_otg) { | 2367 | if (gadget->is_otg) { |
2368 | otg_descriptor.bmAttributes |= USB_OTG_HNP, | 2368 | otg_descriptor.bmAttributes |= USB_OTG_HNP, |
2369 | eth_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP; | 2369 | eth_config.bmAttributes |= USB_CONFIG_ATT_WAKEUP; |