2 LuCI - Lua Configuration Interface
4 Copyright 2008 Steven Barth <steven@midlink.org>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
14 m = Map("wireless", translate("networks"), translate("a_w_networks1"))
16 s = m:section(TypedSection, "wifi-iface", "")
20 s:option(Value, "ssid", translate("a_w_netid")).maxlength = 32
22 device = s:option(ListValue, "device", translate("device"))
23 luci.model.uci.foreach("wireless", "wifi-device",
25 device:value(section[".name"])
28 network = s:option(ListValue, "network", translate("network"), translate("a_w_network1"))
30 luci.model.uci.foreach("network", "interface",
32 if section[".name"] ~= "loopback" then
33 network:value(section[".name"])
37 mode = s:option(ListValue, "mode", translate("mode"))
38 mode:value("ap", translate("a_w_ap"))
39 mode:value("adhoc", translate("a_w_adhoc"))
40 mode:value("ahdemo", translate("a_w_ahdemo"))
41 mode:value("sta", translate("a_w_client"))
42 mode:value("wds", translate("a_w_wds"))
43 mode:value("monitor", translate("a_w_monitor"))
45 s:option(Value, "bssid", "BSSID").optional = true
47 s:option(Value, "txpower", translate("a_w_txpwr"), "dbm").rmempty = true
49 s:option(Flag, "frameburst", translate("a_w_brcmburst")).optional = true
50 s:option(Flag, "bursting", translate("a_w_athburst")).optional = true
53 encr = s:option(ListValue, "encryption", translate("encryption"))
54 encr:value("none", "keine")
55 encr:value("wep", "WEP")
56 encr:value("psk", "WPA-PSK")
57 encr:value("wpa", "WPA-Radius")
58 encr:value("psk2", "WPA2-PSK")
59 encr:value("wpa2", "WPA2-Radius")
61 key = s:option(Value, "key", translate("key"))
62 key:depends("encryption", "wep")
63 key:depends("encryption", "psk")
64 key:depends("encryption", "wpa")
65 key:depends("encryption", "psk2")
66 key:depends("encryption", "wpa2")
69 server = s:option(Value, "server", translate("a_w_radiussrv"))
70 server:depends("encryption", "wpa")
71 server:depends("encryption", "wpa2")
74 port = s:option(Value, "port", translate("a_w_radiusport"))
75 port:depends("encryption", "wpa")
76 port:depends("encryption", "wpa2")
79 s:option(Flag, "isolate", translate("a_w_apisolation"), translate("a_w_apisolation1")).optional = true
81 s:option(Flag, "hidden", translate("a_w_hideessid")).optional = true