wifi module: fixes and multiple channel selection

This commit is contained in:
Matrix86 2018-03-12 16:58:02 +01:00
commit 654633c419
6 changed files with 105 additions and 22 deletions

View file

@ -18,6 +18,18 @@ func Dot11Freq2Chan(freq int) int {
return 0
}
func Dot11Chan2Freq(channel int) int {
if channel <= 13 {
return ((channel - 1) * 5) + 2412
} else if channel == 14 {
return 2484
} else if channel <= 173 {
return ((channel - 7) * 5) + 5035
}
return 0
}
type APNewCallback func(ap *AccessPoint)
type APLostCallback func(ap *AccessPoint)