[U-Boot] [PATCH] net: write enetaddr down to hardware on env_callback
Hannes Schmelzer
hannes at schmelzer.or.at
Sat Nov 12 17:20:35 CET 2016
On 11/12/2016 04:28 PM, Marek Vasut wrote:
> If mac-address is changed using "setenv ethaddr ...." command the new
> mac-adress also must be written into the responsible ethernet driver.
> This fixes the legacy ethernet handling.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Hannes Schmelzer <oe5hpm at oevsv.at>
> Cc: Joe Hershberger <joe.hershberger at ni.com>
> Cc: Tom Rini <trini at konsulko.com>
> ---
> net/eth_legacy.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/eth_legacy.c b/net/eth_legacy.c
> index d6d7cee..1354f49 100644
> --- a/net/eth_legacy.c
> +++ b/net/eth_legacy.c
> @@ -118,6 +118,7 @@ static int on_ethaddr(const char *name, const char *value, enum env_op op,
> case env_op_create:
> case env_op_overwrite:
> eth_parse_enetaddr(value, dev->enetaddr);
> + eth_write_hwaddr(dev, "eth", dev->index);
> break;
> case env_op_delete:
> memset(dev->enetaddr, 0, 6);
Reviewed-by: Hannes Schmelzer <oe5hpm at oevsv.at>
More information about the U-Boot
mailing list