treewide: drop ar71xx platform specific code

This commit is contained in:
David Bauer 2021-06-26 02:17:15 +02:00
parent 003c90f0b2
commit 9fdc57c175
4 changed files with 3 additions and 96 deletions

View File

@ -71,40 +71,6 @@ end
-- Entries are matched in the order they are listed -- Entries are matched in the order they are listed
local primary_addrs = { local primary_addrs = {
{interface('lan'), { {interface('lan'), {
{'ar71xx', 'generic', {
'archer-c5',
'archer-c58-v1',
'archer-c59-v1',
'archer-c60-v1',
'archer-c7',
'archer-c7-v4',
'archer-c7-v5',
'carambola2',
'koala',
'mr600',
'mr600v2',
'mr900',
'mr900v2',
'mr1750',
'mr1750v2',
'om2p',
'om2pv2',
'om2p-hs',
'om2p-hsv2',
'om2p-hsv3',
'om2p-lc',
'om5p',
'om5p-an',
'om5p-ac',
'om5p-acv2',
'unifi-outdoor-plus',
'unifiac-lite',
'unifiac-pro',
}},
{'ar71xx', 'mikrotik'},
{'ar71xx', 'nand', {
'hiveap-121',
}},
{'ath79', 'generic', { {'ath79', 'generic', {
'glinet,gl-ar750s-nor', 'glinet,gl-ar750s-nor',
'ocedo,raccoon', 'ocedo,raccoon',
@ -136,14 +102,6 @@ local primary_addrs = {
{'x86'}, {'x86'},
}}, }},
{interface('wan'), { {interface('wan'), {
{'ar71xx', 'generic', {
'a40',
'a60',
'archer-c25-v1',
'archer-c60-v2',
'om2pv4',
'om2p-hsv4',
}},
{'ipq40xx', 'generic', { {'ipq40xx', 'generic', {
'linksys,ea6350v3', 'linksys,ea6350v3',
'openmesh,a42', 'openmesh,a42',
@ -158,11 +116,6 @@ local primary_addrs = {
}}, }},
}}, }},
{phy(1), { {phy(1), {
{'ar71xx', 'generic', {
'tl-wdr3600',
'tl-wdr4300',
'tl-wr902ac-v1',
}},
{'ramips', 'mt7621', { {'ramips', 'mt7621', {
'dlink,dir-860l-b1', 'dlink,dir-860l-b1',
}}, }},

View File

@ -32,20 +32,7 @@ end
local lan_ifname = iface_exists((network_data.lan or {}).ifname) local lan_ifname = iface_exists((network_data.lan or {}).ifname)
local wan_ifname = iface_exists((network_data.wan or {}).ifname) local wan_ifname = iface_exists((network_data.wan or {}).ifname)
if platform.match('ar71xx', 'generic', { if platform.match('lantiq') then
'cpe210',
'cpe510',
'wbs210',
'wbs510',
'airgateway',
'nanostation-m',
'nanostation-m-xw',
'unifi-outdoor-plus',
'uap-pro',
'unifiac-pro',
}) 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 {}

View File

@ -25,33 +25,7 @@ function M.match(target, subtarget, boards)
end end
function M.is_outdoor_device() function M.is_outdoor_device()
if M.match('ar71xx', 'generic', { if M.match('ath79', 'generic', {
'bullet-m',
'cpe210',
'cpe510',
'wbs210',
'wbs510',
'lbe-m5',
'loco-m-xw',
'nanostation-m',
'nanostation-m-xw',
'rocket-m',
'rocket-m-ti',
'rocket-m-xw',
'unifi-outdoor',
'unifi-outdoor-plus',
}) then
return true
elseif M.match('ar71xx', 'generic', {'unifiac-lite'}) and
M.get_model() == 'Ubiquiti UniFi-AC-MESH' then
return true
elseif M.match('ar71xx', 'generic', {'unifiac-pro'}) and
M.get_model() == 'Ubiquiti UniFi-AC-MESH-PRO' then
return true
elseif M.match('ath79', 'generic', {
'devolo,dvl1750x', 'devolo,dvl1750x',
'plasmacloud,pa300', 'plasmacloud,pa300',
'plasmacloud,pa300e', 'plasmacloud,pa300e',

View File

@ -8,14 +8,7 @@ if sysconfig.setup_ifname then
os.exit(0) os.exit(0)
end end
if platform.is_outdoor_device() or if platform.is_outdoor_device() then
platform.match('ar71xx', 'generic', {
'airgateway',
'uap-pro',
'unifiac-pro'
}) or
platform.match('ar71xx', 'mikrotik')
then
sysconfig.setup_ifname = sysconfig.wan_ifname or sysconfig.lan_ifname sysconfig.setup_ifname = sysconfig.wan_ifname or sysconfig.lan_ifname
else else
sysconfig.setup_ifname = sysconfig.lan_ifname or sysconfig.wan_ifname sysconfig.setup_ifname = sysconfig.lan_ifname or sysconfig.wan_ifname