summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-mod-network/htdocs/luci-static/resources/view
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2023-02-07 14:05:17 +0100
committerGitHub <noreply@github.com>2023-02-07 14:05:17 +0100
commit2234d0c5dda0c6ba4cb323c46901a56fb25e83ce (patch)
tree44ff5242e351ff349f274e6e8c23ad720abd3266 /modules/luci-mod-network/htdocs/luci-static/resources/view
parentf1312cadc6675fb29d02425775dd8a2a533d7e7c (diff)
parent01c5a63934392ab66c66c594fbd93a796e36d6e6 (diff)
Merge pull request #6104 from dhewg/6g
luci-mod-network: enable configuring wifi ax networks on the 6G band
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources/view')
-rw-r--r--modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js25
1 files changed, 9 insertions, 16 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
index bdeaecf8a9..a2b0c84ce2 100644
--- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
+++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
@@ -314,24 +314,16 @@ var CBIWifiFrequencyValue = form.Value.extend({
this.channels = {
'2g': L.hasSystemFeature('hostapd', 'acs') ? [ 'auto', 'auto', true ] : [],
'5g': L.hasSystemFeature('hostapd', 'acs') ? [ 'auto', 'auto', true ] : [],
- '6g': [],
+ '6g': L.hasSystemFeature('hostapd', 'acs') ? [ 'auto', 'auto', true ] : [],
'60g': []
};
for (var i = 0; i < data[1].length; i++) {
- var band;
-
- if (data[1][i].mhz >= 2412 && data[1][i].mhz <= 2484)
- band = '2g';
- else if (data[1][i].mhz >= 5160 && data[1][i].mhz <= 5885)
- band = '5g';
- else if (data[1][i].mhz >= 5925 && data[1][i].mhz <= 7125)
- band = '6g';
- else if (data[1][i].mhz >= 58320 && data[1][i].mhz <= 69120)
- band = '60g';
- else
+ if (!data[1][i].band)
continue;
+ var band = '%dg'.format(data[1][i].band);
+
this.channels[band].push(
data[1][i].channel,
'%d (%d Mhz)'.format(data[1][i].channel, data[1][i].mhz),
@@ -343,10 +335,10 @@ var CBIWifiFrequencyValue = form.Value.extend({
.reduce(function(o, v) { o[v] = true; return o }, {});
this.modes = [
- '', 'Legacy', true,
+ '', 'Legacy', hwmodelist.a || hwmodelist.b || hwmodelist.g,
'n', 'N', hwmodelist.n,
- 'ac', 'AC', hwmodelist.ac,
- 'ax', 'AX', hwmodelist.ax
+ 'ac', 'AC', L.hasSystemFeature('hostapd', '11ac') && hwmodelist.ac,
+ 'ax', 'AX', L.hasSystemFeature('hostapd', '11ax') && hwmodelist.ax
];
var htmodelist = L.toArray(data[0] ? data[0].getHTModes() : null)
@@ -387,7 +379,8 @@ var CBIWifiFrequencyValue = form.Value.extend({
],
'ax': [
'2g', '2.4 GHz', this.channels['2g'].length > 3,
- '5g', '5 GHz', this.channels['5g'].length > 3
+ '5g', '5 GHz', this.channels['5g'].length > 3,
+ '6g', '6 GHz', this.channels['6g'].length > 3
]
};
}, this));