diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld index 46bddfd4c0..6742c76aba 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.eco4.ld @@ -53,7 +53,7 @@ lmacInit = 0x40001dc8; hal_init = 0x40001dd0; mac_txrx_init = 0x40001de0; lmac_stop_hw_txq = 0x40001df8; -ppTxFragmentProc = 0x40001e08; +/*ppTxFragmentProc = 0x40001e08;*/ esf_buf_setup = 0x40001e0c; hal_crypto_set_key_entry = 0x40001e18; /*pm_start = 0x40001e34;*/ @@ -108,6 +108,7 @@ ieee80211_output_do = 0x4000210c; ieee80211_send_nulldata = 0x40002110; //ieee80211_setup_robust_mgmtframe = 0x40002114; //ieee80211_mgmt_output = 0x40002118; +ieee80211_encap_null_data = 0x4000211c; //ieee80211_send_deauth_no_bss = 0x40002120; //ieee80211_tx_mgt_cb = 0x4000212c; //sta_rx_csa = 0x40002134; diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 12d1c22eac..dd6f3f9332 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -940,7 +940,7 @@ ieee80211_alloc_tx_buf = 0x40002108; /* ieee80211_output_do = 0x4000210c; */ /* ieee80211_send_nulldata = 0x40002110; */ /* ieee80211_setup_robust_mgmtframe = 0x40002114; */ -ieee80211_encap_null_data = 0x4000211c; +//ieee80211_encap_null_data = 0x4000211c; /* ieee80211_send_deauth_no_bss = 0x40002120; */ ieee80211_alloc_deauth = 0x40002124; ieee80211_send_proberesp = 0x40002128; diff --git a/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld b/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld index 11741fde65..6f9bde7677 100644 --- a/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld +++ b/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld @@ -67,7 +67,7 @@ wifi_rf_phy_enable = 0x40000bcc; wifi_is_started = 0x40000bd0; /*sta_input = 0x40000bd4;*/ sta_rx_eapol = 0x40000bd8; -sta_reset_beacon_timeout = 0x40000bdc; +//sta_reset_beacon_timeout = 0x40000bdc; sta_get_beacon_timeout = 0x40000be0; ampdu_process_multicast_address_qos_frame = 0x40000be4; /* Data (.data, .bss, .rodata) */ diff --git a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld index 0b4f03932a..306b56b489 100644 --- a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld +++ b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld @@ -176,7 +176,7 @@ ppEnqueueRxq = 0x40000e58; ppEnqueueTxDone = 0x40000e5c; ppGetTxframe = 0x40000e60; /*ppMapTxQueue = 0x40000e64;*/ -ppProcTxSecFrame = 0x40000e68; +//ppProcTxSecFrame = 0x40000e68; ppProcessRxPktHdr = 0x40000e6c; /*ppProcessTxQ = 0x40000e70;*/ ppRecordBarRRC = 0x40000e74; diff --git a/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld b/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld index 82e495baba..7f390abb9a 100644 --- a/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld +++ b/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld @@ -63,7 +63,7 @@ wifi_rf_phy_enable = 0x40000b34; wifi_is_started = 0x40000b38; /*sta_input = 0x40000b3c;*/ sta_rx_eapol = 0x40000b40; -sta_reset_beacon_timeout = 0x40000b44; +//sta_reset_beacon_timeout = 0x40000b44; sta_get_beacon_timeout = 0x40000b48; ampdu_process_multicast_address_qos_frame = 0x40000b4c; /* Data (.data, .bss, .rodata) */ diff --git a/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld b/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld index bcdba8fbc5..2ead480bfd 100644 --- a/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld +++ b/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld @@ -176,7 +176,7 @@ ppEnqueueRxq = 0x40000dd0; ppEnqueueTxDone = 0x40000dd4; ppGetTxframe = 0x40000dd8; /*ppMapTxQueue = 0x40000ddc;*/ -ppProcTxSecFrame = 0x40000de0; +//ppProcTxSecFrame = 0x40000de0; ppProcessRxPktHdr = 0x40000de4; /*ppProcessTxQ = 0x40000de8;*/ ppRecordBarRRC = 0x40000dec; diff --git a/components/esp_wifi/include/esp_private/wifi.h b/components/esp_wifi/include/esp_private/wifi.h index e7c210d00f..149590484c 100644 --- a/components/esp_wifi/include/esp_private/wifi.h +++ b/components/esp_wifi/include/esp_private/wifi.h @@ -808,6 +808,11 @@ esp_err_t esp_wifi_beacon_offset_configure(wifi_beacon_offset_config_t *config); */ void pm_beacon_offset_funcs_empty_init(void); +/** + * @brief This API is not context safe and enable easy fragment just for internal test only. + */ +void esp_wifi_enable_easy_fragment(bool enable); + #ifdef __cplusplus } #endif diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 49d2500723..2457744d76 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 49d2500723a1098ec574bfe8b795562b6a6ccc3b +Subproject commit 2457744d76251e0fd3cd774ebff948cd72186cb8 diff --git a/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in index bd73dd0868..c4fd6e8ab3 100644 --- a/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in @@ -1257,7 +1257,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/esp32c61/include/soc/soc_caps.h b/components/soc/esp32c61/include/soc/soc_caps.h index 9ae67ff952..dcea50ca95 100644 --- a/components/soc/esp32c61/include/soc/soc_caps.h +++ b/components/soc/esp32c61/include/soc/soc_caps.h @@ -512,7 +512,7 @@ /*------------------------------------ WI-FI CAPS ------------------------------------*/ #define SOC_WIFI_HW_TSF (1) /*!< Support hardware TSF */ -#define SOC_WIFI_FTM_SUPPORT (0) /*!< Support FTM */ +#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/ap/pmksa_cache_auth.c b/components/wpa_supplicant/src/ap/pmksa_cache_auth.c index 277967c086..f16ced9981 100644 --- a/components/wpa_supplicant/src/ap/pmksa_cache_auth.c +++ b/components/wpa_supplicant/src/ap/pmksa_cache_auth.c @@ -19,7 +19,7 @@ #include "ap/ieee802_1x.h" static const int pmksa_cache_max_entries = 10; -static const int dot11RSNAConfigPMKLifetime = 8640000; +static const int dot11RSNAConfigPMKLifetime = INT32_MAX; struct rsn_pmksa_cache { diff --git a/components/wpa_supplicant/src/rsn_supp/pmksa_cache.c b/components/wpa_supplicant/src/rsn_supp/pmksa_cache.c index 8ed1bdc2e7..87f8b6871d 100644 --- a/components/wpa_supplicant/src/rsn_supp/pmksa_cache.c +++ b/components/wpa_supplicant/src/rsn_supp/pmksa_cache.c @@ -18,7 +18,7 @@ #ifdef IEEE8021X_EAPOL static const int pmksa_cache_max_entries = 10; -static const int dot11RSNAConfigPMKLifetime = 8640000; // 100 days = 3600 x 24 x 100 Seconds +static const int dot11RSNAConfigPMKLifetime = INT32_MAX; static const int dot11RSNAConfigPMKReauthThreshold = 70; struct rsn_pmksa_cache { @@ -133,8 +133,7 @@ pmksa_cache_add(struct rsn_pmksa_cache *pmksa, const u8 *pmk, size_t pmk_len, os_get_reltime(&now); entry->expiration = now.sec + dot11RSNAConfigPMKLifetime; - entry->reauth_time = now.sec + dot11RSNAConfigPMKLifetime * - dot11RSNAConfigPMKReauthThreshold / 100; + entry->reauth_time = now.sec + dot11RSNAConfigPMKLifetime / 100 * dot11RSNAConfigPMKReauthThreshold; entry->akmp = akmp; os_memcpy(entry->aa, aa, ETH_ALEN); entry->network_ctx = network_ctx; diff --git a/components/wpa_supplicant/src/rsn_supp/wpa.c b/components/wpa_supplicant/src/rsn_supp/wpa.c index 62e2455c0d..75fe1f5094 100644 --- a/components/wpa_supplicant/src/rsn_supp/wpa.c +++ b/components/wpa_supplicant/src/rsn_supp/wpa.c @@ -376,8 +376,14 @@ static void wpa_sm_pmksa_free_cb(struct rsn_pmksa_cache_entry *entry, } if (deauth) { + /* For upstream supplicant, reconnection is handled internally, whereas in ESP-IDF, the user needs to initiate a new connection. + To mitigate this, simply flush the PMK without disconnecting. This will prevent the device from disconnecting, + while allowing it to derive a new PMK during the next connection attempt. */ + +#ifndef ESP_SUPPLICANT os_memset(sm->pmk, 0, sizeof(sm->pmk)); wpa_sm_deauthenticate(sm, WLAN_REASON_UNSPECIFIED); +#endif } } diff --git a/examples/wifi/ftm/README.md b/examples/wifi/ftm/README.md index 7f6df2c5f1..d441c55336 100644 --- a/examples/wifi/ftm/README.md +++ b/examples/wifi/ftm/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-S2 | ESP32-S3 | -| ----------------- | -------- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-S2 | ESP32-S3 | +| ----------------- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | # FTM Example