aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm4908
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2021-02-08 12:05:04 +0100
committerRafał Miłecki <rafal@milecki.pl>2021-02-08 12:05:56 +0100
commitf06c3031a7768b6156e65243c04fb8e058365eff (patch)
tree93570a43c38c5aa89fc6b0f0a7bad139796dbeb0 /target/linux/bcm4908
parent81240a9b8985de7aefe40e8ea3a3d1602094e555 (diff)
downloadupstream-f06c3031a7768b6156e65243c04fb8e058365eff.tar.gz
upstream-f06c3031a7768b6156e65243c04fb8e058365eff.tar.bz2
upstream-f06c3031a7768b6156e65243c04fb8e058365eff.zip
bcm4908: add board.d network setup
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/bcm4908')
-rwxr-xr-xtarget/linux/bcm4908/base-files/etc/board.d/02_network26
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/bcm4908/base-files/etc/board.d/02_network b/target/linux/bcm4908/base-files/etc/board.d/02_network
new file mode 100755
index 0000000000..d16554d569
--- /dev/null
+++ b/target/linux/bcm4908/base-files/etc/board.d/02_network
@@ -0,0 +1,26 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+
+. /lib/functions/system.sh
+. /lib/functions/uci-defaults.sh
+
+bcm4908_setup_interfaces()
+{
+ local board="$1"
+
+ case "$board" in
+ asus,gt-ac5300)
+ ucidef_set_interface_lan "lan1 lan2 lan5 lan6 sw"
+ ;;
+ *)
+ ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
+ ;;
+ esac
+}
+
+board_config_update
+board=$(board_name)
+bcm4908_setup_interfaces "$board"
+board_config_flush
+
+exit 0