Merge pull request #5992 from PolynomialDivision/luci-app-dawn-fix

luci-app-dawn: return 0 in case of weird frequency
This commit is contained in:
Hannu Nyman 2022-09-27 18:13:18 +03:00 committed by GitHub
commit b508588913
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,9 @@
module("luci.tools.ieee80211", package.seeall)
function frequency_to_channel(freq)
if (freq == 2484) then
if (freq <= 2400) then
return 0;
elseif (freq == 2484) then
return 14;
elseif (freq < 2484) then
return (freq - 2407) / 5;