On further review this returns the wrong packet length from the driver.
It may not be noticed since protocols will take care of it. Fix it by
subtracting the header length from the packet length returned.
Signed-off-by: Simon Glass <sjg@chromium.org>
}
*packetp = ptr + sizeof(packet_len);
- return packet_len;
+ return packet_len - 4;
err:
usb_ether_advance_rxbuf(ueth, -1);
{
struct smsc95xx_private *priv = dev_get_priv(dev);
- packet_len = ALIGN(packet_len, 4);
+ packet_len = ALIGN(packet_len + sizeof(u32), 4);
usb_ether_advance_rxbuf(&priv->ueth, sizeof(u32) + packet_len);
return 0;