[openwrt/openwrt] ramips: read Tenbay T-MB5EU address from single location

LEDE Commits lede-commits at lists.infradead.org
Fri Jan 21 16:17:21 PST 2022


blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/ef5f3eb7007e950c9a60810a5f421dcfb75cc97f

commit ef5f3eb7007e950c9a60810a5f421dcfb75cc97f
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed Jan 19 22:58:17 2022 +0100

    ramips: read Tenbay T-MB5EU address from single location
    
    Currently the WAN MAC address is read from a different offset contrary
    to all other addresses.
    
    There's conflicting information whether offset 0x28 on the factory
    partition contains the valid WAN mac for all devices while 0x4 seems to
    be uniform.
    
    Read the WAN mac from this location and calculate it.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
index 6e5f5772be..4be80f4836 100644
--- a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
+++ b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
@@ -118,8 +118,9 @@
 		wan_port: port at 0 {
 			status = "okay";
 			label = "wan";
-			nvmem-cells = <&macaddr_factory_28>;
+			nvmem-cells = <&macaddr_factory_4>;
 			nvmem-cell-names = "mac-address";
+			mac-address-increment = <(-2)>;
 		};
 
 		port at 1 {
@@ -205,8 +206,4 @@
 	macaddr_factory_4: macaddr at 4 {
 		reg = <0x4 0x6>;
 	};
-
-	macaddr_factory_28: macaddr at 28 {
-		reg = <0x28 0x6>;
-	};
 };



More information about the lede-commits mailing list