diff --git a/arch/xtensa/src/esp32/esp32_wifi_adapter.c b/arch/xtensa/src/esp32/esp32_wifi_adapter.c index e7e2190a31..54da5a4639 100644 --- a/arch/xtensa/src/esp32/esp32_wifi_adapter.c +++ b/arch/xtensa/src/esp32/esp32_wifi_adapter.c @@ -6169,7 +6169,7 @@ int esp_wifi_softap_password(struct iwreq *iwr, bool set) if (ext->alg != IW_ENCODE_ALG_NONE) { - memcpy(wifi_cfg.sta.password, pdata, len); + memcpy(wifi_cfg.ap.password, pdata, len); } if (g_softap_started) diff --git a/arch/xtensa/src/esp32s2/esp32s2_wifi_adapter.c b/arch/xtensa/src/esp32s2/esp32s2_wifi_adapter.c index 171a5ef079..49e3872b3e 100644 --- a/arch/xtensa/src/esp32s2/esp32s2_wifi_adapter.c +++ b/arch/xtensa/src/esp32s2/esp32s2_wifi_adapter.c @@ -5965,7 +5965,7 @@ int esp_wifi_softap_password(struct iwreq *iwr, bool set) if (ext->alg != IW_ENCODE_ALG_NONE) { - memcpy(wifi_cfg.sta.password, pdata, len); + memcpy(wifi_cfg.ap.password, pdata, len); } if (g_softap_started) diff --git a/arch/xtensa/src/esp32s3/esp32s3_wifi_adapter.c b/arch/xtensa/src/esp32s3/esp32s3_wifi_adapter.c index ce697ab4df..468eacaa25 100644 --- a/arch/xtensa/src/esp32s3/esp32s3_wifi_adapter.c +++ b/arch/xtensa/src/esp32s3/esp32s3_wifi_adapter.c @@ -6217,7 +6217,7 @@ int esp_wifi_softap_password(struct iwreq *iwr, bool set) if (ext->alg != IW_ENCODE_ALG_NONE) { - memcpy(wifi_cfg.sta.password, pdata, len); + memcpy(wifi_cfg.ap.password, pdata, len); } if (g_softap_started)