luci-mod-network: fix 60GHz radio frequency configuration
authorJo-Philipp Wich <jo@mein.io>
Fri, 9 Jul 2021 19:39:45 +0000 (21:39 +0200)
committerJo-Philipp Wich <jo@mein.io>
Fri, 9 Jul 2021 19:39:45 +0000 (21:39 +0200)
Fix incorrect minimum 60GHz frequency value and ensure that a 60GHz band
choice option is available once corresponding channels are found on the
system.

Ref: http://lists.openwrt.org/pipermail/openwrt-devel/2021-July/035810.html
Suggested-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js

index 5115a69eb6ef6e6de27dbca4f192d252f797e9bc..37d4558edcf0f0fe07cd5f8225054cf43b9ea119 100644 (file)
@@ -327,7 +327,7 @@ var CBIWifiFrequencyValue = form.Value.extend({
                                        band = '5g';
                                else if (data[1][i].mhz >= 5925 && data[1][i].mhz <= 7125)
                                        band = '6g';
-                               else if (data[1][i].mhz >= 58329 && data[1][i].mhz <= 69120)
+                               else if (data[1][i].mhz >= 58320 && data[1][i].mhz <= 69120)
                                        band = '60g';
                                else
                                        continue;
@@ -375,7 +375,8 @@ var CBIWifiFrequencyValue = form.Value.extend({
                        this.bands = {
                                '': [
                                        '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,
+                                       '60g', '60 GHz', this.channels['60g'].length > 0
                                ],
                                'n': [
                                        '2g', '2.4 GHz', this.channels['2g'].length > 3,