gluon-core: fix 200-wireless coding style

This commit is contained in:
Matthias Schiffer 2017-08-08 04:09:00 +02:00
parent 2b9dd54f00
commit 06d0c0f211
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -54,28 +54,21 @@ local function configure_ibss(config, radio, index, suffix, disabled)
end end
if config.vlan then if config.vlan then
uci:section('network', 'interface', name, uci:section('network', 'interface', name, {
{
proto = 'none', proto = 'none',
} })
)
uci:section('network', 'interface', name .. '_vlan', uci:section('network', 'interface', name .. '_vlan', {
{
ifname = '@' .. name .. '.' .. config.vlan, ifname = '@' .. name .. '.' .. config.vlan,
proto = 'gluon_mesh', proto = 'gluon_mesh',
} })
)
else else
uci:section('network', 'interface', name, uci:section('network', 'interface', name, {
{
proto = 'gluon_mesh', proto = 'gluon_mesh',
} })
)
end end
uci:section('wireless', 'wifi-iface', name, uci:section('wireless', 'wifi-iface', name, {
{
device = radio, device = radio,
network = name, network = name,
mode = 'adhoc', mode = 'adhoc',
@ -85,8 +78,7 @@ local function configure_ibss(config, radio, index, suffix, disabled)
mcast_rate = config.mcast_rate, mcast_rate = config.mcast_rate,
ifname = suffix and 'ibss' .. suffix, ifname = suffix and 'ibss' .. suffix,
disabled = disabled, disabled = disabled,
} })
)
end end
local function configure_mesh(config, radio, index, suffix, disabled) local function configure_mesh(config, radio, index, suffix, disabled)
@ -107,14 +99,11 @@ local function configure_mesh(config, radio, index, suffix, disabled)
return return
end end
uci:section('network', 'interface', name, uci:section('network', 'interface', name, {
{
proto = 'gluon_mesh', proto = 'gluon_mesh',
} })
)
uci:section('wireless', 'wifi-iface', name, uci:section('wireless', 'wifi-iface', name, {
{
device = radio, device = radio,
network = name, network = name,
mode = 'mesh', mode = 'mesh',
@ -126,8 +115,7 @@ local function configure_mesh(config, radio, index, suffix, disabled)
disabled = disabled, disabled = disabled,
macfilter = macfilter, macfilter = macfilter,
maclist = maclist, maclist = maclist,
} })
)
end end
local function fixup_wan(radio, index) local function fixup_wan(radio, index)