[openwrt/openwrt] qualcommax: ipq807x: fix mac setup for Linksys MX4200v2

LEDE Commits lede-commits at lists.infradead.org
Sun Feb 16 04:03:31 PST 2025


robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/b02cdced3f2016f8e13794d39242f3e2b45827ad

commit b02cdced3f2016f8e13794d39242f3e2b45827ad
Author: Paweł Owoc <frut3k7 at gmail.com>
AuthorDate: Thu Aug 1 08:53:14 2024 +0200

    qualcommax: ipq807x: fix mac setup for Linksys MX4200v2
    
    Currently for Linksys MX4200v2 all u-boot ethXaddr variables share the same MAC address
    and there is no need to check them one by one.
    
    Signed-off-by: Paweł Owoc <frut3k7 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/16070
    (cherry picked from commit 80c867815636cbf32e85b431c5d06c531e4a371e)
    Signed-off-by: Rafal Boni <rafal.boni at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/17889
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
index 437581d001..373807048d 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
@@ -82,10 +82,8 @@ ipq807x_setup_macs()
 	case "$board" in
 		linksys,mx4200v2)
 			label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
-			for i in $(seq 3 5); do
-				[ "$(mtd_get_mac_ascii u_env eth${i}addr)" != "$label_mac" ] && lan_mac=$label_mac
-			done
-			[ "$(mtd_get_mac_ascii u_env eth2addr)" != "$label_mac" ] && wan_mac=$label_mac
+			[ "$(mtd_get_mac_ascii u_env eth1addr)" != "$label_mac" ] && wan_mac=$label_mac
+			[ "$(mtd_get_mac_ascii u_env eth2addr)" != "$label_mac" ] && lan_mac=$label_mac
 		;;
 		linksys,mx8500)
 			label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)




More information about the lede-commits mailing list