Skip to content
Commit eb78d708 authored by Marcin Niestroj's avatar Marcin Niestroj Committed by Carles Cufí
Browse files

drivers: wifi: esp: stop using pkt->work in TX path



Usage of k_work object from within net_pkt results in undefined behavior
in case when net_pkt is deallocated (by net_pkt_unref()) before work has
been finished.

Use per socket k_work object (sock->send_work) to submit send work and
put net_pkt objects onto k_fifo (sock->tx_fifo). Add a helper function
esp_socket_queue_tx() for that, which will make sure that packets are
enqueued only when send work handler will be successfully submitted (so
that all packets are consumed/dereferenced).

Signed-off-by: default avatarMarcin Niestroj <m.niestroj@grinn-global.com>
parent b671cf72
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment