2
0
forked from Ivasoft/openwrt

bcm53xx: switch to the upstream DSA-based b53 driver

1. Drop swconfig
2. Simplify network setup
3. Verify network config
4. Disable Buffalo WZR-900DHP for now - it misses ports definition

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-By: Christian Lamparter <chunkeey@gmail.com>
This commit is contained in:
Rafał Miłecki
2021-10-18 15:04:17 +02:00
parent d88f3b8a42
commit e9672b1a8f
5 changed files with 49 additions and 77 deletions

View File

@@ -0,0 +1,23 @@
# SPDX-License-Identifier: GPL-2.0-only
# Exit if network doesn't contain any swconfig section
uci -q get network.@switch[0] > /dev/null || exit 0
lan_proto="$(uci -q get network.lan.proto)"
lan_ipaddr="$(uci -q get network.lan.ipaddr)"
lan_netmask="$(uci -q get network.lan.netmask)"
wan_proto="$(uci -q get network.wan.proto)"
wan_ipaddr="$(uci -q get network.wan.ipaddr)"
wan_netmask="$(uci -q get network.wan.netmask)"
rm /etc/config/network
config_generate
uci -q batch <<-EOF
set network.lan.proto="$lan_proto"
set network.lan.ipaddr="$lan_ipaddr"
set network.lan.netmask="$lan_netmask"
set network.wan.proto="$wan_proto"
set network.wan.ipaddr="$wan_ipaddr"
set network.wan.netmask="$wan_netmask"
EOF