7ef794c7e4fd6499d364976c3d2e3d14031b5ca1
[project/luci.git] / src / ffluci / model / cbi / admin_wifi / devices.lua
1 -- ToDo: Translate, Add descriptions and help texts
2 require("ffluci.util")
3
4 m = Map("wireless", "Geräte")
5
6 s = m:section(TypedSection, "wifi-device")
7 --s.addremove = true
8
9 en = s:option(Flag, "disabled", "Aktivieren")
10 en.enabled = "0"
11 en.disabled = "1"
12
13 t = s:option(ListValue, "type", "Typ")
14 t:value("broadcom")
15 t:value("atheros")
16 t:value("mac80211")
17 t:value("prism2")
18 --[[
19 local c = ". /etc/functions.sh;for i in /lib/wifi/*;do . $i;done;echo $DRIVERS"
20 for driver in ffluci.util.execl(c)[1]:gmatch("[^ ]+") do
21 t:value(driver)
22 end
23 ]]--
24
25 mode = s:option(ListValue, "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", "Funkkanal")
34
35 s:option(Value, "txantenna", "Sendeantenne").rmempty = true
36
37 s:option(Value, "rxantenna", "Empfangsantenne").rmempty = true
38
39 s:option(Value, "distance", "Distanz",
40 "Distanz zum am weitesten entfernten Funkpartner (m)").rmempty = true
41
42 s:option(Value, "diversity", "Diversität"):depends("type", "atheros")
43
44 country = s:option(Value, "country", "Ländercode")
45 country.optional = true
46 country:depends("type", "broadcom")
47
48 maxassoc = s:option(Value, "maxassoc", "Verbindungslimit")
49 maxassoc:depends("type", "broadcom")
50 maxassoc.optional = true
51
52 return m