Merge pull request #2687 from HenryGiraldo/master

luci-mod-admin-full: add dependency for channel auto
This commit is contained in:
Jo-Philipp Wich 2019-05-09 13:26:10 +02:00 committed by GitHub
commit 444f06b1b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -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,

View file

@ -177,6 +177,7 @@ if found_sta then
else
ch = s:taboption("general", Value, "_mode_freq", '<br />'..translate("Operating frequency"))
ch.iwinfo = iw
ch.hostapd_acs = (os.execute("hostapd -vacs >/dev/null 2>/dev/null") == 0)
ch.template = "cbi/wireless_modefreq"
function ch.cfgvalue(self, section)