ath79: fix source of label MAC address for Ubiquiti XM devices
[oweals/openwrt.git] / target / linux / ath79 / generic / base-files / etc / board.d / 02_network
index e811f85f0ec3f32cde594f08bbf12309162e910b..05ee1aa016fcbb8b1ab8735a39f186e6457e0f9c 100755 (executable)
@@ -287,12 +287,7 @@ ath79_setup_macs()
                lan_mac=$(mtd_get_mac_binary "Board data" 2)
                label_mac=$lan_mac
                ;;
-       alfa-network,ap121f|\
-       ubnt,airrouter|\
-       ubnt,bullet-m|\
-       ubnt,nanostation-m|\
-       ubnt,rocket-m|\
-       ubnt,unifi)
+       alfa-network,ap121f)
                label_mac=$(mtd_get_mac_binary art 0x1002)
                ;;
        avm,fritz300e)
@@ -397,6 +392,13 @@ ath79_setup_macs()
                wan_mac=$(mtd_get_mac_text mac 0x18)
                label_mac=$wan_mac
                ;;
+       ubnt,airrouter|\
+       ubnt,bullet-m|\
+       ubnt,nanostation-m|\
+       ubnt,rocket-m|\
+       ubnt,unifi)
+               label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
+               ;;
        ubnt,routerstation|\
        ubnt,routerstation-pro)
                wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n ar7100_esa)