From 4f5bc6cc533adf76c6553bc349af0908186a0f4d Mon Sep 17 00:00:00 2001 From: Etan Cohen Date: Thu, 28 Dec 2017 13:08:08 -0800 Subject: [PATCH] [AWARE] Add global NAN RTT enable/disable flag Add a HAL flag to globally enable or disable NAN RTT negotiations. Bug: 70218295 Test: integration tests Change-Id: I1460dd94ba12991e8324cabc88cd3a6ddcf8ed55 --- wifi/1.2/default/hidl_struct_util.cpp | 4 ++++ wifi/1.2/types.hal | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/wifi/1.2/default/hidl_struct_util.cpp b/wifi/1.2/default/hidl_struct_util.cpp index 3ca35f73b2..f87828c14a 100644 --- a/wifi/1.2/default/hidl_struct_util.cpp +++ b/wifi/1.2/default/hidl_struct_util.cpp @@ -1141,6 +1141,8 @@ bool convertHidlNanEnableRequest_1_2ToLegacy( legacy_request->config_dw_early_termination = 1; legacy_request->enable_dw_termination = hidl_request2.enableDiscoveryWindowEarlyTermination; + legacy_request->config_enable_ranging = 1; + legacy_request->enable_ranging = hidl_request2.enableRanging; return true; } @@ -1650,6 +1652,8 @@ bool convertHidlNanConfigRequest_1_2ToLegacy( legacy_request->config_dw_early_termination = 1; legacy_request->enable_dw_termination = hidl_request2.enableDiscoveryWindowEarlyTermination; + legacy_request->config_enable_ranging = 1; + legacy_request->enable_ranging = hidl_request2.enableRanging; return true; } diff --git a/wifi/1.2/types.hal b/wifi/1.2/types.hal index 60f4b1f169..1636ae83e4 100644 --- a/wifi/1.2/types.hal +++ b/wifi/1.2/types.hal @@ -49,6 +49,11 @@ struct NanConfigRequestSupplemental { * lower power consumption, but may result in some missed messages and hence increased latency. */ bool enableDiscoveryWindowEarlyTermination; + /** + * Controls whether NAN RTT (ranging) is permitted. Global flag on any NAN RTT operations are + * allowed. Controls ranging in the context of discovery as well as direct RTT. + */ + bool enableRanging; }; /**