bcm53xx: add Cisco Meraki MR32
[openwrt/openwrt.git] / target / linux / bcm53xx / base-files / etc / board.d / 02_network
index 5752b7760d986214e195b4666f098d5e634b6ec3..231566cfa01c9112aef1a5a1c97cbed7795591d8 100755 (executable)
@@ -89,10 +89,15 @@ bcm53xx_setup_macs()
        netgear,r8500)
                # As vendor doesn't use eth0 its MAC may be missing. Use one from eth2.
                et2macaddr="$(nvram get et2macaddr)"
-               [ -n "$et2macaddr" ] && ucidef_set_interface_macaddr "lan" "$et2macaddr"
+               ;;
+       meraki,mr32)
+               # The MAC is stored on an AT24C64 eeprom and not on the nvram
+               et2macaddr=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66)
                ;;
        esac
 
+       [ -n "$et2macaddr" ] && ucidef_set_interface_macaddr "lan" "$et2macaddr"
+
        wan_macaddr="$(nvram get wan_hwaddr)"
        case "$board" in
        asus,rt-ac87u)