Selaa lähdekoodia

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 <[email protected]>
David Bauer 4 vuotta sitten
vanhempi
sitoutus
ef5f3eb700
1 muutettua tiedostoa jossa 2 lisäystä ja 5 poistoa
  1. 2 5
      target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts

+ 2 - 5
target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts

@@ -118,8 +118,9 @@
 		wan_port: port@0 {
 		wan_port: port@0 {
 			status = "okay";
 			status = "okay";
 			label = "wan";
 			label = "wan";
-			nvmem-cells = <&macaddr_factory_28>;
+			nvmem-cells = <&macaddr_factory_4>;
 			nvmem-cell-names = "mac-address";
 			nvmem-cell-names = "mac-address";
+			mac-address-increment = <(-2)>;
 		};
 		};
 
 
 		port@1 {
 		port@1 {
@@ -205,8 +206,4 @@
 	macaddr_factory_4: macaddr@4 {
 	macaddr_factory_4: macaddr@4 {
 		reg = <0x4 0x6>;
 		reg = <0x4 0x6>;
 	};
 	};
-
-	macaddr_factory_28: macaddr@28 {
-		reg = <0x28 0x6>;
-	};
 };
 };