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

Commit 0a3d3f36 authored by Jimmy Chen's avatar Jimmy Chen Committed by Android (Google) Code Review
Browse files

Merge "wifi: add 60GHz Wi-Fi P2P support"

parents 3b19a57c 2abc3527
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ hidl_interface {
    srcs: [
        "types.hal",
        "ISupplicant.hal",
        "ISupplicantP2pIface.hal",
        "ISupplicantStaIface.hal",
        "ISupplicantStaNetwork.hal",
    ],
+52 −0
Original line number Diff line number Diff line
/*
 * Copyright 2020 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.supplicant@1.4;

import @1.2::ISupplicantP2pIface;
import @1.0::SupplicantStatus;

/**
 * Interface exposed by the supplicant for each P2P mode network
 * interface (e.g p2p0) it controls.
 * To use 1.4 features you must cast specific interfaces returned from the
 * 1.4 HAL. For example V1_4::ISupplicant::addIface() adds V1_4::ISupplicantIface,
 * which can be cast to V1_4::ISupplicantP2pIface.
 */
interface ISupplicantP2pIface extends @1.2::ISupplicantP2pIface {
    /**
     * Set whether to enable EDMG(802.11ay). Only allowed if hw mode is |HOSTAPD_MODE_IEEE80211AD|
     *
     * @param enable true to set, false otherwise.
     * @return status Status of the operation.
     *         Possible status codes:
     *         |SupplicantStatusCode.SUCCESS|,
     *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
     */
    setEdmg(bool enable) generates (SupplicantStatus status);

    /**
     * Get whether EDMG(802.11ay) is enabled for this network.
     *
     * @return status Status of the operation.
     *         Possible status codes:
     *         |SupplicantStatusCode.SUCCESS|,
     *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
     * @return enabled true if set, false otherwise.
     */
    getEdmg() generates (SupplicantStatus status, bool enabled);
};
+31 −0
Original line number Diff line number Diff line
@@ -69,3 +69,34 @@ cc_test {
    ],
    disable_framework: true,
}

cc_test {
    name: "VtsHalWifiSupplicantP2pV1_4TargetTest",
    defaults: ["VtsHalTargetTestDefaults"],
    srcs: [
        "supplicant_p2p_iface_hidl_test.cpp",
    ],
    static_libs: [
        "VtsHalWifiV1_0TargetTestUtil",
        "VtsHalWifiSupplicantV1_0TargetTestUtil",
        "VtsHalWifiSupplicantV1_1TargetTestUtil",
        "VtsHalWifiSupplicantV1_2TargetTestUtil",
        "VtsHalWifiSupplicantV1_3TargetTestUtil",
        "VtsHalWifiSupplicantV1_4TargetTestUtil",
        "android.hardware.wifi.supplicant@1.0",
        "android.hardware.wifi.supplicant@1.1",
        "android.hardware.wifi.supplicant@1.2",
        "android.hardware.wifi.supplicant@1.3",
        "android.hardware.wifi.supplicant@1.4",
        "android.hardware.wifi@1.0",
        "android.hardware.wifi@1.1",
        "libgmock",
        "libwifi-system",
        "libwifi-system-iface",
    ],
    test_suites: [
        "general-tests",
        "vts",
    ],
    disable_framework: true,
}
+7 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@

using ::android::sp;
using ::android::hardware::wifi::supplicant::V1_4::ISupplicant;
using ::android::hardware::wifi::supplicant::V1_4::ISupplicantP2pIface;
using ::android::hardware::wifi::supplicant::V1_4::ISupplicantStaIface;

sp<ISupplicantStaIface> getSupplicantStaIface_1_4(
@@ -29,6 +30,12 @@ sp<ISupplicantStaIface> getSupplicantStaIface_1_4(
    return ISupplicantStaIface::castFrom(getSupplicantStaIface(supplicant));
}

sp<ISupplicantP2pIface> getSupplicantP2pIface_1_4(
    const android::sp<android::hardware::wifi::supplicant::V1_4::ISupplicant>&
        supplicant) {
    return ISupplicantP2pIface::castFrom(getSupplicantP2pIface(supplicant));
}

sp<ISupplicant> getSupplicant_1_4(const std::string& supplicant_instance_name,
                                  bool isP2pOn) {
    return ISupplicant::castFrom(
+5 −0
Original line number Diff line number Diff line
@@ -18,12 +18,17 @@
#define SUPPLICANT_HIDL_TEST_UTILS_1_4_H

#include <android/hardware/wifi/supplicant/1.4/ISupplicant.h>
#include <android/hardware/wifi/supplicant/1.4/ISupplicantP2pIface.h>
#include <android/hardware/wifi/supplicant/1.4/ISupplicantStaIface.h>

android::sp<android::hardware::wifi::supplicant::V1_4::ISupplicantStaIface>
getSupplicantStaIface_1_4(
    const android::sp<android::hardware::wifi::supplicant::V1_4::ISupplicant>&
        supplicant);
android::sp<android::hardware::wifi::supplicant::V1_4::ISupplicantP2pIface>
getSupplicantP2pIface_1_4(
    const android::sp<android::hardware::wifi::supplicant::V1_4::ISupplicant>&
        supplicant);
android::sp<android::hardware::wifi::supplicant::V1_4::ISupplicant>
getSupplicant_1_4(const std::string& supplicant_instance_name, bool isP2pOn);

Loading