mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-30 11:53:09 +01:00
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>
This commit is contained in:
parent
f4cc539f0c
commit
78257d8fe8
2 changed files with 16 additions and 5 deletions
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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|\
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue