1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/esp32: fixes frame size handling in esp_wifi

The size of received and transmitted frames was stored in an uint8_t, which did not allow to process frames larger than 255 octets. However, WiFi has an MTU of 1500 octets.
This commit is contained in:
Gunar Schorcht 2019-01-13 16:51:20 +01:00 committed by Schorcht
parent c06172925a
commit 078c47d79c
2 changed files with 3 additions and 3 deletions

View File

@ -298,7 +298,7 @@ static int _esp_wifi_recv(netdev_t *netdev, void *buf, size_t len, void *info)
mutex_lock(&dev->dev_lock);
uint8_t size = dev->rx_len;
uint16_t size = dev->rx_len;
if (!buf && !len) {
/* return the size without dropping received data */

View File

@ -37,10 +37,10 @@ typedef struct
{
netdev_t netdev; /**< netdev parent struct */
uint8_t rx_len; /**< number of bytes received */
uint16_t rx_len; /**< number of bytes received */
uint8_t rx_buf[ETHERNET_DATA_LEN]; /**< receive buffer */
uint8_t tx_len; /**< number of bytes in transmit buffer */
uint16_t tx_len; /**< number of bytes in transmit buffer */
uint8_t tx_buf[ETHERNET_DATA_LEN]; /**< transmit buffer */
uint32_t event; /**< received event */