misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-03-12 15:58:45 +01:00
commit 0a8b8548b6
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
6 changed files with 39 additions and 38 deletions

View file

@ -7,6 +7,17 @@ import (
"time"
)
func Dot11Freq2Chan(freq int) int {
if freq <= 2472 {
return ((freq - 2412) / 5) + 1
} else if freq == 2484 {
return 14
} else if freq >= 5035 && freq <= 5865 {
return ((freq - 5035) / 5) + 7
}
return 0
}
type APNewCallback func(ap *AccessPoint)
type APLostCallback func(ap *AccessPoint)