ipq40xx: convert GL-AP1300 to DSA
[openwrt/staging/dedeckeh.git] / target / linux / ipq40xx / base-files / etc / board.d / 02_network
index ced26b9dd3f2801bd940f6b23ead76425470a94e..2e0e8d33cd625530c1f6c32f155cf49477f0a66f 100644 (file)
@@ -32,6 +32,7 @@ ipq40xx_setup_interfaces()
        asus,map-ac2200|\
        cilab,meshpoint-one|\
        edgecore,ecw5211|\
+       glinet,gl-ap1300|\
        glinet,gl-b2200|\
        google,wifi|\
        linksys,whw03v2|\
@@ -39,17 +40,22 @@ ipq40xx_setup_interfaces()
        mikrotik,cap-ac|\
        netgear,wac510|\
        sony,ncp-hg100-cellular|\
+       wallys,dr40x9|\
        zte,mf18a|\
        zte,mf289f)
                ucidef_set_interfaces_lan_wan "lan" "wan"
                ;;
        aruba,ap-303|\
+       aruba,ap-365|\
        avm,fritzrepeater-1200|\
        dlink,dap-2610|\
+       extreme-networks,ws-ap3915i|\
        meraki,mr33|\
        meraki,mr74|\
        mikrotik,lhgg-60ad|\
-       mikrotik,sxtsq-5-ac)
+       mikrotik,sxtsq-5-ac|\
+       netgear,ex6100v2|\
+       netgear,ex6150v2)
                ucidef_set_interface_lan "lan"
                ;;
        avm,fritzbox-7530)
@@ -98,6 +104,26 @@ ipq40xx_setup_interfaces()
        esac
 }
 
+ipq40xx_setup_dsl()
+{
+       local board="$1"
+       local annex="j"
+       local tone="b"
+       local xfer_mode=""
+
+       case "$board" in
+       avm,fritzbox-7530)
+               ;;
+       *)
+               return 0
+               ;;
+       esac
+
+       ucidef_add_atm_bridge "1" "32" "llc" "bridged" "dsl"
+       ucidef_add_vdsl_modem "$annex" "$tone" "$xfer_mode"
+       ucidef_set_interface_wan "dsl0" "pppoe"
+}
+
 ipq40xx_setup_macs()
 {
        local board="$1"
@@ -117,6 +143,10 @@ ipq40xx_setup_macs()
                lan_mac=$(mtd_get_mac_binary_ubi Factory 0x5006)
                label_mac=$wan_mac
                ;;
+       avm,fritzbox-7530)
+               local tffsdev=$(find_mtd_chardev "nand-tffs")
+               wan_mac=$(/usr/bin/fritz_tffs_nand -b -d $tffsdev -n macdsl)
+               ;;
        cilab,meshpoint-one)
                label_mac=$(mtd_get_mac_binary "ART" 0x1006)
                ;;
@@ -185,6 +215,7 @@ ipq40xx_setup_macs()
 board_config_update
 board=$(board_name)
 ipq40xx_setup_interfaces $board
+ipq40xx_setup_dsl $board
 ipq40xx_setup_macs $board
 board_config_flush