Merge branch 'bugfix/skip_sae_during_wps_v5.0' into 'release/v5.0'

esp_wifi: Add changes to skip SAE handshake during WPS connection

See merge request espressif/esp-idf!21677
This commit is contained in:
Jiang Jiang Jian 2022-12-19 19:33:04 +08:00
commit 4ace4e6bec
2 changed files with 5 additions and 1 deletions

View File

@ -147,6 +147,10 @@ static u8 *wpa3_build_sae_msg(u8 *bssid, u32 sae_msg_type, size_t *sae_msg_len)
switch (sae_msg_type) {
case SAE_MSG_COMMIT:
/* Do not go for SAE when WPS is ongoing */
if (esp_wifi_get_wps_status_internal() != WPS_STATUS_DISABLE) {
return NULL;
}
if (ESP_OK != wpa3_build_sae_commit(bssid))
return NULL;
*sae_msg_len = wpabuf_len(g_sae_commit);

View File

@ -1870,7 +1870,7 @@ int wifi_wps_enable_internal(const esp_wps_config_t *config)
ret = wifi_station_wps_init();
if (ret != 0) {
wps_set_type(WPS_STATUS_DISABLE);
wps_set_type(WPS_TYPE_DISABLE);
wps_set_status(WPS_STATUS_DISABLE);
return ESP_FAIL;
}