diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 8a94debc901..abbdc70d7a0 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 8a94debc90175b81cf915710b96734c1912528ee +Subproject commit abbdc70d7a0456bb402f1be57e573eb727853495 diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h b/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h index 5a6dad46d76..9c2c6d8a109 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h @@ -278,7 +278,7 @@ uint16_t esp_wifi_sta_pmf_enabled(void); wifi_cipher_type_t esp_wifi_sta_get_mgmt_group_cipher(void); int esp_wifi_set_igtk_internal(uint8_t if_index, const wifi_wpa_igtk_t *igtk); esp_err_t esp_wifi_internal_issue_disconnect(uint8_t reason_code); -bool esp_wifi_skip_supp_pmkcaching(void); +bool esp_wifi_use_supp_pmk_cache(void); bool esp_wifi_is_rm_enabled_internal(uint8_t if_index); bool esp_wifi_is_btm_enabled_internal(uint8_t if_index); esp_err_t esp_wifi_register_mgmt_frame_internal(uint32_t type, uint32_t subtype); diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c b/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c index f6a6fde8430..7bccfb6da67 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c @@ -38,6 +38,12 @@ static esp_err_t wpa3_build_sae_commit(u8 *bssid, size_t *sae_msg_len) const u8 *rsnxe; u8 rsnxe_capa = 0; + if (wpa_sta_cur_pmksa_matches_akm()) { + wpa_printf(MSG_INFO, "wpa3: Skip SAE and use cached PMK instead"); + *sae_msg_len = 0; + return ESP_FAIL; + } + if (wpa_key_mgmt_sae_ext_key(gWpaSm.key_mgmt)) { use_pt = 1; } @@ -90,12 +96,6 @@ static esp_err_t wpa3_build_sae_commit(u8 *bssid, size_t *sae_msg_len) g_sae_pt = sae_derive_pt(g_allowed_groups, ssid->ssid, ssid->len, pw, strlen((const char *)pw), valid_pwd_id ? sae_pwd_id : NULL); } - if (wpa_sta_cur_pmksa_matches_akm()) { - wpa_printf(MSG_INFO, "wpa3: Skip SAE and use cached PMK instead"); - *sae_msg_len = 0; - return ESP_FAIL; - } - if (g_sae_commit) { wpabuf_free(g_sae_commit); g_sae_commit = NULL; diff --git a/components/wpa_supplicant/src/rsn_supp/wpa.c b/components/wpa_supplicant/src/rsn_supp/wpa.c index aa68569f623..1859d7ad335 100644 --- a/components/wpa_supplicant/src/rsn_supp/wpa.c +++ b/components/wpa_supplicant/src/rsn_supp/wpa.c @@ -2340,7 +2340,7 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher, { int res = 0; struct wpa_sm *sm = &gWpaSm; - bool use_pmk_cache = !esp_wifi_skip_supp_pmkcaching(); + bool use_pmk_cache = esp_wifi_use_supp_pmk_cache(); u8 assoc_rsnxe[20]; size_t assoc_rsnxe_len = sizeof(assoc_rsnxe);