aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2020-11-03 17:45:52 +0100
committerJohn Crispin <john@phrozen.org>2020-11-03 17:46:40 +0100
commitf5772d71a41914d40fec21f6111c1b39eea32d4c (patch)
treea8cf32ece804a22165ffba9ca85bfaf33e62097c
parent08d90a75f915bc48603b9125960a9e26f44581c5 (diff)
downloadupstream-f5772d71a41914d40fec21f6111c1b39eea32d4c.tar.gz
upstream-f5772d71a41914d40fec21f6111c1b39eea32d4c.tar.bz2
upstream-f5772d71a41914d40fec21f6111c1b39eea32d4c.zip
rtl838x: remove the swconfig setup from the board.d code
the code currently sets up uci for swconfig which we do not use. Signed-off-by: John Crispin <john@phrozen.org>
-rwxr-xr-xtarget/linux/rtl838x/base-files/etc/board.d/02_network52
1 files changed, 3 insertions, 49 deletions
diff --git a/target/linux/rtl838x/base-files/etc/board.d/02_network b/target/linux/rtl838x/base-files/etc/board.d/02_network
index a79869d8c3..d745526d0e 100755
--- a/target/linux/rtl838x/base-files/etc/board.d/02_network
+++ b/target/linux/rtl838x/base-files/etc/board.d/02_network
@@ -6,57 +6,11 @@
rtl838x_setup_switch()
{
- local switchid net portid master device lan_role lan_list
+ local lan lan_list
- json_select_object switch
- # Find slave ports
- for net in $(ls -d /sys/class/net/*); do
- switchid=$(cat $net/phys_switch_id 2>/dev/null)
- [ -z "$switchid" ] && continue
- device=$(basename $net)
- portid=$(cat $net/phys_port_name)
- lan_role="$lan_role ${portid##p}"
- lan_list="$lan_list $device"
- json_select_object "switch$((switchid))"
- json_add_boolean enable 1
- json_add_boolean reset 0
- json_add_boolean dsa 1
- json_select_array ports
- json_add_object
- json_add_int num "${portid##p}"
- json_add_string role "lan"
- json_add_string device "$device"
- json_close_object
- json_select ..
- json_select ..
+ for lan in /sys/class/net/lan*; do
+ lan_list="$lan_list $(basename $lan)"
done
- # Add switch master device
- for net in $(ls -d /sys/class/net/*/dsa); do
- master=$(dirname $net)
- device=$(basename $master)
- portid=$(cat $master/phys_port_name)
- lan_role="$lan_role ${portid##p}"
- json_select_object "switch$((switchid))"
- json_select_array ports
- json_add_object
- json_add_int num "${portid##p}"
- json_add_string device "$device"
- json_add_boolean need_tag 0
- json_add_boolean want_untag 0
- json_add_boolean master 1
- json_close_object
- json_select ..
- json_select_array roles
- json_add_object
- json_add_string role "lan"
- lan_role=$(echo $lan_role | xargs -n1 | sort -n | xargs)
- json_add_string ports "$lan_role"
- json_close_object
- json_select ..
- json_select ..
- done
- json_select ..
- lan_list=$(echo $lan_list | xargs -n1 | sort -V | xargs)
ucidef_set_interface_lan "$lan_list"
}