esp_wifi: Add changes to skip SAE handshake during WPS connection

This commit is contained in:
Kapil Gupta
2022-12-01 15:37:43 +05:30
parent c881f2dd6f
commit 51dfbafce2
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;
}