luci-mod-network: fix 60GHz radio frequency configuration
authorJo-Philipp Wich <[email protected]>
Fri, 9 Jul 2021 19:39:45 +0000 (21:39 +0200)
committerJo-Philipp Wich <[email protected]>
Tue, 12 Oct 2021 21:01:29 +0000 (23:01 +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 <[email protected]>
Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit e5626ece12236f6be9dbb6da6eb90fcbb469a1f0)

modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js

index 9cfb378906d7629caedbf6543c11c475b044fa49..ed33867e890dfb6e26d2bf2aef777c5a83997763 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,