From f2f3dfa947b7c108906cb1dbb197077bbe317105 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Wed, 28 Jan 2026 20:36:08 +0800 Subject: [PATCH] fix(wifi): support weak func for wifi lmac assert --- components/esp_wifi/include/esp_private/wifi.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/components/esp_wifi/include/esp_private/wifi.h b/components/esp_wifi/include/esp_private/wifi.h index 98bdee071c8..5743fef961f 100644 --- a/components/esp_wifi/include/esp_private/wifi.h +++ b/components/esp_wifi/include/esp_private/wifi.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -815,6 +815,17 @@ esp_err_t esp_wifi_disconnect_internal(void); */ void esp_wifi_enable_easy_fragment(bool enable); +/** + * @brief Weak Wi-Fi assert hook. + * + * The Wi-Fi library provides a weak default implementation. Applications may + * define this symbol to override the default behavior for debugging. + * + * @note This is intended for diagnostics only and is not part of normal Wi-Fi + * operation. + */ +void wifi_assert(bool expr, const char *file, const char *func, int line); + #ifdef __cplusplus } #endif