[AWARE] Fix type of channel width to use enumeration
The Aware channel width was using an int - whereas an Enum already
exists and is the approriate type.
Bug: 37007030
Test: builds, verified by manual inspection of logs
Change-Id: If93a4cddf0e3304658d7b638de1588de1cd04d34
diff --git a/wifi/1.2/default/hidl_struct_util.cpp b/wifi/1.2/default/hidl_struct_util.cpp
index 2e3e0ab..33450ab 100644
--- a/wifi/1.2/default/hidl_struct_util.cpp
+++ b/wifi/1.2/default/hidl_struct_util.cpp
@@ -26,6 +26,9 @@
namespace implementation {
namespace hidl_struct_util {
+WifiChannelWidthInMhz convertLegacyWifiChannelWidthToHidl(
+ legacy_hal::wifi_channel_width type);
+
hidl_string safeConvertChar(const char* str, size_t max_len) {
const char* c = str;
size_t size = 0;
@@ -2044,7 +2047,8 @@
*hidl_struct = {};
hidl_struct->channelFreq = legacy_struct.channel;
- hidl_struct->channelBandwidth = legacy_struct.bandwidth;
+ hidl_struct->channelBandwidth = convertLegacyWifiChannelWidthToHidl(
+ (legacy_hal::wifi_channel_width)legacy_struct.bandwidth);
hidl_struct->numSpatialStreams = legacy_struct.nss;
return true;