[PATCH 03/17] net: ipv6: Add callbacks declarations to get access to IPv6 variables

Ramon Fried rfried.dev at gmail.com
Mon Sep 12 09:34:29 CEST 2022


On Thu, Sep 8, 2022 at 2:59 PM Viacheslav Mitrofanov
<v.v.mitrofanov at yadro.com> wrote:
>
> Set up callbacks for main IPv6 variables ip6add, serverip6, gatewayip6
> and set options to them in flag file. These variables are often set up by
> users.
>
> Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov at yadro.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> ---
>  include/env_callback.h | 10 ++++++++++
>  include/env_flags.h    | 10 ++++++++++
>  2 files changed, 20 insertions(+)
>
> diff --git a/include/env_callback.h b/include/env_callback.h
> index d5d2b2fcad..14c6ce0d24 100644
> --- a/include/env_callback.h
> +++ b/include/env_callback.h
> @@ -57,6 +57,15 @@
>  #define NET_CALLBACKS
>  #endif
>
> +#ifdef CONFIG_IPV6
> +#define NET6_CALLBACKS \
> +       "ip6addr:ip6addr," \
> +       "serverip6:serverip6," \
> +       "gatewayip6:gatewayip6,"
> +#else
> +#define NET6_CALLBACKS
> +#endif
> +
>  #ifdef CONFIG_BOOTSTD
>  #define BOOTSTD_CALLBACK       "bootmeths:bootmeths,"
>  #else
> @@ -71,6 +80,7 @@
>         ENV_DOT_ESCAPE ENV_FLAGS_VAR ":flags," \
>         "baudrate:baudrate," \
>         NET_CALLBACKS \
> +       NET6_CALLBACKS \
>         BOOTSTD_CALLBACK \
>         "loadaddr:loadaddr," \
>         SILENT_CALLBACK \
> diff --git a/include/env_flags.h b/include/env_flags.h
> index 313cb8c49a..718d72773c 100644
> --- a/include/env_flags.h
> +++ b/include/env_flags.h
> @@ -67,6 +67,15 @@ enum env_flags_varaccess {
>  #define NET_FLAGS
>  #endif
>
> +#ifdef CONFIG_IPV6
> +#define NET6_FLAGS \
> +       "ip6addr:s," \
> +       "serverip6:s," \
> +       "gatewayip6:s"
> +#else
> +#define NET6_FLAGS
> +#endif
> +
>  #ifndef CONFIG_ENV_OVERWRITE
>  #define SERIAL_FLAGS "serial#:so,"
>  #else
> @@ -76,6 +85,7 @@ enum env_flags_varaccess {
>  #define ENV_FLAGS_LIST_STATIC \
>         ETHADDR_FLAGS \
>         NET_FLAGS \
> +       NET6_FLAGS \
>         SERIAL_FLAGS \
>         CONFIG_ENV_FLAGS_LIST_STATIC
>
> --
> 2.25.1
>
Reviewed-by: Ramon Fried <rfried.dev at gmail.com>


More information about the U-Boot mailing list