From 36940f8c0e4fc5241d03a476c7975730ccbc45da Mon Sep 17 00:00:00 2001 From: Sajia Date: Tue, 8 Apr 2025 14:37:32 +0530 Subject: [PATCH] refactor(wifi): Optimize wifi bin size for station mode --- components/esp_wifi/lib | 2 +- components/esp_wifi/src/wifi_init.c | 68 +++++++++++++++++++++++++++-- 2 files changed, 65 insertions(+), 5 deletions(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 7488ede43c..4e688b053f 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 7488ede43ce2dd122119f2ee1a229d5e9c3a5d89 +Subproject commit 4e688b053f6d323308945b30535fdf37200e8501 diff --git a/components/esp_wifi/src/wifi_init.c b/components/esp_wifi/src/wifi_init.c index 42625fce05..8d23390e81 100644 --- a/components/esp_wifi/src/wifi_init.c +++ b/components/esp_wifi/src/wifi_init.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -521,7 +521,12 @@ esp_err_t ieee80211_ftm_attach(void) /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ return ESP_OK; } -#endif + +void ftm_initiator_cleanup(void) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ +} +#endif /* CONFIG_ESP_WIFI_FTM_ENABLE */ #ifndef CONFIG_ESP_WIFI_SOFTAP_SUPPORT void net80211_softap_funcs_init(void) @@ -597,7 +602,29 @@ void * ieee80211_alloc_proberesp(void *p, int arg) return NULL; } -#endif +bool hostap_query_mac_in_list(const uint8_t *p, int arg) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ + return false; +} + +int hostap_add_in_mac_list(const uint8_t *p, int arg) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ + return 0; +} + +int hostap_del_mac_info_from_list(const uint8_t *p, int arg) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ + return 0; +} + +void create_new_bss_for_sa_query_failed_sta(uint8_t arg) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ +} +#endif /* CONFIG_ESP_WIFI_SOFTAP_SUPPORT */ #ifndef CONFIG_ESP_WIFI_NAN_ENABLE @@ -624,7 +651,40 @@ void nan_sm_handle_event(void *p1, int p2) /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ } -#endif +int wifi_create_nan(void) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ + return 0; +} + +int wifi_nan_set_config_local(wifi_nan_config_t *p) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ + return 0; +} + +esp_err_t nan_dp_post_tx(void *p1, void *p2) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ + return ESP_OK; +} + +void nan_dp_delete_peer(void *p) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ +} + +void *nan_dp_search_node(const uint8_t *p) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ + return NULL; +} + +void nan_ndp_resp_timeout_process(void *p) +{ + /* Do not remove, stub to overwrite weak link in Wi-Fi Lib */ +} +#endif /* CONFIG_ESP_WIFI_NAN_ENABLE */ #if CONFIG_IDF_TARGET_ESP32C2 #if CONFIG_ESP32C2_REV_MIN_FULL < 200