Skip to content
Snippets Groups Projects
Unverified Commit d972a9df authored by David Bauer's avatar David Bauer Committed by GitHub
Browse files

gluon-core: use country3 UCI option (#2639)


Use the country3 option implemented in OpenWrt's hostapd configuration
handling instead of adding it as a custom option.

Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>

Signed-off-by: default avatarDavid Bauer <mail@david-bauer.net>
parent 3ab8007a
No related branches found
No related tags found
No related merge requests found
......@@ -208,22 +208,20 @@ wireless.foreach_radio(uci, function(radio, index, config)
uci:set('wireless', radio_name, 'legacy_rates', false)
configure_mesh_wireless(radio, index, config)
elseif (band == '5g') then
-- ToDo: Remove in v2024.x
local hostapd_options = uci:get_list('wireless', radio_name, 'hostapd_options')
util.remove_from_set(hostapd_options, 'country3=0x4f')
uci:set_list('wireless', radio_name, 'hostapd_options', hostapd_options)
if is_outdoor() then
uci:set('wireless', radio_name, 'channels', config.outdoor_chanlist())
-- enforce outdoor channels by filtering the regdom for outdoor channels
local hostapd_options = uci:get_list('wireless', radio_name, 'hostapd_options')
util.add_to_set(hostapd_options, 'country3=0x4f')
uci:set_list('wireless', radio_name, 'hostapd_options', hostapd_options)
uci:set('wireless', radio_name, 'country3', '0x4f')
configure_mesh_wireless(radio, index, config, true)
else
uci:delete('wireless', radio_name, 'channels')
local hostapd_options = uci:get_list('wireless', radio_name, 'hostapd_options')
util.remove_from_set(hostapd_options, 'country3=0x4f')
uci:set_list('wireless', radio_name, 'hostapd_options', hostapd_options)
uci:delete('wireless', radio_name, 'country3')
configure_mesh_wireless(radio, index, config)
end
end
......
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