From d1b6c02ac9207b4c2f661821b3e841071480f535 Mon Sep 17 00:00:00 2001 From: ppatience0 Date: Wed, 19 Jun 2013 21:25:08 -0400 Subject: [PATCH] nusb/ether: fix asixread() invert/shift in wrong order --- sys/src/cmd/nusb/ether/asix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/src/cmd/nusb/ether/asix.c b/sys/src/cmd/nusb/ether/asix.c index 4bef7121e..dc0158f42 100644 --- a/sys/src/cmd/nusb/ether/asix.c +++ b/sys/src/cmd/nusb/ether/asix.c @@ -225,7 +225,8 @@ asixread(Dev *ep, uchar *p, int plen) hd = GET4(bin); n = hd & 0xFFFF; m = n+4; - if((n != ~(hd>>16)) || (n < 6) || (m > nbin)){ + hd = (hd>>16) ^ 0xFFFF; + if((n != hd) || (n < 6) || (m > nbin)){ nbin = 0; return 0; }