[openwrt/openwrt] mediatek: filogic: prevent faulty mac address assignment
LEDE Commits
lede-commits at lists.infradead.org
Mon Jul 15 07:42:19 PDT 2024
rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/d3552ccb178a1a19a52927146220e05e2312cd72
commit d3552ccb178a1a19a52927146220e05e2312cd72
Author: Leon M. Busch-George <leon at georgemail.eu>
AuthorDate: Fri May 17 20:10:25 2024 +0200
mediatek: filogic: prevent faulty mac address assignment
The vendor U-Boot on the Cudy M3000 and the Yuncore AX835 assign random
mac addresses on boot and set the 'local-mac-address' property which
prevents Openwrt from assigning the correct address from evmem.
This patch removes the alias for ethernet0 so that U-Boot doesn't add the
property, removes the workaround from 02_network, and adds back the nvmem
definition for the M3000.
Signed-off-by: Leon M. Busch-George <leon at georgemail.eu>
(cherry picked from commit a55ab9e1343e85021253e9c55f67adf33ad68f09)
---
target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts | 4 ++--
target/linux/mediatek/filogic/base-files/etc/board.d/02_network | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts
index e700d3728a..85bdabe474 100644
--- a/target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts
+++ b/target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts
@@ -9,7 +9,6 @@
compatible = "cudy,m3000-v1", "mediatek,mt7981-spim-snand-rfb";
aliases {
- ethernet0 = &gmac0;
label-mac-device = &gmac0;
led-boot = &led_status;
led-failsafe = &led_status;
@@ -87,7 +86,8 @@
phy-mode = "2500base-x";
phy-handle = <&rtl8221b_phy>;
- /* the MAC address assignment using nvmem-cells doesn't work, so it's done through 02_network */
+ nvmem-cell-names = "mac-address";
+ nvmem-cells = <&macaddr_bdinfo_de00 1>;
};
gmac1: mac at 1 {
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index 09896517f2..503171ae64 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -135,9 +135,6 @@ mediatek_setup_macs()
;;
esac
;;
- cudy,m3000-v1)
- wan_mac=$(macaddr_add $(cat /sys/class/net/eth1/address) 1)
- ;;
glinet,gl-mt6000)
label_mac=$(mmc_get_mac_binary factory 0x0a)
wan_mac=$label_mac
More information about the lede-commits
mailing list