ramips: Fix HooToo HT-TM02 support.
[openwrt/openwrt.git] / target / linux / ramips / base-files / etc / board.d / 02_network
index 80b5449e054d15a4d434f4955fd19c6e9802aebf..a86466e5e7adac6fac10d711ab4c8516b3fef83c 100755 (executable)
@@ -50,6 +50,7 @@ ramips_setup_interfaces()
        all5003 | \
        broadway | \
        dcs-930| \
+       ht-tm02| \
        ncs601w | \
        wnce2001)
                ucidef_add_switch "switch0" "1" "0"
@@ -58,8 +59,8 @@ ramips_setup_interfaces()
 
        3g-6200nl | \
        mlw221)
-                ucidef_set_interface_lan "eth0.2"
-                ;;
+               ucidef_set_interface_lan "eth0.2"
+               ;;
 
        wizard8800 | \
        wl-330n | \
@@ -103,12 +104,6 @@ ramips_setup_interfaces()
                ucidef_add_switch_vlan "switch0" "2" "4 9t"
                ;;
 
-       ht-tm02)
-               ucidef_set_interface_lan "eth0.1"
-               ucidef_add_switch "switch0" "1" "1"
-               ucidef_add_switch_vlan "switch0" "1" "4 6t"
-               ;;
-
        3g-6200n | \
        ai-br100 | \
        dir-610-a1 | \
@@ -291,7 +286,6 @@ ramips_setup_macs()
        hlk-rm04 | \
        mpr-a1 | \
        mpr-a2 | \
-        ht-tm02 | \
        dir-300-b7 | \
        dir-320-b1 | \
        psr-680w |\
@@ -303,6 +297,10 @@ ramips_setup_macs()
                wan_mac=$(macaddr_add "$lan_mac" 1)
                ;;
 
+       ht-tm02)
+               lan_mac=$(cat /sys/class/net/eth0/address)
+               ;;
+
        cy-swr1100 | \
        dir-645)
                lan_mac=$(mtd_get_mac_ascii nvram lanmac)
@@ -314,7 +312,7 @@ ramips_setup_macs()
                ;;
 
        wcr-150gn)
-                wan_mac=$(mtd_get_mac_binary factory 40)
+               wan_mac=$(mtd_get_mac_binary factory 40)
                ;;
 
        rt-n56u)