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: David Bauer <mail@david-bauer.net> Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
parent
3ab8007a1e
commit
d972a9df2c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user