aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2016-11-12 16:28:40 +0100
committerTom Rini <trini@konsulko.com>2016-11-13 15:54:38 -0500
commit73d570a76ddee0a18445cd53c9473a445d2f08a4 (patch)
tree9e327781b012bbd4f2b65c9eaa68ddbce85e34ad /net
parent948b8bbd5fc4722ec10e0ffde29d31d982f6a6e4 (diff)
downloadu-boot-73d570a76ddee0a18445cd53c9473a445d2f08a4.zip
u-boot-73d570a76ddee0a18445cd53c9473a445d2f08a4.tar.gz
u-boot-73d570a76ddee0a18445cd53c9473a445d2f08a4.tar.bz2
net: write enetaddr down to hardware on env_callback
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@denx.de> Cc: Hannes Schmelzer <oe5hpm@oevsv.at> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Diffstat (limited to 'net')
-rw-r--r--net/eth_legacy.c1
1 files changed, 1 insertions, 0 deletions
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);