]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ramips: zyxel wsm20: set mac address in dts 19799/head
authorRosen Penev <rosenp@gmail.com>
Thu, 14 Aug 2025 00:22:35 +0000 (17:22 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 24 Aug 2025 14:35:17 +0000 (16:35 +0200)
Support in mt76 has existed for quite a while. Use it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19799
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ramips/dts/mt7621_zyxel_wsm20.dts
target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

index 42dc716027505c6148d166e1861aaf973328f2e5..07e3551317600fe2cfe2a9201ae890b4db3d728e 100644 (file)
                                };
 
                                macaddr_factory_1fdfa: macaddr@1fdfa {
+                                       compatible = "mac-base";
                                        reg = <0x1fdfa 0x6>;
+                                       #nvmem-cell-cells = <1>;
                                };
 
                                macaddr_factory_1fdf4: macaddr@1fdf4 {
 };
 
 &gmac0 {
-       nvmem-cells = <&macaddr_factory_1fdfa>;
+       nvmem-cells = <&macaddr_factory_1fdfa 0>;
        nvmem-cell-names = "mac-address";
 };
 
                nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
                nvmem-cell-names = "eeprom", "precal";
                mediatek,disable-radar-background;
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               band@0 {
+                       reg = <0>;
+                       nvmem-cells = <&macaddr_factory_1fdfa 1>;
+                       nvmem-cell-names = "mac-address";
+               };
+
+               band@1 {
+                       reg = <1>;
+                       nvmem-cells = <&macaddr_factory_1fdfa 2>;
+                       nvmem-cell-names = "mac-address";
+               };
        };
 };
 
index 2dd11f67603346be4698e2a4029f13f149403f1f..fe0974049228a9ad227ed7790e51c02db190b478 100644 (file)
@@ -245,9 +245,4 @@ case "$board" in
                [ "$PHYNBR" = "0" ] && macaddr_setbit_la "$hw_mac_addr" > /sys${DEVPATH}/macaddress
                [ "$PHYNBR" = "1" ] && echo -n "$hw_mac_addr" > /sys${DEVPATH}/macaddress
                ;;
-       zyxel,wsm20)
-               hw_mac_addr="$(mtd_get_mac_binary Factory 0x1fdfa)"
-               [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
-               [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
-               ;;
 esac