Skip to content

Commit

Permalink
fix(nl80211): fix freq_to_channel due to lua5.3
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Sep 5, 2023
1 parent 8822d98 commit 51c9c5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nl80211.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ function M.freq_to_channel(freq)
if freq == 2484 then
return 14
elseif freq < 2484 then
return (freq - 2407) / 5
return (freq - 2407) // 5
elseif freq >= 4910 and freq <= 4980 then
return (freq - 4000) / 5
return (freq - 4000) // 5
elseif freq <= 45000 then -- DMG band lower limit
return (freq - 5000) / 5
return (freq - 5000) // 5
elseif freq >= 58320 and freq <= 64800 then
return (freq - 56160) / 2160
return (freq - 56160) // 2160
else
return 0
end
Expand Down

0 comments on commit 51c9c5d

Please sign in to comment.