8devices,carambola|\
alfa-network,w502u|\
arcwireless,freestation5|\
- cudy,wr1000|\
lenovo,newifi-y1|\
lenovo,newifi-y1s|\
netgear,wnce2001|\
planex,vr500|\
samknows,whitebox-v8|\
youku,yk-l2|\
- zbtlink,zbt-we1326|\
zbtlink,zbt-we3526)
wan_mac=$(mtd_get_mac_binary factory 0xe006)
;;
belkin,f9k1109v1)
wan_mac=$(mtd_get_mac_ascii uboot-env HW_WAN_MAC)
lan_mac=$(mtd_get_mac_ascii uboot-env HW_LAN_MAC)
+ label_mac=$wan_mac
;;
buffalo,wcr-1166ds|\
buffalo,wsr-1166dhp)
zyxel,keenetic-start)
# This empty case has to be kept for devices without any MAC address adjustments
;;
+ cudy,wr1000)
+ wan_mac=$(mtd_get_mac_binary factory 0x2e)
+ label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
+ ;;
dlink,dch-m225|\
samsung,cy-swr1100)
lan_mac=$(mtd_get_mac_ascii factory lanmac)
lava,lr-25g001)
wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000)
lan_mac=$(macaddr_add "$wan_mac" 1)
+ label_mac=$wan_mac
+ ;;
+ dlink,dir-615-d|\
+ dlink,dir-615-h1|\
+ glinet,gl-mt300a|\
+ glinet,gl-mt300n|\
+ glinet,gl-mt750|\
+ zbtlink,zbt-wg3526-16m|\
+ zbtlink,zbt-wg3526-32m)
+ wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+ label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
;;
dlink,dir-645)
lan_mac=$(mtd_get_mac_ascii nvram lanmac)
dlink,dir-860l-b1)
lan_mac=$(mtd_get_mac_ascii factory lanmac)
wan_mac=$(mtd_get_mac_ascii factory wanmac)
+ label_mac=$(cat /sys/class/ieee80211/phy1/macaddress)
;;
dovado,tiny-ac)
lan_mac=$(mtd_get_mac_ascii u-boot-env LAN_MAC_ADDR)
hiwifi,hc5861|\
hiwifi,hc5861b|\
hiwifi,hc5962)
- lan_mac=`mtd_get_mac_ascii bdinfo "Vfac_mac "`
+ lan_mac=$(mtd_get_mac_ascii bdinfo "Vfac_mac ")
+ label_mac=$lan_mac
[ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address)
wan_mac=$(macaddr_add "$lan_mac" 1)
;;
trendnet,tew-691gr)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 3)
;;
- xiaomi,mir3g|\
+ vocore,vocore2|\
+ vocore,vocore2-lite)
+ label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
+ ;;
+ xiaomi,mir3g)
+ lan_mac=$(mtd_get_mac_binary factory 0xe006)
+ ;;
xiaomi,mir3p)
lan_mac=$(mtd_get_mac_binary factory 0xe006)
+ label_mac=$lan_mac
;;
xiaomi,miwifi-mini)
lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
;;
+ zbtlink,zbt-we1326)
+ wan_mac=$(mtd_get_mac_binary factory 0xe006)
+ label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
+ ;;
*)
wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
;;
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
+ [ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
}
board_config_update
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
+ label-mac-device = ðernet;
};
keys {
compatible = "glinet,gl-mt300a", "ralink,mt7620a-soc";
model = "GL-MT300A";
+ aliases {
+ label-mac-device = &wmac;
+ };
+
chosen {
bootargs = "console=ttyS0,115200";
};
compatible = "glinet,gl-mt300n", "ralink,mt7620a-soc";
model = "GL-MT300N";
+ aliases {
+ label-mac-device = &wmac;
+ };
+
chosen {
bootargs = "console=ttyS0,115200";
};
compatible = "glinet,gl-mt750", "ralink,mt7620a-soc";
model = "GL-MT750";
+ aliases {
+ label-mac-device = &wmac;
+ };
+
chosen {
bootargs = "console=ttyS0,115200";
};
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ label-mac-device = ðernet;
};
leds {
led-failsafe = &led_power_blue;
led-running = &led_power_blue;
led-upgrade = &led_power_blue;
+ label-mac-device = ðernet;
};
gpio_export {
led-failsafe = &led_blue;
led-running = &led_blue;
led-upgrade = &led_blue;
+ label-mac-device = ðernet;
};
chosen {
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ label-mac-device = ðernet;
};
keys {
led-failsafe = &led_sys;
led-running = &led_sys;
led-upgrade = &led_sys;
+ label-mac-device = ðernet;
};
chosen {
led-failsafe = &led_power_blue;
led-running = &led_power_blue;
led-upgrade = &led_power_blue;
+ label-mac-device = ðernet;
};
chosen {
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
+ label-mac-device = &wifi1;
};
chosen {
};
&pcie0 {
- mt76@0,0 {
+ wifi0: mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&radio 0x2000>;
ieee80211-freq-limit = <5000000 6000000>;
};
&pcie1 {
- mt76@0,0 {
+ wifi1: mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&radio 0>;
ieee80211-freq-limit = <2400000 2500000>;
led-failsafe = &led_blue;
led-running = &led_blue;
led-upgrade = &led_blue;
+ label-mac-device = ðernet;
};
chosen {
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ label-mac-device = ðernet;
};
chosen {
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ label-mac-device = ðernet;
};
chosen {
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ label-mac-device = ðernet;
};
chosen {
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ label-mac-device = ðernet;
};
chosen {
/ {
compatible = "ubiquiti,edgerouterx", "mediatek,mt7621-soc";
+ aliases {
+ label-mac-device = ðernet;
+ };
+
chosen {
bootargs = "console=ttyS0,57600";
};
compatible = "zbtlink,zbt-we1326", "mediatek,mt7621-soc";
model = "ZBT-WE1326";
+ aliases {
+ label-mac-device = &wifi1;
+ };
+
chosen {
bootargs = "console=ttyS0,115200";
};
};
&pcie0 {
- mt76@0,0 {
+ wifi0: mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
};
&pcie1 {
- mt76@0,0 {
+ wifi1: mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
ieee80211-freq-limit = <2400000 2500000>;
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
+ label-mac-device = &wifi0;
};
chosen {
};
&pcie0 {
- wifi@0,0 {
+ wifi0: wifi@0,0 {
compatible = "pci14c3,7603";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
};
&pcie1 {
- wifi@0,0 {
+ wifi1: wifi@0,0 {
compatible = "pci14c3,7662";
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
led-boot = &led_wps;
led-failsafe = &led_wps;
led-upgrade = &led_wps;
+ label-mac-device = &wmac;
};
keys {
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ label-mac-device = ðernet;
};
chosen {
led-failsafe = &led_cpu;
led-running = &led_cpu;
led-upgrade = &led_cpu;
+ label-mac-device = ðernet;
};
leds {
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ label-mac-device = ðernet;
};
keys {
chosen {
bootargs = "console=ttyS0,115200";
};
+
+ aliases {
+ label-mac-device = ðernet;
+ };
};
&spi0 {
chosen {
bootargs = "console=ttyS0,115200";
};
+
+ aliases {
+ label-mac-device = ðernet;
+ };
};
&spi0 {
/ {
compatible = "vocore,vocore2", "mediatek,mt7628an-soc";
+ aliases {
+ label-mac-device = &wmac;
+ };
+
chosen {
bootargs = "console=ttyS2,115200";
};
led-failsafe = &led_status_green;
led-running = &led_status_green;
led-upgrade = &led_status_green;
+ label-mac-device = &wmac;
};
cfi@1f000000 {
led-failsafe = &led_status_green;
led-running = &led_status_green;
led-upgrade = &led_status_green;
+ label-mac-device = &wmac;
};
leds {
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
+ label-mac-device = ðernet;
};
leds {
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
+ label-mac-device = ðernet;
};
gpio-export {
led-failsafe = &led_status;
led-running = &led_status;
led-upgrade = &led_status;
+ label-mac-device = ðernet;
};
leds {