]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: write enetaddr down to hardware on env_callback
authorHannes Schmelzer <oe5hpm@oevsv.at>
Fri, 2 Sep 2016 12:48:17 +0000 (14:48 +0200)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 13 Oct 2016 17:25:26 +0000 (12:25 -0500)
If mac-address is changed using "setenv ethaddr ...." command the new
mac-adress also must be written into the responsible ethernet driver.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
net/eth-uclass.c

index c15cc4d90bf47dffacdd1339077340b0c99dd36a..a32961e6ceaae8e819a247c1f30bac24b3bc370f 100644 (file)
@@ -227,6 +227,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, pdata->enetaddr);
+                       eth_write_hwaddr(dev);
                        break;
                case env_op_delete:
                        memset(pdata->enetaddr, 0, 6);