summaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorBenjamin ROBIN <dev@benjarobin.fr>2025-05-17 22:09:30 +0200
committerTom Rini <trini@konsulko.com>2025-05-30 13:43:24 -0600
commit6aa9c0f453cf920762e0b90d56d80f7cb36d5e6d (patch)
tree54787124ff79ea9d99eb02647ac0cf12cd3f3b25 /env
parent93905ab6e7564089f5d7b703b660464d675e5ab0 (diff)
downloadu-boot-6aa9c0f453cf920762e0b90d56d80f7cb36d5e6d.tar.gz
u-boot-6aa9c0f453cf920762e0b90d56d80f7cb36d5e6d.zip
env: Fix network support when CONFIG_NET_LWIP is set
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> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'env')
-rw-r--r--env/flags.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/env/flags.c b/env/flags.c
index 233fd460d84..f734fda50c2 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++) {