mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-21 00:48:14 +00:00
feat(esp_wifi): Provide API to disable PMK caching
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include "esp_dpp_i.h"
|
||||
#endif
|
||||
|
||||
bool g_wpa_pmk_caching_disabled = 0;
|
||||
const wifi_osi_funcs_t *wifi_funcs;
|
||||
struct wpa_funcs *wpa_cb;
|
||||
|
||||
@@ -298,6 +299,9 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code)
|
||||
wpa_sm_notify_disassoc(&gWpaSm);
|
||||
break;
|
||||
default:
|
||||
if (g_wpa_pmk_caching_disabled) {
|
||||
wpa_sta_clear_curr_pmksa();
|
||||
}
|
||||
break;
|
||||
}
|
||||
#ifdef CONFIG_OWE_STA
|
||||
@@ -487,3 +491,9 @@ int esp_supplicant_deinit(void)
|
||||
wpa_cb = NULL;
|
||||
return esp_wifi_unregister_wpa_cb_internal();
|
||||
}
|
||||
|
||||
esp_err_t esp_supplicant_disable_pmk_caching(bool disable)
|
||||
{
|
||||
g_wpa_pmk_caching_disabled = disable;
|
||||
return ESP_OK;
|
||||
}
|
||||
|
Reference in New Issue
Block a user