summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2024-04-19 13:03:54 +0800
committersakumisu <[email protected]>2024-04-19 13:03:54 +0800
commit017eb5560d4cf7342f250d7ad6ac862d57cef800 (patch)
treeeaa5168311a2b1f5213f591acc059e1f27ebb517
parentb97fc903c0873541a2519bf127ecf06c0c437c9e (diff)
fix missing busid
-rw-r--r--class/hub/usbh_hub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/class/hub/usbh_hub.c b/class/hub/usbh_hub.c
index cf2b1ab8..55a1e29d 100644
--- a/class/hub/usbh_hub.c
+++ b/class/hub/usbh_hub.c
@@ -91,7 +91,7 @@ static int _usbh_hub_get_hub_descriptor(struct usbh_hub *hub, uint8_t *buffer)
if (ret < 0) {
return ret;
}
- memcpy(buffer, g_hub_buf, USB_SIZEOF_HUB_DESC);
+ memcpy(buffer, g_hub_buf[hub->bus->busid], USB_SIZEOF_HUB_DESC);
return ret;
}
#if 0
@@ -108,11 +108,11 @@ static int _usbh_hub_get_status(struct usbh_hub *hub, uint8_t *buffer)
setup->wIndex = 0;
setup->wLength = 2;
- ret = usbh_control_transfer(hub->parent, setup, g_hub_buf);
+ ret = usbh_control_transfer(hub->parent, setup, g_hub_buf[hub->bus->busid]);
if (ret < 0) {
return ret;
}
- memcpy(buffer, g_hub_buf, 2);
+ memcpy(buffer, g_hub_buf[hub->bus->busid], 2);
return ret;
}
#endif