From 70f34704c011518db52a12092591d31e85faeee1 Mon Sep 17 00:00:00 2001 From: Marco von Rosenberg Date: Sun, 24 Sep 2023 00:53:11 +0200 Subject: [PATCH] Fix MAC addresses. Use offsets 0-3 for eth0, eth1, wlan0 and wlan1 respectively --- target/linux/ath79/dts/qca9550_huawei_ap5030dn.dts | 6 ++++-- .../linux/ath79/generic/base-files/etc/board.d/02_network | 3 +-- .../base-files/etc/hotplug.d/firmware/11-ath10k-caldata | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/target/linux/ath79/dts/qca9550_huawei_ap5030dn.dts b/target/linux/ath79/dts/qca9550_huawei_ap5030dn.dts index 343c722c4dc720..5b2d729a37daad 100644 --- a/target/linux/ath79/dts/qca9550_huawei_ap5030dn.dts +++ b/target/linux/ath79/dts/qca9550_huawei_ap5030dn.dts @@ -160,8 +160,9 @@ &wmac { status = "okay"; - nvmem-cells = <&calibration_art_1000>; - nvmem-cell-names = "calibration"; + nvmem-cells = <&macaddr_art_2005b>, <&calibration_art_1000>; + nvmem-cell-names = "mac-address", "calibration"; + mac-address-increment = <3>; }; &pcie0 { @@ -183,6 +184,7 @@ nvmem-cells = <&macaddr_art_2005b>; nvmem-cell-names = "mac-address"; + mac-address-increment = <1>; pll-data = <0x03000101 0x00000101 0x00001313>; phy-handle = <&phy1>; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 32c60b82d2ac8f..f76d5ee0b54153 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -724,8 +724,7 @@ ath79_setup_macs() label_mac=$(mtd_get_mac_binary u-boot 0x1fc00) ;; huawei,ap5030dn) - lan_mac=$(mtd_get_mac_binary art 0x2005b) - label_mac=$lan_mac + label_mac=$(mtd_get_mac_binary art 0x2005b) ;; iodata,etg3-r) lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 796318905e6788..508dab516de78f 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -88,7 +88,7 @@ case "$FIRMWARE" in ;; huawei,ap5030dn) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(mtd_get_mac_binary art 0x2005b) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x2005b) 2) ;; iodata,wn-ac1167dgr|\ iodata,wn-ac1600dgr2|\