Pārlūkot izejas kodu

ramips: provide label MAC address

This patch adds the label MAC address for several devices in
ramips.

Some devices require setting the MAC address in 02_network:

For the following devices, the netif device can be linked in
device tree, but the MAC address cannot be read:
- cudy,wr1000
- dlink,dir-615-d
- dlink,dir-615-h1
- dlink,dir-860l-b1
- glinet,gl-mt300a
- glinet,gl-mt300n
- glinet,gl-mt750
- vocore,vocore2
- vocore,vocore2-lite
- zbtlink,zbt-we1326
- zbtlink,zbt-wg3526

For the following devices, label MAC address is tied to lan or
wan, so no node to link to exists in device tree:
- dlink,dir-510l
- dlink,dwr-116-a1
- dlink,dwr-118-a1
- dlink,dwr-118-a2
- dlink,dwr-921-c1
- dlink,dwr-922-e2
- all hiwifi devices
- lava,lr-25g001
- xiaomi,mir3p

Signed-off-by: Adrian Schmutzler <[email protected]>
Adrian Schmutzler 6 gadi atpakaļ
vecāks
revīzija
7140394903
32 mainītis faili ar 93 papildinājumiem un 10 dzēšanām
  1. 32 4
      target/linux/ramips/base-files/etc/board.d/02_network
  2. 1 0
      target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts
  3. 4 0
      target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts
  4. 4 0
      target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts
  5. 4 0
      target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts
  6. 1 0
      target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts
  7. 1 0
      target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts
  8. 1 0
      target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts
  9. 1 0
      target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi
  10. 1 0
      target/linux/ramips/dts/mt7621_adslr_g7.dts
  11. 1 0
      target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts
  12. 3 2
      target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
  13. 1 0
      target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
  14. 1 0
      target/linux/ramips/dts/mt7621_mtc_wr1201.dts
  15. 1 0
      target/linux/ramips/dts/mt7621_netgear_r6220.dtsi
  16. 1 0
      target/linux/ramips/dts/mt7621_netgear_r6260_r6350_r6850.dtsi
  17. 1 0
      target/linux/ramips/dts/mt7621_tplink_re650-v1.dts
  18. 4 0
      target/linux/ramips/dts/mt7621_ubiquiti_edgerouterx.dtsi
  19. 6 2
      target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
  20. 3 2
      target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
  21. 1 0
      target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
  22. 1 0
      target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts
  23. 1 0
      target/linux/ramips/dts/mt7628an_iptime_a604m.dts
  24. 1 0
      target/linux/ramips/dts/mt7628an_netgear_r6120.dts
  25. 4 0
      target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi
  26. 4 0
      target/linux/ramips/dts/mt7628an_tplink_8m.dtsi
  27. 4 0
      target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi
  28. 1 0
      target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts
  29. 1 0
      target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts
  30. 1 0
      target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts
  31. 1 0
      target/linux/ramips/dts/rt5350_vocore_vocore.dtsi
  32. 1 0
      target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts

+ 32 - 4
target/linux/ramips/base-files/etc/board.d/02_network

@@ -511,7 +511,6 @@ ramips_setup_macs()
 	8devices,carambola|\
 	8devices,carambola|\
 	alfa-network,w502u|\
 	alfa-network,w502u|\
 	arcwireless,freestation5|\
 	arcwireless,freestation5|\
-	cudy,wr1000|\
 	lenovo,newifi-y1|\
 	lenovo,newifi-y1|\
 	lenovo,newifi-y1s|\
 	lenovo,newifi-y1s|\
 	netgear,wnce2001|\
 	netgear,wnce2001|\
@@ -547,7 +546,6 @@ ramips_setup_macs()
 	planex,vr500|\
 	planex,vr500|\
 	samknows,whitebox-v8|\
 	samknows,whitebox-v8|\
 	youku,yk-l2|\
 	youku,yk-l2|\
-	zbtlink,zbt-we1326|\
 	zbtlink,zbt-we3526)
 	zbtlink,zbt-we3526)
 		wan_mac=$(mtd_get_mac_binary factory 0xe006)
 		wan_mac=$(mtd_get_mac_binary factory 0xe006)
 		;;
 		;;
@@ -558,6 +556,7 @@ ramips_setup_macs()
 	belkin,f9k1109v1)
 	belkin,f9k1109v1)
 		wan_mac=$(mtd_get_mac_ascii uboot-env HW_WAN_MAC)
 		wan_mac=$(mtd_get_mac_ascii uboot-env HW_WAN_MAC)
 		lan_mac=$(mtd_get_mac_ascii uboot-env HW_LAN_MAC)
 		lan_mac=$(mtd_get_mac_ascii uboot-env HW_LAN_MAC)
+		label_mac=$wan_mac
 		;;
 		;;
 	buffalo,wcr-1166ds|\
 	buffalo,wcr-1166ds|\
 	buffalo,wsr-1166dhp)
 	buffalo,wsr-1166dhp)
@@ -574,6 +573,10 @@ ramips_setup_macs()
 	zyxel,keenetic-start)
 	zyxel,keenetic-start)
 		# This empty case has to be kept for devices without any MAC address adjustments
 		# 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|\
 	dlink,dch-m225|\
 	samsung,cy-swr1100)
 	samsung,cy-swr1100)
 		lan_mac=$(mtd_get_mac_ascii factory lanmac)
 		lan_mac=$(mtd_get_mac_ascii factory lanmac)
@@ -587,6 +590,17 @@ ramips_setup_macs()
 	lava,lr-25g001)
 	lava,lr-25g001)
 		wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000)
 		wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000)
 		lan_mac=$(macaddr_add "$wan_mac" 1)
 		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)
 	dlink,dir-645)
 		lan_mac=$(mtd_get_mac_ascii nvram lanmac)
 		lan_mac=$(mtd_get_mac_ascii nvram lanmac)
@@ -595,6 +609,7 @@ ramips_setup_macs()
 	dlink,dir-860l-b1)
 	dlink,dir-860l-b1)
 		lan_mac=$(mtd_get_mac_ascii factory lanmac)
 		lan_mac=$(mtd_get_mac_ascii factory lanmac)
 		wan_mac=$(mtd_get_mac_ascii factory wanmac)
 		wan_mac=$(mtd_get_mac_ascii factory wanmac)
+		label_mac=$(cat /sys/class/ieee80211/phy1/macaddress)
 		;;
 		;;
 	dovado,tiny-ac)
 	dovado,tiny-ac)
 		lan_mac=$(mtd_get_mac_ascii u-boot-env LAN_MAC_ADDR)
 		lan_mac=$(mtd_get_mac_ascii u-boot-env LAN_MAC_ADDR)
@@ -616,7 +631,8 @@ ramips_setup_macs()
 	hiwifi,hc5861|\
 	hiwifi,hc5861|\
 	hiwifi,hc5861b|\
 	hiwifi,hc5861b|\
 	hiwifi,hc5962)
 	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)
 		[ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address)
 		wan_mac=$(macaddr_add "$lan_mac" 1)
 		wan_mac=$(macaddr_add "$lan_mac" 1)
 		;;
 		;;
@@ -667,13 +683,24 @@ ramips_setup_macs()
 	trendnet,tew-691gr)
 	trendnet,tew-691gr)
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 3)
 		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)
 	xiaomi,mir3p)
 		lan_mac=$(mtd_get_mac_binary factory 0xe006)
 		lan_mac=$(mtd_get_mac_binary factory 0xe006)
+		label_mac=$lan_mac
 		;;
 		;;
 	xiaomi,miwifi-mini)
 	xiaomi,miwifi-mini)
 		lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
 		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)
 		wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
 		;;
 		;;
@@ -681,6 +708,7 @@ ramips_setup_macs()
 
 
 	[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
 	[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
 	[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
 	[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac
+	[ -n "$label_mac" ] && ucidef_set_label_macaddr $label_mac
 }
 }
 
 
 board_config_update
 board_config_update

+ 1 - 0
target/linux/ramips/dts/mt7620a_dlink_dir-810l.dts

@@ -14,6 +14,7 @@
 		led-failsafe = &led_power_green;
 		led-failsafe = &led_power_green;
 		led-running = &led_power_green;
 		led-running = &led_power_green;
 		led-upgrade = &led_power_green;
 		led-upgrade = &led_power_green;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	keys {
 	keys {

+ 4 - 0
target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts

@@ -9,6 +9,10 @@
 	compatible = "glinet,gl-mt300a", "ralink,mt7620a-soc";
 	compatible = "glinet,gl-mt300a", "ralink,mt7620a-soc";
 	model = "GL-MT300A";
 	model = "GL-MT300A";
 
 
+	aliases {
+		label-mac-device = &wmac;
+	};
+
 	chosen {
 	chosen {
 		bootargs = "console=ttyS0,115200";
 		bootargs = "console=ttyS0,115200";
 	};
 	};

+ 4 - 0
target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts

@@ -9,6 +9,10 @@
 	compatible = "glinet,gl-mt300n", "ralink,mt7620a-soc";
 	compatible = "glinet,gl-mt300n", "ralink,mt7620a-soc";
 	model = "GL-MT300N";
 	model = "GL-MT300N";
 
 
+	aliases {
+		label-mac-device = &wmac;
+	};
+
 	chosen {
 	chosen {
 		bootargs = "console=ttyS0,115200";
 		bootargs = "console=ttyS0,115200";
 	};
 	};

+ 4 - 0
target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts

@@ -9,6 +9,10 @@
 	compatible = "glinet,gl-mt750", "ralink,mt7620a-soc";
 	compatible = "glinet,gl-mt750", "ralink,mt7620a-soc";
 	model = "GL-MT750";
 	model = "GL-MT750";
 
 
+	aliases {
+		label-mac-device = &wmac;
+	};
+
 	chosen {
 	chosen {
 		bootargs = "console=ttyS0,115200";
 		bootargs = "console=ttyS0,115200";
 	};
 	};

+ 1 - 0
target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts

@@ -11,6 +11,7 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	leds {
 	leds {

+ 1 - 0
target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts

@@ -11,6 +11,7 @@
 		led-failsafe = &led_power_blue;
 		led-failsafe = &led_power_blue;
 		led-running = &led_power_blue;
 		led-running = &led_power_blue;
 		led-upgrade = &led_power_blue;
 		led-upgrade = &led_power_blue;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	gpio_export {
 	gpio_export {

+ 1 - 0
target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts

@@ -14,6 +14,7 @@
 		led-failsafe = &led_blue;
 		led-failsafe = &led_blue;
 		led-running = &led_blue;
 		led-running = &led_blue;
 		led-upgrade = &led_blue;
 		led-upgrade = &led_blue;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	chosen {
 	chosen {

+ 1 - 0
target/linux/ramips/dts/mt7620n_nexx_wt3020.dtsi

@@ -11,6 +11,7 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	keys {
 	keys {

+ 1 - 0
target/linux/ramips/dts/mt7621_adslr_g7.dts

@@ -15,6 +15,7 @@
 		led-failsafe = &led_sys;
 		led-failsafe = &led_sys;
 		led-running = &led_sys;
 		led-running = &led_sys;
 		led-upgrade = &led_sys;
 		led-upgrade = &led_sys;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	chosen {
 	chosen {

+ 1 - 0
target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts

@@ -14,6 +14,7 @@
 		led-failsafe = &led_power_blue;
 		led-failsafe = &led_power_blue;
 		led-running = &led_power_blue;
 		led-running = &led_power_blue;
 		led-upgrade = &led_power_blue;
 		led-upgrade = &led_power_blue;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	chosen {
 	chosen {

+ 3 - 2
target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts

@@ -14,6 +14,7 @@
 		led-failsafe = &led_power_green;
 		led-failsafe = &led_power_green;
 		led-running = &led_power_green;
 		led-running = &led_power_green;
 		led-upgrade = &led_power_green;
 		led-upgrade = &led_power_green;
+		label-mac-device = &wifi1;
 	};
 	};
 
 
 	chosen {
 	chosen {
@@ -119,7 +120,7 @@
 };
 };
 
 
 &pcie0 {
 &pcie0 {
-	mt76@0,0 {
+	wifi0: mt76@0,0 {
 		reg = <0x0000 0 0 0 0>;
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x2000>;
 		mediatek,mtd-eeprom = <&radio 0x2000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		ieee80211-freq-limit = <5000000 6000000>;
@@ -127,7 +128,7 @@
 };
 };
 
 
 &pcie1 {
 &pcie1 {
-	mt76@0,0 {
+	wifi1: mt76@0,0 {
 		reg = <0x0000 0 0 0 0>;
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0>;
 		mediatek,mtd-eeprom = <&radio 0>;
 		ieee80211-freq-limit = <2400000 2500000>;
 		ieee80211-freq-limit = <2400000 2500000>;

+ 1 - 0
target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts

@@ -14,6 +14,7 @@
 		led-failsafe = &led_blue;
 		led-failsafe = &led_blue;
 		led-running = &led_blue;
 		led-running = &led_blue;
 		led-upgrade = &led_blue;
 		led-upgrade = &led_blue;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	chosen {
 	chosen {

+ 1 - 0
target/linux/ramips/dts/mt7621_mtc_wr1201.dts

@@ -14,6 +14,7 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	chosen {
 	chosen {

+ 1 - 0
target/linux/ramips/dts/mt7621_netgear_r6220.dtsi

@@ -14,6 +14,7 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	chosen {
 	chosen {

+ 1 - 0
target/linux/ramips/dts/mt7621_netgear_r6260_r6350_r6850.dtsi

@@ -14,6 +14,7 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	chosen {
 	chosen {

+ 1 - 0
target/linux/ramips/dts/mt7621_tplink_re650-v1.dts

@@ -15,6 +15,7 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	chosen {
 	chosen {

+ 4 - 0
target/linux/ramips/dts/mt7621_ubiquiti_edgerouterx.dtsi

@@ -6,6 +6,10 @@
 / {
 / {
 	compatible = "ubiquiti,edgerouterx", "mediatek,mt7621-soc";
 	compatible = "ubiquiti,edgerouterx", "mediatek,mt7621-soc";
 
 
+	aliases {
+		label-mac-device = &ethernet;
+	};
+
 	chosen {
 	chosen {
 		bootargs = "console=ttyS0,57600";
 		bootargs = "console=ttyS0,57600";
 	};
 	};

+ 6 - 2
target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts

@@ -9,6 +9,10 @@
 	compatible = "zbtlink,zbt-we1326", "mediatek,mt7621-soc";
 	compatible = "zbtlink,zbt-we1326", "mediatek,mt7621-soc";
 	model = "ZBT-WE1326";
 	model = "ZBT-WE1326";
 
 
+	aliases {
+		label-mac-device = &wifi1;
+	};
+
 	chosen {
 	chosen {
 		bootargs = "console=ttyS0,115200";
 		bootargs = "console=ttyS0,115200";
 	};
 	};
@@ -83,7 +87,7 @@
 };
 };
 
 
 &pcie0 {
 &pcie0 {
-	mt76@0,0 {
+	wifi0: mt76@0,0 {
 		reg = <0x0000 0 0 0 0>;
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x8000>;
 		mediatek,mtd-eeprom = <&factory 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		ieee80211-freq-limit = <5000000 6000000>;
@@ -91,7 +95,7 @@
 };
 };
 
 
 &pcie1 {
 &pcie1 {
-	mt76@0,0 {
+	wifi1: mt76@0,0 {
 		reg = <0x0000 0 0 0 0>;
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x0000>;
 		mediatek,mtd-eeprom = <&factory 0x0000>;
 		ieee80211-freq-limit = <2400000 2500000>;
 		ieee80211-freq-limit = <2400000 2500000>;

+ 3 - 2
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi

@@ -11,6 +11,7 @@
 		led-failsafe = &led_status;
 		led-failsafe = &led_status;
 		led-running = &led_status;
 		led-running = &led_status;
 		led-upgrade = &led_status;
 		led-upgrade = &led_status;
+		label-mac-device = &wifi0;
 	};
 	};
 
 
 	chosen {
 	chosen {
@@ -92,7 +93,7 @@
 };
 };
 
 
 &pcie0 {
 &pcie0 {
-	wifi@0,0 {
+	wifi0: wifi@0,0 {
 		compatible = "pci14c3,7603";
 		compatible = "pci14c3,7603";
 		reg = <0x0000 0 0 0 0>;
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x0000>;
 		mediatek,mtd-eeprom = <&factory 0x0000>;
@@ -100,7 +101,7 @@
 };
 };
 
 
 &pcie1 {
 &pcie1 {
-	wifi@0,0 {
+	wifi1: wifi@0,0 {
 		compatible = "pci14c3,7662";
 		compatible = "pci14c3,7662";
 		reg = <0x0000 0 0 0 0>;
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x8000>;
 		mediatek,mtd-eeprom = <&factory 0x8000>;

+ 1 - 0
target/linux/ramips/dts/mt7628an_cudy_wr1000.dts

@@ -14,6 +14,7 @@
 		led-boot = &led_wps;
 		led-boot = &led_wps;
 		led-failsafe = &led_wps;
 		led-failsafe = &led_wps;
 		led-upgrade = &led_wps;
 		led-upgrade = &led_wps;
+		label-mac-device = &wmac;
 	};
 	};
 
 
 	keys {
 	keys {

+ 1 - 0
target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts

@@ -14,6 +14,7 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	chosen {
 	chosen {

+ 1 - 0
target/linux/ramips/dts/mt7628an_iptime_a604m.dts

@@ -15,6 +15,7 @@
 		led-failsafe = &led_cpu;
 		led-failsafe = &led_cpu;
 		led-running = &led_cpu;
 		led-running = &led_cpu;
 		led-upgrade = &led_cpu;
 		led-upgrade = &led_cpu;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	leds {
 	leds {

+ 1 - 0
target/linux/ramips/dts/mt7628an_netgear_r6120.dts

@@ -14,6 +14,7 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	keys {
 	keys {

+ 4 - 0
target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi

@@ -5,6 +5,10 @@
 	chosen {
 	chosen {
 		bootargs = "console=ttyS0,115200";
 		bootargs = "console=ttyS0,115200";
 	};
 	};
+
+	aliases {
+		label-mac-device = &ethernet;
+	};
 };
 };
 
 
 &spi0 {
 &spi0 {

+ 4 - 0
target/linux/ramips/dts/mt7628an_tplink_8m.dtsi

@@ -4,6 +4,10 @@
 	chosen {
 	chosen {
 		bootargs = "console=ttyS0,115200";
 		bootargs = "console=ttyS0,115200";
 	};
 	};
+
+	aliases {
+		label-mac-device = &ethernet;
+	};
 };
 };
 
 
 &spi0 {
 &spi0 {

+ 4 - 0
target/linux/ramips/dts/mt7628an_vocore_vocore2.dtsi

@@ -3,6 +3,10 @@
 / {
 / {
 	compatible = "vocore,vocore2", "mediatek,mt7628an-soc";
 	compatible = "vocore,vocore2", "mediatek,mt7628an-soc";
 
 
+	aliases {
+		label-mac-device = &wmac;
+	};
+
 	chosen {
 	chosen {
 		bootargs = "console=ttyS2,115200";
 		bootargs = "console=ttyS2,115200";
 	};
 	};

+ 1 - 0
target/linux/ramips/dts/rt3050_dlink_dir-615-d.dts

@@ -14,6 +14,7 @@
 		led-failsafe = &led_status_green;
 		led-failsafe = &led_status_green;
 		led-running = &led_status_green;
 		led-running = &led_status_green;
 		led-upgrade = &led_status_green;
 		led-upgrade = &led_status_green;
+		label-mac-device = &wmac;
 	};
 	};
 
 
 	cfi@1f000000 {
 	cfi@1f000000 {

+ 1 - 0
target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts

@@ -14,6 +14,7 @@
 		led-failsafe = &led_status_green;
 		led-failsafe = &led_status_green;
 		led-running = &led_status_green;
 		led-running = &led_status_green;
 		led-upgrade = &led_status_green;
 		led-upgrade = &led_status_green;
+		label-mac-device = &wmac;
 	};
 	};
 
 
 	leds {
 	leds {

+ 1 - 0
target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts

@@ -14,6 +14,7 @@
 		led-failsafe = &led_power;
 		led-failsafe = &led_power;
 		led-running = &led_power;
 		led-running = &led_power;
 		led-upgrade = &led_power;
 		led-upgrade = &led_power;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	leds {
 	leds {

+ 1 - 0
target/linux/ramips/dts/rt5350_vocore_vocore.dtsi

@@ -10,6 +10,7 @@
 		led-failsafe = &led_status;
 		led-failsafe = &led_status;
 		led-running = &led_status;
 		led-running = &led_status;
 		led-upgrade = &led_status;
 		led-upgrade = &led_status;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	gpio-export {
 	gpio-export {

+ 1 - 0
target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts

@@ -15,6 +15,7 @@
 		led-failsafe = &led_status;
 		led-failsafe = &led_status;
 		led-running = &led_status;
 		led-running = &led_status;
 		led-upgrade = &led_status;
 		led-upgrade = &led_status;
+		label-mac-device = &ethernet;
 	};
 	};
 
 
 	leds {
 	leds {