diff options
author | Enrique Giraldo <enrique.giraldo@galgus.net> | 2018-09-18 13:43:01 +0200 |
---|---|---|
committer | Enrique Giraldo <hgiraldos@gmail.com> | 2019-05-02 08:47:06 +0200 |
commit | 4518c0629089eccfc7d2e88a79409cb2df226306 (patch) | |
tree | 5151e1d915ac5eb907f600689c1c992534903c0c /modules/luci-base/luasrc/view | |
parent | 3b379f01b52ec1150662f707864608e3e0f51c3f (diff) |
luci-mod-admin-full: add dependency for channel auto
Do not show 'auto' channel option if hostapd is
not compiled with CONFIG_ACS
Signed-off-by: Enrique Giraldo <hgiraldos@gmail.com>
Diffstat (limited to 'modules/luci-base/luasrc/view')
-rw-r--r-- | modules/luci-base/luasrc/view/cbi/wireless_modefreq.htm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/luci-base/luasrc/view/cbi/wireless_modefreq.htm b/modules/luci-base/luasrc/view/cbi/wireless_modefreq.htm index ebb02e489..eeb1d5c5c 100644 --- a/modules/luci-base/luasrc/view/cbi/wireless_modefreq.htm +++ b/modules/luci-base/luasrc/view/cbi/wireless_modefreq.htm @@ -4,6 +4,7 @@ var freqlist = <%= luci.http.write_json(self.iwinfo.freqlist) %>; var hwmodes = <%= luci.http.write_json(self.iwinfo.hwmodelist or {}) %>; var htmodes = <%= luci.http.write_json(self.iwinfo.htmodelist) %>; + var acs = <%= luci.http.write_json(self.hostapd_acs or 0) %>; var channels = { '11g': [ @@ -14,6 +15,10 @@ ] }; + if (acs < 1) { + channels[(freqlist[freqlist.length - 1].mhz > 2484) ? '11a' : '11g'].length = 0; + } + for (var i = 0; i < freqlist.length; i++) channels[(freqlist[i].mhz > 2484) ? '11a' : '11g'].push( freqlist[i].channel, |