diff options
author | Simon Glass <sjg@chromium.org> | 2023-01-17 10:47:27 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-23 18:11:39 -0500 |
commit | f43b2df3e068cc7be1aa5656c0c3223e270bba63 (patch) | |
tree | 9c29daf5a2cd8180687b3ee4887bca40923bb658 /net | |
parent | b85fc8dbabd7c027ad7ad6133578a0d679dbe2ba (diff) | |
download | u-boot-f43b2df3e068cc7be1aa5656c0c3223e270bba63.tar.gz |
sandbox: Allow ethernet to be disabled at runtime
For bootstd tests it is seldom useful to have ethernet enabled. Add a way
to disable it, so that ethernet operations like tftpboot do nothing.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -106,6 +106,7 @@ #endif #include <watchdog.h> #include <linux/compiler.h> +#include <test/test.h> #include "arp.h" #include "bootp.h" #include "cdp.h" @@ -465,6 +466,9 @@ restart: debug_cond(DEBUG_INT_STATE, "--- net_loop Init\n"); net_init_loop(); + if (!test_eth_enabled()) + return 0; + switch (net_check_prereq(protocol)) { case 1: /* network not configured */ |