60ghz
This commit is contained in:
parent
214c1e37f4
commit
8479a31ec5
@ -16,7 +16,7 @@ if not sysconfig.gluon_version then
|
|||||||
-- This is needed to distribute devices which have radios
|
-- This is needed to distribute devices which have radios
|
||||||
-- capable of operating in the 2.4 GHz and 5 GHz band need
|
-- capable of operating in the 2.4 GHz and 5 GHz band need
|
||||||
-- to be distributed evenly.
|
-- to be distributed evenly.
|
||||||
local radio_band_count = {band24=0, band5=0}
|
local radio_band_count = {band24=0, band5=0, band60=0}
|
||||||
wireless.foreach_radio(uci, function(radio)
|
wireless.foreach_radio(uci, function(radio)
|
||||||
local hwmodes = iwinfo.nl80211.hwmodelist(wireless.find_phy(radio))
|
local hwmodes = iwinfo.nl80211.hwmodelist(wireless.find_phy(radio))
|
||||||
if hwmodes.g and not (hwmodes.a or hwmodes.ac) then
|
if hwmodes.g and not (hwmodes.a or hwmodes.ac) then
|
||||||
@ -25,6 +25,8 @@ if not sysconfig.gluon_version then
|
|||||||
elseif (hwmodes.a or hwmodes.ac) and not hwmodes.g then
|
elseif (hwmodes.a or hwmodes.ac) and not hwmodes.g then
|
||||||
-- 5 GHz
|
-- 5 GHz
|
||||||
radio_band_count["band5"] = radio_band_count["band5"] + 1
|
radio_band_count["band5"] = radio_band_count["band5"] + 1
|
||||||
|
elseif (hwmodes.ad) then
|
||||||
|
radio_band_count["band60"] = radio_band_count["band60"] + 1
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -223,6 +225,7 @@ local function configure_mesh_wireless(radio, index, config, disabled)
|
|||||||
local ibss_disabled = is_disabled('ibss_' .. radio_name)
|
local ibss_disabled = is_disabled('ibss_' .. radio_name)
|
||||||
local mesh_disabled = is_disabled('mesh_' .. radio_name)
|
local mesh_disabled = is_disabled('mesh_' .. radio_name)
|
||||||
|
|
||||||
|
if radio.band ~= '60g' then
|
||||||
configure_ibss(config.ibss(), radio, index, suffix,
|
configure_ibss(config.ibss(), radio, index, suffix,
|
||||||
first_non_nil(
|
first_non_nil(
|
||||||
ibss_disabled,
|
ibss_disabled,
|
||||||
@ -230,6 +233,7 @@ local function configure_mesh_wireless(radio, index, config, disabled)
|
|||||||
config.ibss.disabled(false)
|
config.ibss.disabled(false)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
end
|
||||||
configure_mesh(config.mesh(), radio, index, suffix,
|
configure_mesh(config.mesh(), radio, index, suffix,
|
||||||
first_non_nil(
|
first_non_nil(
|
||||||
mesh_disabled,
|
mesh_disabled,
|
||||||
@ -291,6 +295,8 @@ wireless.foreach_radio(uci, function(radio, index, config)
|
|||||||
|
|
||||||
configure_mesh_wireless(radio, index, config)
|
configure_mesh_wireless(radio, index, config)
|
||||||
end
|
end
|
||||||
|
elseif (band == '60g') then
|
||||||
|
configure_mesh_wireless(radio, index, config, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
uci:set('wireless', radio_name, 'beacon_int', beacon_interval)
|
uci:set('wireless', radio_name, 'beacon_int', beacon_interval)
|
||||||
|
@ -118,6 +118,8 @@ function M.foreach_radio(uci, f)
|
|||||||
f(radio, index, site.wifi24)
|
f(radio, index, site.wifi24)
|
||||||
elseif band == '5g' then
|
elseif band == '5g' then
|
||||||
f(radio, index, site.wifi5)
|
f(radio, index, site.wifi5)
|
||||||
|
elseif band == '60g' then
|
||||||
|
f(radio, index, site.wifi60)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -174,4 +176,17 @@ function M.device_uses_11a(uci)
|
|||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.device_uses_ad(uci)
|
||||||
|
local ret = false
|
||||||
|
|
||||||
|
uci:foreach('wireless', 'wifi-device', function(radio)
|
||||||
|
if radio.band == '60g' then
|
||||||
|
ret = true
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
return ret
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
@ -43,12 +43,16 @@ uci:foreach('wireless', 'wifi-device', function(config)
|
|||||||
local radio = config['.name']
|
local radio = config['.name']
|
||||||
|
|
||||||
local is_5ghz = false
|
local is_5ghz = false
|
||||||
|
local is_60ghz = false
|
||||||
local title
|
local title
|
||||||
if config.band == '2g' then
|
if config.band == '2g' then
|
||||||
title = translate("2.4GHz WLAN")
|
title = translate("2.4GHz WLAN")
|
||||||
elseif config.band == '5g' then
|
elseif config.band == '5g' then
|
||||||
is_5ghz = true
|
is_5ghz = true
|
||||||
title = translate("5GHz WLAN")
|
title = translate("5GHz WLAN")
|
||||||
|
elseif config.band == '60g' then
|
||||||
|
is_60ghz = true
|
||||||
|
title = translate("60Ghz WLAN")
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -93,8 +97,10 @@ uci:foreach('wireless', 'wifi-device', function(config)
|
|||||||
return o
|
return o
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not is_60ghz then
|
||||||
vif_option('client', {'client', 'owe'}, translate('Enable client network (access point)'))
|
vif_option('client', {'client', 'owe'}, translate('Enable client network (access point)'))
|
||||||
vif_option('ibss', {'ibss'}, translate("Enable mesh network (IBSS, outdated)"))
|
vif_option('ibss', {'ibss'}, translate("Enable mesh network (IBSS, outdated)"))
|
||||||
|
end
|
||||||
|
|
||||||
local mesh_vif = vif_option('mesh', {'mesh'}, translate("Enable mesh network (802.11s)"))
|
local mesh_vif = vif_option('mesh', {'mesh'}, translate("Enable mesh network (802.11s)"))
|
||||||
if is_5ghz then
|
if is_5ghz then
|
||||||
@ -133,6 +139,8 @@ uci:foreach('wireless', 'wifi-device', function(config)
|
|||||||
|
|
||||||
if is_5ghz then
|
if is_5ghz then
|
||||||
conf = site.wifi5
|
conf = site.wifi5
|
||||||
|
elseif is_60ghz then
|
||||||
|
conf = site.wifi60
|
||||||
else
|
else
|
||||||
conf = site.wifi24
|
conf = site.wifi24
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user