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 b15b008e69)
This commit is contained in:
Matthias Schiffer 2020-06-06 16:30:38 +02:00
parent 3d091912af
commit e6491287ba
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
1 changed files with 3 additions and 2 deletions

View File

@ -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')