[U-Boot] [PATCH] net: write enetaddr down to hardware on env_callback

Hannes Schmelzer oe5hpm at oevsv.at
Fri Sep 2 14:48:17 CEST 2016


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 at oevsv.at>

---

 net/eth-uclass.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index c15cc4d..a32961e 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -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);
-- 
1.9.1



More information about the U-Boot mailing list