luci-mod-network: enable configuring wifi ax networks on the 6G band
[project/luci.git] / modules / luci-mod-network / htdocs / luci-static / resources / view / network / wireless.js
index bdeaecf8a9442aab0fe76b3c2b58d880948c20c6..3c6f51afeb2afce0a1695c416cebaf0de99cdbad 100644 (file)
@@ -314,7 +314,7 @@ 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': []
                        };
 
@@ -343,10 +343,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 +387,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));