ath79-generic: swap interfaces on TP-Link WBS210 v2 (#2385)

Swap the interfaces so than the PoE input port LAN0 is used for WAN and
config mode, and LAN1 becomes LAN.

To this end, the code previously used for ar71xx and removed in
commit 9fdc57c175 ("treewide: drop ar71xx platform specific code") is
reintroduced.

Fixes #2384
This commit is contained in:
Matthias Schiffer 2022-01-28 19:45:34 +01:00 committed by GitHub
parent 2924afe562
commit 3ea770db73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,11 @@ end
local lan_ifname = iface_exists(lan_interfaces) local lan_ifname = iface_exists(lan_interfaces)
local wan_ifname = iface_exists(wan_interfaces) local wan_ifname = iface_exists(wan_interfaces)
if platform.match('lantiq') then if platform.match('ath79', 'generic', {
'tplink,wbs210-v2',
}) then
lan_ifname, wan_ifname = wan_ifname, lan_ifname
elseif platform.match('lantiq') then
local switch_data = board_data.switch or {} local switch_data = board_data.switch or {}
local switch0_data = switch_data.switch0 or {} local switch0_data = switch_data.switch0 or {}
local roles_data = switch0_data.roles or {} local roles_data = switch0_data.roles or {}