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:
parent
c06172925a
commit
078c47d79c
@ -298,7 +298,7 @@ static int _esp_wifi_recv(netdev_t *netdev, void *buf, size_t len, void *info)
|
|||||||
|
|
||||||
mutex_lock(&dev->dev_lock);
|
mutex_lock(&dev->dev_lock);
|
||||||
|
|
||||||
uint8_t size = dev->rx_len;
|
uint16_t size = dev->rx_len;
|
||||||
|
|
||||||
if (!buf && !len) {
|
if (!buf && !len) {
|
||||||
/* return the size without dropping received data */
|
/* return the size without dropping received data */
|
||||||
|
|||||||
@ -37,10 +37,10 @@ typedef struct
|
|||||||
{
|
{
|
||||||
netdev_t netdev; /**< netdev parent 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 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 */
|
uint8_t tx_buf[ETHERNET_DATA_LEN]; /**< transmit buffer */
|
||||||
|
|
||||||
uint32_t event; /**< received event */
|
uint32_t event; /**< received event */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user