diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-12-18 15:27:16 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-12-18 15:27:16 +0000 |
commit | f1e68e8d5d3874226b0a99546ec246646a700604 (patch) | |
tree | ac088bf26fe04554ff6062cdd8cd2e89e89d0faf /target/linux/brcm47xx | |
parent | fcb1554bd49b0ef758c530193860e51163aae3c9 (diff) | |
download | master-187ad058-f1e68e8d5d3874226b0a99546ec246646a700604.tar.gz master-187ad058-f1e68e8d5d3874226b0a99546ec246646a700604.tar.bz2 master-187ad058-f1e68e8d5d3874226b0a99546ec246646a700604.zip |
brcm47xx: fix switch config for devices with WAN port 0
Commit r47866 dropped default values which were handling WAN interface
at port 0. Fix it by handling 2 more cases on NVRAM values.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47932 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx')
-rwxr-xr-x | target/linux/brcm47xx/base-files/etc/board.d/01_detect | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/base-files/etc/board.d/01_detect b/target/linux/brcm47xx/base-files/etc/board.d/01_detect index 841aafac35..76ceac65fa 100755 --- a/target/linux/brcm47xx/base-files/etc/board.d/01_detect +++ b/target/linux/brcm47xx/base-files/etc/board.d/01_detect @@ -17,6 +17,13 @@ detect_by_vlanports() { ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8@eth0" + elif [ "${vlan0ports:0:9}" = "1 2 3 4 8" -a "${vlan1ports:0:3}" = "0 8" -a ${cpuport:-0} -eq 8 ] || \ + [ "${vlan1ports:0:9}" = "1 2 3 4 8" -a "${vlan2ports:0:3}" = "0 8" -a ${cpuport:-0} -eq 8 ] || \ + [ "${vlan2ports:0:9}" = "1 2 3 4 8" -a "${vlan1ports:0:3}" = "0 8" -a ${cpuport:-0} -eq 8 ]; + then + ucidef_add_switch "switch0" \ + "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "8@eth0" + elif [ "${vlan0ports:0:9}" = "0 1 2 3 5" -a "${vlan1ports:0:3}" = "4 5" -a ${cpuport:-0} -eq 5 ] || \ [ "${vlan1ports:0:9}" = "0 1 2 3 5" -a "${vlan2ports:0:3}" = "4 5" -a ${cpuport:-0} -eq 5 ] || \ [ "${vlan2ports:0:9}" = "0 1 2 3 5" -a "${vlan1ports:0:3}" = "4 5" -a ${cpuport:-0} -eq 5 ]; @@ -24,6 +31,13 @@ detect_by_vlanports() { ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" + elif [ "${vlan0ports:0:9}" = "1 2 3 4 5" -a "${vlan1ports:0:3}" = "0 5" -a ${cpuport:-0} -eq 5 ] || \ + [ "${vlan1ports:0:9}" = "1 2 3 4 5" -a "${vlan2ports:0:3}" = "0 5" -a ${cpuport:-0} -eq 5 ] || \ + [ "${vlan2ports:0:9}" = "1 2 3 4 5" -a "${vlan1ports:0:3}" = "0 5" -a ${cpuport:-0} -eq 5 ]; + then + ucidef_add_switch "switch0" \ + "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0" + else logger -t "01_detect" "Unable to determine network configuration" ucidef_set_interface_lan "eth0" |