From cccae3cabf47d6efe1f6ac3b0e1383493af5586d Mon Sep 17 00:00:00 2001 From: Erik Olof Gunnar Andersson Date: Wed, 9 Oct 2024 21:45:25 +0200 Subject: [PATCH] Enable WiFi 802.11k 802.11v (#365) --- components/connect/connect.c | 11 ++++++++++- sdkconfig.defaults | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/components/connect/connect.c b/components/connect/connect.c index 0edbdd1a5..cbc3a1131 100644 --- a/components/connect/connect.c +++ b/components/connect/connect.c @@ -161,7 +161,16 @@ esp_netif_t * wifi_init_sta(const char * wifi_ssid, const char * wifi_pass) .sta = { .threshold.authmode = authmode, - }, + .btm_enabled = 1, + .rm_enabled = 1, + .scan_method = WIFI_ALL_CHANNEL_SCAN, + .sort_method = WIFI_CONNECT_AP_BY_SIGNAL, + .pmf_cfg = + { + .capable = true, + .required = false + }, + }, }; strncpy((char *) wifi_sta_config.sta.ssid, wifi_ssid, sizeof(wifi_sta_config.sta.ssid)); diff --git a/sdkconfig.defaults b/sdkconfig.defaults index dc9eb21cc..63d09ca1c 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -8,4 +8,5 @@ CONFIG_ESPTOOLPY_FLASHSIZE="16MB" CONFIG_HTTPD_WS_SUPPORT=y CONFIG_SPIFFS_OBJ_NAME_LEN=64 CONFIG_HTTPD_MAX_URI_LEN=2048 -CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y \ No newline at end of file +CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP_WIFI_11KV_SUPPORT=y