projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libs/sys: implement luci.sys.wifi.channels()
[project/luci.git]
/
modules
/
admin-full
/
luasrc
/
model
/
cbi
/
admin_network
/
wifi.lua
diff --git
a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
index
079d895
..
43bff5d
100644
(file)
--- a/
modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
+++ b/
modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua
@@
-39,19
+39,9
@@
local hwtype = m:get(arg[1], "type")
local nsantenna = m:get(arg[1], "antenna")
ch = s:option(Value, "channel", translate("a_w_channel"))
local nsantenna = m:get(arg[1], "antenna")
ch = s:option(Value, "channel", translate("a_w_channel"))
-for
i=1, 14
do
- ch:value(
i, i .. " (2.4 GHz)"
)
+for
c, f in luci.util.kspairs(luci.sys.wifi.channels())
do
+ ch:value(
c, "%i (%.3f GHz)" %{ c, f }
)
end
end
-for i=36, 64, 4 do
- ch:value(i, i .. " (5 GHz)")
-end
-for i=100, 140, 4 do
- ch:value(i, i .. " (5 GHz)")
-end
-ch:value(147, 147 .. " (5 GHz)")
-ch:value(151, 151 .. " (5 GHz)")
-ch:value(155, 155 .. " (5 GHz)")
-ch:value(167, 167 .. " (5 GHz)")
s:option(Value, "txpower", translate("a_w_txpwr"), "dBm").rmempty = true
s:option(Value, "txpower", translate("a_w_txpwr"), "dBm").rmempty = true
@@
-89,6
+79,9
@@
if hwtype == "atheros" then
end
s:option(Value, "distance", translate("wifi_distance"),
translate("wifi_distance_desc")).optional = true
end
s:option(Value, "distance", translate("wifi_distance"),
translate("wifi_distance_desc")).optional = true
+ s:option(Value, "regdomain", translate("wifi_regdomain")).optional = true
+ s:option(Value, "country", translate("wifi_country")).optional = true
+ s:option(Flag, "outdoor", translate("wifi_outdoor")).optional = true
--s:option(Flag, "nosbeacon", translate("wifi_nosbeacon")).optional = true
end
--s:option(Flag, "nosbeacon", translate("wifi_nosbeacon")).optional = true
end
@@
-226,7
+219,7
@@
if hwtype == "atheros" then
s:option(Flag, "bursting", translate("wifi_bursting")).optional = true
s:option(Flag, "turbo", translate("wifi_turbo")).optional = true
s:option(Flag, "bursting", translate("wifi_bursting")).optional = true
s:option(Flag, "turbo", translate("wifi_turbo")).optional = true
- s:option(
Value
, "ff", translate("wifi_ff")).optional = true
+ s:option(
Flag
, "ff", translate("wifi_ff")).optional = true
s:option(Flag, "wmm", translate("wifi_wmm")).optional = true
s:option(Flag, "xr", translate("wifi_xr")).optional = true
s:option(Flag, "wmm", translate("wifi_wmm")).optional = true
s:option(Flag, "xr", translate("wifi_xr")).optional = true