FelipeMdeO opened a new pull request, #19873:
URL: https://github.com/apache/nuttx/pull/19873

   ## Summary
   
   `CONFIG_ESPRESSIF_WIFI_SOFTAP` alone does not build on RISC-V:
   
   ```
   esp_wifi_event_handler.c:105:8: error: 'g_sta_reconnect' undeclared
   ```
   
   `esp_reconnect_work_cb()` dereferences `g_sta_reconnect`, which is declared
   only under `ESP_WLAN_HAS_STA`. Since `esp_wlan_netdev.h` selects the modes
   with `#elif`, a SoftAP-only configuration leaves `ESP_WLAN_HAS_STA` undefined
   and the reference is orphaned.
   
   I introduced this myself in #19725: the guard was added to the Xtensa copy of
   the same file but not to the RISC-V one. This commit adds it, matching what
   Xtensa already does.
   
   ## Impact
   
   Any RISC-V Espressif target built as a pure SoftAP. CI does not catch it: no
   RISC-V defconfig in tree selects SoftAP-only (the two that do,
   `esp32-devkitc:softap` and `esp32s3-m5-cardputer:softap`, are Xtensa), and 
the
   only "softap" entry in `tools/ci/testlist/*.dat` is 
`esp32-c3-zero:sta_softap`,
   which is STA+AP and therefore compiles.
   
   ## Testing
   
   `esp32c6-devkitc` on current master, all three Wi-Fi modes:
   
   | Config | Mode | Before | After |
   |---|---|---|---|
   | `esp32c6-devkitc:wifi` + SoftAP | SoftAP only | fails | builds |
   | `esp32c6-devkitc:wifi` | STA | builds | builds |
   | `esp32c6-devkitc:sta_softap` | STA + SoftAP | builds | builds |
   
   `tools/checkpatch.sh -m -g` passes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to