get_mac_addr(addr);
}
- if (is_multicast_ethaddr(addr) || is_zero_ethaddr(addr)) {
+ if (!is_multicast_ethaddr(addr) && !is_zero_ethaddr(addr)) {
+ sprintf((char *)tmp, "%02x:%02x:%02x:%02x:%02x:%02x",
+ addr[0], addr[1], addr[2], addr[3], addr[4],
+ addr[5]);
+
+ setenv("ethaddr", (char *)tmp);
+ } else {
printf("Invalid MAC address read.\n");
- return -EINVAL;
}
- sprintf((char *)tmp, "%02x:%02x:%02x:%02x:%02x:%02x", addr[0],
- addr[1], addr[2], addr[3], addr[4], addr[5]);
-
- setenv("ethaddr", (char *)tmp);
}
+
#ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
/* Select RMII fucntion through the expander */
if (rmii_hw_init())