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: Marcin Niestroj <m.niestroj@grinn-global.com> |
||
|---|---|---|
| .. | ||
| esp32 | ||
| esp_at | ||
| eswifi | ||
| simplelink | ||
| winc1500 | ||
| CMakeLists.txt | ||
| Kconfig | ||