fix(wpa_supplicant): Handle case when WPS registrar misses WSC_DONE sent by station

When registrar somehow misses the WSC_DONE sent by station and station
goes for next connection after sending deauth, make sure that softAP
disables the registrar.
This commit is contained in:
Sarvesh Bodakhe 2024-04-29 12:59:21 +05:30
parent ed12574848
commit e2c47edafa
2 changed files with 8 additions and 1 deletions

View File

@ -221,7 +221,7 @@ int esp_wifi_ap_wps_enable(const esp_wps_config_t *config)
return ret;
}
static int wifi_ap_wps_disable_internal(void)
int wifi_ap_wps_disable_internal(void)
{
struct wps_sm *sm = gWpsSm;

View File

@ -103,6 +103,13 @@ static void eap_wsc_reset(struct eap_sm *sm, void *priv)
wpabuf_free(data->out_buf);
//wps_deinit(data->wps);
os_free(data);
#ifdef ESP_SUPPLICANT
/* TODO: When wps-registrar is shifted in a separate task other than wifi task,
* call esp_wifi_ap_wps_disable() here instead of wifi_ap_wps_disable_internal()
* */
extern int wifi_ap_wps_disable_internal(void);
wifi_ap_wps_disable_internal();
#endif
}