diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2010-02-27 23:21:14 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2010-02-27 23:21:14 +0000 |
commit | de8a2d07675c3e48c249878437063e62f68f10d7 (patch) | |
tree | 2162a45b92aa5ecc7c262d31107eed378e0434e0 /modules | |
parent | c9d652c4eb781eb8b20b17ae0a4546295fd6c4ff (diff) |
modules/admin-full: add extended mac80211 wireless options for 11n, patch by Dennis Bartsch
Diffstat (limited to 'modules')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua index d6abfd6ad..098a3a26b 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua @@ -28,6 +28,10 @@ m = Map("wireless", "", m:chain("network") +m.breadcrumb = { + { luci.dispatcher.build_url("admin/network/wireless"), translate("Wireless Networks") } +} + local ifsection function m.on_commit(map) @@ -111,6 +115,29 @@ if hwtype == "mac80211" then for _, p in ipairs(iw and iw.txpwrlist or {}) do tp:value(p.dbm, "%i dBm (%i mW)" %{ p.dbm, p.mw }) end + + mode = s:taboption("advanced", ListValue, "hwmode", translate("Mode")) + mode:value("", translate("auto")) + mode:value("11b", "802.11b") + mode:value("11g", "802.11g") + mode:value("11a", "802.11a") + mode:value("11ng", "802.11g+n") + mode:value("11na", "802.11a+n") + + htmode = s:taboption("advanced", ListValue, "htmode", translate("HT mode")) + htmode:depends("hwmode", "11na") + htmode:depends("hwmode", "11ng") + htmode:value("HT20", "20MHz") + htmode:value("HT40-", translate("40MHz 2nd channel below")) + htmode:value("HT40+", translate("40MHz 2nd channel above")) + + htcapab = s:taboption("advanced", DynamicList, "ht_capab", translate("HT capabilities")) + htcapab:depends("hwmode", "11na") + htcapab:depends("hwmode", "11ng") + + s:taboption("advanced", Value, "country", translate("Country Code"), translate("Use ISO/IEC 3166 alpha2 country codes.")) + s:taboption("advanced", Value, "distance", translate("Distance Optimization"), + translate("Distance to farthest network member in meters.")) end @@ -300,6 +327,26 @@ if wnet then s:taboption("advanced", Value, "frag", translate("Fragmentation Threshold")) s:taboption("advanced", Value, "rts", translate("RTS/CTS Threshold")) + + mode:value("ap-wds", "%s (%s)" % {translate("Access Point"), translate("WDS")}) + mode:value("sta-wds", "%s (%s)" % {translate("Client"), translate("WDS")}) + + function mode.write(self, section, value) + if value == "ap-wds" then + ListValue.write(self, section, "ap") + m.uci:set("wireless", section, "wds", 1) + elseif value == "sta-wds" then + ListValue.write(self, section, "sta") + m.uci:set("wireless", section, "wds", 1) + else + ListValue.write(self, section, value) + m.uci:delete("wireless", section, "wds") + end + end + + hidden = s:taboption("general", Flag, "hidden", translate("Hide <abbr title=\"Extended Service Set Identifier\">ESSID</abbr>")) + hidden:depends({mode="ap"}) + hidden:depends({mode="ap-wds"}) end |