[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
This commit is contained in:
Etan Cohen
2017-12-28 13:08:08 -08:00
parent 809b5df89d
commit 4f5bc6cc53
2 changed files with 9 additions and 0 deletions

View File

@@ -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;
}

View File

@@ -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;
};
/**