aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2011-11-07 21:44:03 +0000
committerGabor Juhos <juhosg@openwrt.org>2011-11-07 21:44:03 +0000
commitcf735fe89398ef92df8f511c15c3db30a2dc2221 (patch)
tree6621413fa98e8d5e74336fe7d2551677e08cbb65 /target/linux
parent71d946496ea333280dc9ce1f78831221da1bf899 (diff)
downloadupstream-cf735fe89398ef92df8f511c15c3db30a2dc2221.tar.gz
upstream-cf735fe89398ef92df8f511c15c3db30a2dc2221.tar.bz2
upstream-cf735fe89398ef92df8f511c15c3db30a2dc2221.zip
ar71xx: create TL-WR{841N-v1,941ND} network config from uci-defaults
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28824 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/base-files/etc/defconfig/tl-wr841n-v1/network20
-rw-r--r--target/linux/ar71xx/base-files/etc/defconfig/tl-wr941nd/network20
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/uci-defaults/network17
3 files changed, 17 insertions, 40 deletions
diff --git a/target/linux/ar71xx/base-files/etc/defconfig/tl-wr841n-v1/network b/target/linux/ar71xx/base-files/etc/defconfig/tl-wr841n-v1/network
deleted file mode 100644
index 780fdb7644..0000000000
--- a/target/linux/ar71xx/base-files/etc/defconfig/tl-wr841n-v1/network
+++ /dev/null
@@ -1,20 +0,0 @@
-config interface loopback
- option ifname lo
- option proto static
- option ipaddr 127.0.0.1
- option netmask 255.0.0.0
-
-config interface mac0
- option ifname eth0
- option proto none
-
-config interface lan
- option ifname "lan1 lan2 lan3 lan4"
- option type bridge
- option proto static
- option ipaddr 192.168.1.1
- option netmask 255.255.255.0
-
-config interface wan
- option ifname wan
- option proto dhcp
diff --git a/target/linux/ar71xx/base-files/etc/defconfig/tl-wr941nd/network b/target/linux/ar71xx/base-files/etc/defconfig/tl-wr941nd/network
deleted file mode 100644
index cb741fbea5..0000000000
--- a/target/linux/ar71xx/base-files/etc/defconfig/tl-wr941nd/network
+++ /dev/null
@@ -1,20 +0,0 @@
-config interface loopback
- option ifname lo
- option proto static
- option ipaddr 127.0.0.1
- option netmask 255.0.0.0
-
-config interface eth
- option ifname eth0
- option proto none
-
-config interface lan
- option ifname "lan1 lan2 lan3 lan4"
- option type bridge
- option proto static
- option ipaddr 192.168.1.1
- option netmask 255.255.255.0
-
-config interface wan
- option ifname wan
- option proto dhcp
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/network b/target/linux/ar71xx/base-files/etc/uci-defaults/network
index 2f2525bb02..5cf80796cf 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/network
@@ -13,6 +13,17 @@ set network.loopback.netmask='255.0.0.0'
EOF
}
+set_interface_raw() {
+ local cfg=$1
+ local ifname=$2
+
+ uci batch <<EOF
+set network.$cfg='interface'
+set network.$cfg.ifname='$ifname'
+set network.$cfg.proto='none'
+EOF
+}
+
set_interface_lan() {
local ifname=$1
@@ -99,6 +110,12 @@ routerstation-pro)
add_switch_vlan "switch0" "1" "0 1 2 3 4"
;;
+tl-wr841n-v1|\
+tl-wr941nd)
+ set_interface_raw "eth" "eth0"
+ set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
+ ;;
+
aw-nr580 |\
bullet-m |\
eap7660d |\