Support 6G up to channel 253 for some reason

This commit is contained in:
Mygod
2022-07-12 20:21:54 -04:00
parent 4e1f7c9c40
commit f9a62be428
2 changed files with 2 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ data class SoftApConfigurationCompat(
} }
BAND_6GHZ -> when (chan) { BAND_6GHZ -> when (chan) {
2 -> 5935 2 -> 5935
in 1..233 -> 5950 + chan * 5 in 1..253 -> 5950 + chan * 5
else -> throw IllegalArgumentException("Invalid 6GHz channel $chan") else -> throw IllegalArgumentException("Invalid 6GHz channel $chan")
} }
BAND_60GHZ -> { BAND_60GHZ -> {

View File

@@ -70,7 +70,7 @@ class WifiApDialogFragment : AlertDialogFragment<WifiApDialogFragment.Arg, WifiA
in 30..Int.MAX_VALUE -> { in 30..Int.MAX_VALUE -> {
genAutoOptions(SoftApConfigurationCompat.BAND_ANY_31) + genAutoOptions(SoftApConfigurationCompat.BAND_ANY_31) +
channels5G + channels5G +
(1..233).map { ChannelOption(SoftApConfigurationCompat.BAND_6GHZ, it) } + (1..253).map { ChannelOption(SoftApConfigurationCompat.BAND_6GHZ, it) } +
(1..6).map { ChannelOption(SoftApConfigurationCompat.BAND_60GHZ, it) } (1..6).map { ChannelOption(SoftApConfigurationCompat.BAND_60GHZ, it) }
} }
in 28 until 30 -> p2pSafeOptions in 28 until 30 -> p2pSafeOptions