summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorQuentin Schulz <[email protected]>2025-11-19 17:43:48 +0100
committerTom Rini <[email protected]>2025-12-05 10:34:52 -0600
commit715107089fb8823a4419f3a3bf2f26816450324c (patch)
treea0919f157498cd1d160ee873801e021008be00e7 /net
parent914acbdba3c128a035da4ab371efef1e91cebdfe (diff)
net: remove unreachable legacy LED code
The code is guarded by a condition none of the defconfigs meet (that is CONFIG_SYS_FAULT_ECHO_LINK_DOWN and CONFIG_LED_STATUS_RED both enabled), so we can remove the unreachable code sections. When doing that, there's no caller for miiphy_link anymore, so it can be removed. This in turns makes CONFIG_SYS_FAULT_ECHO_LINK_DOWN and CONFIG_SYS_FAULT_MII_ADDR unused so they are removed as well. Signed-off-by: Quentin Schulz <[email protected]> Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'net')
-rw-r--r--net/Kconfig11
-rw-r--r--net/net.c35
2 files changed, 0 insertions, 46 deletions
diff --git a/net/Kconfig b/net/Kconfig
index 42fcba5323f..e45ceb25106 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -53,17 +53,6 @@ config NET_MAXDEFRAG
used for reassembly, and thus an upper bound for the size of
IP datagrams that can be received.
-config SYS_FAULT_ECHO_LINK_DOWN
- bool "Echo the inverted Ethernet link state to the fault LED"
- help
- Echo the inverted Ethernet link state to the fault LED. Note, if
- this option is active, then CONFIG_SYS_FAULT_MII_ADDR also needs to
- be configured.
-
-config SYS_FAULT_MII_ADDR
- hex "MII address of the PHY to check for the Ethernet link state"
- depends on SYS_FAULT_ECHO_LINK_DOWN && LED_STATUS_RED_ENABLE
-
config TFTP_WINDOWSIZE
int "TFTP window size"
default 1
diff --git a/net/net.c b/net/net.c
index f579f6ac5bc..44ce0ba4011 100644
--- a/net/net.c
+++ b/net/net.c
@@ -88,15 +88,9 @@
#include <image.h>
#include <led.h>
#include <log.h>
-#if defined(CONFIG_LED_STATUS)
-#include <miiphy.h>
-#endif
#include <net.h>
#include <net6.h>
#include <ndisc.h>
-#if defined(CONFIG_LED_STATUS)
-#include <status_led.h>
-#endif
#include <watchdog.h>
#include <linux/compiler.h>
#include <net/fastboot_udp.h>
@@ -615,19 +609,6 @@ restart:
break;
}
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
-#if defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN) && \
- defined(CONFIG_LED_STATUS) && \
- defined(CONFIG_LED_STATUS_RED)
- /*
- * Echo the inverted link state to the fault LED.
- */
- if (miiphy_link(eth_get_dev()->name, CONFIG_SYS_FAULT_MII_ADDR))
- status_led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_OFF);
- else
- status_led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_ON);
-#endif /* CONFIG_SYS_FAULT_ECHO_LINK_DOWN, ... */
-#endif /* CONFIG_MII, ... */
#ifdef CONFIG_USB_KEYBOARD
net_busy_flag = 1;
#endif
@@ -688,22 +669,6 @@ restart:
((get_timer(0) - time_start) > time_delta)) {
thand_f *x;
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
-#if defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN) && \
- defined(CONFIG_LED_STATUS) && \
- defined(CONFIG_LED_STATUS_RED)
- /*
- * Echo the inverted link state to the fault LED.
- */
- if (miiphy_link(eth_get_dev()->name,
- CONFIG_SYS_FAULT_MII_ADDR))
- status_led_set(CONFIG_LED_STATUS_RED,
- CONFIG_LED_STATUS_OFF);
- else
- status_led_set(CONFIG_LED_STATUS_RED,
- CONFIG_LED_STATUS_ON);
-#endif /* CONFIG_SYS_FAULT_ECHO_LINK_DOWN, ... */
-#endif /* CONFIG_MII, ... */
debug_cond(DEBUG_INT_STATE, "--- net_loop timeout\n");
x = time_handler;
time_handler = (thand_f *)0;