summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEtan Cohen2017-04-04 15:00:14 -0500
committerEtan Cohen2017-04-04 17:13:36 -0500
commit20925b0f569c7396468a5bd406bd4c139978c7ac (patch)
tree0cf80a2e286928d283ddabf11beb675abe0e29ff
parent945fbf84347a7b2446d58d6e87c68110765c1462 (diff)
downloadplatform-hardware-interfaces-20925b0f569c7396468a5bd406bd4c139978c7ac.tar.gz
platform-hardware-interfaces-20925b0f569c7396468a5bd406bd4c139978c7ac.tar.xz
platform-hardware-interfaces-20925b0f569c7396468a5bd406bd4c139978c7ac.zip
[AWARE] Legacy HAL update: reduce host wakeup
Legacy HAL update to add indications when a solicited publisher receives a match. Not used in current HAL. However, also added a control bit to turn off host notification which is now enabled. Bug: 35195773 Test: integration (sl4a) tests Change-Id: I8ff378abaae11d4feaa42a9901abb1b48069dc4f
-rw-r--r--wifi/1.0/default/hidl_struct_util.cpp1
-rw-r--r--wifi/1.0/default/wifi_legacy_hal.cpp7
2 files changed, 8 insertions, 0 deletions
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index df9c9dfd..ae4f95d5 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -1067,6 +1067,7 @@ bool convertHidlNanPublishRequestToLegacy(
1067 hidl_request.baseConfigs.disableMatchExpirationIndication ? 0x2 : 0x0; 1067 hidl_request.baseConfigs.disableMatchExpirationIndication ? 0x2 : 0x0;
1068 legacy_request->recv_indication_cfg |= 1068 legacy_request->recv_indication_cfg |=
1069 hidl_request.baseConfigs.disableFollowupReceivedIndication ? 0x4 : 0x0; 1069 hidl_request.baseConfigs.disableFollowupReceivedIndication ? 0x4 : 0x0;
1070 legacy_request->recv_indication_cfg |= 0x8;
1070 legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.securityConfig.cipherType; 1071 legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.securityConfig.cipherType;
1071 if (hidl_request.baseConfigs.securityConfig.securityType == NanDataPathSecurityType::PMK) { 1072 if (hidl_request.baseConfigs.securityConfig.securityType == NanDataPathSecurityType::PMK) {
1072 legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PMK; 1073 legacy_request->key_info.key_type = legacy_hal::NAN_SECURITY_KEY_INPUT_PMK;
diff --git a/wifi/1.0/default/wifi_legacy_hal.cpp b/wifi/1.0/default/wifi_legacy_hal.cpp
index ba57ba7e..44acc046 100644
--- a/wifi/1.0/default/wifi_legacy_hal.cpp
+++ b/wifi/1.0/default/wifi_legacy_hal.cpp
@@ -180,6 +180,12 @@ void onAysncNanNotifyResponse(transaction_id id, NanResponseMsg* msg) {
180 } 180 }
181} 181}
182 182
183std::function<void(const NanPublishRepliedInd&)>
184 on_nan_event_publish_replied_user_callback;
185void onAysncNanEventPublishReplied(NanPublishRepliedInd* /* event */) {
186 LOG(ERROR) << "onAysncNanEventPublishReplied triggered";
187}
188
183std::function<void(const NanPublishTerminatedInd&)> 189std::function<void(const NanPublishTerminatedInd&)>
184 on_nan_event_publish_terminated_user_callback; 190 on_nan_event_publish_terminated_user_callback;
185void onAysncNanEventPublishTerminated(NanPublishTerminatedInd* event) { 191void onAysncNanEventPublishTerminated(NanPublishTerminatedInd* event) {
@@ -1054,6 +1060,7 @@ wifi_error WifiLegacyHal::nanRegisterCallbackHandlers(
1054 return global_func_table_.wifi_nan_register_handler( 1060 return global_func_table_.wifi_nan_register_handler(
1055 wlan_interface_handle_, 1061 wlan_interface_handle_,
1056 {onAysncNanNotifyResponse, 1062 {onAysncNanNotifyResponse,
1063 onAysncNanEventPublishReplied,
1057 onAysncNanEventPublishTerminated, 1064 onAysncNanEventPublishTerminated,
1058 onAysncNanEventMatch, 1065 onAysncNanEventMatch,
1059 onAysncNanEventMatchExpired, 1066 onAysncNanEventMatchExpired,