From 435dc2e77e3b6a92b3be1e386bf99d4d458d2bb9 Mon Sep 17 00:00:00 2001 From: Stefan Lippers-Hollmann Date: Fri, 7 May 2021 01:09:50 +0200 Subject: ipq806x: ecw5410: case-insensitive qcom-smem partitions The out-of-tree qcom-smem patches traditionally displayed mtd partition names in upper case, starting with the new mainline qcom-smem support in kernel v5.10, it switches to normalizing the partition names to lower case. Signed-off-by: Stefan Lippers-Hollmann --- target/linux/ipq806x/base-files/etc/board.d/02_network | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'target/linux/ipq806x/base-files/etc/board.d/02_network') diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index 511794a3ce..abdab89857 100644 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -28,8 +28,14 @@ tplink,vr2600v) ;; edgecore,ecw5410) ucidef_set_interfaces_lan_wan "eth1" "eth0" - ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:ART" 0x6)" - ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:ART" 0x0)" + if [ -b "$(find_mtd_part 0:art)" ]; then + ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:art" 0x6)" + ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:art" 0x0)" + else + # XXX: drop upper case after kernel v5.4 is gone (qcom-smem) + ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:ART" 0x6)" + ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:ART" 0x0)" + fi ;; linksys,ea7500-v1) hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr) -- cgit v1.2.3