diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2013-02-14 12:38:16 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2013-02-14 12:38:16 +0000 |
commit | 8f8b2b4cd0e85017c49b03e1bd921f286e3eb346 (patch) | |
tree | a708acdf8a37d1ef34093e284f747ae6b5ab87b8 | |
parent | f47db5b16a735be7cf661dcd9e75d00774c2b8e9 (diff) | |
download | upstream-8f8b2b4cd0e85017c49b03e1bd921f286e3eb346.tar.gz upstream-8f8b2b4cd0e85017c49b03e1bd921f286e3eb346.tar.bz2 upstream-8f8b2b4cd0e85017c49b03e1bd921f286e3eb346.zip |
brcm47xx: if the cpuport of the switch is port 8 assume vlan0ports: "1 2 3 4 8" and vlan0ports: "0 8"
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35597 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-x | target/linux/brcm47xx/base-files/etc/init.d/netconfig | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/target/linux/brcm47xx/base-files/etc/init.d/netconfig b/target/linux/brcm47xx/base-files/etc/init.d/netconfig index 229beb900c..2b1a66d33d 100755 --- a/target/linux/brcm47xx/base-files/etc/init.d/netconfig +++ b/target/linux/brcm47xx/base-files/etc/init.d/netconfig @@ -91,6 +91,14 @@ start() { if (mac_check != "") mac_check = mac_check ":" mac_check = mac_check "[0-9a-fA-F][0-9a-fA-F]" } + if (system("[ -d /proc/switch/eth0 ] ") == 0) { + getline < "/proc/switch/eth0/cpuport" + cpuport=$0 + if (cpuport == "8") { + c["vlan0ports"]="1 2 3 4 8" + c["vlan1ports"]="0 8" + } + } } ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") || ($1 ~ /macaddr/) { @@ -157,22 +165,6 @@ start() { c["lan_ifname"] = "eth0" c["wan_ifname"] = "eth1" } - # generic broadcom 4705/4785 processor with 5397 switch? - # EXCEPT Linksys WRT300N V1.1 - if ((nvram["boardtype"] == "0x478") && \ - (model != "Linksys WRT300N V1.1")) { - c["vlan0ports"] = "1 2 3 4 8*" - c["vlan1ports"] = "0 8" - } - - # generic broadcom 4716 processor with 53115 switch - if ((tolower(nvram["boardtype"]) == "0x04cf") || \ - (tolower(nvram["boardtype"]) == "0xf5b2") || \ - (tolower(nvram["boardtype"]) == "0xf52a") || \ - (tolower(nvram["boardtype"]) == "0xf52e")) { - c["vlan0ports"] = "1 2 3 4 8*" - c["vlan1ports"] = "0 8" - } # WAP54G if ((nvram["boardnum"] == "2") || \ |