diff options
author | Steven Barth <steven@midlink.org> | 2009-11-23 20:46:44 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-11-23 20:46:44 +0000 |
commit | bd2ddbdc92e998968f13588495e464efe191d913 (patch) | |
tree | 7aaa75404a7573066fa79c61fff8f67ee9777886 /modules/niu/luasrc/model | |
parent | 1f83b916ac83eff03e582084dd99579689570360 (diff) |
NIU: Minor fixes
Diffstat (limited to 'modules/niu/luasrc/model')
-rw-r--r-- | modules/niu/luasrc/model/cbi/niu/network/wan.lua | 1 | ||||
-rw-r--r-- | modules/niu/luasrc/model/cbi/niu/network/wlanwan.lua | 11 | ||||
-rw-r--r-- | modules/niu/luasrc/model/cbi/niu/wireless/ap1.lua | 12 |
3 files changed, 14 insertions, 10 deletions
diff --git a/modules/niu/luasrc/model/cbi/niu/network/wan.lua b/modules/niu/luasrc/model/cbi/niu/network/wan.lua index a69b1ba0e6..b8d572d831 100644 --- a/modules/niu/luasrc/model/cbi/niu/network/wan.lua +++ b/modules/niu/luasrc/model/cbi/niu/network/wan.lua @@ -45,6 +45,7 @@ local function deviceroute(self) local widev = wd:sub(6) if cursor:get("wireless", "client", "device") ~= widev then cursor:delete("wireless", "client", "network") + cursor:set("wireless", "client", "mode", "sta") cursor:set("wireless", "client", "device", widev) cursor:delete_all("wireless", "wifi-iface", function(s) return s.device == widev and s._niu ~= "1" diff --git a/modules/niu/luasrc/model/cbi/niu/network/wlanwan.lua b/modules/niu/luasrc/model/cbi/niu/network/wlanwan.lua index dc8bfbdfbb..16c74f05c5 100644 --- a/modules/niu/luasrc/model/cbi/niu/network/wlanwan.lua +++ b/modules/niu/luasrc/model/cbi/niu/network/wlanwan.lua @@ -114,11 +114,20 @@ for _, v in ipairs(suggest) do end end +mode = s:taboption("expert", ListValue, "mode", translate("Operating Mode")) +mode.override_values = true +mode:value("sta", translate("Client")) + encr = s:taboption("general", ListValue, "encryption", translate("Encryption")) if hwtype == "mac80211" then - s:taboption("expert", Flag, "powersave", "Enable Powersaving") + mode:value("mesh", translate("Mesh (802.11s)")) + local meshid = s:taboption("expert", Value, "mesh_id", translate("Mesh ID")) + meshid:depends("mode", "mesh") + + local ps = s:taboption("expert", Flag, "powersave", translate("Enable Powersaving")) + ps:depends("mode", "sta") elseif hwtype == "atheros" then s:taboption("expert", Flag, "bursting", translate("Allow Burst Transmissions")) end diff --git a/modules/niu/luasrc/model/cbi/niu/wireless/ap1.lua b/modules/niu/luasrc/model/cbi/niu/wireless/ap1.lua index ccca18c506..5ce93b4000 100644 --- a/modules/niu/luasrc/model/cbi/niu/wireless/ap1.lua +++ b/modules/niu/luasrc/model/cbi/niu/wireless/ap1.lua @@ -185,8 +185,8 @@ encr = s:taboption("expert", ListValue, "encryption", translate("Encryption")) if hwtype == "mac80211" then - s:taboption("expert", Flag, "wds", "Allow Bridging and Repeating (WDS)") - s:taboption("expert", Flag, "powersave", "Enable Powersaving") + s:taboption("expert", Flag, "wds", translate("Enable Bridging and Repeating (WDS)")) + s:taboption("expert", Flag, "powersave", translate("Enable Powersaving")) elseif hwtype == "atheros" then -- mode:value("wds", translate("Static WDS")) @@ -198,7 +198,7 @@ elseif hwtype == "atheros" then ml:depends({macpolicy="allow"}) ml:depends({macpolicy="deny"}) - s:taboption("expert", Flag, "wds", "Allow Bridging and Repeating (WDS)") + s:taboption("expert", Flag, "wds", translate("Enable Bridging and Repeating (WDS)")) if ap then hidden = s:taboption("expert", Flag, "hidden", translate("Hide Access Point")) @@ -212,8 +212,6 @@ elseif hwtype == "atheros" then s:taboption("expert", Flag, "bursting", translate("Allow Burst Transmissions")) elseif hwtype == "broadcom" then if ap then - mode:value("wds", translate("WDS")) - hidden = s:taboption("expert", Flag, "hidden", translate("Hide Access Point")) hidden:depends({mode="ap"}) hidden:depends({mode="wds"}) @@ -222,10 +220,6 @@ elseif hwtype == "broadcom" then isolate:depends({mode="ap"}) end elseif hwtype == "prism2" then - if ap then - mode:value("wds", translate("WDS")) - end - mp = s:taboption("expert", ListValue, "macpolicy", translate("MAC-Address Filter")) mp:value("", translate("disable")) mp:value("deny", translate("Allow listed only")) |