git: 9front

Download patch

ref: db74ee87b79a888ccef57d98c73147946aa291b6
parent: df0496ee5be19da80f993b64ca8529c790cd0bbe
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;
 	}
--