summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-full/luasrc/model/cbi/admin_wifi/devices.lua
blob: e33f2416143abd5758cc28d9e6f1c211e06c87d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--[[
LuCI - Lua Configuration Interface

Copyright 2008 Steven Barth <steven@midlink.org>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

	http://www.apache.org/licenses/LICENSE-2.0

$Id$
]]--
m = Map("wireless", translate("devices"), translate("a_w_devices1", 
	"An dieser Stelle können eingebaute WLAN-Geräte konfiguriert werden."))

s = m:section(TypedSection, "wifi-device", "")
--s.addremove = true

en = s:option(Flag, "disabled", translate("enable"))
en.enabled = "0"
en.disabled = "1"

function en.cfgvalue(self, section)
	return Flag.cfgvalue(self, section) or "0"
end

t = s:option(DummyValue, "type", translate("type"))

mode = s:option(ListValue, "mode", translate("mode"))
mode:value("", "standard")
mode:value("11b", "802.11b")
mode:value("11g", "802.11g")
mode:value("11a", "802.11a")
mode:value("11bg", "802.11b+g")
mode.rmempty = true

s:option(Value, "channel", translate("a_w_channel"))

s:option(Value, "txantenna", translate("a_w_txantenna")).rmempty = true

s:option(Value, "rxantenna", translate("a_w_rxantenna")).rmempty = true

s:option(Value, "distance", translate("distance"),
	translate("a_w_distance1")).rmempty = true

s:option(Value, "diversity", translate("a_w_diversity")):depends("type", "atheros")
	
country = s:option(Value, "country", translate("a_w_countrycode"))
country.optional = true
country:depends("type", "broadcom")

maxassoc = s:option(Value, "maxassoc", translate("a_w_connlimit"))
maxassoc:depends("type", "broadcom")
maxassoc.optional = true

return m