ath79: add support for ALFA Network N2Q
[openwrt/openwrt.git] / target / linux / ath79 / generic / base-files / etc / board.d / 02_network
index f655abe740af1b1eac2fdf9a1ec55a074d45e53a..160eea523caeb0d0f7d65a21ca5ee9efcb3aad9f 100755 (executable)
@@ -30,6 +30,7 @@ ath79_setup_interfaces()
        engenius,ecb1750|\
        enterasys,ws-ap3705i|\
        glinet,gl-ar300m-lite|\
+       meraki,mr16|\
        netgear,ex6400|\
        netgear,ex7300|\
        ocedo,koala|\
@@ -74,6 +75,15 @@ ath79_setup_interfaces()
        winchannel,wb2000)
                ucidef_set_interface_lan "eth0"
                ;;
+       alfa-network,ap121fe)
+               ucidef_set_interface_lan "eth0 usb0"
+               ;;
+       alfa-network,n2q|\
+       devolo,dvl1200e|\
+       devolo,dvl1750e|\
+       ocedo,ursus)
+               ucidef_set_interface_lan "eth0 eth1"
+               ;;
        avm,fritz4020|\
        pcs,cr3000|\
        tplink,archer-c58-v1|\
@@ -93,6 +103,7 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0"
                ;;
+       buffalo,wzr-600dhp|\
        buffalo,wzr-hp-ag300h|\
        tplink,archer-c25-v1|\
        tplink,archer-c60-v1|\
@@ -142,11 +153,6 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "3:lan" "2:wan"
                ;;
-       devolo,dvl1200e|\
-       devolo,dvl1750e|\
-       ocedo,ursus)
-               ucidef_set_interface_lan "eth0 eth1"
-               ;;
        devolo,magic-2-wifi)
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:wan" "3:lan" "4:lan"
@@ -186,6 +192,16 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "1:wan" "2:lan:3" "3:lan:2"
                ;;
+       engenius,enh202-v1)
+               ucidef_set_interface_wan "eth0"
+               ucidef_add_switch "switch0" \
+                       "0@eth1" "4:lan:1"
+               ;;
+       engenius,ens202ext-v1)
+               ucidef_set_interface_wan "eth1"
+               ucidef_add_switch "switch0" \
+                       "0@eth0" "1:lan"
+               ;;
        engenius,ews511ap)
                ucidef_set_interface_lan "eth0 eth1" "dhcp"
                ;;
@@ -212,6 +228,19 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "5:wan" "6@eth1" "4:lan"
                ;;
+       mercury,mw4530r-v1|\
+       tplink,archer-a7-v5|\
+       tplink,archer-c6-v2|\
+       tplink,archer-c6-v2-us|\
+       tplink,archer-c7-v4|\
+       tplink,archer-c7-v5|\
+       tplink,tl-wdr3600-v1|\
+       tplink,tl-wdr4300-v1|\
+       tplink,tl-wdr4300-v1-il|\
+       tplink,tl-wdr4310-v1)
+               ucidef_add_switch "switch0" \
+                       "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
+               ;;
        nec,wg1200cr|\
        ubnt,nanostation-ac|\
        yuncore,a782|\
@@ -262,18 +291,6 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan:3" "3:lan:2" "4:lan:1"
                ;;
-       tplink,archer-a7-v5|\
-       tplink,archer-c6-v2|\
-       tplink,archer-c6-v2-us|\
-       tplink,archer-c7-v4|\
-       tplink,archer-c7-v5|\
-       tplink,tl-wdr3600-v1|\
-       tplink,tl-wdr4300-v1|\
-       tplink,tl-wdr4300-v1-il|\
-       tplink,tl-wdr4310-v1)
-               ucidef_add_switch "switch0" \
-                       "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan"
-               ;;
        tplink,archer-c5-v1|\
        tplink,archer-c7-v1|\
        tplink,archer-c7-v2|\
@@ -290,6 +307,14 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth1" "3:lan:3" "4:lan:2" "5:lan:1" "6@eth0" "2:wan:4" "1:wan:5"
                ;;
+       tplink,eap225-wall-v2)
+               ucidef_add_switch "switch0" \
+                       "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
+               ;;
+       tplink,eap245-v3)
+               ucidef_add_switch "switch0" \
+                       "0@eth0" "2:lan:1" "5:lan:2"
+               ;;
        tplink,tl-mr6400-v1)
                ucidef_set_interfaces_lan_wan "eth0.1 eth1" "usb0"
                ucidef_add_switch "switch0" \
@@ -350,6 +375,10 @@ ath79_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0@eth0" "2:lan:1" "3:lan:2"
                ;;
+       ubnt,unifi-ap-pro)
+               ucidef_add_switch "switch0" \
+                       "0@eth0" "1:lan" "2:lan"
+               ;;
        zbtlink,zbt-wd323|\
        xiaomi,mi-router-4q)
                ucidef_set_interface_wan "eth1"
@@ -372,7 +401,11 @@ ath79_setup_macs()
                lan_mac=$(mtd_get_mac_binary "Board data" 2)
                label_mac=$lan_mac
                ;;
-       alfa-network,ap121f)
+       alfa-network,ap121f|\
+       alfa-network,ap121fe|\
+       alfa-network,n2q|\
+       alfa-network,r36a|\
+       engenius,ens202ext-v1)
                label_mac=$(mtd_get_mac_binary art 0x1002)
                ;;
        arduino,yun)
@@ -443,6 +476,19 @@ ath79_setup_macs()
                lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
                label_mac=$(mtd_get_mac_ascii u-boot-env athaddr)
                ;;
+       engenius,enh202-v1|\
+       ubnt,airrouter|\
+       ubnt,bullet-m-ar7240|\
+       ubnt,bullet-m-ar7241|\
+       ubnt,nanobridge-m|\
+       ubnt,nanostation-loco-m|\
+       ubnt,nanostation-m|\
+       ubnt,picostation-m|\
+       ubnt,powerbridge-m|\
+       ubnt,rocket-m|\
+       ubnt,unifi)
+               label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
+               ;;
        engenius,epg5000)
                lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
                wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr)
@@ -473,6 +519,13 @@ ath79_setup_macs()
                wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n alias/ethaddr)
                lan_mac=$(macaddr_add "$wan_mac" 1)
                ;;
+       mercury,mw4530r-v1|\
+       tplink,tl-wdr3600-v1|\
+       tplink,tl-wdr4300-v1|\
+       tplink,tl-wdr4300-v1-il)
+               base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
+               wan_mac=$(macaddr_add "$base_mac" 1)
+               ;;
        nec,wg800hp)
                lan_mac=$(mtd_get_mac_text board_data 0x280)
                wan_mac=$(mtd_get_mac_text board_data 0x480)
@@ -507,29 +560,11 @@ ath79_setup_macs()
                base_mac=$(mtd_get_mac_binary info 0x8)
                wan_mac=$(macaddr_add "$base_mac" 1)
                ;;
-       tplink,tl-wdr3600-v1|\
-       tplink,tl-wdr4300-v1|\
-       tplink,tl-wdr4300-v1-il)
-               base_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
-               wan_mac=$(macaddr_add "$base_mac" 1)
-               ;;
        trendnet,tew-823dru)
                lan_mac=$(mtd_get_mac_text mac 0x4)
                wan_mac=$(mtd_get_mac_text mac 0x18)
                label_mac=$wan_mac
                ;;
-       ubnt,airrouter|\
-       ubnt,bullet-m-ar7240|\
-       ubnt,bullet-m-ar7241|\
-       ubnt,nanobridge-m|\
-       ubnt,nanostation-loco-m|\
-       ubnt,nanostation-m|\
-       ubnt,picostation-m|\
-       ubnt,powerbridge-m|\
-       ubnt,rocket-m|\
-       ubnt,unifi)
-               label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
-               ;;
        ubnt,litebeam-ac-gen2|\
        ubnt,powerbeam-5ac-500|\
        ubnt,powerbeam-5ac-gen2)