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

Commit b5906451 authored by Gabriel Biren's avatar Gabriel Biren Committed by Android (Google) Code Review
Browse files

Merge changes from topic "remove-radio-combo-matrix" into udc-dev

* changes:
  Update usages of WifiRadioCombinationMatrix in the Vendor HAL service.
  Remove the WifiRadioCombinationsMatrix type from the Vendor HAL interface.
parents 19e5846d 263db45e
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;
}
+4 −6
Original line number Diff line number Diff line
@@ -2996,14 +2996,13 @@ bool convertLegacyWifiRadioConfigurationToAidl(

bool convertLegacyRadioCombinationsMatrixToAidl(
        legacy_hal::wifi_radio_combination_matrix* legacy_matrix,
        WifiRadioCombinationMatrix* aidl_matrix) {
    if (!aidl_matrix || !legacy_matrix) {
        std::vector<WifiRadioCombination>* aidl_combinations) {
    if (!aidl_combinations || !legacy_matrix) {
        return false;
    }
    *aidl_matrix = {};
    *aidl_combinations = {};

    int num_combinations = legacy_matrix->num_radio_combinations;
    std::vector<WifiRadioCombination> radio_combinations_vec;
    if (!num_combinations) {
        LOG(ERROR) << "zero radio combinations";
        return false;
@@ -3029,13 +3028,12 @@ bool convertLegacyRadioCombinationsMatrixToAidl(
            radio_configurations_vec.push_back(radioConfiguration);
        }
        radioCombination.radioConfigurations = radio_configurations_vec;
        radio_combinations_vec.push_back(radioCombination);
        aidl_combinations->push_back(radioCombination);
        l_radio_combinations_ptr =
                (wifi_radio_combination*)((u8*)l_radio_combinations_ptr +
                                          sizeof(wifi_radio_combination) +
                                          (sizeof(wifi_radio_configuration) * num_configurations));
    }
    aidl_matrix->radioCombinations = radio_combinations_vec;
    return true;
}

Loading