diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld index ba5d8c4537..73683b557a 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld @@ -202,7 +202,7 @@ pm_beacon_offset_add_loss_counter = 0x400030a8; pm_beacon_offset_deinit = 0x400030b4; /*pm_get_tbtt_count = 0x400030b8;*/ pm_coex_schm_overall_period_get = 0x400030bc; -pm_coex_pwr_update = 0x400030c0; +//pm_coex_pwr_update = 0x400030c0; /* Data (.data, .bss, .rodata) */ s_pm_beacon_offset_ptr = 0x3fcdfa64; s_pm_beacon_offset_config_ptr = 0x3fcdfa60; diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 08c1d4a7dd..876e8c029c 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -528,7 +528,7 @@ pm_mac_sleep = 0x40001b80; pm_enable_active_timer = 0x40001b84; pm_enable_sleep_delay_timer = 0x40001b88; pm_local_tsf_process = 0x40001b8c; -pm_set_beacon_filter = 0x40001b90; +//pm_set_beacon_filter = 0x40001b90; /*pm_is_in_wifi_slice_threshold = 0x40001b94;*/ pm_is_waked = 0x40001b98; /*pm_keep_alive = 0x40001b9c;*/ diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index 80b1445ae2..1220dcdc33 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -717,7 +717,7 @@ pm_mac_sleep = 0x4000165c; pm_enable_active_timer = 0x40001660; pm_enable_sleep_delay_timer = 0x40001664; pm_local_tsf_process = 0x40001668; -pm_set_beacon_filter = 0x4000166c; +//pm_set_beacon_filter = 0x4000166c; /*pm_is_in_wifi_slice_threshold = 0x40001670;*/ pm_is_waked = 0x40001674; /*pm_keep_alive = 0x40001678;*/ diff --git a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld index 69174a6c87..e034f31e80 100644 --- a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld +++ b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld @@ -113,7 +113,7 @@ pm_mac_sleep = 0x40000d5c; pm_enable_active_timer = 0x40000d60; pm_enable_sleep_delay_timer = 0x40000d64; pm_local_tsf_process = 0x40000d68; -pm_set_beacon_filter = 0x40000d6c; +//pm_set_beacon_filter = 0x40000d6c; /*pm_is_in_wifi_slice_threshold = 0x40000d70;*/ pm_is_waked = 0x40000d74; /*pm_keep_alive = 0x40000d78;*/ @@ -156,9 +156,9 @@ pm_twt_disallow_tx = 0x40000e08; pm_clear_wakeup_signal = 0x40000e0c; /*pm_mac_disable_tsf_tbtt_soc_wakeup = 0x40000e10; pm_mac_disable_tsf_tbtt_modem_wakeup = 0x40000e14; -pm_mac_enable_tsf_tbtt_soc_wakeup = 0x40000e18; -pm_mac_enable_tsf_tbtt_modem_wakeup = 0x40000e1c; -pm_mac_modem_params_rt_update = 0x40000e20;*/ +//pm_mac_enable_tsf_tbtt_soc_wakeup = 0x40000e18; +//pm_mac_enable_tsf_tbtt_modem_wakeup = 0x40000e1c; +//pm_mac_modem_params_rt_update = 0x40000e20;*/ pm_update_at_next_beacon = 0x40000e24; tbtt_adaptive_setup = 0x40000e28; tbtt_adaptive_servo = 0x40000e2c; @@ -288,7 +288,7 @@ esp_test_clr_tx_statistics = 0x40001020; esp_test_get_tx_statistics = 0x40001024; esp_test_clr_tx_tb_statistics = 0x40001028; esp_test_get_tx_tb_statistics = 0x4000102c; -esp_test_tx_process_complete = 0x40001030; +/*esp_test_tx_process_complete = 0x40001030;*/ esp_test_tx_process_txq_state = 0x40001034; esp_test_tx_enab_statistics = 0x40001038; esp_test_tx_tb_complete = 0x4000103c; @@ -459,7 +459,7 @@ g_he_max_apep_length_tab_ptr = 0x4085fc8c; /* Functions */ pm_coex_schm_overall_period_get = 0x40001504; -pm_coex_pwr_update = 0x40001508; +//pm_coex_pwr_update = 0x40001508; ppRemoveHEAMPDUflags = 0x4000150c; tsf_hal_get_tbtt_interval = 0x40001510; pm_beacon_monitor_tbtt_start = 0x40001514; diff --git a/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld b/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld index a006d5a1fe..2fb70a00f3 100644 --- a/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld +++ b/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld @@ -119,7 +119,7 @@ pm_mac_sleep = 0x40000cc8; /*pm_enable_active_timer = 0x40000ccc;*/ pm_enable_sleep_delay_timer = 0x40000cd0; pm_local_tsf_process = 0x40000cd4; -pm_set_beacon_filter = 0x40000cd8; +//pm_set_beacon_filter = 0x40000cd8; /*pm_is_in_wifi_slice_threshold = 0x40000cdc;*/ pm_is_waked = 0x40000ce0; //pm_keep_alive = 0x40000ce4; @@ -162,13 +162,13 @@ pm_twt_disallow_tx = 0x40000d74; pm_clear_wakeup_signal = 0x40000d78; /*pm_mac_disable_tsf_tbtt_soc_wakeup = 0x40000d7c; pm_mac_disable_tsf_tbtt_modem_wakeup = 0x40000d80; -pm_mac_enable_tsf_tbtt_soc_wakeup = 0x40000d84; -pm_mac_enable_tsf_tbtt_modem_wakeup = 0x40000d88; -pm_mac_modem_params_rt_update = 0x40000d8c;*/ +//pm_mac_enable_tsf_tbtt_soc_wakeup = 0x40000d84; +//pm_mac_enable_tsf_tbtt_modem_wakeup = 0x40000d88; +//pm_mac_modem_params_rt_update = 0x40000d8c;*/ pm_update_at_next_beacon = 0x40000d90; pm_get_null_max_tx_time = 0x40000d94; pm_coex_schm_overall_period_get = 0x40000d98; -pm_coex_pwr_update = 0x40000d9c; +//pm_coex_pwr_update = 0x40000d9c; tbtt_adaptive_setup = 0x40000da0; tbtt_adaptive_servo = 0x40000da4; ppAMPDU2Normal = 0x40000da8; diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index ae157912b5..bf4c37ddc8 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -971,7 +971,7 @@ pm_mac_sleep = 0x40005454; pm_enable_active_timer = 0x40005460; pm_enable_sleep_delay_timer = 0x4000546c; pm_local_tsf_process = 0x40005478; -pm_set_beacon_filter = 0x40005484; +//pm_set_beacon_filter = 0x40005484; /*pm_is_in_wifi_slice_threshold = 0x40005490;*/ pm_is_waked = 0x4000549c; /*pm_keep_alive = 0x400054a8;*/ diff --git a/components/esp_wifi/include/esp_private/esp_wifi_he_types_private.h b/components/esp_wifi/include/esp_private/esp_wifi_he_types_private.h index 7443822ad9..8e86bb3bd7 100644 --- a/components/esp_wifi/include/esp_private/esp_wifi_he_types_private.h +++ b/components/esp_wifi/include/esp_private/esp_wifi_he_types_private.h @@ -350,7 +350,8 @@ typedef struct { uint32_t tx_muedca_enable; /* count TX times within mu-timer working */ uint32_t collision; uint32_t timeout; -} esp_test_tx_statistics_t; //136 bytes + uint32_t tx_error_a0; +} esp_test_tx_statistics_t; //140 bytes typedef struct { uint32_t complete_suc_tb; diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index 082c8bf6d2..603e5b6573 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -572,6 +572,7 @@ esp_err_t esp_wifi_get_scan_parameters(wifi_scan_default_params_t *config); * - ESP_OK: succeed * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_STATE: WiFi is still connecting when esp_wifi_scan_stop() is invoked. */ esp_err_t esp_wifi_scan_stop(void); @@ -1528,7 +1529,7 @@ esp_err_t esp_wifi_force_wakeup_release(void); /** * @brief configure country * - * @attention 1. When ieee80211d_enabled, the country info of the AP to which + * @attention 1. When ieee80211d_enabled is enabled, the country info of the AP to which * the station is connected is used. E.g. if the configured country is US * and the country info of the AP to which the station is connected is JP * then the country info that will be used is JP. If the station disconnected diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index ace8e5adc8..8cf8d0de49 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -81,7 +81,7 @@ typedef struct { * @brief Wi-Fi authmode type * Strength of authmodes * Personal Networks : OPEN < WEP < WPA_PSK < OWE < WPA2_PSK = WPA_WPA2_PSK < WAPI_PSK < WPA3_PSK = WPA2_WPA3_PSK = DPP - * Enterprise Networks : WIFI_AUTH_WPA2_ENTERPRISE < WIFI_AUTH_WPA3_ENTERPRISE = WIFI_AUTH_WPA2_WPA3_ENTERPRISE < WIFI_AUTH_WPA3_ENT_192 + * Enterprise Networks : WIFI_AUTH_WPA_ENTERPRISE < WIFI_AUTH_WPA2_ENTERPRISE < WIFI_AUTH_WPA3_ENTERPRISE = WIFI_AUTH_WPA2_WPA3_ENTERPRISE < WIFI_AUTH_WPA3_ENT_192 */ typedef enum { WIFI_AUTH_OPEN = 0, /**< Authenticate mode : open */ @@ -89,8 +89,8 @@ typedef enum { WIFI_AUTH_WPA_PSK, /**< Authenticate mode : WPA_PSK */ WIFI_AUTH_WPA2_PSK, /**< Authenticate mode : WPA2_PSK */ WIFI_AUTH_WPA_WPA2_PSK, /**< Authenticate mode : WPA_WPA2_PSK */ - WIFI_AUTH_ENTERPRISE, /**< Authenticate mode : Wi-Fi EAP security */ - WIFI_AUTH_WPA2_ENTERPRISE = WIFI_AUTH_ENTERPRISE, /**< Authenticate mode : Wi-Fi EAP security */ + WIFI_AUTH_ENTERPRISE, /**< Authenticate mode : Wi-Fi EAP security, treated the same as WIFI_AUTH_WPA2_ENTERPRISE */ + WIFI_AUTH_WPA2_ENTERPRISE = WIFI_AUTH_ENTERPRISE, /**< Authenticate mode : WPA2-Enterprise security */ WIFI_AUTH_WPA3_PSK, /**< Authenticate mode : WPA3_PSK */ WIFI_AUTH_WPA2_WPA3_PSK, /**< Authenticate mode : WPA2_WPA3_PSK */ WIFI_AUTH_WAPI_PSK, /**< Authenticate mode : WAPI_PSK */ @@ -101,6 +101,7 @@ typedef enum { WIFI_AUTH_DPP, /**< Authenticate mode : DPP */ WIFI_AUTH_WPA3_ENTERPRISE, /**< Authenticate mode : WPA3-Enterprise Only Mode */ WIFI_AUTH_WPA2_WPA3_ENTERPRISE, /**< Authenticate mode : WPA3-Enterprise Transition Mode */ + WIFI_AUTH_WPA_ENTERPRISE, /**< Authenticate mode : WPA-Enterprise security */ WIFI_AUTH_MAX } wifi_auth_mode_t; diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 130d9aed0b..0a6b4ae17b 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 130d9aed0bcfd487fb4c96301e58cd7a9a7aaa30 +Subproject commit 0a6b4ae17b00566fd45aae10696e2f728e63e245 diff --git a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in index 9c050e1e1b..a1e3df010c 100644 --- a/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c5/include/soc/Kconfig.soc_caps.in @@ -1693,7 +1693,7 @@ config SOC_WIFI_HW_TSF config SOC_WIFI_FTM_SUPPORT bool - default n + default y config SOC_WIFI_GCMP_SUPPORT bool diff --git a/components/soc/esp32c5/include/soc/soc_caps.h b/components/soc/esp32c5/include/soc/soc_caps.h index 8f5c02f9b3..d289171725 100644 --- a/components/soc/esp32c5/include/soc/soc_caps.h +++ b/components/soc/esp32c5/include/soc/soc_caps.h @@ -667,7 +667,7 @@ /*------------------------------------ WI-FI CAPS ------------------------------------*/ #define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */ -#define SOC_WIFI_FTM_SUPPORT (0) /*!< Support FTM */ // TODO: [ESP32C5] WIFI-6426 +#define SOC_WIFI_FTM_SUPPORT (1) /*!< Support FTM */ #define SOC_WIFI_GCMP_SUPPORT (1) /*!< Support GCMP(GCMP128 and GCMP256) */ #define SOC_WIFI_WAPI_SUPPORT (1) /*!< Support WAPI */ #define SOC_WIFI_CSI_SUPPORT (1) /*!< Support CSI */ diff --git a/components/wpa_supplicant/src/rsn_supp/wpa.c b/components/wpa_supplicant/src/rsn_supp/wpa.c index c073abe493..0a24ad94fb 100644 --- a/components/wpa_supplicant/src/rsn_supp/wpa.c +++ b/components/wpa_supplicant/src/rsn_supp/wpa.c @@ -2261,7 +2261,7 @@ void wpa_set_profile(u32 wpa_proto, u8 auth_mode) struct wpa_sm *sm = &gWpaSm; sm->proto = wpa_proto; - if (auth_mode == WPA2_AUTH_ENT) { + if (auth_mode == WPA2_AUTH_ENT || (auth_mode == WPA_AUTH_UNSPEC)) { sm->key_mgmt = WPA_KEY_MGMT_IEEE8021X; /* for wpa2 enterprise */ } else if (auth_mode == WPA2_AUTH_ENT_SHA256) { sm->key_mgmt = WPA_KEY_MGMT_IEEE8021X_SHA256; /* for wpa2 enterprise sha256 */ @@ -2386,7 +2386,7 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher, } #ifdef CONFIG_SUITEB192 extern bool g_wpa_suiteb_certification; - if (g_wpa_suiteb_certification) { + if (is_wpa2_enterprise_connection() && g_wpa_suiteb_certification) { if (sm->mgmt_group_cipher != WPA_CIPHER_BIP_GMAC_256) { wpa_printf(MSG_ERROR, "suite-b 192bit certification, only GMAC256 is supported"); return -1; diff --git a/examples/protocols/http_server/file_serving/partitions_example.csv b/examples/protocols/http_server/file_serving/partitions_example.csv index 48947d9341..c943624078 100644 --- a/examples/protocols/http_server/file_serving/partitions_example.csv +++ b/examples/protocols/http_server/file_serving/partitions_example.csv @@ -2,5 +2,5 @@ # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap nvs, data, nvs, 0x9000, 0x6000, phy_init, data, phy, 0xf000, 0x1000, -factory, app, factory, 0x10000, 1M, -storage, data, spiffs, , 0xF0000, +factory, app, factory, 0x10000, 0x110000, +storage, data, spiffs, , 0xE0000, diff --git a/examples/wifi/ftm/README.md b/examples/wifi/ftm/README.md index a124ac79de..7f6df2c5f1 100644 --- a/examples/wifi/ftm/README.md +++ b/examples/wifi/ftm/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | +| ----------------- | -------- | -------- | -------- | -------- | -------- | -------- | # FTM Example diff --git a/examples/wifi/ftm/main/ftm_main.c b/examples/wifi/ftm/main/ftm_main.c index b6eb413ab7..806de08e88 100644 --- a/examples/wifi/ftm/main/ftm_main.c +++ b/examples/wifi/ftm/main/ftm_main.c @@ -418,10 +418,12 @@ static bool wifi_cmd_ap_set(const char* ssid, const char* pass, uint8_t channel, } strlcpy((char*) g_ap_config.ap.password, pass, MAX_PASSPHRASE_LEN); } +#if !CONFIG_SOC_WIFI_SUPPORT_5G if (!(channel >=1 && channel <= 14)) { ESP_LOGE(TAG_AP, "Channel cannot be %d!", channel); return false; } +#endif if (bw != 20 && bw != 40) { ESP_LOGE(TAG_AP, "Cannot set %d MHz bandwidth!", bw); return false; @@ -430,16 +432,41 @@ static bool wifi_cmd_ap_set(const char* ssid, const char* pass, uint8_t channel, if (ESP_OK != wifi_add_mode(WIFI_MODE_AP)) { return false; } + wifi_bandwidths_t bws = {0}; + wifi_protocols_t proto = {0}; + if (channel <= 14) { + if (bw == 40) { + proto.ghz_2g = WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G | WIFI_PROTOCOL_11N; + proto.ghz_5g = 0; + esp_wifi_set_protocols(ESP_IF_WIFI_AP, &proto); + bws.ghz_2g = WIFI_BW_HT40; + esp_wifi_set_bandwidths(ESP_IF_WIFI_AP, &bws); + } else { + bws.ghz_2g = WIFI_BW_HT20; + esp_wifi_set_bandwidths(ESP_IF_WIFI_AP, &bws); + } + } else { +#if CONFIG_SOC_WIFI_SUPPORT_5G + if (bw == 40) { + proto.ghz_2g = 0; + proto.ghz_5g = WIFI_PROTOCOL_11N | WIFI_PROTOCOL_11A; + esp_wifi_set_protocols(ESP_IF_WIFI_AP, &proto); + bws.ghz_5g=WIFI_BW_HT40; + esp_wifi_set_bandwidths(ESP_IF_WIFI_AP, &bws); + } else { + proto.ghz_2g = 0; + proto.ghz_5g = WIFI_PROTOCOL_11AC | WIFI_PROTOCOL_11A | WIFI_PROTOCOL_11AX; + esp_wifi_set_protocols(ESP_IF_WIFI_AP, &proto); + bws.ghz_5g = WIFI_BW_HT20; + esp_wifi_set_bandwidths(ESP_IF_WIFI_AP, &bws); + } +#endif + } if (strlen(pass) == 0) { g_ap_config.ap.authmode = WIFI_AUTH_OPEN; } g_ap_config.ap.channel = channel; ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &g_ap_config)); - if (bw == 40) { - esp_wifi_set_bandwidth(ESP_IF_WIFI_AP, WIFI_BW_HT40); - } else { - esp_wifi_set_bandwidth(ESP_IF_WIFI_AP, WIFI_BW_HT20); - } ESP_LOGI(TAG_AP, "Starting SoftAP with FTM Responder support, SSID - %s, Password - %s, Primary Channel - %d, Bandwidth - %dMHz", ap_args.ssid->sval[0], ap_args.password->sval[0], channel, bw);