[openwrt/openwrt] mediatek: Fix setting MAC address for some devices

LEDE Commits lede-commits at lists.infradead.org
Sat Sep 20 10:27:06 PDT 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e49a2192e5ee6812f9e2bd44d85961406bcb0928

commit e49a2192e5ee6812f9e2bd44d85961406bcb0928
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Sep 20 00:09:29 2025 +0200

    mediatek: Fix setting MAC address for some devices
    
    This fixes a previous commit breaking setting the MAC address for the
    wifi devices.
    
    Fixes: 9ed4d27fbf90 ("mediatek: filogic: fix 5G MAC address for Zyxel EX5601")
    Link: https://github.com/openwrt/openwrt/pull/20100
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index 819fa44b93..d753941c62 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -215,7 +215,10 @@ case "$board" in
 	routerich,ax3000-ubootmod|\
 	zbtlink,zbt-z8102ax|\
 	zbtlink,zbt-z8102ax-v2|\
-	zbtlink,zbt-z8103ax|\
+	zbtlink,zbt-z8103ax)
+		addr=$(mtd_get_mac_binary "Factory" 0x4)
+		[ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
+		;;
 	wavlink,wl-wn573hx3)
 		addr=$(mtd_get_mac_binary factory 0x04)
 		[ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr -0x300000) > /sys${DEVPATH}/macaddress




More information about the lede-commits mailing list