Просмотр исходного кода

lwip: Made LCP ECHO bool for better user experience

David Cermak 4 лет назад
Родитель
Сommit
d6f66465ff
2 измененных файлов с 27 добавлено и 21 удалено
  1. 23 18
      components/lwip/Kconfig
  2. 4 3
      components/lwip/port/esp32/include/lwipopts.h

+ 23 - 18
components/lwip/Kconfig

@@ -708,6 +708,29 @@ menu "LWIP"
         help
             Enable Microsoft Point-to-Point Encryption (MPPE) support
 
+    config LWIP_ENABLE_LCP_ECHO
+        bool "Enable LCP ECHO"
+        depends on LWIP_PPP_SUPPORT
+        default n
+        help
+            Enable LCP echo keepalive requests
+
+    config LWIP_LCP_ECHOINTERVAL
+        int "Echo interval (s)"
+        range 0 1000000
+        depends on LWIP_ENABLE_LCP_ECHO
+        default 3
+        help
+            Interval in seconds between keepalive LCP echo requests, 0 to disable.
+
+    config LWIP_LCP_MAXECHOFAILS
+        int "Maximum echo failures"
+        range 0 100000
+        depends on LWIP_ENABLE_LCP_ECHO
+        default 3
+        help
+            Number of consecutive unanswered echo requests before failure is indicated.
+
     config LWIP_PPP_DEBUG_ON
         bool "Enable PPP debug log output"
         depends on LWIP_PPP_SUPPORT
@@ -777,24 +800,6 @@ menu "LWIP"
 
     endmenu # SNTP
 
-    menu "LCP"
-
-        config LCP_ECHOINTERVAL
-            int "Echo interval (s)"
-            range 0 1000000
-            default 0
-            help
-                Interval in seconds between keepalive LCP echo requests, 0 to disable.
-
-        config LCP_MAXECHOFAILS
-            int "Maximum echo failures"
-            range 0 100000
-            default 3
-            help
-                Number of consecutive unanswered echo requests before failure is indicated.
-
-    endmenu # LCP
-
     config LWIP_ESP_LWIP_ASSERT
         bool "Enable LWIP ASSERT checks"
         default y

+ 4 - 3
components/lwip/port/esp32/include/lwipopts.h

@@ -745,16 +745,17 @@
    --------- LCP Echo options ---------
    ------------------------------------
 */
+#if CONFIG_LWIP_ENABLE_LCP_ECHO
 /**
  * LCP_ECHOINTERVAL: Interval in seconds between keepalive LCP echo requests, 0 to disable.
  */
-#define LCP_ECHOINTERVAL                CONFIG_LCP_ECHOINTERVAL
+#define LCP_ECHOINTERVAL                CONFIG_LWIP_LCP_ECHOINTERVAL
 
 /**
  * LCP_MAXECHOFAILS: Number of consecutive unanswered echo requests before failure is indicated.
  */
-#define LCP_MAXECHOFAILS                CONFIG_LCP_MAXECHOFAILS
-
+#define LCP_MAXECHOFAILS                CONFIG_LWIP_LCP_MAXECHOFAILS
+#endif /* CONFIG_LWIP_ENABLE_LCP_ECHO */
 
 /*
    --------------------------------------