gluonc-core: 200-wireless: remove unneeded nil checks for uci:set_list()
uci:set_list() will delete the list when nil is passed, so there is no need to differentiate between the cases.
This commit is contained in:
parent
06d0c0f211
commit
31721a61f5
@ -151,17 +151,8 @@ local function configure_radio(radio, index, config)
|
||||
uci:set('wireless', radio, 'htmode', 'HT20')
|
||||
uci:set('wireless', radio, 'country', site.regdom)
|
||||
|
||||
if config.supported_rates then
|
||||
uci:set_list('wireless', radio, 'supported_rates', config.supported_rates)
|
||||
else
|
||||
uci:delete('wireless', radio, 'supported_rates')
|
||||
end
|
||||
|
||||
if config.basic_rate then
|
||||
uci:set_list('wireless', radio, 'basic_rate', config.basic_rate)
|
||||
else
|
||||
uci:delete('wireless', radio, 'basic_rate')
|
||||
end
|
||||
uci:set_list('wireless', radio, 'supported_rates', config.supported_rates)
|
||||
uci:set_list('wireless', radio, 'basic_rate', config.basic_rate)
|
||||
|
||||
|
||||
local ibss_disabled = is_disabled('ibss_' .. radio)
|
||||
|
Loading…
Reference in New Issue
Block a user