[openwrt/openwrt] mt7621: zyxel nwa-ax: set mac address in dts
LEDE Commits
lede-commits at lists.infradead.org
Sun Aug 17 09:56:21 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1180dd6bf7197e40ccafddb707cfef8ccb39dfa5
commit 1180dd6bf7197e40ccafddb707cfef8ccb39dfa5
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Wed Aug 13 16:34:05 2025 -0700
mt7621: zyxel nwa-ax: set mac address in dts
Support in mt76 has existed for quite a while. Use it.
Signed-off-by: Rosen Penev <rosenp at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19771
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi | 20 ++++++++++++++++++--
.../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 6 ------
2 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi b/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi
index cd6f63a78e..4505eb9c77 100644
--- a/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi
+++ b/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi
@@ -117,7 +117,9 @@
#size-cells = <1>;
macaddr_mrd_1fff8: macaddr at 1fff8 {
+ compatible = "mac-base";
reg = <0x1fff8 0x6>;
+ #nvmem-cell-cells = <1>;
};
};
};
@@ -134,12 +136,26 @@
reg = <0x0000 0 0 0 0>;
nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
nvmem-cell-names = "eeprom", "precal";
- /* MAC-Address set in userspace */
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ band at 0 {
+ reg = <0>;
+ nvmem-cells = <&macaddr_mrd_1fff8 0>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ band at 1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_mrd_1fff8 1>;
+ nvmem-cell-names = "mac-address";
+ };
};
};
&gmac0 {
- nvmem-cells = <&macaddr_mrd_1fff8>;
+ nvmem-cells = <&macaddr_mrd_1fff8 0>;
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 21ab3f16ea..2dd11f6760 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,12 +245,6 @@ 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,nwa50ax|\
- zyxel,nwa55axe)
- hw_mac_addr="$(mtd_get_mac_binary mrd 0x1fff8)"
- [ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
- [ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /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
More information about the lede-commits
mailing list