Skip to content
Snippets Groups Projects
Unverified Commit e6491287 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-core: create disabled mesh interface sections in outdoor mode

The interfaces should always exist and just be disabled when outdoor
mode is enabled. Not creating them at all leads to an issue in the
advanced wifi settings where an additional reload of the page is
necessary after enabling or disabling the ourdoor mode to make the mesh
VIF options appear or disappear.

(cherry picked from commit b15b008e)
parent 3d091912
No related branches found
No related tags found
No related merge requests found
......@@ -162,12 +162,13 @@ local function fixup_wan(radio, index)
uci:set('wireless', name, 'macaddr', macaddr)
end
local function configure_mesh_wireless(radio, index, config)
local function configure_mesh_wireless(radio, index, config, disabled)
local radio_name = radio['.name']
local suffix = radio_name:match('^radio(%d+)$')
configure_mesh(config.mesh(), radio, index, suffix,
first_non_nil(
disabled,
is_disabled('mesh_' .. radio_name),
config.mesh.disabled(false)
)
......@@ -215,7 +216,7 @@ wireless.foreach_radio(uci, function(radio, index, config)
util.add_to_set(hostapd_options, 'country3=0x4f')
uci:set_list('wireless', radio_name, 'hostapd_options', hostapd_options)
uci:delete('wireless', 'mesh_' .. radio_name)
configure_mesh_wireless(radio, index, config, true)
else
uci:delete('wireless', radio_name, 'channels')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment