From: Weikai Kong Date: Fri, 3 Jan 2025 05:31:35 +0000 (-0500) Subject: luci-app-dawn: Fix getChannelFromFrequency for 6GHz X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=15a8136ace399bc1f4d5cd683d9df671b232d4a5;p=project%2Fluci.git 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 --- 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; }