+cipher = s:taboption("encryption", ListValue, "cipher", translate("Cipher"))
+cipher.rmempty = false
+cipher:depends({encryption="wpa"})
+cipher:depends({encryption="wpa2"})
+cipher:depends({encryption="psk"})
+cipher:depends({encryption="psk2"})
+cipher:depends({encryption="wpa-mixed"})
+cipher:depends({encryption="psk-mixed"})
+cipher:value("auto", translate("auto"))
+cipher:value("ccmp", translate("Force CCMP (AES)"))
+cipher:value("tkip", translate("Force TKIP"))
+cipher:value("tkip+ccmp", translate("Force TKIP and CCMP (AES)"))
+
+function encr.cfgvalue(self, section)
+ local v = tostring(ListValue.cfgvalue(self, section))
+ if v == "wep" then
+ return "wep-open"
+ elseif v and v:match("%+") then
+ return (v:gsub("%+.+$", ""))
+ end
+ return v
+end
+