Merge branch 'fix/fix_openthread_netif_glue_deinit_issue_v6.1' into 'release/v6.1'

fix(openthread): fix stack deinit by reversing netif glue teardown and hardening workflow cleanup (v6.1)

See merge request espressif/esp-idf!52397
This commit is contained in:
Shu Chen
2026-09-04 03:08:09 +00:00
8 changed files with 63 additions and 27 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -106,6 +106,11 @@ esp_err_t esp_openthread_start(const esp_openthread_config_t *config);
/**
* @brief This function performs OpenThread stack and platform driver deinitialization and delete the handle task.
*
* @note Thread must already be inactive (`otThreadSetEnabled(false)` and
* `otIp6SetEnabled(false)`). If border routing was initialized, call
* `esp_openthread_border_router_deinit()` first.
*
* @return
* - ESP_OK on success
* - ESP_ERR_INVALID_STATE if Thread is already active
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -44,6 +44,11 @@ esp_err_t esp_openthread_border_router_init(void);
/**
* @brief Deinitializes the border router features of OpenThread.
*
* @note This function must be called while the OpenThread mainloop is still running
* and after Thread IPv6 has been brought down:
* `otThreadSetEnabled(instance, false)` then `otIp6SetEnabled(instance, false)`.
* Call `esp_openthread_stop()` only after this function returns.
*
* @return
* - ESP_OK on success
* - ESP_ERR_INVALID_STATE if not initialized