diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 7628a277483..5779457dea9 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 7628a277483344e598304b1a45130a52984583ea +Subproject commit 5779457dea99d54072842e7ab52c73e80a5726b4 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 d7a87a2a279..3a8f79c3c48 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h @@ -277,7 +277,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 55eafc2bbf2..d2c216fb1b9 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c @@ -39,6 +39,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; } @@ -91,12 +97,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 59d9307ba5d..94927c8e895 100644 --- a/components/wpa_supplicant/src/rsn_supp/wpa.c +++ b/components/wpa_supplicant/src/rsn_supp/wpa.c @@ -2333,7 +2333,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);