mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
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:
parent
ef5a8a7337
commit
5a460a150b
1 changed files with 1 additions and 2 deletions
|
@ -252,11 +252,10 @@ lan78xxreceive(Dev *ep)
|
||||||
break;
|
break;
|
||||||
if((hd & Rxerror) == 0){
|
if((hd & Rxerror) == 0){
|
||||||
if(n == BLEN(b)){
|
if(n == BLEN(b)){
|
||||||
b->wp -= 4;
|
|
||||||
etheriq(b);
|
etheriq(b);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
etheriq(copyblock(b, n - 4));
|
etheriq(copyblock(b, n));
|
||||||
}
|
}
|
||||||
b->rp = (uchar*)(((uintptr)b->rp + n + 3)&~3);
|
b->rp = (uchar*)(((uintptr)b->rp + n + 3)&~3);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue