lantiq: add support for AVM FRITZ!Box 7412
[openwrt/staging/wigyori.git] / target / linux / lantiq / base-files / etc / board.d / 02_network
index efe631c..b7d23da 100755 (executable)
@@ -135,12 +135,16 @@ lantiq,easy80920-nand|lantiq,easy80920-nor)
                "0:lan:4" "1:lan:3" "2:lan:2" "4:lan:1" "5:wan:5" "6t@eth0"
        ;;
 
-avm,fritz3370)
+avm,fritz3370-rev2-hynix|\
+avm,fritz3370-rev2-micron)
        annex="b"
-       wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2439)" 1)
-       ucidef_set_interface_lan 'eth0'
+       lan_mac=$(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
+       wan_mac=$(macaddr_add "$lan_mac" 3)
+       ucidef_add_switch "switch0" \
+               "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0"
        ;;
 
+avm,fritz7312|\
 avm,fritz7320)
        annex="b"
        wan_mac=$(macaddr_add "$(mtd_get_mac_binary urlader 2705)" 1)
@@ -154,6 +158,14 @@ avm,fritz7360sl)
                "0:lan:3" "1:lan:4" "2:lan:2" "4:lan:1" "6t@eth0"
        ;;
 
+avm,fritz7412)
+       tffsdev=$(find_mtd_chardev "nand-tffs")
+       annex="b"
+       lan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n maca)
+       wan_mac=$(/usr/bin/fritz_tffs_nand -d $tffsdev -n macdsl)
+       ucidef_set_interface_lan 'eth0'
+       ;;
+
 siemens,gigaset-sx76x)
        annex="b"
        ucidef_add_switch "switch0" \
@@ -188,10 +200,10 @@ arcadyan,vg3503j)
        lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr)
        wan_mac=$(macaddr_add "$lan_mac" 1)
        ucidef_add_switch "switch0" \
-               "2:lan:1" "4:lan:2" "6t@eth0"
+               "2:lan:2" "4:lan:1" "6t@eth0"
        ;;
 
-tplink,vr200v)
+tplink,vr200|tplink,vr200v)
        wan_mac=$(macaddr_add "$(mtd_get_mac_binary romfile 61696)" 1)
        ucidef_add_switch "switch0" \
                "0:lan" "2:lan" "4:lan" "5:lan" "6t@eth0"
@@ -229,7 +241,7 @@ buffalo,wbmr-300hpd)
 esac
 
 ls /lib/modules/$(uname -r)/ltq_atm* 1> /dev/null 2>&1 && \
-       ucidef_add_atm_bridge "$vpi" "$vci" "$encaps" "$payload"
+       ucidef_add_atm_bridge "$vpi" "$vci" "$encaps" "$payload" "dsl"
 
 if lantiq_is_vdsl_system; then
        ucidef_add_vdsl_modem "$annex" "$tone" "$xfer_mode"