wifi: Add the missing RTT capabilities
These feature flags are defined in the legacy HAL, but were not exposed in the HIDL
interface.
Updated the hash in current.txt using 'hidl-gen -L hash -r
android.hardware.wifi@1.1:hardware/interfaces -r
android.hardware:hardware/interfaces -r
android.hidl:system/libhidl/transport
android.hardware.wifi@1.1::IWifiChip'
Bug: 63545934
Test: Manual testing
Change-Id: Ia196e0fc1c5e305210ec95eb8a54b1a1204ebf20
diff --git a/current.txt b/current.txt
index d93352a..edfcf91 100644
--- a/current.txt
+++ b/current.txt
@@ -219,4 +219,4 @@
c3354ab0d381a236c12dc486ad4b6bec28c979d26748b4661f12ede36f392808 android.hardware.wifi.offload@1.0::IOffloadCallback
b18caefefcc765092412285d776234fcf213b73bdf07ae1b67a5f71b2d2464e3 android.hardware.wifi.offload@1.0::types
c26473e2e4a00af43e28a0ddf9002e5062a7d0940429e5efb6e5513a8abcb75c android.hardware.wifi@1.1::IWifi
-48adfb7259e3816a82a4c394ffaf56fb14628a542295b7a51f1311392d3f8769 android.hardware.wifi@1.1::IWifiChip
+bfcf4856c7b6c66ebc56785ed3e5d181b7be859c2add672497a843b024518737 android.hardware.wifi@1.1::IWifiChip
diff --git a/wifi/1.1/IWifiChip.hal b/wifi/1.1/IWifiChip.hal
index 7275412..50cd02d 100644
--- a/wifi/1.1/IWifiChip.hal
+++ b/wifi/1.1/IWifiChip.hal
@@ -32,7 +32,15 @@
/**
* Set/Reset Tx Power limits.
*/
- SET_TX_POWER_LIMIT = 1 << 8
+ SET_TX_POWER_LIMIT = 1 << 8,
+ /**
+ * Device to Device RTT.
+ */
+ D2D_RTT = 1 << 9,
+ /**
+ * Device to AP RTT.
+ */
+ D2AP_RTT = 1 << 10
};
/**
diff --git a/wifi/1.1/default/hidl_struct_util.cpp b/wifi/1.1/default/hidl_struct_util.cpp
index a413cbb..6b93b9e 100644
--- a/wifi/1.1/default/hidl_struct_util.cpp
+++ b/wifi/1.1/default/hidl_struct_util.cpp
@@ -75,6 +75,10 @@
switch (feature) {
case WIFI_FEATURE_SET_TX_POWER_LIMIT:
return HidlChipCaps::SET_TX_POWER_LIMIT;
+ case WIFI_FEATURE_D2D_RTT:
+ return HidlChipCaps::D2D_RTT;
+ case WIFI_FEATURE_D2AP_RTT:
+ return HidlChipCaps::D2AP_RTT;
};
CHECK(false) << "Unknown legacy feature: " << feature;
return {};
@@ -133,7 +137,9 @@
*hidl_caps |= convertLegacyLoggerFeatureToHidlChipCapability(feature);
}
}
- for (const auto feature : {WIFI_FEATURE_SET_TX_POWER_LIMIT}) {
+ for (const auto feature : {WIFI_FEATURE_SET_TX_POWER_LIMIT,
+ WIFI_FEATURE_D2D_RTT,
+ WIFI_FEATURE_D2AP_RTT}) {
if (feature & legacy_feature_set) {
*hidl_caps |= convertLegacyFeatureToHidlChipCapability(feature);
}