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

Commit 432807e4 authored by Gabriel Biren's avatar Gabriel Biren
Browse files

Remove the WifiRadioCombinationsMatrix type from the

Vendor HAL interface.

We can return a list of WifiRadioCombinations instead.

Bug: 267819850
Test: atest VtsHalWifiChipTargetTest
Change-Id: I0f57df6262d36917dfd8cc3e27d6781e9b7c8dbf
parent cb34a1dc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ interface IWifiChip {
  String[] getP2pIfaceNames();
  @PropagateAllowBlocking android.hardware.wifi.IWifiStaIface getStaIface(in String ifname);
  String[] getStaIfaceNames();
  android.hardware.wifi.WifiRadioCombinationMatrix getSupportedRadioCombinationsMatrix();
  android.hardware.wifi.WifiRadioCombination[] getSupportedRadioCombinations();
  android.hardware.wifi.WifiChipCapabilities getWifiChipCapabilities();
  android.hardware.wifi.WifiUsableChannel[] getUsableChannels(in android.hardware.wifi.WifiBand band, in android.hardware.wifi.WifiIfaceMode ifaceModeMask, in android.hardware.wifi.IWifiChip.UsableChannelFilter filterMask);
  void setAfcChannelAllowance(in android.hardware.wifi.AvailableAfcFrequencyInfo[] availableAfcFrequencyInfo);
+0 −38
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL file. Do not edit it manually. There are
// two cases:
// 1). this is a frozen version file - do not edit this in any case.
// 2). this is a 'current' file. If you make a backwards compatible change to
//     the interface (from the latest frozen version), the build system will
//     prompt you to update this file with `m <name>-update-api`.
//
// You must not make a backward incompatible change to any AIDL file built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.wifi;
@VintfStability
parcelable WifiRadioCombinationMatrix {
  android.hardware.wifi.WifiRadioCombination[] radioCombinations;
}
+3 −4
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ import android.hardware.wifi.WifiDebugHostWakeReasonStats;
import android.hardware.wifi.WifiDebugRingBufferStatus;
import android.hardware.wifi.WifiDebugRingBufferVerboseLevel;
import android.hardware.wifi.WifiIfaceMode;
import android.hardware.wifi.WifiRadioCombinationMatrix;
import android.hardware.wifi.WifiRadioCombination;
import android.hardware.wifi.WifiUsableChannel;

/**
@@ -737,8 +737,7 @@ interface IWifiChip {
     * Retrieve the list of all the possible radio combinations supported by this
     * chip.
     *
     * @return A list of all the possible radio combinations represented by
     *         |WifiRadioCombinationMatrix|.
     * @return A list of all the possible radio combinations.
     *         For example, in case of a chip which has two radios, where one radio is
     *         capable of 2.4GHz 2X2 only and another radio which is capable of either
     *         5GHz or 6GHz 2X2, the number of possible radio combinations in this case
@@ -759,7 +758,7 @@ interface IWifiChip {
     *         |WifiStatusCode.FAILURE_UNKNOWN|
     *
     */
    WifiRadioCombinationMatrix getSupportedRadioCombinationsMatrix();
    WifiRadioCombination[] getSupportedRadioCombinations();

    /**
     * Get capabilities supported by this chip.
+0 −31
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.wifi;

import android.hardware.wifi.WifiRadioCombination;

/**
 * Wifi radio combinations matrix retrieved via
 * |IWifiChip.getSupportedRadioCombinationsMatrix|.
 */
@VintfStability
parcelable WifiRadioCombinationMatrix {
    /**
     * List of all the possible radio combinations that the chip can operate.
     */
    WifiRadioCombination[] radioCombinations;
}
+6 −6
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ using aidl::android::hardware::wifi::WifiDebugHostWakeReasonStats;
using aidl::android::hardware::wifi::WifiDebugRingBufferStatus;
using aidl::android::hardware::wifi::WifiDebugRingBufferVerboseLevel;
using aidl::android::hardware::wifi::WifiIfaceMode;
using aidl::android::hardware::wifi::WifiRadioCombinationMatrix;
using aidl::android::hardware::wifi::WifiRadioCombination;
using aidl::android::hardware::wifi::WifiStatusCode;
using aidl::android::hardware::wifi::WifiUsableChannel;

@@ -242,14 +242,14 @@ TEST_P(WifiChipAidlTest, GetUsableChannels) {
}

/*
 * GetSupportedRadioCombinationsMatrix
 * GetSupportedRadioCombinations
 */
TEST_P(WifiChipAidlTest, GetSupportedRadioCombinationsMatrix) {
    WifiRadioCombinationMatrix combination_matrix = {};
TEST_P(WifiChipAidlTest, GetSupportedRadioCombinations) {
    std::vector<WifiRadioCombination> combinations;
    configureChipForConcurrencyType(IfaceConcurrencyType::STA);
    auto status = wifi_chip_->getSupportedRadioCombinationsMatrix(&combination_matrix);
    auto status = wifi_chip_->getSupportedRadioCombinations(&combinations);
    if (checkStatusCode(&status, WifiStatusCode::ERROR_NOT_SUPPORTED)) {
        GTEST_SKIP() << "Skipping this test since getSupportedRadioCombinationsMatrix() "
        GTEST_SKIP() << "Skipping this test since getSupportedRadioCombinations() "
                        "is not supported by vendor.";
    }
    EXPECT_TRUE(status.isOk());