Skip to content

Commit de08715

Browse files
nehebrobimarko
authored andcommitted
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: openwrt#21977 Signed-off-by: Robert Marko <robimarko@gmail.com>
1 parent 8364cb4 commit de08715

2 files changed

Lines changed: 23 additions & 8 deletions

File tree

target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,33 @@
5555
};
5656

5757
&wifi0 {
58-
nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 1>;
59-
nvmem-cell-names = "eeprom", "mac-address";
60-
ieee80211-freq-limit;
6158
/delete-property/ ieee80211-freq-limit;
59+
60+
nvmem-cells = <&eeprom_factory_0>;
61+
nvmem-cell-names = "eeprom";
62+
63+
#address-cells = <1>;
64+
#size-cells = <0>;
65+
66+
band@0 {
67+
reg = <0>;
68+
nvmem-cells = <&macaddr_factory_e000 2>;
69+
nvmem-cell-names = "mac-address";
70+
};
71+
72+
band@1 {
73+
reg = <1>;
74+
nvmem-cells = <&macaddr_factory_e000 1>;
75+
nvmem-cell-names = "mac-address";
76+
};
6277
};
6378

6479
&wifi1 {
6580
nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 3>;
6681
nvmem-cell-names = "eeprom", "mac-address";
6782
};
83+
84+
&gmac1 {
85+
nvmem-cells = <&macaddr_factory_e000 4>;
86+
nvmem-cell-names = "mac-address";
87+
};

target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ case "$board" in
5454
[ "$PHYNBR" = "1" ] && \
5555
macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress
5656
;;
57-
dlink,dir-3040-a1)
58-
lan_mac_addr="$(mtd_get_mac_binary factory 0xe000)"
59-
[ "$PHYNBR" = "0" ] && \
60-
macaddr_add $lan_mac_addr 2 > /sys${DEVPATH}/macaddress
61-
;;
6257
dlink,dir-853-a3)
6358
[ "$PHYNBR" = "0" ] && \
6459
macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \

0 commit comments

Comments
 (0)