From 15a8136ace399bc1f4d5cd683d9df671b232d4a5 Mon Sep 17 00:00:00 2001 From: Weikai Kong Date: Fri, 3 Jan 2025 00:31:35 -0500 Subject: [PATCH] luci-app-dawn: Fix getChannelFromFrequency for 6GHz For (5.9-)6GHz channels ( Center Frequency - 5950 ) / 5 = channel_number e.g. ( 5955 - 5950 ) / 5 = Channel 1 Signed-off-by: Weikai Kong --- .../htdocs/luci-static/resources/dawn/dawn-common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applications/luci-app-dawn/htdocs/luci-static/resources/dawn/dawn-common.js b/applications/luci-app-dawn/htdocs/luci-static/resources/dawn/dawn-common.js index 9852994fd3..a76d38495d 100644 --- a/applications/luci-app-dawn/htdocs/luci-static/resources/dawn/dawn-common.js +++ b/applications/luci-app-dawn/htdocs/luci-static/resources/dawn/dawn-common.js @@ -49,9 +49,12 @@ function getChannelFromFrequency(freq) { else if (freq >= 4910 && freq <= 4980) { return (freq - 4000) / 5; } - else if (freq <= 45000) { + else if (freq <= 5935) { return (freq - 5000) / 5; } + else if (freq <= 45000) { + return (freq - 5950) / 5; + } else if (freq >= 58320 && freq <= 64800) { return (freq - 56160) / 2160; } -- 2.30.2