shithub: riscv

Download patch

ref: d1b6c02ac9207b4c2f661821b3e841071480f535
parent: 17da3e3ff418849d2176a2f1ea6ef8bdbea0fa4c
author: ppatience0 <ppatience0@gmail.com>
date: Wed Jun 19 17:25:08 EDT 2013

nusb/ether: fix asixread() invert/shift in wrong order

--- a/sys/src/cmd/nusb/ether/asix.c
+++ b/sys/src/cmd/nusb/ether/asix.c
@@ -225,7 +225,8 @@
 	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;
 	}
--