diff options
author | Benoit Goby <benoit@android.com> | 2011-12-16 20:00:38 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2012-04-09 13:57:59 -0700 |
commit | 7f141c58da4a6c8920fd6d7051b832e3dec6b877 (patch) | |
tree | 808142c7abf8c0fb082cb6e5ec85ac754a9f5bc7 /drivers/usb/gadget | |
parent | 735d20edbc1bb7fd0ff2e524168f39e9f868b268 (diff) |
usb: gadget: rndis: Fix re-binding f_rndis
f_rndis checks if rndis_string_defs[0].id is null to setup rndis
and allocate string ids when it is bound to the first configuration:
/* maybe allocate device-global string IDs */
if (rndis_string_defs[0].id == 0) {
/* ... and setup RNDIS itself */
status = rndis_init();
if (status < 0)
return status;
rndis_string_defs[0].id must be reset to 0 on unbind for rndis to be
correctly initialized on the next composite_bind.
Signed-off-by: Benoit Goby <benoit@android.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/f_rndis.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 7b1cf18df5e..f377c10b32b 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c @@ -819,6 +819,7 @@ rndis_unbind(struct usb_configuration *c, struct usb_function *f) rndis_deregister(rndis->config); rndis_exit(); + rndis_string_defs[0].id = 0; if (gadget_is_superspeed(c->cdev->gadget)) usb_free_descriptors(f->ss_descriptors); |