diff --git a/cpu/esp32/esp-eth/esp_eth_netdev.c b/cpu/esp32/esp-eth/esp_eth_netdev.c index e9e116439d..5f3d8f7b14 100644 --- a/cpu/esp32/esp-eth/esp_eth_netdev.c +++ b/cpu/esp32/esp-eth/esp_eth_netdev.c @@ -243,7 +243,7 @@ static int _esp_eth_recv(netdev_t *netdev, void *buf, size_t len, void *info) mutex_lock(&dev->dev_lock); - uint8_t size = dev->rx_len; + int size = dev->rx_len; if (!buf && !len) { /* return the size without dropping received data */ diff --git a/cpu/esp32/esp-eth/esp_eth_netdev.h b/cpu/esp32/esp-eth/esp_eth_netdev.h index 8b6366786d..0cb2254081 100644 --- a/cpu/esp32/esp-eth/esp_eth_netdev.h +++ b/cpu/esp32/esp-eth/esp_eth_netdev.h @@ -37,11 +37,11 @@ typedef struct { netdev_t netdev; /**< netdev parent struct */ - uint8_t rx_len; /**< number of bytes received */ - uint8_t rx_buf[ETHERNET_DATA_LEN]; /**< receive buffer */ + uint16_t rx_len; /**< number of bytes received */ + uint16_t tx_len; /**< number of bytes in transmit buffer */ - uint8_t tx_len; /**< number of bytes in transmit buffer */ - uint8_t tx_buf[ETHERNET_DATA_LEN]; /**< transmit buffer */ + uint8_t rx_buf[ETHERNET_DATA_LEN]; /**< receive buffer */ + uint8_t tx_buf[ETHERNET_DATA_LEN]; /**< transmit buffer */ uint32_t event; /**< received event */ bool link_up; /**< indicates whether link is up */