If the ethernet address environment is set with a valid
ethernet address prevent overriding it as it is most likely
set by the user and he/she doesn't want board code to
automatically override it whatsoever.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
{
char buf[ARP_HLEN_ASCII + 1];
+ if (eth_getenv_enetaddr(name, (uchar *)buf))
+ return -EEXIST;
+
sprintf(buf, "%pM", enetaddr);
return setenv(name, buf);