mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02: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:
@ -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;
|
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 */
|
#endif /* CONFIG_WPA3_SAE */
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include "esp_wpa2.h"
|
#include "esp_wpa2.h"
|
||||||
#include "esp_common_i.h"
|
#include "esp_common_i.h"
|
||||||
|
|
||||||
|
struct wpa_funcs *wpa_cb;
|
||||||
void wpa_install_key(enum wpa_alg alg, u8 *addr, int key_idx, int set_tx,
|
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)
|
u8 *seq, size_t seq_len, u8 *key, size_t key_len, enum key_flag key_flag)
|
||||||
{
|
{
|
||||||
@ -229,7 +230,6 @@ static void wpa_sta_disconnected_cb(uint8_t reason_code)
|
|||||||
int esp_supplicant_init(void)
|
int esp_supplicant_init(void)
|
||||||
{
|
{
|
||||||
int ret = ESP_OK;
|
int ret = ESP_OK;
|
||||||
struct wpa_funcs *wpa_cb;
|
|
||||||
|
|
||||||
wpa_cb = (struct wpa_funcs *)os_zalloc(sizeof(struct wpa_funcs));
|
wpa_cb = (struct wpa_funcs *)os_zalloc(sizeof(struct wpa_funcs));
|
||||||
if (!wpa_cb) {
|
if (!wpa_cb) {
|
||||||
|
Reference in New Issue
Block a user