summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2024-10-01 14:24:39 +0200
committerTom Rini <trini@konsulko.com>2024-10-10 16:02:20 -0600
commit5d162bbb203502516b92934b78316b874c20d176 (patch)
treeb27dda7219fe28532ee9c778d09a4db573a71be6 /net/net.c
parentaad8cfa3ca4b1bb18c4a55d2bbee4f58d3095d64 (diff)
tftp: implement support for LED activity
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal traffic. Also turn the ACTIVITY LED OFF if a CTRL-C is detected in the main net loop function. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/net.c b/net/net.c
index 1e0b7c85624..bc16f0d0cea 100644
--- a/net/net.c
+++ b/net/net.c
@@ -87,6 +87,7 @@
#include <env_internal.h>
#include <errno.h>
#include <image.h>
+#include <led.h>
#include <log.h>
#include <net.h>
#include <net6.h>
@@ -664,6 +665,9 @@ restart:
/* Invalidate the last protocol */
eth_set_last_protocol(BOOTP);
+ /* Turn off activity LED if triggered */
+ led_activity_off();
+
puts("\nAbort\n");
/* include a debug print as well incase the debug
messages are directed to stderr */