summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRosen Penev2025-08-14 00:22:35 +0000
committerHauke Mehrtens2025-08-24 14:35:17 +0000
commit749fa79e016cd3c22ce5ee7a53c4dc61f67c8a8a (patch)
tree589bc1b2eb58dcfcab00a4a7f5c9246d122edb6b
parent41106141b85a38a285b370f347532dd553660b39 (diff)
downloadopenwrt-749fa79e016cd3c22ce5ee7a53c4dc61f67c8a8a.tar.gz
ramips: zyxel wsm20: set mac address in dts
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>
-rw-r--r--target/linux/ramips/dts/mt7621_zyxel_wsm20.dts19
-rw-r--r--target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac5
2 files changed, 18 insertions, 6 deletions
diff --git a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts
index 42dc716027..07e3551317 100644
--- a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts
+++ b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts
@@ -121,7 +121,9 @@
};
macaddr_factory_1fdfa: macaddr@1fdfa {
+ compatible = "mac-base";
reg = <0x1fdfa 0x6>;
+ #nvmem-cell-cells = <1>;
};
macaddr_factory_1fdf4: macaddr@1fdf4 {
@@ -180,7 +182,7 @@
};
&gmac0 {
- nvmem-cells = <&macaddr_factory_1fdfa>;
+ nvmem-cells = <&macaddr_factory_1fdfa 0>;
nvmem-cell-names = "mac-address";
};
@@ -208,6 +210,21 @@
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";
+ };
};
};
diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 2dd11f6760..fe09740492 100644
--- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -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