summaryrefslogtreecommitdiff
path: root/apps/nshlib/Kconfig
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-17 09:51:26 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-17 09:51:26 -0600
commit45ae398fe34e373700a02e08c0f779e572862525 (patch)
treea48ee28cc5816be0ba00d12d5f26b4367dc37dde /apps/nshlib/Kconfig
parent83bd793f672c95bc632b1467f7e090ca7a6b4038 (diff)
downloadnuttx-45ae398fe34e373700a02e08c0f779e572862525.tar.gz
nuttx-45ae398fe34e373700a02e08c0f779e572862525.tar.bz2
nuttx-45ae398fe34e373700a02e08c0f779e572862525.zip
Extend the NSH network initialization logic. There is now an option that will create a network monitor thread that will monitor the state of the link. When the link goes down, the code will attempt to gracefully put the Ethernet driver in a down state; When the link comes back, the code will attempt to bring the network back up.
Diffstat (limited to 'apps/nshlib/Kconfig')
-rw-r--r--apps/nshlib/Kconfig49
1 files changed, 49 insertions, 0 deletions
diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig
index 36839a736..cae3a7dca 100644
--- a/apps/nshlib/Kconfig
+++ b/apps/nshlib/Kconfig
@@ -810,6 +810,43 @@ config NSH_NETINIT_THREAD
if NSH_NETINIT_THREAD
+config NSH_NETINIT_MONITOR
+ bool "Monitor link state"
+ default n
+ depends on ARCH_PHY_INTERRUPT && NET_UDP && !DISABLE_SIGNALS && EXPERIMENTAL
+ ---help---
+ By default the net initialization thread will bring-up the network
+ then exit, freeing all of the resources that it required. This is a
+ good behavior for systems with limited memory.
+
+ If this option is selected, however, then the network initialization
+ thread will persist forever; it will monitor the network status. In
+ the event that the network goes down (for example, if a cable is
+ removed), then the the thread will monitor the link status and
+ attempt to bring the network back up. In this case the resources
+ required for network initialization are never released.
+
+config NSH_NETINIT_SIGNO
+ int "Notification signal number"
+ default 18
+ ---help---
+ The network monitor logic will receive signals when there is any
+ change in the link status. This setting may be used to customize
+ that signal number in order to avoid conflicts.
+
+if NSH_NETINIT_MONITOR
+
+config NSH_NETINIT_RETRYMSEC
+ int "Network bring-up retry period (msec)"
+ default 2000
+ ---help---
+ When the network is down, the initialization thread will periodically
+ try to bring the network up. This can be a time consuming operation
+ so is done only periodically with that period specified by this
+ selection in milliseconds.
+
+endif # NSH_NETINIT_MONITOR
+
config NSH_NETINIT_THREAD_STACKSIZE
int "Network initialization thread stack size"
default 1568
@@ -820,6 +857,18 @@ config NSH_NETINIT_THREAD_PRIORITY
endif # NSH_NETINIT_THREAD
+config NSH_NETINIT_DEBUG
+ bool "Network init debug"
+ default n
+ depends on DEBUG
+ ---help---
+ Normally debug output is controlled by DEBUG_NET. However, that
+ will generate a LOT of debug output, especially if DEBUG_VERBOSE is
+ also selected. This option is intended to force VERVOSE debug
+ output from the NSH network initialization logic even if DEBUG_NET
+ or DEBUG_VERBOSE are not selected. This allows for focused, unit-
+ level debug of the NSH network initialization logic.
+
config NSH_DHCPC
bool "Use DHCP to get IP address"
default n