]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ramips: dir-3040-a1: fix MAC address assignment 21977/head
authorRosen Penev <rosenp@gmail.com>
Wed, 11 Feb 2026 00:29:33 +0000 (16:29 -0800)
committerRobert Marko <robimarko@gmail.com>
Wed, 18 Mar 2026 11:18:27 +0000 (12:18 +0100)
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>
target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts
target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

index 5044ba3bdc496f09ece4b0fa3558eb067736d108..314f53b985748986ef32ee3601cee9c98c8bb0c5 100644 (file)
 };
 
 &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";
+};
index a7fae4f8de013a63a013e8760ac11862d79b5d4c..fdfb199af370df1e1d2dd03166df40a30962632d 100644 (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)" \