[AWARE] Pass through full structure for end NDP command
The end NDP command is the only NAN HAL command which uses
a dynamically sized command structure. The original code
stripped out the non-static portions of the command - losing
the information. Modify the dynamically allocate at a lower
level of the shim.
Bug: 62569797
Test: integration tests now proceeding past failure point
Change-Id: I1732923aed64d7ec11649f0bad1731ab5bca13a0
diff --git a/wifi/1.0/default/wifi_nan_iface.cpp b/wifi/1.0/default/wifi_nan_iface.cpp
index 88fb5b2..ee324ce 100644
--- a/wifi/1.0/default/wifi_nan_iface.cpp
+++ b/wifi/1.0/default/wifi_nan_iface.cpp
@@ -757,14 +757,8 @@
}
WifiStatus WifiNanIface::terminateDataPathRequestInternal(
uint16_t cmd_id, uint32_t ndpInstanceId) {
- legacy_hal::NanDataPathEndRequest* legacy_msg = (legacy_hal::NanDataPathEndRequest*)malloc(
- sizeof(legacy_hal::NanDataPathEndRequest) + sizeof(uint32_t));
- legacy_msg->num_ndp_instances = 1;
- legacy_msg->ndp_instance_id[0] = ndpInstanceId;
-
legacy_hal::wifi_error legacy_status =
- legacy_hal_.lock()->nanDataEnd(cmd_id, *legacy_msg);
- free(legacy_msg);
+ legacy_hal_.lock()->nanDataEnd(cmd_id, ndpInstanceId);
return createWifiStatusFromLegacyError(legacy_status);
}