From 4301645bea2ab749a76c47909cc2e34cd575e799 Mon Sep 17 00:00:00 2001 From: entrop1a Date: Tue, 22 Oct 2024 21:26:17 -0300 Subject: [PATCH] fix(nan_console): Removal of network interface unconditional initialization --- examples/wifi/wifi_aware/nan_console/main/nan_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/wifi/wifi_aware/nan_console/main/nan_main.c b/examples/wifi/wifi_aware/nan_console/main/nan_main.c index 037e52c35e5..a8ff529ed02 100644 --- a/examples/wifi/wifi_aware/nan_console/main/nan_main.c +++ b/examples/wifi/wifi_aware/nan_console/main/nan_main.c @@ -235,12 +235,10 @@ static int wifi_cmd_nan_disc(int argc, char **argv) nan_cfg.warm_up_sec = nan_args.warmup_time->ival[0]; } - if(!g_nan_netif) - { + if(!g_nan_netif){ g_nan_netif = esp_netif_create_default_wifi_nan(); } - g_nan_netif = esp_netif_create_default_wifi_nan(); if ((esp_wifi_nan_start(&nan_cfg)) != ESP_OK) { ESP_LOGI(TAG, "Failed to start NAN"); esp_netif_destroy_default_wifi(g_nan_netif);