NIU: Cleanup
This commit is contained in:
parent
c27128946b
commit
efe5fc77f9
2 changed files with 8 additions and 9 deletions
|
@ -9,7 +9,6 @@ end
|
||||||
local function deviceroute(self)
|
local function deviceroute(self)
|
||||||
cursor:unload("wireless")
|
cursor:unload("wireless")
|
||||||
local d = cursor:get("wireless", "ap", "device")
|
local d = cursor:get("wireless", "ap", "device")
|
||||||
local h = cursor:get("wireless", d, "type")
|
|
||||||
if d ~= "none" then
|
if d ~= "none" then
|
||||||
cursor:delete_all("wireless", "wifi-iface", function(s)
|
cursor:delete_all("wireless", "wifi-iface", function(s)
|
||||||
return s.device == d and s._niu ~= "1"
|
return s.device == d and s._niu ~= "1"
|
||||||
|
|
|
@ -230,11 +230,11 @@ end
|
||||||
|
|
||||||
-- Encryption --
|
-- Encryption --
|
||||||
|
|
||||||
|
encr.default = "wep" -- Early default
|
||||||
encr.override_values = true
|
encr.override_values = true
|
||||||
encr.override_depends = true
|
encr.override_depends = true
|
||||||
encr:value("none", "No Encryption")
|
encr:value("none", "No Encryption")
|
||||||
encr:value("wep", "WEP", {mode="ap"}, {mode="sta"}, {mode="ap-wds"})
|
encr:value("wep", "WEP", {mode="ap"}, {mode="sta"})
|
||||||
|
|
||||||
if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then
|
if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then
|
||||||
local hostapd = fs.access("/usr/sbin/hostapd") or os.getenv("LUCI_SYSROOT")
|
local hostapd = fs.access("/usr/sbin/hostapd") or os.getenv("LUCI_SYSROOT")
|
||||||
|
@ -242,11 +242,11 @@ if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then
|
||||||
if hostapd then
|
if hostapd then
|
||||||
--s:taboption("expert", Flag, "_alloweap", "Allow EAP / 802.11i authentication")
|
--s:taboption("expert", Flag, "_alloweap", "Allow EAP / 802.11i authentication")
|
||||||
|
|
||||||
encr:value("psk", "WPA", {mode="ap"}, {mode="ap-wds"})
|
encr:value("psk", "WPA", {mode="ap"})
|
||||||
encr:value("wpa", "WPA-EAP", {mode="ap"}, {mode="ap-wds"})
|
encr:value("wpa", "WPA-EAP", {mode="ap"})
|
||||||
encr:value("psk-mixed", "WPA + WPA2", {mode="ap"}, {mode="ap-wds"})
|
encr:value("psk-mixed", "WPA + WPA2", {mode="ap"})
|
||||||
encr:value("psk2", "WPA2", {mode="ap"}, {mode="ap-wds"})
|
encr:value("psk2", "WPA2", {mode="ap"})
|
||||||
encr:value("wpa2", "WPA2-EAP (802.11i)", {mode="ap"}, {mode="ap-wds"})
|
encr:value("wpa2", "WPA2-EAP (802.11i)", {mode="ap"})
|
||||||
encr.default = "psk-mixed"
|
encr.default = "psk-mixed"
|
||||||
end
|
end
|
||||||
elseif hwtype == "broadcom" then
|
elseif hwtype == "broadcom" then
|
||||||
|
|
Loading…
Reference in a new issue