mirror of
https://github.com/apache/nuttx.git
synced 2026-10-03 20:27:53 +00:00
set_intr_wrapper() allocates a new intr_handle_data_t from the kernel heap each time the Wi-Fi driver calls it, and the driver calls it on every esp_wifi_start() -- twice per start on esp32s3 -- not only the first time. clear_intr_wrapper() is a no-op, so the IRQ still holds the handle from the previous start: esp_set_handle() refuses to replace it with -EINVAL, the return value is ignored, and the new block is lost. Any application that stops and restarts Wi-Fi to save power therefore loses a few bytes of kernel heap per cycle, without bound. Look up the vector descriptor first, then reuse the handle already registered for the IRQ and only allocate and register one when there is none. A failed descriptor lookup no longer touches the registered handle. The same code is present in the esp32, esp32s2, esp32s3, esp32c3 and esp32c6 Wi-Fi adapters; all five are fixed the same way. Signed-off-by: Felipe Moura <moura.fmo@gmail.com> Assisted-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| include | ||
| src | ||
| CMakeLists.txt | ||
| Kconfig | ||