ath79: fix MAC address assignment for TP-Link ar7241 devices
authorWill Moss <willormos@gmail.com>
Wed, 3 Aug 2022 11:37:47 +0000 (11:37 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 12 Nov 2022 20:55:11 +0000 (21:55 +0100)
On TP-Link ar7241 devices LAN and WAN interfaces are swapped. Keeping
that in mind fix MAC address assignment as used in vendor firmware:
LAN MAC - main MAC stored in u-boot and printed on label
WAN MAC - LAN MAC + 1

Signed-off-by: Will Moss <willormos@gmail.com>
(cherry picked from commit 5a1af6ed621d4547d8bf486d0d3e4de5443b9b58)

target/linux/ath79/dts/ar7241_tplink.dtsi

index 84a9a4f63d6f9e10ed788281d9af3bbd90375602..0861cc623226084ec0c68eea4a8e057304ab0357 100644 (file)
        };
 };
 
-&eth0 {
+&eth0 {                /* WAN interface, initialized last as eth1 */
        status = "okay";
 
        nvmem-cells = <&macaddr_uboot_1fc00>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <(-1)>;
+       mac-address-increment = <1>;
 };
 
-&eth1 {
+&eth1 {                /* LAN interface, initialized first as eth0 */
        nvmem-cells = <&macaddr_uboot_1fc00>;
        nvmem-cell-names = "mac-address";
-       mac-address-increment = <1>;
 };
 
 &uboot {