On Thu, Oct 16, 2025 at 02:53:50PM +0200, Heinrich Schuchardt wrote: > On 10/9/25 14:30, Jerome Forissier wrote: > > THere are currently two implementations of dhcp_run(): one in cmd/net.c > > for NET and one in net/lwip/dhcp.c for NET_LWIP. There is no > > justification for that. Therefore, move the NET version into > > net/net-common.c to be used by both stacks, and drop the NET_LWIP > > version which by the way does not look totally correct. > > > > Signed-off-by: Jerome Forissier <[email protected]> > > Suggested-by: Tom Rini <[email protected]> > > --- > > > > cmd/net.c | 36 ++---------------------------------- > > include/net-common.h | 10 ++++++++++ > > include/net-lwip.h | 1 - > > net/lwip/dhcp.c | 22 ---------------------- > > net/net-common.c | 35 +++++++++++++++++++++++++++++++++++ > > 5 files changed, 47 insertions(+), 57 deletions(-) > > > > diff --git a/cmd/net.c b/cmd/net.c > > index 886735ea14f6..24099764493e 100644 > > --- a/cmd/net.c > > +++ b/cmd/net.c > > @@ -134,8 +134,8 @@ U_BOOT_CMD(dhcp6, 3, 1, do_dhcp6, > > #endif > > #if defined(CONFIG_CMD_DHCP) > > -static int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, > > - char *const argv[]) > > +int do_dhcp(struct cmd_tbl *cmdtp, int flag, int argc, > > + char *const argv[]) > > Thank you for all this clean up work. > > Should we move the dhcp command to a new file cmd/dhcp.c to get rid of all > the related '#if' statements?
Might be a reasonable cleanup, yes. But at some point, the legacy network stack will be for SPL only, ideally. -- Tom
signature.asc
Description: PGP signature

