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"
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
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"))
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"))
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"})
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"))