summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVeerendranath Jakkam <quic_vjakkam@quicinc.com>2020-05-11 09:33:06 +0530
committerSunil Ravi <sunilravi@google.com>2020-05-20 14:04:25 -0700
commit3280ce7359f081628980661afc46890bd90a71c9 (patch)
treef344dfc4be76afcc75ab4fa5f4a8eef3db83671f /tests
parent0715666c96aef01fd8d76445189446bf3b5179c3 (diff)
Add check to consider band in determining VHT capability
determineMode returning MODE_11AC capability when VHT IEs found. Thus all APs that have support for the vendor specific partial VHT support in the 2.4 GHz band were also being reported as 11AC capable. However, IEEE Std 802.11ac-2013 defines VHT STA to operate in frequency bands below 6 GHz excluding the 2.4 GHz band. Do not report MODE_11AC capability when operating channel is 2.4 GHz. Bug: 156571060 Test: Manual - Enabled verbose logging in NetworkDetail Class and verified that WifiMode is determined correctly for 2.4GHz APs supporting 11ax, 11ac and 11n. Test: atest com.android.server.wifi.util.InformationElementUtilTest Change-Id: Iae202a0d3116f99e9a672d7510bec9baf7c709d2
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java
index 874da7043..77c99a9d1 100644
--- a/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/util/InformationElementUtilTest.java
@@ -1706,5 +1706,39 @@ public class InformationElementUtilTest extends WifiBaseTest {
assertEquals(true, vsa.IsOceCapable);
}
+ /**
+ * verify determineMode for various combinations.
+ */
+ @Test
+ public void determineMode() throws Exception {
+ assertEquals(InformationElementUtil.WifiMode.MODE_11B,
+ InformationElementUtil.WifiMode.determineMode(
+ 2412, 11000000, false, false, false, false));
+ assertEquals(InformationElementUtil.WifiMode.MODE_11G,
+ InformationElementUtil.WifiMode.determineMode(
+ 2412, 54000000, false, false, false, false));
+ assertEquals(InformationElementUtil.WifiMode.MODE_11A,
+ InformationElementUtil.WifiMode.determineMode(
+ 5180, 54000000, false, false, false, false));
+ assertEquals(InformationElementUtil.WifiMode.MODE_11G,
+ InformationElementUtil.WifiMode.determineMode(
+ 2412, 54000000, false, false, false, true));
+ assertEquals(InformationElementUtil.WifiMode.MODE_11N,
+ InformationElementUtil.WifiMode.determineMode(
+ 2412, 72000000, false, false, true, false));
+ assertEquals(InformationElementUtil.WifiMode.MODE_11N,
+ InformationElementUtil.WifiMode.determineMode(
+ 2412, 72000000, false, true, true, false));
+ assertEquals(InformationElementUtil.WifiMode.MODE_11AC,
+ InformationElementUtil.WifiMode.determineMode(
+ 5180, 866000000, false, true, true, false));
+ assertEquals(InformationElementUtil.WifiMode.MODE_11AX,
+ InformationElementUtil.WifiMode.determineMode(
+ 5180, 866000000, true, true, true, false));
+ assertEquals(InformationElementUtil.WifiMode.MODE_11AX,
+ InformationElementUtil.WifiMode.determineMode(
+ 2412, 72000000, true, true, true, false));
+ }
+
// TODO: SAE, OWN, SUITE_B
}