Skip to content
Snippets Groups Projects
Unverified Commit a072a712 authored by Kistelini's avatar Kistelini Committed by GitHub
Browse files

gluon-core: preserve wireless channel width during updates (#2696)

If the uci option 'gluon.wireless.preserve_channels' is set then the channel width of wireless radios (htmode) is preserved during updates, too.
parent 200e302a
No related branches found
No related tags found
No related merge requests found
......@@ -16,8 +16,8 @@ by the user). This means that it is not possible to enable or disable an existin
configurations during upgrades.
During upgrades the wifi channel of the 2.4GHz and 5GHz radio will be restored to the channel
configured in the site.conf. If you need to preserve a user defined wifi channel during upgrades
you can configure this via the uci section ``gluon-core.wireless``::
configured in the site.conf. The channel width will be reset to Gluon's default. If you need to preserve
these settings during upgrades you can configure this via the uci section ``gluon-core.wireless``::
uci set gluon.wireless.preserve_channels='1'
......
......@@ -66,6 +66,10 @@ local function get_channel(radio, config)
end
local function get_htmode(radio)
if wireless.preserve_channels(uci) then
return radio.htmode
end
if radio.band == '5g' and is_outdoor() then
local outdoor_htmode = uci:get('gluon', 'wireless', 'outdoor_' .. radio['.name'] .. '_htmode')
if outdoor_htmode ~= nil then
......
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