summaryrefslogtreecommitdiff
path: root/wifi/1.0/default/hidl_struct_util.cpp
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2017-02-09 09:16:25 -0800
committerEtan Cohen <etancohen@google.com>2017-02-10 12:45:55 -0800
commit2373fe2a889cfdf14e291cf64fb4d73e14a85824 (patch)
tree629eb238ef643bcbcfda27f084ffe52e37a2fb65 /wifi/1.0/default/hidl_struct_util.cpp
parent44983aeea920e937522181b447d9e64086c17b0a (diff)
[AWARE] Add support for SDEA.ServiceInfo field
Add support for SDEA.ServiceInfo as extended service specific information field in all SDF-related APIs: discovery (configure & match), message sending and receiving. Rationale: SDEA.ServiceInfo will form the basis for upper layer discovery protocols on NAN (e.g. mDNS). Even if not exposed to user-facing API will need to have handle to be able to create adaptation layers. Bug: 35193423 Bug: 35040192 Test: unit test and integration (sl4a) tests. Change-Id: I3fc225952e93a134d5e58795281238829ed4b1ea
Diffstat (limited to 'wifi/1.0/default/hidl_struct_util.cpp')
-rw-r--r--wifi/1.0/default/hidl_struct_util.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index 9e23d556c9..28ad6c3088 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -917,6 +917,7 @@ bool convertHidlNanPublishRequestToLegacy(
memcpy(legacy_request->service_specific_info,
hidl_request.baseConfigs.serviceSpecificInfo.data(),
legacy_request->service_specific_info_len);
+ // TODO: b/35193423 add support for extended service specific info
legacy_request->rx_match_filter_len = hidl_request.baseConfigs.rxMatchFilter.size();
if (legacy_request->rx_match_filter_len > NAN_MAX_MATCH_FILTER_LEN) {
LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: rx_match_filter_len too large";
@@ -995,6 +996,7 @@ bool convertHidlNanSubscribeRequestToLegacy(
memcpy(legacy_request->service_specific_info,
hidl_request.baseConfigs.serviceSpecificInfo.data(),
legacy_request->service_specific_info_len);
+ // TODO: b/35193423 add support for extended service specific info
legacy_request->rx_match_filter_len = hidl_request.baseConfigs.rxMatchFilter.size();
if (legacy_request->rx_match_filter_len > NAN_MAX_MATCH_FILTER_LEN) {
LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: rx_match_filter_len too large";
@@ -1081,6 +1083,7 @@ bool convertHidlNanTransmitFollowupRequestToLegacy(
memcpy(legacy_request->service_specific_info,
hidl_request.serviceSpecificInfo.data(),
legacy_request->service_specific_info_len);
+ // TODO: b/35193423 add support for extended service specific info
legacy_request->recv_indication_cfg = hidl_request.disableFollowupResultIndication ? 0x1 : 0x0;
return true;
@@ -1272,6 +1275,7 @@ bool convertLegacyNanCapabilitiesResponseToHidl(
hidl_response->maxMatchFilterLen = legacy_response.max_match_filter_len;
hidl_response->maxTotalMatchFilterLen = legacy_response.max_total_match_filter_len;
hidl_response->maxServiceSpecificInfoLen = legacy_response.max_service_specific_info_len;
+ // TODO: b/35193423 add support for extended service specific info
hidl_response->maxVsaDataLen = legacy_response.max_vsa_data_len;
hidl_response->maxNdiInterfaces = legacy_response.max_ndi_interfaces;
hidl_response->maxNdpSessions = legacy_response.max_ndp_sessions;
@@ -1296,6 +1300,7 @@ bool convertLegacyNanMatchIndToHidl(
hidl_ind->addr = hidl_array<uint8_t, 6>(legacy_ind.addr);
hidl_ind->serviceSpecificInfo = std::vector<uint8_t>(legacy_ind.service_specific_info,
legacy_ind.service_specific_info + legacy_ind.service_specific_info_len);
+ // TODO: b/35193423 add support for extended service specific info
hidl_ind->matchFilter = std::vector<uint8_t>(legacy_ind.sdf_match_filter,
legacy_ind.sdf_match_filter + legacy_ind.sdf_match_filter_len);
hidl_ind->matchOccuredInBeaconFlag = legacy_ind.match_occured_flag == 1;