- local wconf = {
- device = m.hidden.device,
- ssid = m.hidden.join,
- mode = (m.hidden.mode == "Ad-Hoc" and "adhoc" or "sta"),
- network = net:name()
- }
-
- if m.hidden.wep == "1" then
- wconf.encryption = "wep-open"
- wconf.key = "1"
- wconf.key1 = key and key:formvalue(section) or ""
- elseif (tonumber(m.hidden.wpa_version) or 0) > 0 then
- wconf.encryption = (tonumber(m.hidden.wpa_version) or 0) >= 2 and "psk2" or "psk"
- wconf.key = key and key:formvalue(section) or ""
- else
- wconf.encryption = "none"
- end
+ local wconf = {
+ device = m.hidden.device,
+ ssid = m.hidden.join,
+ mode = (m.hidden.mode == "Ad-Hoc" and "adhoc" or "sta")
+ }
+
+ if m.hidden.wep == "1" then
+ wconf.encryption = "wep-open"
+ wconf.key = "1"
+ wconf.key1 = key and key:formvalue(section) or ""
+ elseif (tonumber(m.hidden.wpa_version) or 0) > 0 then
+ wconf.encryption = (tonumber(m.hidden.wpa_version) or 0) >= 2 and "psk2" or "psk"
+ wconf.key = key and key:formvalue(section) or ""
+ else
+ wconf.encryption = "none"
+ end