From 5618cf51001dc56848a66ff1d55d7d8766902715 Mon Sep 17 00:00:00 2001 From: Nachiket Kukade Date: Wed, 27 Nov 2019 11:41:27 +0530 Subject: [PATCH] wpa_supplicant: Fix MD5 mismatch in esp_wifi_driver.h Make cosmetic changes in esp_wifi_driver.h in both IDF and wifi library to match the md5sum. --- components/esp_wifi/lib | 2 +- .../src/esp_supplicant/esp_wifi_driver.h | 6 ++---- .../wpa_supplicant/src/esp_supplicant/esp_wpa3_i.h | 11 +++++++++++ .../wpa_supplicant/src/esp_supplicant/esp_wpa_main.c | 2 -- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 6513ff9a7..057749197 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 6513ff9a71d0cea1924e37d9f70a08dfaed946cd +Subproject commit 057749197b1cebb2da34e2c2a81096149eb6ecca diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h b/components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h index 20df6197c..6be9a747d 100644 --- a/components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h +++ b/components/wpa_supplicant/src/esp_supplicant/esp_wifi_driver.h @@ -122,10 +122,8 @@ struct wpa_funcs { int (*wpa_parse_wpa_ie)(const u8 *wpa_ie, size_t wpa_ie_len, wifi_wpa_ie_t *data); int (*wpa_config_bss)(u8 *bssid); int (*wpa_michael_mic_failure)(u16 is_unicast); -#ifdef CONFIG_WPA3_SAE - u8 *(*wpa3_build_sae_msg)(u8 *bssid, u32 type, u32 *len); - int (*wpa3_parse_sae_msg)(u8 *buf, u32 len, u32 type); -#endif + uint8_t *(*wpa3_build_sae_msg)(uint8_t *bssid, uint32_t type, size_t *len); + int (*wpa3_parse_sae_msg)(uint8_t *buf, size_t len, uint32_t type); }; struct wpa2_funcs { diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wpa3_i.h b/components/wpa_supplicant/src/esp_supplicant/esp_wpa3_i.h index 99c9d84f0..ffbb19e6c 100644 --- a/components/wpa_supplicant/src/esp_supplicant/esp_wpa3_i.h +++ b/components/wpa_supplicant/src/esp_supplicant/esp_wpa3_i.h @@ -18,6 +18,17 @@ #include "esp_wifi_driver.h" +#ifdef CONFIG_WPA3_SAE + void esp_wifi_register_wpa3_cb(struct wpa_funcs *wpa_cb); +#else /* CONFIG_WPA3_SAE */ + +static inline void esp_wifi_register_wpa3_cb(struct wpa_funcs *wpa_cb) +{ + wpa_cb->wpa3_build_sae_msg = NULL; + wpa_cb->wpa3_parse_sae_msg = NULL; +} + +#endif /* CONFIG_WPA3_SAE */ #endif /* ESP_WPA3_H */ diff --git a/components/wpa_supplicant/src/esp_supplicant/esp_wpa_main.c b/components/wpa_supplicant/src/esp_supplicant/esp_wpa_main.c index d72ea8131..95e6c6c96 100644 --- a/components/wpa_supplicant/src/esp_supplicant/esp_wpa_main.c +++ b/components/wpa_supplicant/src/esp_supplicant/esp_wpa_main.c @@ -202,9 +202,7 @@ int esp_supplicant_init(void) wpa_cb->wpa_parse_wpa_ie = wpa_parse_wpa_ie_wrapper; wpa_cb->wpa_config_bss = NULL;//wpa_config_bss; wpa_cb->wpa_michael_mic_failure = wpa_michael_mic_failure; -#ifdef CONFIG_WPA3_SAE esp_wifi_register_wpa3_cb(wpa_cb); -#endif /* CONFIG_WPA3_SAE */ esp_wifi_register_wpa_cb_internal(wpa_cb);