From f06c3031a7768b6156e65243c04fb8e058365eff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Mon, 8 Feb 2021 12:05:04 +0100 Subject: [PATCH] bcm4908: add board.d network setup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- .../bcm4908/base-files/etc/board.d/02_network | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 target/linux/bcm4908/base-files/etc/board.d/02_network 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 00000000000..d16554d569a --- /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 -- 2.30.2