ramips: add support for Beeline SmartBox Flash
[openwrt/openwrt.git] / target / linux / ramips / mt7621 / base-files / etc / hotplug.d / ieee80211 / 10_fix_wifi_mac
index f2daac990bbcaa3b9339aec40f4a297aa745b557..d018c1de1b63dc85d3d51fe98474a7b1ca9d765a 100644 (file)
@@ -10,6 +10,12 @@ PHYNBR=${DEVPATH##*/phy}
 board=$(board_name)
 
 case "$board" in
+       beeline,smartbox-flash)
+               hw_mac_addr_ra0="$(mtd_get_mac_ascii u-boot-env ra0macaddr)"
+               hw_mac_addr_rax0="$(mtd_get_mac_ascii u-boot-env rax0macaddr)"
+               [ "$PHYNBR" = "0" ] && echo -n $hw_mac_addr_ra0 > /sys${DEVPATH}/macaddress
+               [ "$PHYNBR" = "1" ] && echo -n $hw_mac_addr_rax0 > /sys${DEVPATH}/macaddress
+               ;;
        dlink,dir-853-a3)
                [ "$PHYNBR" = "0" ] && \
                        macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \