diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2013-02-20 15:31:43 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2013-02-20 15:31:43 +0000 |
commit | 9afdb046d32866fd161233a2861476bfaf845f6a (patch) | |
tree | 48a8dbbc84dc22a030dd60e0c74eb95330c14d31 /target/linux/brcm47xx/base-files/etc | |
parent | 9622f68581cea9d607bbd641b89350c2420720d5 (diff) | |
download | upstream-9afdb046d32866fd161233a2861476bfaf845f6a.tar.gz upstream-9afdb046d32866fd161233a2861476bfaf845f6a.tar.bz2 upstream-9afdb046d32866fd161233a2861476bfaf845f6a.zip |
brcm47xx: do not use vlan0 any more.
The Broadcom switch driver says that vlan0 should not be used with any switch other than bcm5325.
This makes OpenWrt always use vlan1 and vlan2 instead.
SVN-Revision: 35704
Diffstat (limited to 'target/linux/brcm47xx/base-files/etc')
-rwxr-xr-x | target/linux/brcm47xx/base-files/etc/init.d/netconfig | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/target/linux/brcm47xx/base-files/etc/init.d/netconfig b/target/linux/brcm47xx/base-files/etc/init.d/netconfig index 3839f9f106..61bcb25ddd 100755 --- a/target/linux/brcm47xx/base-files/etc/init.d/netconfig +++ b/target/linux/brcm47xx/base-files/etc/init.d/netconfig @@ -81,10 +81,10 @@ start() { BEGIN { FS="=" - c["lan_ifname"]="eth0.0" - c["wan_ifname"]="eth0.1" - c["vlan0ports"]="1 2 3 4 5" - c["vlan1ports"]="0 5" + c["lan_ifname"]="eth0.1" + c["wan_ifname"]="eth0.2" + c["vlan1ports"]="1 2 3 4 5" + c["vlan2ports"]="0 5" getline < "/proc/diag/model" model=$0 for (i = 0; i < 6; i++) { @@ -95,8 +95,8 @@ start() { getline < "/proc/switch/eth0/cpuport" cpuport=$0 if (cpuport == "8") { - c["vlan0ports"]="1 2 3 4 8" - c["vlan1ports"]="0 8" + c["vlan1ports"]="1 2 3 4 8" + c["vlan2ports"]="0 8" } } } @@ -109,13 +109,13 @@ start() { END { if (((nvram["vlan0ports"] ~ /^0 1 2 3 8/ ) && (nvram["vlan1ports"] ~ /^4 8/ && (cpuport == "8"))) || \ ((nvram["vlan1ports"] ~ /^0 1 2 3 8/ ) && (nvram["vlan2ports"] ~ /^4 8/ && (cpuport == "8")))) { - c["vlan0ports"] = "0 1 2 3 8" - c["vlan1ports"] = "4 8" + c["vlan1ports"] = "0 1 2 3 8" + c["vlan2ports"] = "4 8" } if (((nvram["vlan0ports"] ~ /^0 1 2 3 5/ ) && (nvram["vlan1ports"] ~ /^4 5/ && (cpuport == "5"))) || \ ((nvram["vlan1ports"] ~ /^0 1 2 3 5/ ) && (nvram["vlan2ports"] ~ /^4 5/ && (cpuport == "5")))) { - c["vlan0ports"] = "0 1 2 3 5" - c["vlan1ports"] = "4 5" + c["vlan1ports"] = "0 1 2 3 5" + c["vlan2ports"] = "4 5" } if ((model == "ASUS WL-HDD") || (model == "ASUS WL-300g") || (model == "Linksys WAP54G V1")) { c["wan_ifname"] = "" @@ -123,23 +123,23 @@ start() { } if (model == "ASUS WL-330gE") { c["wan_ifname"] = "" - c["lan_ifname"] = "eth0.0" - c["vlan0ports"] = "4 5" - c["vlan1ports"] = "" + c["lan_ifname"] = "eth0.1" + c["vlan1ports"] = "4 5" + c["vlan2ports"] = "" } if ((model == "ASUS WL-500g") || (model == "Microsoft MN-700")) { c["wan_ifname"] = "eth1" c["lan_ifname"] = "eth0" } if ((model == "ASUS WL-500g Premium V2") || (model == "Dell TrueMobile 2300 v2") || (model == "Buffalo WHR-G125")) { - c["vlan0ports"] = "0 1 2 3 5" - c["vlan1ports"] = "4 5" + c["vlan1ports"] = "0 1 2 3 5" + c["vlan2ports"] = "4 5" } if (model == "Dell TrueMobile 2300") { c["lan_ifname"] = "eth0" c["wan_ifname"] = "eth1" - c["vlan0ports"] = "0 1 2 3 4 5u" - c["vlan1ports"] = "" + c["vlan1ports"] = "0 1 2 3 4 5u" + c["vlan2ports"] = "" } if (nvram["boardtype"] == "bcm94710r4") { # Toshiba WRC-1000 @@ -147,18 +147,18 @@ start() { c["wan_ifname"] = "eth1" } if ((nvram["boardtype"] == "wgt634u") || (nvram["boardtype"] == "0x0467")) { - c["vlan0ports"] = "0 1 2 3 5" - c["vlan1ports"] = "4 5" + c["vlan1ports"] = "0 1 2 3 5" + c["vlan2ports"] = "4 5" } if ((nvram["boardtype"] == "0x042f") || (nvram["boardtype"] == "0x0472")) { if (nvram["boardnum"] == "45") { # WL-500gP - c["vlan0ports"] = "1 2 3 4 5" - c["vlan1ports"] = "0 5" + c["vlan1ports"] = "1 2 3 4 5" + c["vlan2ports"] = "0 5" } else { # Generic BCM94704 - c["vlan0ports"] = "0 1 2 3 4 5u" - c["vlan1ports"] = "" + c["vlan1ports"] = "0 1 2 3 4 5u" + c["vlan2ports"] = "" c["lan_ifname"] = "eth0" c["wan_ifname"] = "eth1" @@ -171,8 +171,8 @@ start() { } # Buffalo WBR-B11 and Buffalo WBR-G54 if (nvram["boardtype"] == "bcm94710ap") { - c["vlan0ports"] = "0 1 2 3 4 5u" - c["vlan1ports"] = "" + c["vlan1ports"] = "0 1 2 3 4 5u" + c["vlan2ports"] = "" c["lan_ifname"] = "eth0" c["wan_ifname"] = "eth1" } @@ -196,41 +196,41 @@ start() { # Generic BCM94704 settings instead so we revert to proper settings here. # Hopefully someone will fix this properly soon. if (model == "ASUS WL-700gE") { - c["lan_ifname"]="eth0.0" - c["wan_ifname"]="eth0.1" - c["vlan0ports"]="1 2 3 4 5" - c["vlan1ports"]="0 5" + c["lan_ifname"]="eth0.1" + c["wan_ifname"]="eth0.2" + c["vlan1ports"]="1 2 3 4 5" + c["vlan2ports"]="0 5" } if ((model == "Motorola WR850G V2/V3") || (model == "Siemens SE505 V2")) { - c["vlan0ports"]="0 1 2 3 5" - c["vlan1ports"]="4 5" + c["vlan1ports"]="0 1 2 3 5" + c["vlan2ports"]="4 5" } if (model == "ASUS WL-500W") { c["lan_ifname"] = "eth0" c["wan_ifname"] = "eth1" - c["vlan0ports"] = "0 1 2 3 4 5u" - c["vlan1ports"] = "" + c["vlan1ports"] = "0 1 2 3 4 5u" + c["vlan2ports"] = "" } if (model == "OvisLink WL-1600GL") { - c["lan_ifname"] = "eth0.0" - c["wan_ifname"] = "eth0.1" - c["vlan0ports"] = "0 1 2 3 5" - c["vlan1ports"] = "4 5" + c["lan_ifname"] = "eth0.1" + c["wan_ifname"] = "eth0.2" + c["vlan1ports"] = "0 1 2 3 5" + c["vlan2ports"] = "4 5" } if (model == "SimpleTech SimpleShare NAS") { c["lan_ifname"] = "eth0" c["wan_ifname"] = "" - c["vlan0ports"] = "" c["vlan1ports"] = "" + c["vlan2ports"] = "" } - if (c["vlan0ports"] || c["vlan1ports"]) { + if (c["vlan1ports"] || c["vlan2ports"]) { print "#### VLAN configuration " print "config switch eth0" print " option enable 1" print "" - vlan(0, "vlan0ports") vlan(1, "vlan1ports") + vlan(2, "vlan2ports") } print "#### Loopback configuration" print "config interface loopback" |