nusb/ether: fix asixwrite()

invert/shift in wrong order causing low 16 bits to be all ffff...
This commit is contained in:
cinap_lenrek 2013-06-18 02:00:05 +02:00
parent b5659c0977
commit 1a6d523d26

View file

@ -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){