[PATCH v3 3/3] net: lwip: introduce net_lwip_eth_stop() function

Jerome Forissier jerome.forissier at arm.com
Tue Jun 16 17:38:16 CEST 2026


On 12/06/2026 01:36, David Lechner wrote:
> 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 <dlechner at baylibre.com>
> ---
>  cmd/lwip/ping.c     | 19 +++++++++++--------
>  cmd/lwip/sntp.c     | 10 ++++++++--
>  include/net-lwip.h  |  1 +
>  net/lwip/dhcp.c     | 15 +++++++++++----
>  net/lwip/dns.c      |  7 ++++++-
>  net/lwip/net-lwip.c | 16 ++++++++++++++++
>  net/lwip/nfs.c      |  4 ++++
>  net/lwip/tftp.c     |  4 ++++
>  net/lwip/wget.c     |  5 ++++-
>  9 files changed, 65 insertions(+), 16 deletions(-)
Reviewed-by: Jerome Forissier <jerome.forissier at arm.com>

Thanks,
-- 
Jerome


More information about the U-Boot mailing list