From: Adrian Schmutzler Date: Thu, 15 Aug 2019 13:13:33 +0000 (+0200) Subject: ath79: provide label MAC address X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=50fdc0374b75584f19c75f712ca0472a7113a065;p=openwrt%2Fstaging%2Fjogo.git ath79: provide label MAC address This patch adds the label MAC address for several devices in ath79. 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: - alfa-network,ap121f - avm,fritz300e - ubnt-xm devices For the following devices, label MAC address is tied to lan or wan, so no node to link to exists in device tree: - adtran,bsap1800-v2 - adtran,bsap1840 - dlink,dir-842-c1/-c2/-c3 - engenius,ecb1750 - iodata,etg3-r - iodata,wn-ac1167dgr - iodata,wn-ac1600dgr - iodata,wn-ac1600dgr2 - iodata,wn-ag300dgr - nec,wg800hp - nec,wg1200cr - trendnet,tew-823dru Signed-off-by: Adrian Schmutzler --- diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 5b47af8ef7..2ed4ee010c 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -314,9 +314,19 @@ ath79_setup_macs() adtran,bsap1800-v2|\ adtran,bsap1840) 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) + label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) ;; avm,fritz300e) lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) + label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) ;; avm,fritz4020) lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)")) @@ -334,8 +344,13 @@ ath79_setup_macs() dlink,dir-842-c1|\ dlink,dir-842-c2|\ dlink,dir-842-c3|\ + nec,wg1200cr) + lan_mac=$(mtd_get_mac_ascii devdata "lanmac") + wan_mac=$(mtd_get_mac_ascii devdata "wanmac") + label_mac=$lan_mac + ;; dlink,dir-859-a1|\ - nec,wg1200cr|\ + qihoo,c301|\ wd,mynet-n750) lan_mac=$(mtd_get_mac_ascii devdata "lanmac") wan_mac=$(mtd_get_mac_ascii devdata "wanmac") @@ -346,12 +361,9 @@ ath79_setup_macs() ;; engenius,ecb1750) lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) + label_mac=$(mtd_get_mac_ascii u-boot-env athaddr) ;; - engenius,epg5000|\ - iodata,wn-ac1167dgr|\ - iodata,wn-ac1600dgr|\ - iodata,wn-ac1600dgr2|\ - iodata,wn-ag300dgr) + engenius,epg5000) lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr) ;; @@ -364,6 +376,15 @@ ath79_setup_macs() iodata,etg3-r) lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac=$(macaddr_add "$lan_mac" -1) + label_mac=$wan_mac + ;; + iodata,wn-ac1167dgr|\ + iodata,wn-ac1600dgr|\ + iodata,wn-ac1600dgr2|\ + iodata,wn-ag300dgr) + lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) + wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr) + label_mac=$wan_mac ;; jjplus,ja76pf2) wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n alias/ethaddr) @@ -372,6 +393,7 @@ ath79_setup_macs() nec,wg800hp) lan_mac=$(mtd_get_mac_text board_data 0x280) wan_mac=$(mtd_get_mac_text board_data 0x480) + label_mac=$wan_mac ;; netgear,wndr3700|\ netgear,wndr3700v2|\ @@ -382,10 +404,6 @@ ath79_setup_macs() lan_mac=$(k2t_get_mac "lan_mac") wan_mac=$(k2t_get_mac "wan_mac") ;; - qihoo,c301) - lan_mac=$(mtd_get_mac_ascii devdata lanmac) - wan_mac=$(mtd_get_mac_ascii devdata wanmac) - ;; rosinson,wr818) wan_mac=$(mtd_get_mac_binary factory 0x0) lan_mac=$(macaddr_setbit_la "$wan_mac") @@ -406,6 +424,7 @@ ath79_setup_macs() trendnet,tew-823dru) lan_mac=$(mtd_get_mac_text mac 0x4) wan_mac=$(mtd_get_mac_text mac 0x18) + label_mac=$wan_mac ;; ubnt,routerstation|\ ubnt,routerstation-pro) @@ -419,6 +438,7 @@ ath79_setup_macs() [ -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 diff --git a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts index 45d4d03f31..91f6e1dc02 100644 --- a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts +++ b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts @@ -19,6 +19,7 @@ led-failsafe = &power_red; led-running = &power_green; led-upgrade = &power_green; + label-mac-device = ð0; }; extosc: ref { diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi index 89e9b2fbb7..070f450778 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi +++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi @@ -12,6 +12,7 @@ led-failsafe = &power_orange; led-running = &power_green; led-upgrade = &power_orange; + label-mac-device = ð0; }; chosen { diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi index b7db74d937..89c11762b5 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi @@ -11,6 +11,7 @@ led-failsafe = &led_system; led-running = &led_system; led-upgrade = &led_system; + label-mac-device = &ath9k; }; keys { diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi index fa6ba71925..827c51ba8b 100644 --- a/target/linux/ath79/dts/ar7241_tplink.dtsi +++ b/target/linux/ath79/dts/ar7241_tplink.dtsi @@ -11,6 +11,7 @@ led-failsafe = &led_system; led-running = &led_system; led-upgrade = &led_system; + label-mac-device = &ath9k; }; keys { diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts index 282446b1e1..15cb22b518 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts @@ -15,6 +15,7 @@ led-failsafe = &led_system; led-running = &led_system; led-upgrade = &led_system; + label-mac-device = &ath9k; }; keys { diff --git a/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts b/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts index 774a45f22d..f12d4341c6 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts +++ b/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts @@ -12,6 +12,7 @@ led-failsafe = &globe; led-running = &globe; led-upgrade = &globe; + label-mac-device = &wifi; }; airrouter-leds { diff --git a/target/linux/ath79/dts/ar7241_ubnt_unifi.dts b/target/linux/ath79/dts/ar7241_ubnt_unifi.dts index 27aec88cca..44a5fdd0bd 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_unifi.dts +++ b/target/linux/ath79/dts/ar7241_ubnt_unifi.dts @@ -15,6 +15,7 @@ led-failsafe = &dome_green; led-running = &dome_green; led-upgrade = &dome_green; + label-mac-device = &wifi; }; extosc: ref { @@ -110,7 +111,7 @@ &pcie { status = "okay"; - wifi@0,0 { + wifi: wifi@0,0 { reg = <0x0000 0 0 0 0>; qca,no-eeprom; }; diff --git a/target/linux/ath79/dts/ar7241_ubnt_xm.dtsi b/target/linux/ath79/dts/ar7241_ubnt_xm.dtsi index 5466575229..d330a56ee2 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_xm.dtsi +++ b/target/linux/ath79/dts/ar7241_ubnt_xm.dtsi @@ -89,7 +89,7 @@ &pcie { status = "okay"; - wifi@0,0 { + wifi: wifi@0,0 { reg = <0x0000 0 0 0 0>; qca,no-eeprom; }; diff --git a/target/linux/ath79/dts/ar7241_ubnt_xm_outdoor.dtsi b/target/linux/ath79/dts/ar7241_ubnt_xm_outdoor.dtsi index c773f1aac3..787a01771e 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_xm_outdoor.dtsi +++ b/target/linux/ath79/dts/ar7241_ubnt_xm_outdoor.dtsi @@ -9,6 +9,7 @@ aliases { led-boot = &link4; led-failsafe = &link4; + label-mac-device = &wifi; }; leds { diff --git a/target/linux/ath79/dts/ar7242_avm_fritz300e.dts b/target/linux/ath79/dts/ar7242_avm_fritz300e.dts index 3621714d9d..a7fdc97780 100644 --- a/target/linux/ath79/dts/ar7242_avm_fritz300e.dts +++ b/target/linux/ath79/dts/ar7242_avm_fritz300e.dts @@ -15,6 +15,7 @@ led-failsafe = &power; led-running = &power; led-upgrade = &power; + label-mac-device = &ath9k; }; keys { diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts index e76f677fd5..37c98604ad 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts @@ -10,6 +10,10 @@ compatible = "buffalo,wzr-hp-g450h", "qca,ar7242"; model = "Buffalo WZR-HP-G450H/WZR-450HP"; + aliases { + label-mac-device = ð0; + }; + ath9k-leds { compatible = "gpio-leds"; diff --git a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts index c42207e6cf..08f82a8710 100644 --- a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts +++ b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts @@ -15,6 +15,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = ð0; }; chosen { diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts index 6551d0a7ff..2fff08195b 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts @@ -15,6 +15,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = ð0; }; extosc: ref { diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts index f617d89c5b..88b9d36a2d 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts @@ -15,6 +15,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = ð0; }; extosc: ref { diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts index 93b99beb6d..80677fa894 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts @@ -15,6 +15,7 @@ led-failsafe = &led_system; led-running = &led_system; led-upgrade = &led_system; + label-mac-device = ð0; }; keys { diff --git a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts index 76f6e80236..e4ea4c95af 100644 --- a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts +++ b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts @@ -15,6 +15,7 @@ led-boot = &wlan; led-failsafe = &wlan; led-upgrade = &wlan; + label-mac-device = ð0; }; leds { diff --git a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts index eb8ea3b20c..8af378ef92 100644 --- a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts +++ b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts @@ -12,6 +12,7 @@ aliases { serial0 = &uart; + label-mac-device = &wmac; }; leds { diff --git a/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts b/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts index 1dc659b9e4..8b8e304c9b 100644 --- a/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts +++ b/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts @@ -16,6 +16,7 @@ led-failsafe = &led_system; led-running = &led_system; led-upgrade = &led_system; + label-mac-device = &wmac; }; keys { diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts index 9182374235..728463bb9d 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts @@ -16,6 +16,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = ð0; }; leds { diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts index ebf4d4485f..1644799235 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts @@ -13,6 +13,7 @@ aliases { led-boot = &led_lan; led-failsafe = &led_lan; + label-mac-device = ð0; }; leds { diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi index ffd3d71a62..a0f54850c1 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi @@ -13,6 +13,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = ð0; }; keys { diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts index 056e9fa512..0254b40aae 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n-v1.dts @@ -16,6 +16,7 @@ led-failsafe = &led_system; led-running = &led_system; led-upgrade = &led_system; + label-mac-device = ð0; }; keys { diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi index e4b59f1591..9fef023f80 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi @@ -16,6 +16,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = &wmac; }; keys { diff --git a/target/linux/ath79/dts/ar9341_tplink.dtsi b/target/linux/ath79/dts/ar9341_tplink.dtsi index e472481936..5dbcac34af 100644 --- a/target/linux/ath79/dts/ar9341_tplink.dtsi +++ b/target/linux/ath79/dts/ar9341_tplink.dtsi @@ -13,6 +13,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = &wmac; }; keys: keys { diff --git a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi index 84fc222156..76c5c5efca 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi @@ -14,6 +14,7 @@ led-running = &system; led-upgrade = &system; led-failsafe = &system; + label-mac-device = &wmac; }; leds { diff --git a/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts b/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts index b0fdce77a6..8fe45f64a3 100644 --- a/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts +++ b/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts @@ -15,6 +15,7 @@ led-boot = &wan; led-failsafe = &wan; led-upgrade = &wan; + label-mac-device = ð0; }; leds { diff --git a/target/linux/ath79/dts/ar9344_tplink_cpexxx.dtsi b/target/linux/ath79/dts/ar9344_tplink_cpexxx.dtsi index 15b4fc8876..dc7313b58a 100644 --- a/target/linux/ath79/dts/ar9344_tplink_cpexxx.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_cpexxx.dtsi @@ -7,6 +7,10 @@ #include "ar9344.dtsi" / { + aliases { + label-mac-device = &wmac; + }; + keys { compatible = "gpio-keys"; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts index fbe10752e7..e709e6b547 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts @@ -6,6 +6,10 @@ / { model = "TP-Link TL-WDR3500 v1"; compatible = "tplink,tl-wdr3500-v1", "qca,ar9344"; + + aliases { + label-mac-device = &wmac; + }; }; &leds { diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi index edf60df0cc..9ca96cc7cd 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi @@ -2,6 +2,12 @@ #include "ar9344_tplink_tl-wdrxxxx.dtsi" +/ { + aliases { + label-mac-device = &ath9k; + }; +}; + &leds { usb1 { label = "tp-link:green:usb1"; diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts index c181b32aa6..3851f77f6a 100644 --- a/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts +++ b/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts @@ -10,6 +10,10 @@ compatible = "comfast,cf-e5", "qca,qca9531"; model = "COMFAST CF-E5/E7"; + aliases { + label-mac-device = ð0; + }; + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi index 8b127ed1d8..5d0dd74c3f 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi @@ -11,6 +11,7 @@ led-failsafe = &led_status; led-running = &led_status; led-upgrade = &led_status; + label-mac-device = ð0; }; keys { diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts index 54aad320f6..1ce0d91bfe 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts @@ -10,6 +10,10 @@ compatible = "glinet,gl-ar750", "qca,qca9531"; model = "GL.iNet GL-AR750"; + aliases { + label-mac-device = ð0; + }; + keys { compatible = "gpio-keys"; diff --git a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts index 25c1d050da..430a8f98ed 100644 --- a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts @@ -10,6 +10,10 @@ compatible = "tplink,archer-d50-v1", "qca,qca9531"; model = "TP-Link Archer D50 v1"; + aliases { + label-mac-device = &wmac; + }; + chosen { bootargs = "console=ttyS0,115200n8"; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_cpe210.dtsi b/target/linux/ath79/dts/qca9533_tplink_cpe210.dtsi index f86ff30fc7..f61b05d746 100644 --- a/target/linux/ath79/dts/qca9533_tplink_cpe210.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_cpe210.dtsi @@ -16,6 +16,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = ð0; }; leds { diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi index 34f242ac56..61777027ed 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi @@ -11,6 +11,10 @@ bootargs = "console=ttyS0,115200n8"; }; + aliases { + label-mac-device = &wmac; + }; + gpio_leds: leds { compatible = "gpio-leds"; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts index 22d70af594..8a6667e028 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts @@ -15,6 +15,7 @@ led-failsafe = &power_led; led-running = &power_led; led-upgrade = &power_led; + label-mac-device = ð1; }; gpio_leds: leds { diff --git a/target/linux/ath79/dts/qca9533_ubnt_acb-isp.dts b/target/linux/ath79/dts/qca9533_ubnt_acb-isp.dts index 3bdaa8ba9b..590ec448e9 100644 --- a/target/linux/ath79/dts/qca9533_ubnt_acb-isp.dts +++ b/target/linux/ath79/dts/qca9533_ubnt_acb-isp.dts @@ -10,6 +10,10 @@ compatible = "ubnt,acb-isp", "qca,qca9533"; model = "Ubiquiti airCube ISP"; + aliases { + label-mac-device = &wmac; + }; + keys { compatible = "gpio-keys"; diff --git a/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi b/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi index d4faee7506..649e538fc0 100644 --- a/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi +++ b/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi @@ -16,6 +16,7 @@ led-failsafe = &led_system; led-running = &led_system; led-upgrade = &led_system; + label-mac-device = ð1; }; gpio_leds: leds { diff --git a/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi b/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi index 3e94eda953..2d91ba1ce1 100644 --- a/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi +++ b/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi @@ -16,6 +16,7 @@ led-failsafe = &power_amber; led-running = &power_green; led-upgrade = &power_amber; + label-mac-device = ð0; }; led_spi { diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts index a80155b08c..5b55541557 100644 --- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts +++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts @@ -19,6 +19,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = ð0; }; leds { diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi b/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi index 343d318e0b..c1bd795396 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi @@ -16,6 +16,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = ð1; }; gpio_leds: leds { diff --git a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi index c593cc434f..2bc0f38f02 100644 --- a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi @@ -17,6 +17,7 @@ led-running = &led_power; led-upgrade = &led_power; mdio-gpio0 = &mdio2; + label-mac-device = ð0; }; leds { diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts index 3cc2d790d4..77166b8bfe 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts @@ -19,6 +19,7 @@ led-failsafe = &led_system; led-running = &led_system; led-upgrade = &led_system; + label-mac-device = ð1; }; gpio_leds: leds { diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi index 61d4aec624..1092250f02 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi @@ -16,6 +16,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = &wmac; }; leds { diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts index c33fe7404a..13dacc2ff8 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts @@ -19,6 +19,7 @@ led-failsafe = &led_system; led-running = &led_system; led-upgrade = &led_system; + label-mac-device = ð0; }; leds { diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts index 881e3a1822..794ac24ed8 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts @@ -55,6 +55,7 @@ led-failsafe = &power; led-running = &power; led-upgrade = &power; + label-mac-device = ð0; }; leds { diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi index 141baa6bd4..80d8e707bb 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi @@ -13,6 +13,7 @@ led-failsafe = &power; led-running = &power; led-upgrade = &power; + label-mac-device = ð1; }; chosen { diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts index f4add2fe31..9c8e00ca90 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts @@ -19,6 +19,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = ð0; }; led_spi { diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi b/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi index ac10d9134a..2ed5e0ceb4 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi @@ -16,6 +16,7 @@ led-failsafe = &power; led-running = &power; led-upgrade = &power; + label-mac-device = ð0; }; leds { diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi index 324d831249..2e66e0f03e 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi @@ -16,6 +16,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = ð0; }; gpio_leds: leds { diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi index 42b4b6b8c6..d21bee6970 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi @@ -16,6 +16,7 @@ led-failsafe = &system; led-running = &system; led-upgrade = &system; + label-mac-device = &wmac; }; gpio_leds: leds { diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi index 6fe43453ec..4f77661fbd 100644 --- a/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi +++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi @@ -2,6 +2,12 @@ #include "qca9563_ubnt_unifiac.dtsi" +/ { + aliases { + label-mac-device = ð0; + }; +}; + &mdio0 { status = "okay"; diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi index f218143550..3a6c0cd3fa 100644 --- a/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi +++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi @@ -2,6 +2,12 @@ #include "qca9563_ubnt_unifiac.dtsi" +/ { + aliases { + label-mac-device = ð0; + }; +}; + &mdio0 { status = "okay"; phy-mask = <0>;