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

Commit 29172177 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'wifi_1_1' into oc-dr1-dev

* changes:
  wifi(implementation): Create 1.1 interface package
  wifi(interface): Create 1.1 interface package
parents 1d3d5a96 dbd83ef5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -17,10 +17,12 @@
cc_library_static {
    name: "VtsHalWifiV1_0TargetTestUtil",
    srcs: [

        "wifi_hidl_call_util_selftest.cpp",
        "wifi_hidl_test.cpp",
        "wifi_hidl_test_utils.cpp"],
    export_include_dirs: [
        "."
    ],
    shared_libs: [
        "libbase",
        "liblog",

wifi/1.1/Android.bp

0 → 100644
+68 −0
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen. Do not edit manually.

filegroup {
    name: "android.hardware.wifi@1.1_hal",
    srcs: [
        "IWifi.hal",
        "IWifiChip.hal",
    ],
}

genrule {
    name: "android.hardware.wifi@1.1_genc++",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
    srcs: [
        ":android.hardware.wifi@1.1_hal",
    ],
    out: [
        "android/hardware/wifi/1.1/WifiAll.cpp",
        "android/hardware/wifi/1.1/WifiChipAll.cpp",
    ],
}

genrule {
    name: "android.hardware.wifi@1.1_genc++_headers",
    tools: ["hidl-gen"],
    cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.wifi@1.1",
    srcs: [
        ":android.hardware.wifi@1.1_hal",
    ],
    out: [
        "android/hardware/wifi/1.1/IWifi.h",
        "android/hardware/wifi/1.1/IHwWifi.h",
        "android/hardware/wifi/1.1/BnHwWifi.h",
        "android/hardware/wifi/1.1/BpHwWifi.h",
        "android/hardware/wifi/1.1/BsWifi.h",
        "android/hardware/wifi/1.1/IWifiChip.h",
        "android/hardware/wifi/1.1/IHwWifiChip.h",
        "android/hardware/wifi/1.1/BnHwWifiChip.h",
        "android/hardware/wifi/1.1/BpHwWifiChip.h",
        "android/hardware/wifi/1.1/BsWifiChip.h",
    ],
}

cc_library_shared {
    name: "android.hardware.wifi@1.1",
    defaults: ["hidl-module-defaults"],
    generated_sources: ["android.hardware.wifi@1.1_genc++"],
    generated_headers: ["android.hardware.wifi@1.1_genc++_headers"],
    export_generated_headers: ["android.hardware.wifi@1.1_genc++_headers"],
    vendor_available: true,
    shared_libs: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "liblog",
        "libutils",
        "libcutils",
        "android.hardware.wifi@1.0",
    ],
    export_shared_lib_headers: [
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libutils",
        "android.hardware.wifi@1.0",
    ],
}

wifi/1.1/Android.mk

0 → 100644
+116 −0
Original line number Diff line number Diff line
# This file is autogenerated by hidl-gen. Do not edit manually.

LOCAL_PATH := $(call my-dir)

################################################################################

include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.wifi-V1.1-java
LOCAL_MODULE_CLASS := JAVA_LIBRARIES

intermediates := $(call local-generated-sources-dir, COMMON)

HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)

LOCAL_JAVA_LIBRARIES := \
    android.hardware.wifi-V1.0-java \
    android.hidl.base-V1.0-java \


#
# Build IWifi.hal
#
GEN := $(intermediates)/android/hardware/wifi/V1_1/IWifi.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifi.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.wifi@1.1::IWifi

$(GEN): $(LOCAL_PATH)/IWifi.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build IWifiChip.hal
#
GEN := $(intermediates)/android/hardware/wifi/V1_1/IWifiChip.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiChip.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.wifi@1.1::IWifiChip

$(GEN): $(LOCAL_PATH)/IWifiChip.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
include $(BUILD_JAVA_LIBRARY)


################################################################################

include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.wifi-V1.1-java-static
LOCAL_MODULE_CLASS := JAVA_LIBRARIES

intermediates := $(call local-generated-sources-dir, COMMON)

HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)

LOCAL_STATIC_JAVA_LIBRARIES := \
    android.hardware.wifi-V1.0-java-static \
    android.hidl.base-V1.0-java-static \


#
# Build IWifi.hal
#
GEN := $(intermediates)/android/hardware/wifi/V1_1/IWifi.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifi.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.wifi@1.1::IWifi

$(GEN): $(LOCAL_PATH)/IWifi.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build IWifiChip.hal
#
GEN := $(intermediates)/android/hardware/wifi/V1_1/IWifiChip.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiChip.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.wifi@1.1::IWifiChip

$(GEN): $(LOCAL_PATH)/IWifiChip.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
include $(BUILD_STATIC_JAVA_LIBRARY)



include $(call all-makefiles-under,$(LOCAL_PATH))

wifi/1.1/IWifi.hal

0 → 100644
+28 −0
Original line number Diff line number Diff line
/*
 * Copyright 2016 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.1;

import @1.0::IWifi;

/**
 * This is the root of the HAL module and is the interface returned when
 * loading an implementation of the Wi-Fi HAL. There must be at most one
 * module loaded in the system.
 * IWifi.getChip() may return either a @1.0::IWifiChip or @1.1::IWifiChip.
 */
interface IWifi extends @1.0::IWifi {
};

wifi/1.1/IWifiChip.hal

0 → 100644
+67 −0
Original line number Diff line number Diff line
/*
 * Copyright 2016 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.1;

import @1.0::IWifiChip;
import @1.0::WifiStatus;

/**
 * Interface that represents a chip that must be configured as a single unit.
 * The HAL/driver/firmware will be responsible for determining which phy is used
 * to perform operations like NAN, RTT, etc.
 */
interface IWifiChip extends @1.0::IWifiChip {
  /**
   * Capabilities exposed by this chip.
   */
  enum ChipCapabilityMask : @1.0::IWifiChip.ChipCapabilityMask {
    /**
     * Set/Reset Tx Power limits.
     */
    SET_TX_POWER_LIMIT = 1 << 8
  };

  /**
   * API to set TX power limit.
   * This is used for meeting SAR requirements while making VOIP calls for
   * example.
   *
   * @param powerInDbm Power level in dBm.
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
   *         |WifiStatusCode.NOT_AVAILABLE|,
   *         |WifiStatusCode.UNKNOWN|
   */
  setTxPowerLimit(int32_t powerInDbm) generates (WifiStatus status);

  /**
   * API to reset TX power limit.
   * This is used to set the power back to default values.
   *
   * @return status WifiStatus of the operation.
   *         Possible status codes:
   *         |WifiStatusCode.SUCCESS|,
   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
   *         |WifiStatusCode.NOT_AVAILABLE|,
   *         |WifiStatusCode.UNKNOWN|
   */
  resetTxPowerLimit() generates (WifiStatus status);
};
Loading