Skip to content
Snippets Groups Projects
Unverified Commit ed7134fa authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-web-wifi-config: reuse device_uses_11a() instead of reimplementing it less efficiently

parent 7a2cd66c
No related branches found
No related tags found
No related merge requests found
...@@ -24,18 +24,6 @@ local function txpower_list(phy) ...@@ -24,18 +24,6 @@ local function txpower_list(phy)
return new return new
end end
local function has_5ghz_radio()
local result = false
uci:foreach('wireless', 'wifi-device', function(config)
local radio = config['.name']
local hwmode = uci:get('wireless', radio, 'hwmode')
result = result or (hwmode == '11a' or hwmode == '11na')
end)
return result
end
local f = Form(translate("WLAN")) local f = Form(translate("WLAN"))
f:section(Section, nil, translate( f:section(Section, nil, translate(
...@@ -142,7 +130,7 @@ uci:foreach('wireless', 'wifi-device', function(config) ...@@ -142,7 +130,7 @@ uci:foreach('wireless', 'wifi-device', function(config)
end) end)
if has_5ghz_radio() and not wireless.preserve_channels(uci) then if wireless.device_uses_11a(uci) and not wireless.preserve_channels(uci) then
local r = f:section(Section, translate("Outdoor Installation"), translate( local r = f:section(Section, translate("Outdoor Installation"), translate(
"Configuring the node for outdoor use tunes the 5 GHz radio to a frequency " "Configuring the node for outdoor use tunes the 5 GHz radio to a frequency "
.. "and transmission power that conforms with the local regulatory requirements. " .. "and transmission power that conforms with the local regulatory requirements. "
......
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