All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] env: Fix network support when CONFIG_NET_LWIP is set
@ 2025-05-17 20:09 Benjamin ROBIN
  2025-05-19  8:52 ` Jerome Forissier
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Benjamin ROBIN @ 2025-05-17 20:09 UTC (permalink / raw)
  To: u-boot; +Cc: jerome.forissier, joe.hershberger, Benjamin ROBIN

When lwIP (CONFIG_NET_LWIP) is used instead of legacy stack (CONFIG_NET),
environment flags support associated with network was not built: restore
support of "i" and "m" environment flags.

Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
---
 env/flags.c            | 10 +++++-----
 include/env_callback.h |  2 +-
 include/env_flags.h    |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/env/flags.c b/env/flags.c
index 233fd460d842..f734fda50c27 100644
--- a/env/flags.c
+++ b/env/flags.c
@@ -22,7 +22,7 @@
 #include <env_internal.h>
 #endif
 
-#ifdef CONFIG_NET
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 #define ENV_FLAGS_NET_VARTYPE_REPS "im"
 #else
 #define ENV_FLAGS_NET_VARTYPE_REPS ""
@@ -57,7 +57,7 @@ static const char * const env_flags_vartype_names[] = {
 	"decimal",
 	"hexadecimal",
 	"boolean",
-#ifdef CONFIG_NET
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 	"IP address",
 	"MAC address",
 #endif
@@ -211,7 +211,7 @@ static void skip_num(int hex, const char *value, const char **end,
 		*end = value;
 }
 
-#ifdef CONFIG_NET
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 int eth_validate_ethaddr_str(const char *addr)
 {
 	const char *end;
@@ -244,7 +244,7 @@ static int _env_flags_validate_type(const char *value,
 	enum env_flags_vartype type)
 {
 	const char *end;
-#ifdef CONFIG_NET
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 	const char *cur;
 	int i;
 #endif
@@ -273,7 +273,7 @@ static int _env_flags_validate_type(const char *value,
 		if (value[1] != '\0')
 			return -1;
 		break;
-#ifdef CONFIG_NET
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 	case env_flags_vartype_ipaddr:
 		cur = value;
 		for (i = 0; i < 4; i++) {
diff --git a/include/env_callback.h b/include/env_callback.h
index 47a31f6cf52a..918ccb3b14f4 100644
--- a/include/env_callback.h
+++ b/include/env_callback.h
@@ -32,7 +32,7 @@
 #define DNS_CALLBACK
 #endif
 
-#ifdef CONFIG_NET
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 #define NET_CALLBACKS \
 	"bootfile:bootfile," \
 	"ipaddr:ipaddr," \
diff --git a/include/env_flags.h b/include/env_flags.h
index 2476043b0e38..92c7ea8529a3 100644
--- a/include/env_flags.h
+++ b/include/env_flags.h
@@ -14,7 +14,7 @@ enum env_flags_vartype {
 	env_flags_vartype_decimal,
 	env_flags_vartype_hex,
 	env_flags_vartype_bool,
-#ifdef CONFIG_NET
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 	env_flags_vartype_ipaddr,
 	env_flags_vartype_macaddr,
 #endif
@@ -41,7 +41,7 @@ enum env_flags_varaccess {
 #define CFG_ENV_FLAGS_LIST_STATIC ""
 #endif
 
-#ifdef CONFIG_NET
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 #ifdef CONFIG_REGEX
 #define ETHADDR_WILDCARD "\\d*"
 #else
@@ -123,7 +123,7 @@ enum env_flags_varaccess env_flags_parse_varaccess(const char *flags);
  */
 enum env_flags_varaccess env_flags_parse_varaccess_from_binflags(int binflags);
 
-#ifdef CONFIG_NET
+#if CONFIG_IS_ENABLED(NET) || CONFIG_IS_ENABLED(NET_LWIP)
 /*
  * Check if a string has the format of an Ethernet MAC address
  */
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] env: Fix network support when CONFIG_NET_LWIP is set
  2025-05-17 20:09 [PATCH] env: Fix network support when CONFIG_NET_LWIP is set Benjamin ROBIN
@ 2025-05-19  8:52 ` Jerome Forissier
  2025-05-19 14:49 ` Tom Rini
  2025-05-31 14:22 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Jerome Forissier @ 2025-05-19  8:52 UTC (permalink / raw)
  To: Benjamin ROBIN, u-boot; +Cc: joe.hershberger


On 5/17/25 21:09, Benjamin ROBIN wrote:
> When lwIP (CONFIG_NET_LWIP) is used instead of legacy stack (CONFIG_NET),
> environment flags support associated with network was not built: restore
> support of "i" and "m" environment flags.
> 
> Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>
> ---
>  env/flags.c            | 10 +++++-----
>  include/env_callback.h |  2 +-
>  include/env_flags.h    |  6 +++---
>  3 files changed, 9 insertions(+), 9 deletions(-)

Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

Thanks,
-- 
Jerome

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] env: Fix network support when CONFIG_NET_LWIP is set
  2025-05-17 20:09 [PATCH] env: Fix network support when CONFIG_NET_LWIP is set Benjamin ROBIN
  2025-05-19  8:52 ` Jerome Forissier
@ 2025-05-19 14:49 ` Tom Rini
  2025-05-31 14:22 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2025-05-19 14:49 UTC (permalink / raw)
  To: Benjamin ROBIN; +Cc: u-boot, jerome.forissier, joe.hershberger

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

On Sat, May 17, 2025 at 10:09:30PM +0200, Benjamin ROBIN wrote:

> When lwIP (CONFIG_NET_LWIP) is used instead of legacy stack (CONFIG_NET),
> environment flags support associated with network was not built: restore
> support of "i" and "m" environment flags.
> 
> Signed-off-by: Benjamin ROBIN <dev@benjarobin.fr>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] env: Fix network support when CONFIG_NET_LWIP is set
  2025-05-17 20:09 [PATCH] env: Fix network support when CONFIG_NET_LWIP is set Benjamin ROBIN
  2025-05-19  8:52 ` Jerome Forissier
  2025-05-19 14:49 ` Tom Rini
@ 2025-05-31 14:22 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2025-05-31 14:22 UTC (permalink / raw)
  To: u-boot, Benjamin ROBIN; +Cc: jerome.forissier, joe.hershberger

On Sat, 17 May 2025 22:09:30 +0200, Benjamin ROBIN wrote:

> When lwIP (CONFIG_NET_LWIP) is used instead of legacy stack (CONFIG_NET),
> environment flags support associated with network was not built: restore
> support of "i" and "m" environment flags.
> 
> 

Applied to u-boot/master, thanks!

[1/1] env: Fix network support when CONFIG_NET_LWIP is set
      commit: 6aa9c0f453cf920762e0b90d56d80f7cb36d5e6d
-- 
Tom



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-05-31 14:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-17 20:09 [PATCH] env: Fix network support when CONFIG_NET_LWIP is set Benjamin ROBIN
2025-05-19  8:52 ` Jerome Forissier
2025-05-19 14:49 ` Tom Rini
2025-05-31 14:22 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.