diff options
author | Sven Eckelmann <sven@narfation.org> | 2022-10-24 18:55:44 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-11-12 18:15:55 +0100 |
commit | 66a3c32b47a9c9da155fd04045d7262b005a1de3 (patch) | |
tree | 02951a3e7df68d105a0ef46c5c9ce5d0848088cf /target/linux/ipq40xx/base-files | |
parent | 65d9a715fc891740a900052be625f60da3a2b6a3 (diff) | |
download | upstream-66a3c32b47a9c9da155fd04045d7262b005a1de3.tar.gz upstream-66a3c32b47a9c9da155fd04045d7262b005a1de3.tar.bz2 upstream-66a3c32b47a9c9da155fd04045d7262b005a1de3.zip |
ipq40xx: Convert openmesh,a42 to DSA
* ethernet1:
- physical port label "Ethernet 1"
- can be used to power the device
- its mac address is printed on the device label
* ethernet2:
- physical port label "Ethernet 2"
Both ports are not marked by there role (because the vendor firmware
automatically detects roles) but the "Ethernet 1" port was used in the past
for "WAN" functionality in OpenWrt.
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'target/linux/ipq40xx/base-files')
-rw-r--r-- | target/linux/ipq40xx/base-files/etc/board.d/02_network | 6 | ||||
-rw-r--r-- | target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 80b7b02e8a..6c6d04a923 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -73,6 +73,9 @@ ipq40xx_setup_interfaces() netgear,srs60) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" ;; + openmesh,a42) + ucidef_set_interfaces_lan_wan "ethernet2" "ethernet1" + ;; zte,mf286d) ucidef_set_interfaces_lan_wan "lan2 lan3 lan4" "wan" ;; @@ -159,6 +162,9 @@ ipq40xx_setup_macs() pakedge,wr-1) wan_mac=$(macaddr_add $(get_mac_label) 1) ;; + openmesh,a42) + label_mac="$(mtd_get_mac_binary "0:ART" 0x0)" + ;; esac [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh index ddfef1ab2d..4ae4103131 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh @@ -29,6 +29,10 @@ preinit_set_mac_address() { ip link set dev lan1 address $(macaddr_add "$base_mac" 1) ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7) ;; + openmesh,a42) + ip link set dev ethernet1 address $(mtd_get_mac_binary "0:ART" 0x0) + ip link set dev ethernet2 address $(mtd_get_mac_binary "0:ART" 0x6) + ;; mikrotik,wap-ac) base_mac=$(cat /sys/firmware/mikrotik/hard_config/mac_base) ip link set dev sw-eth1 address "$base_mac" |