mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
wpa_supplicant : Add support for unregistering wifi wpa3 callbacks.
Unregister wifi callbacks allows for disabling support for wpa3 functions when not required.
This commit is contained in:
parent
7cf3f99bfa
commit
f283b589ed
@ -260,4 +260,12 @@ void esp_wifi_register_wpa3_cb(struct wpa_funcs *wpa_cb)
|
||||
wpa_cb->wpa3_parse_sae_msg = wpa3_parse_sae_msg;
|
||||
}
|
||||
|
||||
void esp_wifi_unregister_wpa3_cb(void)
|
||||
{
|
||||
extern struct wpa_funcs *wpa_cb;
|
||||
|
||||
wpa_cb->wpa3_build_sae_msg = NULL;
|
||||
wpa_cb->wpa3_parse_sae_msg = NULL;
|
||||
|
||||
}
|
||||
#endif /* CONFIG_WPA3_SAE */
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "wps/wps_defs.h"
|
||||
|
||||
const wifi_osi_funcs_t *wifi_funcs;
|
||||
struct wpa_funcs *wpa_cb;
|
||||
|
||||
void wpa_install_key(enum wpa_alg alg, u8 *addr, int key_idx, int set_tx,
|
||||
u8 *seq, size_t seq_len, u8 *key, size_t key_len, enum key_flag key_flag)
|
||||
@ -311,7 +312,6 @@ static bool hostap_sta_join(void **sta, u8 *bssid, u8 *wpa_ie, u8 wpa_ie_len, bo
|
||||
int esp_supplicant_init(void)
|
||||
{
|
||||
int ret = ESP_OK;
|
||||
struct wpa_funcs *wpa_cb;
|
||||
|
||||
wifi_funcs = WIFI_OSI_FUNCS_INITIALIZER();
|
||||
if (!wifi_funcs) {
|
||||
@ -370,5 +370,6 @@ int esp_supplicant_deinit(void)
|
||||
{
|
||||
esp_supplicant_common_deinit();
|
||||
eloop_destroy();
|
||||
wpa_cb = NULL;
|
||||
return esp_wifi_unregister_wpa_cb_internal();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user