diff options
| author | Bjørn Mork | 2025-09-24 17:18:20 +0000 |
|---|---|---|
| committer | Hauke Mehrtens | 2025-09-26 22:32:40 +0000 |
| commit | 78257d8fe85027cdcef6037826595eba071dfdf1 (patch) | |
| tree | 820830c23d2e854539c69c873ab9d8e16a4e5456 | |
| parent | f4cc539f0ced46bccd318047b005962d1d89f800 (diff) | |
| download | openwrt-78257d8fe85027cdcef6037826595eba071dfdf1.tar.gz | |
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@mork.no>
Link: https://github.com/openwrt/openwrt/pull/20154
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
| -rw-r--r-- | target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts | 16 | ||||
| -rw-r--r-- | target/linux/mediatek/filogic/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@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@0 { + reg = <0>; + nvmem-cells = <&macaddr_eeprom_6 0>; + nvmem-cell-names = "mac-address"; + }; + + band@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|\ |