usb: gadget: fastboot: use correct max packet size

Change to use wMaxPacketSize of current speed EP desc for request
length wrap up.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
Li Jun 2021-01-25 21:43:59 +08:00 committed by Marek Vasut
parent 54b22f409c
commit 27c9141b11
1 changed files with 1 additions and 1 deletions

View File

@ -427,7 +427,7 @@ static unsigned int rx_bytes_expected(struct usb_ep *ep)
{
int rx_remain = fastboot_data_remaining();
unsigned int rem;
unsigned int maxpacket = ep->maxpacket;
unsigned int maxpacket = usb_endpoint_maxp(ep->desc);
if (rx_remain <= 0)
return 0;