luci-admin-full: add further wifi options
authorAnsuel Smith <ansuelsmth@gmail.com>
Tue, 17 Jul 2018 23:23:46 +0000 (01:23 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 20 Jul 2018 06:48:39 +0000 (08:48 +0200)
This commit adds option to disable scan for 40mhz channel, permit to tweak
beacon interval and other advanced settings.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
[fix whitespace, add range constraint to dtim_period, add dtim_period
 to local vars, reword commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 39cabc03611369d7cb421b5fcff90ce20d9d51c4)

modules/luci-mod-admin-full/luasrc/model/cbi/admin_network/wifi.lua

index d51a72aba1d998ad65949c3b9bf9a5810ea7e6bd..743efaa1e8c07402b3176aaf891c50cd3e3a0224 100644 (file)
@@ -16,7 +16,7 @@ local acct_port, acct_secret, acct_server, anonymous_identity, ant1, ant2,
        mp, nasid, network, password, pmk_r1_push, privkey, privkey2, privkeypwd,
        privkeypwd2, r0_key_lifetime, r0kh, r1_key_holder, r1kh,
        reassociation_deadline, retry_timeout, ssid, st, tp, wepkey, wepslot,
-       wmm, wpakey, wps
+       wmm, wpakey, wps, disassoc_low_ack, short_preamble, beacon_int, dtim_period
 
 arg[1] = arg[1] or ""
 
@@ -250,6 +250,14 @@ if hwtype == "mac80211" then
 
        s:taboption("advanced", Value, "frag", translate("Fragmentation Threshold"))
        s:taboption("advanced", Value, "rts", translate("RTS/CTS Threshold"))
+       
+       s:taboption("advanced", Flag, "noscan", translate("Force 40MHz mode"),
+               translate("Always use 40MHz channels even if the secondary channel overlaps. Using this option does not comply with IEEE 802.11n-2009!")).optional = true
+
+       beacon_int = s:taboption("advanced", Value, "beacon_int", translate("Beacon Interval"))
+       beacon_int.optional = true
+       beacon_int.placeholder = 100
+       beacon_int.datatype = "range(15,65535)"
 end
 
 
@@ -491,6 +499,18 @@ if hwtype == "mac80211" then
 
        ifname = s:taboption("advanced", Value, "ifname", translate("Interface name"), translate("Override default interface name"))
        ifname.optional = true
+
+       short_preamble = s:taboption("advanced", Flag, "short_preamble", translate("Short Preamble"))
+       short_preamble.default = short_preamble.enabled
+
+       dtim_period = s:taboption("advanced", Value, "dtim_period", translate("DTIM Interval"), translate("Delivery Traffic Indication Message Interval"))
+       dtim_period.optional = true
+       dtim_period.placeholder = 2
+       dtim_period.datatype = "range(1,255)"
+
+       disassoc_low_ack = s:taboption("advanced", Flag, "disassoc_low_ack", translate("Disassociate On Low Acknowledgement"),
+               translate("Allow AP mode to disconnect STAs based on low ACK condition"))
+       disassoc_low_ack.default = disassoc_low_ack.enabled
 end