driver: wifi: esp32: fix send data for AP_STA mode
Fixes the check for connected interface if CONFIG_ESP32_WIFI_AP_STA_MODE=y (different data objects for STA (esp32_data) and AP (esp32_ap_sta_data)). As the correct data object is linked to device object, we can check for ESP32_STA_CONNECTED or ESP32_AP_CONNECTED in dev->data. This fixes AP mode in samples/net/wifi/apsta_mode if STA WIFI_SSID/WIFI_PSK are invalid and no STA connection can be established before (samples/net/wifi/apsta_mode/src/main.c#L28-L29) for all ESP32 derivates. Fixes false check from https://github.com/zephyrproject-rtos/zephyr/commit/183b74c558ed3ed34636fc29940b2fda048a382a Signed-off-by:Gregor Copoix <gregor.copoix@ithinx.io>
Loading
Please sign in to comment