ref: 43166ed050b8eaf9205e57c6eded4807310c24b5
parent: f9b061c9bd55ca930125e3f6ef0f6cfb331bd67e
author: Arne Meyer <meyer.arne83@netcologne.de>
date: Wed Jun 5 05:22:31 EDT 2024
nusb/ether: Don't pass ethernet fcs to the network stack for smsc and lan78xx
--- a/sys/src/cmd/nusb/ether/lan78xx.c
+++ b/sys/src/cmd/nusb/ether/lan78xx.c
@@ -252,10 +252,11 @@
break;
if((hd & Rxerror) == 0){
if(n == BLEN(b)){
+ b->wr -= 4;
etheriq(b);
return 0;
}
- etheriq(copyblock(b, n));
+ etheriq(copyblock(b, n - 4));
}
b->rp = (uchar*)(((uintptr)b->rp + n + 3)&~3);
}
--- a/sys/src/cmd/nusb/ether/smsc.c
+++ b/sys/src/cmd/nusb/ether/smsc.c
@@ -228,10 +228,11 @@
break;
if((hd & Rxerror) == 0){
if(n == BLEN(b)){
+ b->wp -= 4;
etheriq(b);
return 0;
}
- etheriq(copyblock(b, n));
+ etheriq(copyblock(b, n - 4));
}
b->rp += (n + 3) & ~3;
}
--
⑨