summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/java/com/android/server/wifi/util/ApConfigUtil.java3
-rw-r--r--tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/util/ApConfigUtil.java b/service/java/com/android/server/wifi/util/ApConfigUtil.java
index c3a4c0c95..2ca0641c3 100644
--- a/service/java/com/android/server/wifi/util/ApConfigUtil.java
+++ b/service/java/com/android/server/wifi/util/ApConfigUtil.java
@@ -44,6 +44,7 @@ public class ApConfigUtil {
/**
* Convert frequency to channel.
+ * Note: the utility does not perform any regulatory domain compliance.
* @param frequency frequency to convert
* @return channel number associated with given frequency, -1 if no match
*/
@@ -52,7 +53,7 @@ public class ApConfigUtil {
return (frequency - 2412) / 5 + 1;
} else if (frequency == 2484) {
return 14;
- } else if (frequency >= 5170 && frequency <= 5825) {
+ } else if (frequency >= 5170 && frequency <= 5865) {
/* DFS is included. */
return (frequency - 5170) / 5 + 34;
}
diff --git a/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java
index 823b93846..d02a790c4 100644
--- a/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/util/ApConfigUtilTest.java
@@ -99,7 +99,9 @@ public class ApConfigUtilTest extends WifiBaseTest {
5765, 153,
5785, 157,
5805, 161,
- 5825, 165
+ 5825, 165,
+ 5845, 169,
+ 5865, 173
};
private static final Integer[] ALLOWED_2G_CHANNELS = {1, 2, 3, 4};