[openwrt/openwrt] ath79: fix label_mac for NEC Aterm WG1200CR

LEDE Commits lede-commits at lists.infradead.org
Sat Mar 27 15:59:00 GMT 2021


adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e2331fb5491e52e3e21ab18b58d064b344e093e5

commit e2331fb5491e52e3e21ab18b58d064b344e093e5
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Thu Mar 25 00:15:57 2021 +0900

    ath79: fix label_mac for NEC Aterm WG1200CR
    
    On NEC Aterm WG1200CR, the MAC address for WAN is printed in the label
    on the case, not LAN.
    This patch fixes this issue.
    
    Fixes: 50fdc0374b ("ath79: provide label MAC address")
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 target/linux/ath79/generic/base-files/etc/board.d/02_network | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index e0c4f31e9d..8b3f04c8e1 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -525,8 +525,7 @@ ath79_setup_macs()
 		;;
 	dlink,dir-842-c1|\
 	dlink,dir-842-c2|\
-	dlink,dir-842-c3|\
-	nec,wg1200cr)
+	dlink,dir-842-c3)
 		lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
 		wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
 		label_mac=$lan_mac
@@ -587,6 +586,11 @@ ath79_setup_macs()
 		base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
 		wan_mac=$(macaddr_add "$base_mac" 1)
 		;;
+	nec,wg1200cr)
+		lan_mac=$(mtd_get_mac_ascii devdata "lanmac")
+		wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
+		label_mac=$wan_mac
+		;;
 	nec,wg800hp)
 		lan_mac=$(mtd_get_mac_text board_data 0x280)
 		wan_mac=$(mtd_get_mac_text board_data 0x480)



More information about the lede-commits mailing list