ramips: fix GL-inet GL-MT300N-V2 WAN/LAN MAC address
authorJohn Marrett <johnf@zioncluster.ca>
Thu, 13 Jul 2017 12:03:07 +0000 (08:03 -0400)
committerMathias Kresin <dev@kresin.me>
Sat, 15 Jul 2017 05:02:59 +0000 (07:02 +0200)
Correct MAC address lookup to appropriate offset based on vendor
source.

Override the WAN MAC to use the same address as LAN. The switch driver
increments the base MAC address for the WAN vlan but the stock firmware
uses the same MAC address for all interfaces.

Based on vendor source commit
https://github.com/domino-team/lede-1701/commit/efb0518

Signed-off-by: John Marrett <johnf@zioncluster.ca>
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/dts/GL-MT300N-V2.dts

index 22b231bf9662cf40bb98fc9ef9dde5339bc1e2ea..f6129b527add0e33315298656b71c977a6ce8013 100755 (executable)
@@ -381,6 +381,9 @@ ramips_setup_macs()
        e1700)
                wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR)
                ;;
+       gl-mt300n-v2)
+               wan_mac=$(mtd_get_mac_binary factory 4)
+               ;;
        hc5*61|\
        hc5661a|\
        hc5962)
index e40c4cf7dfea9dc5e0772f6b747f3d839fa9586b..442fc093a5ffa6054a9fd074f793d373fba387ba 100644 (file)
@@ -80,7 +80,7 @@
 };
 
 &ethernet {
-       mtd-mac-address = <&factory 0x4000>;
+       mtd-mac-address = <&factory 0x4>;
 };
 
 &wmac {