[openwrt/openwrt] ath79: improve MAC address configuration of ELECOM devices

LEDE Commits lede-commits at lists.infradead.org
Wed Oct 19 14:25:07 PDT 2022


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/48bb71ff280e2d3cd97c7a48b0d17c209ae6a36c

commit 48bb71ff280e2d3cd97c7a48b0d17c209ae6a36c
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Thu Oct 20 00:00:27 2022 +0900

    ath79: improve MAC address configuration of ELECOM devices
    
    Get MAC address of WAN from HW.WAN.MAC.Address in hwconfig partition
    instead of calculated one from wlan's address.
    And added label_mac.
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 target/linux/ath79/generic/base-files/etc/board.d/02_network | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 a2ae5cb8de..1d8beaaa25 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
@@ -634,7 +634,8 @@ ath79_setup_macs()
 		;;
 	elecom,wrc-1750ghbk2-i|\
 	elecom,wrc-300ghbk2-i)
-		wan_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" -2)
+		wan_mac=$(mtd_get_mac_ascii hwconfig "HW.WAN.MAC.Address")
+		label_mac=$wan_mac
 		;;
 	engenius,ecb1200|\
 	engenius,ecb1750)




More information about the lede-commits mailing list