* Performance optimizations
[project/luci.git] / modules / admin-core / luasrc / model / cbi / admin_wifi / devices.lua
1 -- ToDo: Translate, Add descriptions and help texts
2 m = Map("wireless", translate("devices", "Geräte"), translate("a_w_devices1", 
3         "An dieser Stelle können eingebaute WLAN-Geräte konfiguriert werden."))
4
5 s = m:section(TypedSection, "wifi-device")
6 --s.addremove = true
7
8 en = s:option(Flag, "disabled", translate("enable", "Aktivieren"))
9 en.enabled = "0"
10 en.disabled = "1"
11
12 t = s:option(ListValue, "type", translate("type", "Typ"))
13 t:value("broadcom")
14 t:value("atheros")
15 t:value("mac80211")
16 t:value("prism2")
17 --[[
18 require("luci.sys")
19 local c = ". /etc/functions.sh;for i in /lib/wifi/*;do . $i;done;echo $DRIVERS"
20 for driver in luci.sys.execl(c)[1]:gmatch("[^ ]+") do
21         t:value(driver)
22 end
23 ]]--
24
25 mode = s:option(ListValue, "mode", translate("mode", "Modus"))
26 mode:value("", "standard")
27 mode:value("11b", "802.11b")
28 mode:value("11g", "802.11g")
29 mode:value("11a", "802.11a")
30 mode:value("11bg", "802.11b+g")
31 mode.rmempty = true
32
33 s:option(Value, "channel", translate("a_w_channel", "Funkkanal"))
34
35 s:option(Value, "txantenna", translate("a_w_txantenna", "Sendeantenne")).rmempty = true
36
37 s:option(Value, "rxantenna", translate("a_w_rxantenna", "Empfangsantenne")).rmempty = true
38
39 s:option(Value, "distance", translate("distance", "Distanz"),
40         translate("a_w_distance1", "Distanz zum am weitesten entfernten Funkpartner (m)")).rmempty = true
41
42 s:option(Value, "diversity", translate("a_w_diversity", "Diversität")):depends("type", "atheros")
43         
44 country = s:option(Value, "country", translate("a_w_countrycode", "Ländercode"))
45 country.optional = true
46 country:depends("type", "broadcom")
47
48 maxassoc = s:option(Value, "maxassoc", translate("a_w_connlimit", "Verbindungslimit"))
49 maxassoc:depends("type", "broadcom")
50 maxassoc.optional = true
51
52 return m