nusb/ether: fix asixread() invert/shift in wrong order
This commit is contained in:
parent
17da3e3ff4
commit
d1b6c02ac9
1 changed files with 2 additions and 1 deletions
|
@ -225,7 +225,8 @@ asixread(Dev *ep, uchar *p, int plen)
|
||||||
hd = GET4(bin);
|
hd = GET4(bin);
|
||||||
n = hd & 0xFFFF;
|
n = hd & 0xFFFF;
|
||||||
m = n+4;
|
m = n+4;
|
||||||
if((n != ~(hd>>16)) || (n < 6) || (m > nbin)){
|
hd = (hd>>16) ^ 0xFFFF;
|
||||||
|
if((n != hd) || (n < 6) || (m > nbin)){
|
||||||
nbin = 0;
|
nbin = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue