From 4051922885f0e30f786a0a582711130f65c3f8f7 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Fri, 5 Feb 2021 10:56:51 +0100 Subject: [PATCH] esp_netif: Update documentation on deinitialization of wifi default netif Closes https://github.com/espressif/esp-idf/issues/6504 --- docs/en/api-reference/network/esp_netif.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/api-reference/network/esp_netif.rst b/docs/en/api-reference/network/esp_netif.rst index e51f23a87b..81d534f82a 100644 --- a/docs/en/api-reference/network/esp_netif.rst +++ b/docs/en/api-reference/network/esp_netif.rst @@ -160,7 +160,9 @@ such as softAP and station, are provided in two separate APIs to facilitate simp Please note that these functions return the ``esp_netif`` handle, i.e. a pointer to a network interface object allocated and configured with default settings, which as a consequence, means that: -* The created object has to be destroyed if a network de-initialization is provided by an application. +* The created object has to be destroyed if a network de-initialization is provided by an application. The de-initialization should be performed in the two steps: + - :cpp:func:`esp_wifi_clear_default_wifi_driver_and_handlers()` -- To unregister default wifi handlers and detach the created object from the wifi + - :cpp:func:`esp_netif_destroy()` -- To destroy the ``esp_netif`` object. * These *default* interfaces must not be created multiple times, unless the created handle is deleted using :cpp:func:`esp_netif_destroy()`. * When using Wifi in ``AP+STA`` mode, both these interfaces has to be created.