1
0
Fork 0
forked from mirror/openwrt

ramips: dir-3040-a1: fix MAC address assignment

The dtsi used handles a bunch of non-DBDC platforms where the
assignments are correct. The 3040-a1 is different as there are 3 instead
of 2 wifi interfaces and WAN needs to be incremented by 1.

Remove userspace wifi assignmwent which was needed before per band nvmem
was supported.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21977
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Rosen Penev 2026-02-10 16:29:33 -08:00 committed by Robert Marko
parent 8364cb4baa
commit de08715d7f
2 changed files with 23 additions and 8 deletions

View file

@ -55,13 +55,33 @@
};
&wifi0 {
nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 1>;
nvmem-cell-names = "eeprom", "mac-address";
ieee80211-freq-limit;
/delete-property/ ieee80211-freq-limit;
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
#address-cells = <1>;
#size-cells = <0>;
band@0 {
reg = <0>;
nvmem-cells = <&macaddr_factory_e000 2>;
nvmem-cell-names = "mac-address";
};
band@1 {
reg = <1>;
nvmem-cells = <&macaddr_factory_e000 1>;
nvmem-cell-names = "mac-address";
};
};
&wifi1 {
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 3>;
nvmem-cell-names = "eeprom", "mac-address";
};
&gmac1 {
nvmem-cells = <&macaddr_factory_e000 4>;
nvmem-cell-names = "mac-address";
};

View file

@ -54,11 +54,6 @@ case "$board" in
[ "$PHYNBR" = "1" ] && \
macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress
;;
dlink,dir-3040-a1)
lan_mac_addr="$(mtd_get_mac_binary factory 0xe000)"
[ "$PHYNBR" = "0" ] && \
macaddr_add $lan_mac_addr 2 > /sys${DEVPATH}/macaddress
;;
dlink,dir-853-a3)
[ "$PHYNBR" = "0" ] && \
macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \