[PATCH] fixup! net: usb: smsc95xx: fix handling of multiple packets per urb

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Apr 5 00:18:00 PDT 2024


We need to advance the buffer with the same value that is subtracted
from the length (skb_pull).

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/net/usb/smsc95xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 291e3c2f80f7..2e085c435dbe 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -799,7 +799,7 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, void *buf, int len)
 		/* padding bytes before the next frame starts */
 		if (len) {
 			len -= align_count;
-			buf += size;
+			buf += align_count;
 		}
 	}
 
-- 
2.39.2




More information about the barebox mailing list