From 9f7906a58cf194fc43484f5be4b65e368fa59040 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Thu, 11 Jun 2026 18:36:10 -0500 Subject: net: lwip: introduce net_lwip_eth_stop() function Add a introduce net_lwip_eth_stop() function and use that to stop the network interface after each command that uses the network. This makes the behavior the same as the legacy net code and avoids potential issues with the network interface being left in an active state after a command finishes. The start/stop is reference-counted since there is at least one command (dhcp) that calls another command (tftp) to avoid starting and stopping the network interface multiple times in a single command. Signed-off-by: David Lechner Reviewed-by: Jerome Forissier --- include/net-lwip.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/net-lwip.h b/include/net-lwip.h index 20cb0992cce..5d0627eb271 100644 --- a/include/net-lwip.h +++ b/include/net-lwip.h @@ -35,6 +35,7 @@ int eth_init_state_only(void); /* Set active state */ int net_lwip_dns_init(void); int net_lwip_eth_start(void); +void net_lwip_eth_stop(void); struct netif *net_lwip_new_netif(struct udevice *udev); struct netif *net_lwip_new_netif_noip(struct udevice *udev); void net_lwip_remove_netif(struct netif *netif); -- cgit v1.3.1