board: amlogic: Generate unique MAC address for Q200 and P212 based boards
authorNeil Armstrong <narmstrong@baylibre.com>
Wed, 12 Jun 2019 09:49:08 +0000 (11:49 +0200)
committerNeil Armstrong <narmstrong@baylibre.com>
Thu, 4 Jul 2019 14:04:59 +0000 (16:04 +0200)
Enable unique MAC address generation for boards usins SoCs having
a known functional and valid unique serial number.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
board/amlogic/p212/p212.c
board/amlogic/q200/q200.c

index 546c4d9c86d0e5bd39cf3a13fc175d598d0edb55..1159cee4ceeb476f53b7093d60ff0abdd3a6037e 100644 (file)
@@ -32,6 +32,8 @@ int misc_init_r(void)
                                          mac_addr, EFUSE_MAC_SIZE);
                if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr))
                        eth_env_set_enetaddr("ethaddr", mac_addr);
+               else
+                       meson_generate_serial_ethaddr();
        }
 
        if (!env_get("serial#")) {
index de97d6ad586d4daf90e93357add903af68264398..2ea97c362ec8265d79b2528d7f64bbd4fd3bb3ac 100644 (file)
@@ -31,6 +31,8 @@ int misc_init_r(void)
                                          mac_addr, EFUSE_MAC_SIZE);
                if (len == EFUSE_MAC_SIZE && is_valid_ethaddr(mac_addr))
                        eth_env_set_enetaddr("ethaddr", mac_addr);
+               else
+                       meson_generate_serial_ethaddr();
        }
 
        if (!env_get("serial#")) {