call usbh_xxx_stop when class enumerates completely

This commit is contained in:
sakimisu
2023-05-17 20:43:23 +08:00
parent 0c21844166
commit 9172223fe6
8 changed files with 55 additions and 82 deletions

View File

@@ -395,12 +395,13 @@ static int usbh_rndis_disconnect(struct usbh_hubport *hport, uint8_t intf)
usbh_pipe_free(rndis_class->bulkout);
}
usbh_rndis_stop(rndis_class);
if (hport->config.intf[intf].devname[0] != '\0') {
USB_LOG_INFO("Unregister RNDIS Class:%s\r\n", hport->config.intf[intf].devname);
usbh_rndis_stop(rndis_class);
}
memset(rndis_class, 0, sizeof(struct usbh_rndis));
usb_free(rndis_class);
if (hport->config.intf[intf].devname[0] != '\0')
USB_LOG_INFO("Unregister RNDIS Class:%s\r\n", hport->config.intf[intf].devname);
}
return ret;