Skip to content

Commit

Permalink
ethos: adapt for netdev2 parameter type change
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Aug 2, 2016
1 parent 78bc5b2 commit 5cce180
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/ethos/ethos.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void ethos_send_frame(ethos_t *dev, const uint8_t *data, size_t len, unsigned fr
}
}

static int _send(netdev2_t *netdev, const struct iovec *vector, int count)
static int _send(netdev2_t *netdev, const struct iovec *vector, unsigned count)
{
ethos_t * dev = (ethos_t *) netdev;
(void)dev;
Expand Down Expand Up @@ -292,7 +292,7 @@ static void _get_mac_addr(netdev2_t *encdev, uint8_t* buf)
memcpy(buf, dev->mac_addr, 6);
}

static int _recv(netdev2_t *netdev, char* buf, int len, void* info)
static int _recv(netdev2_t *netdev, void *buf, size_t len, void* info)
{
(void) info;
ethos_t * dev = (ethos_t *) netdev;
Expand All @@ -303,15 +303,15 @@ static int _recv(netdev2_t *netdev, char* buf, int len, void* info)
return -1;
}

len = (int)dev->last_framesize;
len = dev->last_framesize;
dev->last_framesize = 0;

if ((tsrb_get(&dev->inbuf, buf, len) != len)) {
DEBUG("ethos _recv(): inbuf doesn't contain enough bytes.");
return -1;
}

return len;
return (int)len;
}
else {
return dev->last_framesize;
Expand Down

0 comments on commit 5cce180

Please sign in to comment.