[openwrt/openwrt] mediatek: filogic: use nvmem for Unifi 6 Plus WiFi mac
LEDE Commits
lede-commits at lists.infradead.org
Fri Sep 26 15:33:26 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/78257d8fe85027cdcef6037826595eba071dfdf1
commit 78257d8fe85027cdcef6037826595eba071dfdf1
Author: Bjørn Mork <bjorn at mork.no>
AuthorDate: Wed Sep 24 19:18:20 2025 +0200
mediatek: filogic: use nvmem for Unifi 6 Plus WiFi mac
Avoids the occacial lost race, where VAPs are created before the hotplug
script has updated the phy mac address.
Signed-off-by: Bjørn Mork <bjorn at mork.no>
Link: https://github.com/openwrt/openwrt/pull/20154
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts | 16 ++++++++++++++++
.../base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac | 5 -----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts
index 51b8c42021..9c1182e85d 100644
--- a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts
+++ b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts
@@ -128,7 +128,9 @@
};
macaddr_eeprom_6: macaddr at 6 {
+ compatible = "mac-base";
reg = <0x6 0x6>;
+ #nvmem-cell-cells = <1>;
};
};
};
@@ -169,5 +171,19 @@
};
&wifi {
+ #address-cells = <1>;
+ #size-cells = <0>;
status = "okay";
+
+ band at 0 {
+ reg = <0>;
+ nvmem-cells = <&macaddr_eeprom_6 0>;
+ nvmem-cell-names = "mac-address";
+ };
+
+ band at 1 {
+ reg = <1>;
+ nvmem-cells = <&macaddr_eeprom_6 1>;
+ nvmem-cell-names = "mac-address";
+ };
};
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 d753941c62..93a3e86a16 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
@@ -206,11 +206,6 @@ case "$board" in
tplink,tl-xtr8488)
[ "$PHYNBR" = "1" ] && get_mac_label > /sys${DEVPATH}/macaddress
;;
- ubnt,unifi-6-plus)
- addr=$(mtd_get_mac_binary EEPROM 0x6)
- [ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress
- [ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
- ;;
routerich,ax3000|\
routerich,ax3000-ubootmod|\
zbtlink,zbt-z8102ax|\
More information about the lede-commits
mailing list