[source] ramips: TEW-691GR: fix switch and wireless

LEDE Commits lede-commits at lists.infradead.org
Sat Aug 20 02:47:55 PDT 2016


mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=bcd2113a32d80c0dc2c4140f76e96b28c3f70a27

commit bcd2113a32d80c0dc2c4140f76e96b28c3f70a27
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Fri Aug 19 20:46:50 2016 +0200

    ramips: TEW-691GR: fix switch and wireless
    
    Due to the missing phy-mode setting, the switch wasn't initialised.
    
    The wireless requires an eeprom to work. Use the same mac addresses as
    the stock firmware.
    
    Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 target/linux/ramips/base-files/etc/board.d/02_network | 3 +--
 target/linux/ramips/dts/TEW-691GR.dts                 | 5 ++++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 73404d9..32bfa77 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -333,8 +333,7 @@ ramips_setup_macs()
 		wan_mac=$(mtd_get_mac_binary factory 57350)
 		;;
 	tew-691gr)
-		lan_mac=$(cat /sys/class/net/eth0/address)
-		wan_mac=$(macaddr_add "$lan_mac" 3)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 3)
 		;;
 	tew-692gr)
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 4)" 1)
diff --git a/target/linux/ramips/dts/TEW-691GR.dts b/target/linux/ramips/dts/TEW-691GR.dts
index 750c24f..b1f7320 100644
--- a/target/linux/ramips/dts/TEW-691GR.dts
+++ b/target/linux/ramips/dts/TEW-691GR.dts
@@ -86,7 +86,7 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	mtd-mac-address = <&factory 0x4>;
 
 	port at 0 {
 		phy-handle = <&phy0>;
@@ -98,10 +98,13 @@
 
 		phy0: ethernet-phy at 0 {
 			reg = <0>;
+			phy-mode = "rgmii";
 		};
 	};
 };
 
 &wmac {
+	status = "okay";
+	ralink,mtd-eeprom = <&factory 0x0>;
 	ralink,5ghz = <0>;
 };



More information about the lede-commits mailing list