nusb/ether: dont break lan78xx chip (rpi3b+)

The rpi3b+ uses different chip lan78xx.
This one does not append fcs in received frames,
so the previous change broke ethernet.
This commit is contained in:
cinap_lenrek 2025-01-03 09:24:18 +00:00
parent ef5a8a7337
commit 5a460a150b

View file

@ -252,11 +252,10 @@ lan78xxreceive(Dev *ep)
break;
if((hd & Rxerror) == 0){
if(n == BLEN(b)){
b->wp -= 4;
etheriq(b);
return 0;
}
etheriq(copyblock(b, n - 4));
etheriq(copyblock(b, n));
}
b->rp = (uchar*)(((uintptr)b->rp + n + 3)&~3);
}