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

Commit 79233abc authored by Sunil Ravi's avatar Sunil Ravi Committed by Automerger Merge Worker
Browse files

Merge "wifi: Fix for returning wrong radio combinations matrix" into tm-dev...

Merge "wifi: Fix for returning wrong radio combinations matrix" into tm-dev am: b51d11fb am: 0a1dd609

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/17618828



Change-Id: I57cb45e8c62dc11df43dc0ace9d847a3359cbd50
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6f597db0 0a1dd609
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1549,13 +1549,14 @@ wifi_error WifiLegacyHal::setIndoorState(bool isIndoor) {

std::pair<wifi_error, wifi_radio_combination_matrix*>
WifiLegacyHal::getSupportedRadioCombinationsMatrix() {
    std::array<char, kMaxSupportedRadioCombinationsMatrixLength> buffer;
    buffer.fill(0);
    char* buffer = new char[kMaxSupportedRadioCombinationsMatrixLength];
    std::fill(buffer, buffer + kMaxSupportedRadioCombinationsMatrixLength, 0);
    uint32_t size = 0;
    wifi_radio_combination_matrix* radio_combination_matrix_ptr =
            reinterpret_cast<wifi_radio_combination_matrix*>(buffer.data());
            reinterpret_cast<wifi_radio_combination_matrix*>(buffer);
    wifi_error status = global_func_table_.wifi_get_supported_radio_combinations_matrix(
            global_handle_, buffer.size(), &size, radio_combination_matrix_ptr);
            global_handle_, kMaxSupportedRadioCombinationsMatrixLength, &size,
            radio_combination_matrix_ptr);
    CHECK(size >= 0 && size <= kMaxSupportedRadioCombinationsMatrixLength);
    return {status, radio_combination_matrix_ptr};
}