Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1b7a82c authored by Etan Cohen's avatar Etan Cohen
Browse files

[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
parent 9cdd6f95
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -26,6 +26,9 @@ namespace V1_2 {
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 @@ bool convertLegacyNdpChannelInfoToHidl(
    *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;
+2 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.hardware.wifi@1.2;
import @1.0::MacAddress;
import @1.0::NanDataPathConfirmInd;
import @1.0::WifiChannelInMhz;
import @1.0::WifiChannelWidthInMhz;

/**
 * NAN configuration request parameters added in the 1.2 HAL. These are supplemental to previous
@@ -67,7 +68,7 @@ struct NanDataPathChannelInfo {
    /**
     * Channel bandwidth in MHz.
     */
    uint32_t channelBandwidth;
    WifiChannelWidthInMhz channelBandwidth;
    /**
     * Number of spatial streams used in the channel.
     */