ramips: add support for Phicomm K2P
[openwrt/openwrt.git] / target / linux / ramips / base-files / etc / board.d / 02_network
index 3cd7ff60491e4db5f50b1f128e2243f76a816d46..d0f3fce135907857e93f9ad5a63d28fb8536c34c 100755 (executable)
@@ -1,7 +1,6 @@
 #!/bin/sh
 
 . /lib/functions.sh
-. /lib/ramips.sh
 . /lib/functions/uci-defaults.sh
 . /lib/functions/system.sh
 
@@ -84,6 +83,7 @@ ramips_setup_interfaces()
        hc5661a|\
        hc5962|\
        hlk-rm04|\
+       k2p|\
        kn|\
        kn_rc|\
        mac1200rv2|\
@@ -169,6 +169,8 @@ ramips_setup_interfaces()
        mzk-wdpr|\
        rb750gr3|\
        rt-n14u|\
+       tl-wr840n-v4|\
+       tl-wr841n-v13|\
        ubnt-erx|\
        ubnt-erx-sfp|\
        ur-326n4g|\
@@ -276,6 +278,10 @@ ramips_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8@eth0"
                ;;
+       tew-638apb-v2)
+               ucidef_add_switch "switch0" \
+                       "4:lan" "6@eth0"
+               ;;
        tew-691gr|\
        tew-692gr|\
        wlr-6000)
@@ -375,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)
@@ -485,7 +494,7 @@ ramips_setup_macs()
 }
 
 board_config_update
-board=$(ramips_board_name)
+board=$(board_name)
 ramips_setup_interfaces $board
 ramips_setup_macs $board
 board_config_flush