summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakimisu <[email protected]>2023-05-24 20:22:16 +0800
committersakimisu <[email protected]>2023-05-24 20:22:34 +0800
commita26d8b602c8db34c941f054f9a03760a408de84c (patch)
tree0d1f8d1fa379b552f70b92d34b2432fead1f0edd
parent0c36483b4090d6c0338435432d1f7279b97280ec (diff)
use usbh_hport_activate_epx to alloc rndis intin pipe
-rw-r--r--class/wireless/usbh_rndis.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/class/wireless/usbh_rndis.c b/class/wireless/usbh_rndis.c
index bb049fe1..c968a8ad 100644
--- a/class/wireless/usbh_rndis.c
+++ b/class/wireless/usbh_rndis.c
@@ -259,14 +259,7 @@ static int usbh_rndis_connect(struct usbh_hubport *hport, uint8_t intf)
#ifdef CONFIG_USBHOST_RNDIS_NOTIFY
ep_desc = &hport->config.intf[intf].altsetting[0].ep[0].ep_desc;
- ep_cfg.ep_addr = ep_desc->bEndpointAddress;
- ep_cfg.ep_type = ep_desc->bmAttributes & USB_ENDPOINT_TYPE_MASK;
- ep_cfg.ep_mps = ep_desc->wMaxPacketSize & USB_MAXPACKETSIZE_MASK;
-
- ep_cfg.ep_interval = ep_desc->bInterval;
- ep_cfg.hport = hport;
- usbh_pipe_alloc(&rndis_class->intin, &ep_cfg);
-
+ usbh_hport_activate_epx(&rndis_class->intin, hport, ep_desc);
#endif
for (uint8_t i = 0; i < hport->config.intf[intf + 1].altsetting[0].intf_desc.bNumEndpoints; i++) {
ep_desc = &hport->config.intf[intf + 1].altsetting[0].ep[i].ep_desc;