Skip to content
Snippets Groups Projects
Commit c0f6c75c authored by Hauke Mehrtens's avatar Hauke Mehrtens
Browse files

brcm47xx: if the cpuport of the switch is port 8 assume vlan0ports: "1 2 3 4...

brcm47xx: if the cpuport of the switch is port 8 assume vlan0ports: "1 2 3 4 8" and vlan0ports: "0 8"

SVN-Revision: 35597
parent 243c5822
No related branches found
No related tags found
No related merge requests found
...@@ -91,6 +91,14 @@ start() { ...@@ -91,6 +91,14 @@ start() {
if (mac_check != "") mac_check = mac_check ":" if (mac_check != "") mac_check = mac_check ":"
mac_check = mac_check "[0-9a-fA-F][0-9a-fA-F]" 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/) { ($1 == "boardnum") || ($1 == "boardtype") || ($1 == "boardflags") || ($1 ~ /macaddr/) {
...@@ -157,22 +165,6 @@ start() { ...@@ -157,22 +165,6 @@ start() {
c["lan_ifname"] = "eth0" c["lan_ifname"] = "eth0"
c["wan_ifname"] = "eth1" 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 # WAP54G
if ((nvram["boardnum"] == "2") || \ if ((nvram["boardnum"] == "2") || \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment