mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
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>
This commit is contained in:
parent
a8609102a4
commit
41d2bb9d98
1 changed files with 1 additions and 0 deletions
|
@ -850,6 +850,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);
|
||||
|
|
Loading…
Reference in a new issue