summaryrefslogtreecommitdiffstats
path: root/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
diff options
context:
space:
mode:
authorAhmed ElArabawy <arabawy@google.com>2018-10-31 14:34:29 -0700
committerAhmed ElArabawy <arabawy@google.com>2018-12-05 08:40:25 -0800
commitc29e3001af3a6ad885cdbb3b1df948c6702576ba (patch)
tree417613ecf1742f83b444cfeada63d6bd4c6a6dce /tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
parent927553ec38241f1e65fc826b822c757d92b1e9bd (diff)
downloadandroid_frameworks_opt_net_wifi-c29e3001af3a6ad885cdbb3b1df948c6702576ba.tar.gz
android_frameworks_opt_net_wifi-c29e3001af3a6ad885cdbb3b1df948c6702576ba.tar.bz2
android_frameworks_opt_net_wifi-c29e3001af3a6ad885cdbb3b1df948c6702576ba.zip
Handle low-latency mode for legacy devices
This commit handles low-latency mode for legacy devices, or for devices that don't support IWifiChip@1.3 HAL. For those devices, the new HAL api for setting latency-mode is not supported, and hence, we revert to controlling power-save mode instead. Bug: 34905427 Test: Unit test Test: ./tests/wifitests/runtests.sh Change-Id: Ia7aaafa0f2190e0bc1d2e5eeee753a268da9b698
Diffstat (limited to 'tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
index a9dbe6f21..00d137d4c 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiVendorHalTest.java
@@ -748,6 +748,24 @@ public class WifiVendorHalTest {
}
/**
+ * Test translation to WifiManager.WIFI_FEATURE_* for V1.3
+ *
+ * Test the added features in V1.3
+ */
+ @Test
+ public void testChipFeatureMaskTranslation_1_3() {
+ int caps = (
+ android.hardware.wifi.V1_3.IWifiChip.ChipCapabilityMask.SET_LATENCY_MODE
+ | android.hardware.wifi.V1_1.IWifiChip.ChipCapabilityMask.D2D_RTT
+ );
+ int expected = (
+ WifiManager.WIFI_FEATURE_LOW_LATENCY
+ | WifiManager.WIFI_FEATURE_D2D_RTT
+ );
+ assertEquals(expected, mWifiVendorHal.wifiFeatureMaskFromChipCapabilities_1_3(caps));
+ }
+
+ /**
* Test get supported features. Tests whether we coalesce information from different sources
* (IWifiStaIface, IWifiChip and HalDeviceManager) into the bitmask of supported features
* correctly.