diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-05-13 13:11:04 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-05-13 13:11:04 +0000 |
commit | 8d69ae09fc903ae9d0004b29879d1cda2f012536 (patch) | |
tree | 313435e39efde9cd118b773deaa51e9b2e731330 /target/linux | |
parent | 4215d9ebbc125042f8aa64062beef297f2ca84df (diff) | |
download | upstream-8d69ae09fc903ae9d0004b29879d1cda2f012536.tar.gz upstream-8d69ae09fc903ae9d0004b29879d1cda2f012536.tar.bz2 upstream-8d69ae09fc903ae9d0004b29879d1cda2f012536.zip |
bcm53xx: fix default network interface on Netgear R8000
It has 3 Ethernet interfaces, each of them connected to separated switch
port. Default NVRAM uses switch port 8 as CPU which is connected to the
3rd interface (eth2).
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45681 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rwxr-xr-x | target/linux/bcm53xx/base-files/etc/board.d/02_network | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network index 644d3d9bb9..4263615e83 100755 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -7,9 +7,18 @@ board_config_update -ucidef_set_interface_loopback +board=$(cat /proc/device-tree/compatible | tr '\0' '\t' | cut -f 1) +case "$board" in +netgear,r8000) + ifname=eth2 + ;; +*) + ifname=eth0 + ;; +esac -ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" +ucidef_set_interface_loopback +ucidef_set_interfaces_lan_wan "$ifname.1" "$ifname.2" ucidef_add_switch "switch0" "1" "1" # NVRAM entries may contain unsorted ports, e.g. Netgear R6250 uses |