summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/cmd/nusb/ether/asix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/src/cmd/nusb/ether/asix.c b/sys/src/cmd/nusb/ether/asix.c
index 2b8f507ea..4bef7121e 100644
--- a/sys/src/cmd/nusb/ether/asix.c
+++ b/sys/src/cmd/nusb/ether/asix.c
@@ -242,9 +242,12 @@ asixread(Dev *ep, uchar *p, int plen)
static void
asixwrite(Dev *ep, uchar *p, int n)
{
+ uint hd;
+
if(n > sizeof(bout)-8)
n = sizeof(bout)-8;
- PUT4(bout, n | ~(n<<16));
+ hd = n | (n<<16)^0xFFFF0000;
+ PUT4(bout, hd);
memmove(bout+4, p, n);
n += 4;
if((n % ep->maxpkt) == 0){