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

Commit b46f5327 authored by Gabriel Biren's avatar Gabriel Biren
Browse files

Handle additional WifiBand cases in

convertAidlWifiBandToLegacy.

Several cases related to 6 Ghz are
not currently handled.

CL is adapted from aosp/3015819
which was developed for HIDL.

Bug: 331453855
Test: m
Change-Id: Ide86ef46eb6fbe3c4dd8648230ad5bf8a8112203
parent e9c6e369
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -525,6 +525,7 @@ bool convertLegacyGscanCapabilitiesToAidl(const legacy_hal::wifi_gscan_capabilit
    return true;
}

// Only use to prepare parameters for Gscan.
legacy_hal::wifi_band convertAidlWifiBandToLegacy(WifiBand band) {
    switch (band) {
        case WifiBand::BAND_UNSPECIFIED:
@@ -541,6 +542,15 @@ legacy_hal::wifi_band convertAidlWifiBandToLegacy(WifiBand band) {
            return legacy_hal::WIFI_BAND_ABG;
        case WifiBand::BAND_24GHZ_5GHZ_WITH_DFS:
            return legacy_hal::WIFI_BAND_ABG_WITH_DFS;
        case WifiBand::BAND_6GHZ:
        case WifiBand::BAND_60GHZ:
        case WifiBand::BAND_5GHZ_6GHZ:
        case WifiBand::BAND_24GHZ_5GHZ_6GHZ:
        case WifiBand::BAND_24GHZ_5GHZ_6GHZ_60GHZ:
        case WifiBand::BAND_24GHZ_5GHZ_WITH_DFS_6GHZ:
        case WifiBand::BAND_24GHZ_5GHZ_WITH_DFS_6GHZ_60GHZ:
            LOG(INFO) << "WifiBand mapping may be incorrect, since 6GHz is not supported by legacy";
            return legacy_hal::WIFI_BAND_UNSPECIFIED;
        default:
            CHECK(false);
            return {};