nusb/ether: fix asixwrite()
invert/shift in wrong order causing low 16 bits to be all ffff...
This commit is contained in:
parent
b5659c0977
commit
1a6d523d26
1 changed files with 4 additions and 1 deletions
|
@ -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){
|
||||
|
|
Loading…
Reference in a new issue