mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 14:03:17 -07:00
wifi module: fixes and multiple channel selection
This commit is contained in:
commit
654633c419
6 changed files with 105 additions and 22 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue