From aca36a17845f584ffa3a04bdee1cc4f6ffeb28f9 Mon Sep 17 00:00:00 2001 From: Filipe Cavalcanti Date: Mon, 16 Dec 2024 09:29:56 -0300 Subject: [PATCH] arch/xtensa: fix memcpy on AP password --- arch/xtensa/src/esp32/esp32_wifi_adapter.c | 2 +- arch/xtensa/src/esp32s2/esp32s2_wifi_adapter.c | 2 +- arch/xtensa/src/esp32s3/esp32s3_wifi_adapter.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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)