xtensa/esp32s3: Support WPA3 on softap mode
Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
This commit is contained in:
parent
d13065468e
commit
b739b2b18a
@ -1407,6 +1407,20 @@ config ESP32S3_WIFI_STATION_SOFTAP
|
||||
|
||||
endchoice # ESP32S3 Wi-Fi mode
|
||||
|
||||
config ESP_WIFI_ENABLE_SAE_PK
|
||||
bool "Enable SAE-PK"
|
||||
default y
|
||||
---help---
|
||||
Select this option to enable SAE-PK
|
||||
|
||||
config ESP_WIFI_ENABLE_WPA3_OWE_STA
|
||||
bool "Enable OWE STA"
|
||||
default y
|
||||
---help---
|
||||
Select this option to allow the device to establish OWE connection with eligible AP's.
|
||||
PMF (Protected Management Frames) is a prerequisite feature for a WPA3 connection, it needs to be
|
||||
explicitly configured before attempting connection. Please refer to the Wi-Fi Driver API Guide for details.
|
||||
|
||||
config ESP32S3_WIFI_STATIC_RXBUF_NUM
|
||||
int "Wi-Fi static RX buffer number"
|
||||
default 10
|
||||
|
@ -191,7 +191,7 @@ endif
|
||||
|
||||
ESP_HAL_3RDPARTY_REPO = esp-hal-3rdparty
|
||||
ifndef ESP_HAL_3RDPARTY_VERSION
|
||||
ESP_HAL_3RDPARTY_VERSION = 22804823777dbbb7f43925b7729b3a32331aa7cd
|
||||
ESP_HAL_3RDPARTY_VERSION = 72cebefc6238637ae0a0ec6641fa4e2a0faa4901
|
||||
endif
|
||||
|
||||
ifndef ESP_HAL_3RDPARTY_URL
|
||||
|
@ -87,6 +87,20 @@ CHIP_CSRCS += platform.c
|
||||
CHIP_CSRCS += sha1.c
|
||||
CHIP_CSRCS += sha256.c
|
||||
CHIP_CSRCS += sha512.c
|
||||
CHIP_CSRCS += pk.c
|
||||
CHIP_CSRCS += pk_wrap.c
|
||||
CHIP_CSRCS += pkparse.c
|
||||
CHIP_CSRCS += ecdsa.c
|
||||
CHIP_CSRCS += asn1parse.c
|
||||
CHIP_CSRCS += asn1write.c
|
||||
CHIP_CSRCS += rsa.c
|
||||
CHIP_CSRCS += md5.c
|
||||
CHIP_CSRCS += oid.c
|
||||
CHIP_CSRCS += pem.c
|
||||
CHIP_CSRCS += hmac_drbg.c
|
||||
CHIP_CSRCS += hash_info.c
|
||||
CHIP_CSRCS += rsa_alt_helpers.c
|
||||
CHIP_CSRCS += ecdh.c
|
||||
|
||||
VPATH += chip$(DELIM)$(ESP_HAL_3RDPARTY_REPO)$(DELIM)components$(DELIM)mbedtls$(DELIM)port
|
||||
|
||||
@ -113,6 +127,16 @@ CFLAGS += $(DEFINE_PREFIX)ESP_SUPPLICANT
|
||||
CFLAGS += $(DEFINE_PREFIX)ESPRESSIF_USE
|
||||
CFLAGS += $(DEFINE_PREFIX)IEEE8021X_EAPOL
|
||||
CFLAGS += $(DEFINE_PREFIX)USE_WPA2_TASK
|
||||
CFLAGS += $(DEFINE_PREFIX)CONFIG_SHA256
|
||||
CFLAGS += $(DEFINE_PREFIX)CONFIG_SAE
|
||||
|
||||
ifeq ($(CONFIG_ESP_WIFI_ENABLE_SAE_PK),y)
|
||||
CFLAGS += $(DEFINE_PREFIX)CONFIG_SAE_PK
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA),y)
|
||||
CFLAGS += $(DEFINE_PREFIX)CONFIG_OWE_STA
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ESP_WIFI_GCMP_SUPPORT),y)
|
||||
CFLAGS += $(DEFINE_PREFIX)CONFIG_GCMP
|
||||
@ -131,6 +155,7 @@ INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)
|
||||
|
||||
CHIP_CSRCS += ap_config.c
|
||||
CHIP_CSRCS += ieee802_11.c
|
||||
CHIP_CSRCS += comeback_token.c
|
||||
CHIP_CSRCS += pmksa_cache_auth.c
|
||||
CHIP_CSRCS += sta_info.c
|
||||
CHIP_CSRCS += wpa_auth_ie.c
|
||||
@ -143,6 +168,10 @@ INCLUDES += $(INCDIR_PREFIX)$(ARCH_SRCDIR)$(DELIM)$(WIFI_WPA_SUPPLICANT)$(DELIM)
|
||||
CHIP_CSRCS += dragonfly.c
|
||||
CHIP_CSRCS += sae.c
|
||||
CHIP_CSRCS += wpa_common.c
|
||||
CHIP_CSRCS += sae_pk.c
|
||||
CHIP_CSRCS += bss.c
|
||||
CHIP_CSRCS += scan.c
|
||||
CHIP_CSRCS += ieee802_11_common.c
|
||||
|
||||
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)src$(DELIM)crypto
|
||||
|
||||
@ -213,6 +242,8 @@ CHIP_CSRCS += esp_wpa_main.c
|
||||
CHIP_CSRCS += esp_wpa2.c
|
||||
CHIP_CSRCS += esp_wpa3.c
|
||||
CHIP_CSRCS += esp_wpas_glue.c
|
||||
CHIP_CSRCS += esp_owe.c
|
||||
CHIP_CSRCS += esp_scan.c
|
||||
|
||||
VPATH += $(WIFI_WPA_SUPPLICANT)$(DELIM)esp_supplicant$(DELIM)src$(DELIM)crypto
|
||||
|
||||
@ -223,5 +254,6 @@ CHIP_CSRCS += crypto_mbedtls-ec.c
|
||||
CHIP_CSRCS += crypto_mbedtls-rsa.c
|
||||
CHIP_CSRCS += crypto_mbedtls.c
|
||||
CHIP_CSRCS += tls_mbedtls.c
|
||||
CHIP_CSRCS += aes-siv.c
|
||||
|
||||
endif
|
||||
|
@ -116,6 +116,8 @@
|
||||
# define DEFAULT_PS_MODE WIFI_PS_NONE
|
||||
#endif
|
||||
|
||||
#define ESP_MAX_PRIORITIES (25)
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
@ -1810,8 +1812,14 @@ static int32_t esp_task_create_pinned_to_core(void *entry,
|
||||
cpu_set_t cpuset;
|
||||
#endif
|
||||
|
||||
pid = kthread_create(name, prio, stack_depth, entry,
|
||||
(char * const *)param);
|
||||
uint32_t target_prio = prio;
|
||||
if (target_prio < ESP_MAX_PRIORITIES)
|
||||
{
|
||||
target_prio += esp_task_get_max_priority() - ESP_MAX_PRIORITIES;
|
||||
}
|
||||
|
||||
pid = kthread_create(name, target_prio, stack_depth, entry,
|
||||
(char * const *)param);
|
||||
if (pid > 0)
|
||||
{
|
||||
if (task_handle != NULL)
|
||||
@ -6476,6 +6484,13 @@ int esp_wifi_softap_auth(struct iwreq *iwr, bool set)
|
||||
wifi_cfg.ap.authmode = WIFI_AUTH_WPA2_PSK;
|
||||
break;
|
||||
|
||||
case IW_AUTH_WPA_VERSION_WPA3:
|
||||
wifi_cfg.ap.pmf_cfg.required = true;
|
||||
wifi_cfg.ap.pmf_cfg.capable = false;
|
||||
wifi_cfg.ap.sae_pwe_h2e = WPA3_SAE_PWE_BOTH;
|
||||
wifi_cfg.ap.authmode = WIFI_AUTH_WPA3_PSK;
|
||||
break;
|
||||
|
||||
default:
|
||||
wlerr("Invalid wpa version %" PRId32 "\n",
|
||||
iwr->u.param.value);
|
||||
|
Loading…
Reference in New Issue
Block a user