diff --git a/cpu/esp32/esp-eth/esp_eth_netdev.c b/cpu/esp32/esp-eth/esp_eth_netdev.c index d8cacc7ef4b99567c01bd4bfff7fbc6cc23c0887..bf641a77779d86e03ab4530847453a22b5b61875 100644 --- a/cpu/esp32/esp-eth/esp_eth_netdev.c +++ b/cpu/esp32/esp-eth/esp_eth_netdev.c @@ -95,7 +95,7 @@ static esp_err_t IRAM_ATTR _eth_input_callback(void *buffer, uint16_t len, void DEBUG("%s: buf=%p len=%d eb=%p\n", __func__, buffer, len, eb); CHECK_PARAM_RET (buffer != NULL, -EINVAL); - CHECK_PARAM_RET (len <= ETHERNET_DATA_LEN, -EINVAL); + CHECK_PARAM_RET (len <= ETHERNET_MAX_LEN, -EINVAL); mutex_lock(&_esp_eth_dev.dev_lock); @@ -198,7 +198,7 @@ static int _esp_eth_send(netdev_t *netdev, const iolist_t *iolist) /* load packet data into TX buffer */ for (const iolist_t *iol = iolist; iol; iol = iol->iol_next) { - if (dev->tx_len + iol->iol_len > ETHERNET_DATA_LEN) { + if (dev->tx_len + iol->iol_len > ETHERNET_MAX_LEN) { mutex_unlock(&dev->dev_lock); return -EOVERFLOW; } diff --git a/cpu/esp32/esp-eth/esp_eth_netdev.h b/cpu/esp32/esp-eth/esp_eth_netdev.h index 0cb2254081d5275d4927f704f5e6ea61b8e05b64..71fb8a090dfee053a964e8e8c75fcf24a356eef0 100644 --- a/cpu/esp32/esp-eth/esp_eth_netdev.h +++ b/cpu/esp32/esp-eth/esp_eth_netdev.h @@ -40,8 +40,8 @@ typedef struct uint16_t rx_len; /**< number of bytes received */ uint16_t tx_len; /**< number of bytes in transmit buffer */ - uint8_t rx_buf[ETHERNET_DATA_LEN]; /**< receive buffer */ - uint8_t tx_buf[ETHERNET_DATA_LEN]; /**< transmit buffer */ + uint8_t rx_buf[ETHERNET_MAX_LEN]; /**< receive buffer */ + uint8_t tx_buf[ETHERNET_MAX_LEN]; /**< transmit buffer */ uint32_t event; /**< received event */ bool link_up; /**< indicates whether link is up */ diff --git a/cpu/esp32/esp-wifi/esp_wifi_netdev.c b/cpu/esp32/esp-wifi/esp_wifi_netdev.c index f2b90de92a803f8cdc9803ea1bed501b10697900..7ae62ada7282feea18bd9616f7b4ea0b87aae2f0 100644 --- a/cpu/esp32/esp-wifi/esp_wifi_netdev.c +++ b/cpu/esp32/esp-wifi/esp_wifi_netdev.c @@ -79,7 +79,7 @@ esp_err_t _esp_wifi_rx_cb(void *buffer, uint16_t len, void *eb) DEBUG("%s: buf=%p len=%d eb=%p\n", __func__, buffer, len, eb); - if ((buffer == NULL) || (len >= ETHERNET_DATA_LEN)) { + if ((buffer == NULL) || (len >= ETHERNET_MAX_LEN)) { if (eb != NULL) { esp_wifi_internal_free_rx_buffer(eb); } @@ -298,7 +298,7 @@ static int _esp_wifi_send(netdev_t *netdev, const iolist_t *iolist) /* load packet data into TX buffer */ for (const iolist_t *iol = iolist; iol; iol = iol->iol_next) { - if (dev->tx_len + iol->iol_len > ETHERNET_DATA_LEN) { + if (dev->tx_len + iol->iol_len > ETHERNET_MAX_LEN) { mutex_unlock(&dev->dev_lock); return -EOVERFLOW; } diff --git a/cpu/esp32/esp-wifi/esp_wifi_netdev.h b/cpu/esp32/esp-wifi/esp_wifi_netdev.h index 4a562cfeb0f89297ec98113f87b7375dfb74bca2..4d39bb14a47e5b10de2a652747a178fdad4a920d 100644 --- a/cpu/esp32/esp-wifi/esp_wifi_netdev.h +++ b/cpu/esp32/esp-wifi/esp_wifi_netdev.h @@ -38,10 +38,10 @@ typedef struct netdev_t netdev; /**< netdev parent struct */ uint16_t rx_len; /**< number of bytes received */ - uint8_t rx_buf[ETHERNET_DATA_LEN]; /**< receive buffer */ + uint8_t rx_buf[ETHERNET_MAX_LEN]; /**< receive buffer */ uint16_t tx_len; /**< number of bytes in transmit buffer */ - uint8_t tx_buf[ETHERNET_DATA_LEN]; /**< transmit buffer */ + uint8_t tx_buf[ETHERNET_MAX_LEN]; /**< transmit buffer */ uint32_t event; /**< received event */ bool connected; /**< indicates whether connected to AP */