wifi: Begin NAN iface methods implementation
Start implementation of the NAN iface HIDL methods by plumbing the HIDL
stubs to the corresponding legacy HAL methods. The incoming HIDL struct
needs to be converted to legacy for the HIDL methods. The legacy HAL
structs needs to be converted to HIDL for callbacks.
This CL only has a couple of methods and some structure conversion.
etan@ will take over the rest.
Bug: 31991076
Test: Compiles
Change-Id: Ide348f4c3318822226bb7de93d091107c7465cd3
diff --git a/wifi/1.0/default/hidl_struct_util.h b/wifi/1.0/default/hidl_struct_util.h
index 6c91e03..ae1cf70 100644
--- a/wifi/1.0/default/hidl_struct_util.h
+++ b/wifi/1.0/default/hidl_struct_util.h
@@ -36,7 +36,7 @@
namespace implementation {
namespace hidl_struct_util {
-// Convert hidl gscan params to legacy gscan params.
+// STA iface conversion methods.
bool convertHidlScanParamsToLegacy(
const StaBackgroundScanParameters& hidl_scan_params,
legacy_hal::wifi_scan_cmd_params* legacy_scan_params);
@@ -59,6 +59,89 @@
bool convertLegacyLinkLayerStatsToHidl(
const legacy_hal::LinkLayerStats& legacy_stats,
StaLinkLayerStats* hidl_stats);
+
+// NAN iface conversion methods.
+bool convertHidlNanEnableRequestToLegacy(
+ const NanEnableRequest& hidl_request,
+ legacy_hal::NanEnableRequest* legacy_request);
+bool convertHidlNanPublishRequestToLegacy(
+ const NanPublishRequest& hidl_request,
+ legacy_hal::NanPublishRequest* legacy_request);
+bool convertHidlNanPublishCancelRequestToLegacy(
+ const NanPublishCancelRequest& hidl_request,
+ legacy_hal::NanPublishCancelRequest* legacy_request);
+bool convertHidlNanSubscribeRequestToLegacy(
+ const NanSubscribeRequest& hidl_request,
+ legacy_hal::NanSubscribeRequest* legacy_request);
+bool convertHidlNanSubscribeCancelRequestToLegacy(
+ const NanSubscribeCancelRequest& hidl_request,
+ legacy_hal::NanSubscribeCancelRequest* legacy_request);
+bool convertHidlNanTransmitFollowupRequestToLegacy(
+ const NanTransmitFollowupRequest& hidl_request,
+ legacy_hal::NanTransmitFollowupRequest* legacy_request);
+bool convertHidlNanConfigRequestToLegacy(
+ const NanConfigRequest& hidl_request,
+ legacy_hal::NanConfigRequest* legacy_request);
+bool convertHidlNanBeaconSdfPayloadRequestToLegacy(
+ const NanBeaconSdfPayloadRequest& hidl_request,
+ legacy_hal::NanBeaconSdfPayloadRequest* legacy_request);
+bool convertHidlNanDataPathInitiatorRequestToLegacy(
+ const NanDataPathInitiatorRequest& hidl_request,
+ legacy_hal::NanDataPathInitiatorRequest* legacy_request);
+bool convertHidlNanDataPathIndicationResponseToLegacy(
+ const NanDataPathIndicationResponse& hidl_response,
+ legacy_hal::NanDataPathIndicationResponse* legacy_response);
+bool convertHidlNanDataPathEndRequestToLegacy(
+ const NanDataPathEndRequest& hidl_request,
+ legacy_hal::NanDataPathEndRequest* legacy_request);
+bool convertLegacyNanResponseHeaderToHidl(
+ const legacy_hal::NanResponseMsg& legacy_response,
+ NanResponseMsgHeader* hidl_response);
+bool convertLegacyNanPublishResponseToHidl(
+ const legacy_hal::NanPublishResponse& legacy_response,
+ NanPublishResponse* hidl_response);
+bool convertLegacyNanSubscribeResponseToHidl(
+ const legacy_hal::NanSubscribeResponse& legacy_response,
+ NanSubscribeResponse* hidl_response);
+bool convertLegacyNanDataPathResponseToHidl(
+ const legacy_hal::NanDataPathRequestResponse& legacy_response,
+ NanDataPathResponse* hidl_response);
+bool convertLegacyNanCapabilitiesResponseToHidl(
+ const legacy_hal::NanCapabilities& legacy_response,
+ NanCapabilitiesResponse* hidl_response);
+bool convertLegacyNanPublishTerminatedIndToHidl(
+ const legacy_hal::NanPublishTerminatedInd& legacy_ind,
+ NanPublishTerminatedInd* hidl_ind);
+bool convertLegacyNanMatchIndToHidl(const legacy_hal::NanMatchInd& legacy_ind,
+ NanMatchInd* hidl_ind);
+bool convertLegacyNanMatchExpiredIndToHidl(
+ const legacy_hal::NanMatchExpiredInd& legacy_ind,
+ NanMatchExpiredInd* hidl_ind);
+bool convertLegacyNanSubscribeTerminatedIndToHidl(
+ const legacy_hal::NanSubscribeTerminatedInd& legacy_ind,
+ NanSubscribeTerminatedInd* hidl_ind);
+bool convertLegacyNanFollowupIndToHidl(
+ const legacy_hal::NanFollowupInd& legacy_ind, NanFollowupInd* hidl_ind);
+bool convertLegacyNanDiscEngEventIndToHidl(
+ const legacy_hal::NanDiscEngEventInd& legacy_ind,
+ NanDiscEngEventInd* hidl_ind);
+bool convertLegacyNanDisabledIndToHidl(
+ const legacy_hal::NanDisabledInd& legacy_ind, NanDisabledInd* hidl_ind);
+bool convertLegacyNanBeaconSdfPayloadIndToHidl(
+ const legacy_hal::NanBeaconSdfPayloadInd& legacy_ind,
+ NanBeaconSdfPayloadInd* hidl_ind);
+bool convertLegacyNanDataPathRequestIndToHidl(
+ const legacy_hal::NanDataPathRequestInd& legacy_ind,
+ NanDataPathRequestInd* hidl_ind);
+bool convertLegacyNanDataPathConfirmIndToHidl(
+ const legacy_hal::NanDataPathConfirmInd& legacy_ind,
+ NanDataPathConfirmInd* hidl_ind);
+bool convertLegacyNanDataPathEndIndToHidl(
+ const legacy_hal::NanDataPathEndInd& legacy_ind,
+ NanDataPathEndInd* hidl_ind);
+bool convertLegacyNanTransmitFollowupIndToHidl(
+ const legacy_hal::NanTransmitFollowupInd& legacy_ind,
+ NanTransmitFollowupInd* hidl_ind);
} // namespace hidl_struct_util
} // namespace implementation
} // namespace V1_0