zephyr/drivers/wifi/eswifi
Léo BRIAND cf0c2a5275 drivers: wifi: eswifi: Fix memory buffer allocation in off_read_work
When receiving data over the eswifi module, we currently read the data
first, then allocate a buffer, and finally write the data into the
buffer. The issue is that if we can't allocate the buffer, the data
that was read is lost. To fix this, we should first attempt to allocate
the buffer before reading any data. If we can't allocate the buffer, we
should not proceed with reading the data. By allocating a buffer with
the MTU size, we can read the packet, write it into the allocated buffer
and then resize by removing unused allocated buffer with
net_pkt_trim_buffer().

Signed-off-by: Léo BRIAND <leo.briand@smile.fr>
2024-08-02 18:42:53 -05:00
..
CMakeLists.txt
Kconfig.eswifi
eswifi.h
eswifi_bus_spi.c
eswifi_bus_uart.c
eswifi_core.c
eswifi_log.h
eswifi_offload.c
eswifi_offload.h
eswifi_shell.c
eswifi_socket.c drivers: wifi: eswifi: Fix memory buffer allocation in off_read_work 2024-08-02 18:42:53 -05:00
eswifi_socket_offload.c