From b0ec6d89ffcddc64fbdb73692809b4260c0c86c3 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 9852994fd32a..a76d38495d12 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; }