Wifi updates part #1

This commit is contained in:
Steven Barth 2008-08-30 00:11:48 +00:00
parent 76c5cc5ff9
commit 449d8e46e9

View file

@ -27,7 +27,8 @@ function en.cfgvalue(self, section)
return Flag.cfgvalue(self, section) or "0" return Flag.cfgvalue(self, section) or "0"
end end
t = s:option(DummyValue, "type", translate("type")) s:option(DummyValue, "type", translate("type"))
local hwtype = m:get(arg[1], "type")
mode = s:option(ListValue, "mode", translate("mode")) mode = s:option(ListValue, "mode", translate("mode"))
mode:value("", "standard") mode:value("", "standard")
@ -35,6 +36,14 @@ mode:value("11b", "802.11b")
mode:value("11g", "802.11g") mode:value("11g", "802.11g")
mode:value("11a", "802.11a") mode:value("11a", "802.11a")
mode:value("11bg", "802.11b+g") mode:value("11bg", "802.11b+g")
if hwtype == "atheros" then
mode:value("11gdt", "802.11adt")
mode:value("11adt", "802.11adt")
mode:value("fh", "fh")
end
mode.rmempty = true mode.rmempty = true
ch = s:option(Value, "channel", translate("a_w_channel")) ch = s:option(Value, "channel", translate("a_w_channel"))
@ -71,6 +80,8 @@ maxassoc.optional = true
----------------------- Interface -----------------------
s = m:section(TypedSection, "wifi-iface", translate("interfaces")) s = m:section(TypedSection, "wifi-iface", translate("interfaces"))
s.addremove = true s.addremove = true
s.anonymous = true s.anonymous = true
@ -102,9 +113,16 @@ mode:value("ap", translate("a_w_ap"))
mode:value("adhoc", translate("a_w_adhoc")) mode:value("adhoc", translate("a_w_adhoc"))
mode:value("ahdemo", translate("a_w_ahdemo")) mode:value("ahdemo", translate("a_w_ahdemo"))
mode:value("sta", translate("a_w_client")) mode:value("sta", translate("a_w_client"))
mode:value("wds", translate("a_w_wds"))
mode:value("monitor", translate("a_w_monitor")) mode:value("monitor", translate("a_w_monitor"))
if hwtype ~= "atheros" then
mode:value("wds", translate("a_w_wds"))
end
if hwtype == "atheros" then
s:option(Flag, "wds", translate("a_w_wds"))
end
s:option(Value, "bssid", "BSSID").optional = true s:option(Value, "bssid", "BSSID").optional = true
s:option(Value, "txpower", translate("a_w_txpwr"), "dbm").rmempty = true s:option(Value, "txpower", translate("a_w_txpwr"), "dbm").rmempty = true