NIU: Minor fixes
authorSteven Barth <steven@midlink.org>
Mon, 23 Nov 2009 20:46:44 +0000 (20:46 +0000)
committerSteven Barth <steven@midlink.org>
Mon, 23 Nov 2009 20:46:44 +0000 (20:46 +0000)
modules/niu/luasrc/model/cbi/niu/network/wan.lua
modules/niu/luasrc/model/cbi/niu/network/wlanwan.lua
modules/niu/luasrc/model/cbi/niu/wireless/ap1.lua

index a69b1ba0e638bff61a313eb7c3c15c80a33a070c..b8d572d831e792ffa93f0d72049ea5c09d9dfe3c 100644 (file)
@@ -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"
index dc8bfbdfbb40d5cb4b0735b690efbd3d2a71c369..16c74f05c59a3fa64b614dd9c259c924d8882d12 100644 (file)
@@ -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
index ccca18c506ad923bb890a18dc71e6b2445d64911..5ce93b400035b1b774222fd98585f3e369766457 100644 (file)
@@ -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"))