Since https://github.com/RIOT-OS/RIOT/pull/21012 a netdev in the new API
can return > 0 directly in netdev_driver_t::send() to indicate the
driver is naturally synchronous and has already completed the
transmission.
The adaption of lwIP to that API change contained a bug: It handled the
case after the thread is already blocked waiting for the signal that
is never going to arrive. This is now fixed.
This is directly useful for the two driver using the bhp API, but also
other drivers profit from not loosing IRQs.
The main selling point is that this paves the way for implementing
netdev_driver_t::confirm_send().
Co-authored-by: benpicco <benpicco@googlemail.com>
Co-authored-by: Erik Ekman <eekman@google.com>
* Added arch_64bit feature and added it to all packages that require 32 bit.
* hacl, wolfssl: Fixed different types between function declaration and implementation.
* lwip: Add required flag for 64 bit and bug fix in `lwip_sock`.
* micro-ecc: Workaround for GCC warning when using `__int128`.
Without initializing async_cb to NULL it might be a value != NULL,
which leads to sock->async_cb.gen() being called mistakenly in _netconn_cb.
gnrc_sock already does it with "reg->async_cb.generic = NULL;"
Otherwise if the cable is connected at boot the immediate NETDEV_EVENT_ISR
event signaling connection will not trigger the isr, and the netdev will not
clear its pending event.
This explains why the connect/rx event clash seen in "esp32/eth: Don't
overwrite queued event with RX packet" (95196fb7e40b12c7) only happened
with lwIP.
Now on my ESP32 board with Ethernet the issue was the opposite (since IDF
upgrade), the stuck connected event blocked receive from working. After
this change 95196fb7e40b12c7 can be reverted since even early events are
consumed properly.
This mostly converts switch statements from double indent style to
Linux kernel style, as required per the coding convention.
From the C compiler perspective, this is a whitespace only change.