projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27060f3
)
luci-app-dawn: return 0 in case of weird frequency
author
Nick Hainke
<
[email protected]
>
Tue, 27 Sep 2022 07:30:15 +0000
(09:30 +0200)
committer
Nick Hainke
<
[email protected]
>
Tue, 27 Sep 2022 07:30:15 +0000
(09:30 +0200)
Sometimes 0 is passed to the frequency. Return 0 in that case.
Signed-off-by: Nick Hainke <
[email protected]
>
applications/luci-app-dawn/luasrc/tools/ieee80211.lua
patch
|
blob
|
history
diff --git
a/applications/luci-app-dawn/luasrc/tools/ieee80211.lua
b/applications/luci-app-dawn/luasrc/tools/ieee80211.lua
index b35991ed7d08f0bdb5704b4d1d9c6b4dbb83696d..44b04644274381e345aa1448068a2813dad0d165 100644
(file)
--- a/
applications/luci-app-dawn/luasrc/tools/ieee80211.lua
+++ b/
applications/luci-app-dawn/luasrc/tools/ieee80211.lua
@@
-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;