summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-01-30 08:24:38 +0100
committerGitHub <noreply@github.com>2019-01-30 08:24:38 +0100
commit74e4cf56c63e982519f9f8fd1fb2adbddbd33093 (patch)
tree0545419af559db70486549efa498109ec36b7f01
parent1828af98279369d9eb3ee1e113c7b544a907b3c6 (diff)
parent69490d628e1d0a02609581123373b3cbc368fece (diff)
Merge pull request #2466 from HenryGiraldo/master
luci-mod-network: Add mesh_rssi_threshold and encryption
-rw-r--r--modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua b/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua
index eed758c6cd..1ac79d8ee7 100644
--- a/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua
+++ b/modules/luci-mod-network/luasrc/model/cbi/admin_network/wifi.lua
@@ -376,6 +376,14 @@ meshfwd.rmempty = false
meshfwd.default = "1"
meshfwd:depends({mode="mesh"})
+mesh_rssi_th = s:taboption("advanced", Value, "mesh_rssi_threshold",
+ translate("RSSI threshold for joining"),
+ translate("0 = not using RSSI threshold, 1 = do not change driver default"))
+mesh_rssi_th.rmempty = false
+mesh_rssi_th.default = "0"
+mesh_rssi_th.datatype = "range(-255,1)"
+mesh_rssi_th:depends({mode="mesh"})
+
ssid = s:taboption("general", Value, "ssid", translate("<abbr title=\"Extended Service Set Identifier\">ESSID</abbr>"))
ssid.datatype = "maxlength(32)"
ssid:depends({mode="ap"})
@@ -669,6 +677,7 @@ if hwtype == "mac80211" or hwtype == "prism2" then
encr:value("psk", "WPA-PSK", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"})
encr:value("psk2", "WPA2-PSK", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"})
encr:value("psk-mixed", "WPA-PSK/WPA2-PSK Mixed Mode", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"}, {mode="adhoc"})
+ encr:value("sae", "SAE", {mode="mesh"})
if has_ap_eap and has_sta_eap then
encr:value("wpa", "WPA-EAP", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"})
encr:value("wpa2", "WPA2-EAP", {mode="ap"}, {mode="sta"}, {mode="ap-wds"}, {mode="sta-wds"})
@@ -689,6 +698,7 @@ if hwtype == "mac80211" or hwtype == "prism2" then
encr:value("psk", "WPA-PSK", {mode="sta"}, {mode="sta-wds"}, {mode="adhoc"})
encr:value("psk2", "WPA2-PSK", {mode="sta"}, {mode="sta-wds"}, {mode="adhoc"})
encr:value("psk-mixed", "WPA-PSK/WPA2-PSK Mixed Mode", {mode="sta"}, {mode="sta-wds"}, {mode="adhoc"})
+ encr:value("sae", "SAE", {mode="mesh"})
if has_sta_eap then
encr:value("wpa", "WPA-EAP", {mode="sta"}, {mode="sta-wds"})
encr:value("wpa2", "WPA2-EAP", {mode="sta"}, {mode="sta-wds"})
@@ -841,6 +851,21 @@ for slot=1,4 do
end
end
+saekey = s:taboption("encryption", Value, "_sae_key", translate("Key"))
+saekey:depends("encryption", "sae")
+saekey.rmempty = true
+saekey.datatype = "wpakey"
+saekey.password = true
+
+saekey.cfgvalue = function(self, section, value)
+ local key = m.uci:get("wireless", section, "key")
+ return key
+end
+
+saekey.write = function(self, section, value)
+ self.map.uci:set("wireless", section, "key", value)
+end
+
if hwtype == "mac80211" or hwtype == "prism2" then
-- Probe 802.11r support (and EAP support as a proxy for Openwrt)