From 432807e44b4dc0d69205abcabc8f0f3d84e2cfc3 Mon Sep 17 00:00:00 2001 From: Gabriel Biren Date: Fri, 24 Feb 2023 21:03:20 +0000 Subject: [PATCH] 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 --- .../android/hardware/wifi/IWifiChip.aidl | 2 +- .../wifi/WifiRadioCombinationMatrix.aidl | 38 ------------------- .../aidl/android/hardware/wifi/IWifiChip.aidl | 7 ++-- .../wifi/WifiRadioCombinationMatrix.aidl | 31 --------------- .../vts/functional/wifi_chip_aidl_test.cpp | 12 +++--- 5 files changed, 10 insertions(+), 80 deletions(-) delete mode 100644 wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiRadioCombinationMatrix.aidl delete mode 100644 wifi/aidl/android/hardware/wifi/WifiRadioCombinationMatrix.aidl diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl index b27b06ff52..2ff6896d98 100644 --- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl +++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/IWifiChip.aidl @@ -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); diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiRadioCombinationMatrix.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiRadioCombinationMatrix.aidl deleted file mode 100644 index ea86c4fa79..0000000000 --- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/WifiRadioCombinationMatrix.aidl +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 -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; -} diff --git a/wifi/aidl/android/hardware/wifi/IWifiChip.aidl b/wifi/aidl/android/hardware/wifi/IWifiChip.aidl index de2449e8e2..c0e41cdb44 100644 --- a/wifi/aidl/android/hardware/wifi/IWifiChip.aidl +++ b/wifi/aidl/android/hardware/wifi/IWifiChip.aidl @@ -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. diff --git a/wifi/aidl/android/hardware/wifi/WifiRadioCombinationMatrix.aidl b/wifi/aidl/android/hardware/wifi/WifiRadioCombinationMatrix.aidl deleted file mode 100644 index b79a8189d7..0000000000 --- a/wifi/aidl/android/hardware/wifi/WifiRadioCombinationMatrix.aidl +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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; -} diff --git a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp index f908be64c7..d0b7014614 100644 --- a/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp +++ b/wifi/aidl/vts/functional/wifi_chip_aidl_test.cpp @@ -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 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());