From 24a2e5a17e6701a5833eee6c3bf2f935f58ed0f0 Mon Sep 17 00:00:00 2001 From: Roland Dobai Date: Thu, 2 May 2019 15:06:44 +0200 Subject: [PATCH] Rename Kconfig options (components/tcpip_adapter) --- components/tcpip_adapter/Kconfig | 4 ++-- components/tcpip_adapter/sdkconfig.rename | 5 +++++ components/tcpip_adapter/tcpip_adapter_lwip.c | 8 ++++---- tools/ldgen/samples/sdkconfig | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 components/tcpip_adapter/sdkconfig.rename diff --git a/components/tcpip_adapter/Kconfig b/components/tcpip_adapter/Kconfig index 20d91fcabe..6b409d38b7 100644 --- a/components/tcpip_adapter/Kconfig +++ b/components/tcpip_adapter/Kconfig @@ -1,6 +1,6 @@ menu "TCP/IP Adapter" - config IP_LOST_TIMER_INTERVAL + config NETIF_IP_LOST_TIMER_INTERVAL int "IP Address lost timer interval (seconds)" range 0 65535 default 120 @@ -13,7 +13,7 @@ menu "TCP/IP Adapter" the timer expires. The IP lost timer is stopped if the station get the IP again before the timer expires. - choice USE_TCPIP_STACK_LIB + choice NETIF_USE_TCPIP_STACK_LIB prompt "TCP/IP Stack Library" default TCPIP_LWIP help diff --git a/components/tcpip_adapter/sdkconfig.rename b/components/tcpip_adapter/sdkconfig.rename new file mode 100644 index 0000000000..72405c0562 --- /dev/null +++ b/components/tcpip_adapter/sdkconfig.rename @@ -0,0 +1,5 @@ +# sdkconfig replacement configurations for deprecated options formatted as +# CONFIG_DEPRECATED_OPTION CONFIG_NEW_OPTION + +CONFIG_IP_LOST_TIMER_INTERVAL CONFIG_NETIF_IP_LOST_TIMER_INTERVAL +CONFIG_USE_TCPIP_STACK_LIB CONFIG_NETIF_USE_TCPIP_STACK_LIB diff --git a/components/tcpip_adapter/tcpip_adapter_lwip.c b/components/tcpip_adapter/tcpip_adapter_lwip.c index 0d77bb5acf..4720fadc2d 100644 --- a/components/tcpip_adapter/tcpip_adapter_lwip.c +++ b/components/tcpip_adapter/tcpip_adapter_lwip.c @@ -953,15 +953,15 @@ static esp_err_t tcpip_adapter_start_ip_lost_timer(tcpip_adapter_if_t tcpip_if) return ESP_OK; } - if ( netif && (CONFIG_IP_LOST_TIMER_INTERVAL > 0) && !ip4_addr_isany_val(ip_info_old->ip)) { + if ( netif && (CONFIG_NETIF_IP_LOST_TIMER_INTERVAL > 0) && !ip4_addr_isany_val(ip_info_old->ip)) { esp_ip_lost_timer[tcpip_if].timer_running = true; - sys_timeout(CONFIG_IP_LOST_TIMER_INTERVAL*1000, tcpip_adapter_ip_lost_timer, (void*)tcpip_if); - ESP_LOGD(TAG, "if%d start ip lost tmr: interval=%d", tcpip_if, CONFIG_IP_LOST_TIMER_INTERVAL); + sys_timeout(CONFIG_NETIF_IP_LOST_TIMER_INTERVAL*1000, tcpip_adapter_ip_lost_timer, (void*)tcpip_if); + ESP_LOGD(TAG, "if%d start ip lost tmr: interval=%d", tcpip_if, CONFIG_NETIF_IP_LOST_TIMER_INTERVAL); return ESP_OK; } ESP_LOGD(TAG, "if%d start ip lost tmr: no need start because netif=%p interval=%d ip=%x", - tcpip_if, netif, CONFIG_IP_LOST_TIMER_INTERVAL, ip_info_old->ip.addr); + tcpip_if, netif, CONFIG_NETIF_IP_LOST_TIMER_INTERVAL, ip_info_old->ip.addr); return ESP_OK; } diff --git a/tools/ldgen/samples/sdkconfig b/tools/ldgen/samples/sdkconfig index 3f8158a92f..9530a7f321 100644 --- a/tools/ldgen/samples/sdkconfig +++ b/tools/ldgen/samples/sdkconfig @@ -532,7 +532,7 @@ CONFIG_SPIFFS_TEST_VISUALISATION= # # tcpip adapter # -CONFIG_IP_LOST_TIMER_INTERVAL=120 +CONFIG_NETIF_IP_LOST_TIMER_INTERVAL=120 # # Wear Levelling