From: Steven Barth Date: Mon, 23 Nov 2009 20:46:44 +0000 (+0000) Subject: NIU: Minor fixes X-Git-Tag: 0.10.0~919 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bd2ddbdc92e998968f13588495e464efe191d913;p=oweals%2Fluci.git NIU: Minor fixes --- diff --git a/modules/niu/luasrc/model/cbi/niu/network/wan.lua b/modules/niu/luasrc/model/cbi/niu/network/wan.lua index a69b1ba0e..b8d572d83 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 dc8bfbdfb..16c74f05c 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 ccca18c50..5ce93b400 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"))