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

Commit b23485dd authored by Ahmed ElArabawy's avatar Ahmed ElArabawy
Browse files

Remove 6GHz capability query through HAL

It was decided to perform the check on the device support of 6GHz
through overlay configs instead of through HAL.
This commit removes the Hidl API changes that were used for that
check.

Bug: 145936758
Bug: 139354972
Test: Manual
Test: VTS test
Test: Unit test: hardware/interfaces/wifi/1.4/default/tests/runtests.sh
Change-Id: I81fdf603a668a71e3e875211367111fffee20e54
parent ad84668d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ hidl_interface {
        "IWifiNanIface.hal",
        "IWifiRttController.hal",
        "IWifiRttControllerEventCallback.hal",
        "IWifiStaIface.hal",
    ],
    interfaces: [
        "android.hardware.wifi@1.0",

wifi/1.4/IWifiStaIface.hal

deleted100644 → 0
+0 −48
Original line number Diff line number Diff line
/*
 * Copyright 2019 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@1.4;

import @1.0::WifiStatus;
import @1.0::MacAddress;
import @1.0::IWifiStaIface;
import @1.3::IWifiStaIface;

/**
 * Interface used to represent a single STA iface.
 *
 * IWifiChip.createStaIface() may return a @1.4::IWifiStaIface when supported.
 */
interface IWifiStaIface extends @1.3::IWifiStaIface {
    enum StaIfaceCapabilityMask : @1.0::IWifiStaIface.StaIfaceCapabilityMask {
        STA_6G = 1 << 15,
    };

    /**
     * Get the capabilities supported by this STA iface.
     *
     * @return status WifiStatus of the operation.
     *         Possible status codes:
     *         |WifiStatusCode.SUCCESS|,
     *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
     *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
     *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
     *         |WifiStatusCode.ERROR_UNKNOWN|
     * @return capabilities Bitset of |StaIfaceCapabilityMask| values.
     */
    getCapabilities_1_4()
        generates (WifiStatus status, bitfield<StaIfaceCapabilityMask> capabilities);
};
+1 −4
Original line number Diff line number Diff line
@@ -120,8 +120,6 @@ convertLegacyFeatureToHidlStaIfaceCapability(uint64_t feature) {
            return HidlStaIfaceCaps::ND_OFFLOAD;
        case WIFI_FEATURE_MKEEP_ALIVE:
            return HidlStaIfaceCaps::KEEP_ALIVE;
        case WIFI_FEATURE_INFRA_6G:
            return HidlStaIfaceCaps::STA_6G;
    };
    CHECK(false) << "Unknown legacy feature: " << feature;
    return {};
@@ -394,8 +392,7 @@ bool convertLegacyFeaturesToHidlStaCapabilities(
          WIFI_FEATURE_IE_WHITELIST, WIFI_FEATURE_SCAN_RAND,
          WIFI_FEATURE_INFRA_5G, WIFI_FEATURE_HOTSPOT, WIFI_FEATURE_PNO,
          WIFI_FEATURE_TDLS, WIFI_FEATURE_TDLS_OFFCHANNEL,
          WIFI_FEATURE_CONFIG_NDO, WIFI_FEATURE_MKEEP_ALIVE,
          WIFI_FEATURE_INFRA_6G}) {
          WIFI_FEATURE_CONFIG_NDO, WIFI_FEATURE_MKEEP_ALIVE}) {
        if (feature & legacy_feature_set) {
            *hidl_caps |= convertLegacyFeatureToHidlStaIfaceCapability(feature);
        }
+0 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@
#include <android/hardware/wifi/1.3/IWifiChip.h>
#include <android/hardware/wifi/1.3/types.h>
#include <android/hardware/wifi/1.4/IWifiChipEventCallback.h>
#include <android/hardware/wifi/1.4/IWifiStaIface.h>
#include <android/hardware/wifi/1.4/types.h>

#include "wifi_legacy_hal.h"
+3 −2
Original line number Diff line number Diff line
@@ -938,7 +938,8 @@ WifiStatus WifiChip::removeP2pIfaceInternal(const std::string& ifname) {
    return createWifiStatus(WifiStatusCode::SUCCESS);
}

std::pair<WifiStatus, sp<IWifiStaIface>> WifiChip::createStaIfaceInternal() {
std::pair<WifiStatus, sp<V1_3::IWifiStaIface>>
WifiChip::createStaIfaceInternal() {
    if (!canCurrentModeSupportIfaceOfTypeWithCurrentIfaces(IfaceType::STA)) {
        return {createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE), {}};
    }
@@ -962,7 +963,7 @@ WifiChip::getStaIfaceNamesInternal() {
    return {createWifiStatus(WifiStatusCode::SUCCESS), getNames(sta_ifaces_)};
}

std::pair<WifiStatus, sp<IWifiStaIface>> WifiChip::getStaIfaceInternal(
std::pair<WifiStatus, sp<V1_3::IWifiStaIface>> WifiChip::getStaIfaceInternal(
    const std::string& ifname) {
    const auto iface = findUsingName(sta_ifaces_, ifname);
    if (!iface.get()) {
Loading