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:
commit
b508588913
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue