From 5cce1800bf5e099f604eb814af994e33e36f7935 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 2 Aug 2016 17:01:00 +0200 Subject: [PATCH] ethos: adapt for netdev2 parameter type change --- drivers/ethos/ethos.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ethos/ethos.c b/drivers/ethos/ethos.c index 28bcd1beedf26..f63fb70a84dbc 100644 --- a/drivers/ethos/ethos.c +++ b/drivers/ethos/ethos.c @@ -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; @@ -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; @@ -303,7 +303,7 @@ 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)) { @@ -311,7 +311,7 @@ static int _recv(netdev2_t *netdev, char* buf, int len, void* info) return -1; } - return len; + return (int)len; } else { return dev->last_framesize;