mediatek: filogic: fix 5G MAC address for Zyxel EX5601
authorPaweł Owoc <[email protected]>
Sun, 7 Sep 2025 14:50:48 +0000 (16:50 +0200)
committerHauke Mehrtens <[email protected]>
Wed, 10 Sep 2025 22:11:30 +0000 (00:11 +0200)
Currently 5G wireless interface MAC address is incorrect.
Fix by setting MAC address using Factory data.

Signed-off-by: Paweł Owoc <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/19968
Signed-off-by: Hauke Mehrtens <[email protected]>
target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac

index f0f31060815b131ff3199c535a6d21d30af0472f..a0545af30184e9a3780854a42139970002357ba5 100644 (file)
 };
 
 &wifi {
+       #address-cells = <1>;
+       #size-cells = <0>;
+
        status = "okay";
        pinctrl-names = "default", "dbdc";
        pinctrl-0 = <&wf_2g_5g_pins>;
        pinctrl-1 = <&wf_dbdc_pins>;
        nvmem-cells = <&eeprom_factory>;
        nvmem-cell-names = "eeprom";
+
+       band@1 {
+               reg = <1>;
+               nvmem-cells = <&macaddr_factory_4 1>;
+               nvmem-cell-names = "mac-address";
+       };
 };
 
 &crypto {
index 36024bf2e37387900f1dcfd540efa8d1d96b5741..646e925d18d4a488ddeaa6ed625d676acaf31b34 100644 (file)
@@ -209,11 +209,6 @@ case "$board" in
        zbtlink,zbt-z8102ax|\
        zbtlink,zbt-z8102ax-v2|\
        zbtlink,zbt-z8103ax|\
-       zyxel,ex5601-t0-stock|\
-       zyxel,ex5601-t0-ubootmod)
-               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