wifi(hidl): Add supplicant HIDL interface am: 9a3a84f5a3
am: 236659d535
am: e344a1aea4
am: d971903960
Change-Id: Ibfdaff9e6f97b03769b2c56cb15c2b699fbba572
This commit is contained in:
commit
8760803b55
8 changed files with 1836 additions and 0 deletions
|
@ -25,6 +25,126 @@ $(GEN): $(LOCAL_PATH)/types.hal
|
|||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicant.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/SupplicantAll.cpp
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicant.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Lc++ -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicant
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicant.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantCallback.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/SupplicantCallbackAll.cpp
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Lc++ -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantCallback
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantIface.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/SupplicantIfaceAll.cpp
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Lc++ -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantIface
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantIfaceCallback.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/SupplicantIfaceCallbackAll.cpp
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Lc++ -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantIfaceCallback
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantNetwork.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/SupplicantNetworkAll.cpp
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Lc++ -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantNetwork
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantNetworkCallback.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/SupplicantNetworkCallbackAll.cpp
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Lc++ -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantNetworkCallback
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build IWifi.hal
|
||||
#
|
||||
|
@ -159,6 +279,160 @@ $(GEN): $(LOCAL_PATH)/types.hal
|
|||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SupplicantStatus)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/SupplicantStatus.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.SupplicantStatus
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SupplicantStatusCode)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/SupplicantStatusCode.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.SupplicantStatusCode
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicant.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicant.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicant.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicant
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicant.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantCallback.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicantCallback.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantCallback
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantIface.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicantIface.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantIface
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantIfaceCallback.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicantIfaceCallback.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantIfaceCallback
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantNetwork.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicantNetwork.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantNetwork
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantNetworkCallback.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicantNetworkCallback.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantNetworkCallback
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build IWifi.hal
|
||||
#
|
||||
|
@ -285,6 +559,160 @@ $(GEN): $(LOCAL_PATH)/types.hal
|
|||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SupplicantStatus)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/SupplicantStatus.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.SupplicantStatus
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build types.hal (SupplicantStatusCode)
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/SupplicantStatusCode.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::types.SupplicantStatusCode
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicant.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicant.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicant.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicant
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicant.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantCallback.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicantCallback.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantCallback
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantCallback.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantIface.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicantIface.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantIface
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantIfaceCallback.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicantIfaceCallback.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantIfaceCallback
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantNetwork.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicantNetwork.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
|
||||
$(GEN): $(LOCAL_PATH)/types.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantNetwork
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build ISupplicantNetworkCallback.hal
|
||||
#
|
||||
GEN := $(intermediates)/android/hardware/wifi/1.0/ISupplicantNetworkCallback.java
|
||||
$(GEN): $(HIDL)
|
||||
$(GEN): PRIVATE_HIDL := $(HIDL)
|
||||
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
|
||||
$(GEN): PRIVATE_CUSTOM_TOOL = \
|
||||
$(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
|
||||
-Ljava -randroid.hardware:hardware/interfaces \
|
||||
android.hardware.wifi@1.0::ISupplicantNetworkCallback
|
||||
|
||||
$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
|
||||
$(transform-generated-source)
|
||||
LOCAL_GENERATED_SOURCES += $(GEN)
|
||||
|
||||
#
|
||||
# Build IWifi.hal
|
||||
#
|
||||
|
|
155
wifi/1.0/ISupplicant.hal
Normal file
155
wifi/1.0/ISupplicant.hal
Normal file
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
* 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.0;
|
||||
|
||||
import ISupplicantCallback;
|
||||
import ISupplicantIface;
|
||||
|
||||
/**
|
||||
* Interface exposed by the wpa_supplicant HIDL service registered
|
||||
* with the hardware service manager.
|
||||
* This is the root level object for any wpa_supplicant interactions.
|
||||
*/
|
||||
interface ISupplicant {
|
||||
/**
|
||||
* Debug levels for wpa_supplicant.
|
||||
* Only log messages with a level greater than the set level
|
||||
* (via |setDebugParams|) will be logged.
|
||||
*/
|
||||
enum DebugLevel : uint32_t {
|
||||
EXCESSIVE = 0,
|
||||
MSGDUMP = 1,
|
||||
DEBUG = 2,
|
||||
INFO = 3,
|
||||
WARNING = 4,
|
||||
ERROR = 5
|
||||
};
|
||||
|
||||
/**
|
||||
* Registers a wireless interface in wpa_supplicant.
|
||||
*
|
||||
* @param ifName Name of the network interface, e.g., wlan0
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_EXISTS|
|
||||
* @return iface HIDL interface object representing the interface if
|
||||
* successful, null otherwise.
|
||||
*/
|
||||
createInterface(string ifName)
|
||||
generates (SupplicantStatus status, ISupplicantIface iface);
|
||||
|
||||
/**
|
||||
* Deregisters a wireless interface from wpa_supplicant.
|
||||
*
|
||||
* @param ifName Name of the network interface, e.g., wlan0
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_UNKOWN|
|
||||
*/
|
||||
removeInterface(string ifName) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Gets a HIDL interface object for the interface corresponding to ifName
|
||||
* which wpa_supplicant already controls.
|
||||
*
|
||||
* @param ifName Name of the network interface, e.g., wlan0
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_UNKOWN|
|
||||
* @return iface HIDL interface object representing the interface if
|
||||
* successful, null otherwise.
|
||||
*/
|
||||
getInterface(string ifName)
|
||||
generates (SupplicantStatus status, ISupplicantIface iface);
|
||||
|
||||
/**
|
||||
* Retrieve a list of all the interface names controlled by wpa_supplicant.
|
||||
*
|
||||
* The corresponding |ISupplicantIface| object for any interface can be
|
||||
* retrieved using |getInterface| method.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* @return ifNames List of all interface names controlled by wpa_supplicant.
|
||||
*/
|
||||
listInterfaces() generates (SupplicantStatus status, vec<string> ifNames);
|
||||
|
||||
/**
|
||||
* Register for callbacks from the wpa_supplicant service.
|
||||
*
|
||||
* These callbacks are invoked for global events that are not specific
|
||||
* to any interface or network. Registration of multiple callback
|
||||
* objects is supported. These objects must be deleted when the corresponding
|
||||
* client process is dead.
|
||||
*
|
||||
* @param callback An instance of the |ISupplicantCallback| HIDL interface
|
||||
* object.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
*/
|
||||
registerCallback(ISupplicantCallback callback)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set debug parameters for wpa_supplicant.
|
||||
*
|
||||
* @param level Debug logging level for wpa_supplicant.
|
||||
* (one of |DebugLevel| values).
|
||||
* @param timestamp Determines whether to show timestamps in logs or
|
||||
* not.
|
||||
* @param showKeys Determines whether to show keys in debug logs or
|
||||
* not.
|
||||
* CAUTION: Do not set this param in production code!
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
*/
|
||||
setDebugParams(DebugLevel level, bool showTimestamp, bool showKeys)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Get the debug level set.
|
||||
*
|
||||
* @return level one of |DebugLevel| values.
|
||||
*/
|
||||
getDebugLevel() generates (DebugLevel level);
|
||||
|
||||
/**
|
||||
* Get whether the timestamps are shown in the debug logs or not.
|
||||
*
|
||||
* @return enabled true if set, false otherwise.
|
||||
*/
|
||||
isDebugShowTimestampEnabled() generates (bool enabled);
|
||||
|
||||
/**
|
||||
* Get whether the keys are shown in the debug logs or not.
|
||||
*
|
||||
* @return enabled true if set, false otherwise.
|
||||
*/
|
||||
isDebugShowKeysEnabled() generates (bool enabled);
|
||||
};
|
40
wifi/1.0/ISupplicantCallback.hal
Normal file
40
wifi/1.0/ISupplicantCallback.hal
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* 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.0;
|
||||
|
||||
/**
|
||||
* Callback Interface exposed by the wpa_supplicant service (ISupplicant).
|
||||
*
|
||||
* Clients need to host an instance of this HIDL interface object and
|
||||
* pass a reference of the object to wpa_supplicant via the
|
||||
* |ISupplicant.registerCallback| method.
|
||||
*/
|
||||
interface ISupplicantCallback {
|
||||
/**
|
||||
* Used to indicate that a new interface has been created.
|
||||
*
|
||||
* @param ifName Name of the network interface, e.g., wlan0
|
||||
*/
|
||||
oneway onInterfaceCreated(string ifName);
|
||||
|
||||
/**
|
||||
* Used to indicate that an interface has been removed.
|
||||
*
|
||||
* @param ifName Name of the network interface, e.g., wlan0
|
||||
*/
|
||||
oneway onInterfaceRemoved(string ifName);
|
||||
};
|
213
wifi/1.0/ISupplicantIface.hal
Normal file
213
wifi/1.0/ISupplicantIface.hal
Normal file
|
@ -0,0 +1,213 @@
|
|||
/*
|
||||
* 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.0;
|
||||
|
||||
import ISupplicantIfaceCallback;
|
||||
import ISupplicantNetwork;
|
||||
|
||||
/**
|
||||
* Interface exposed by wpa_supplicant for each network interface (e.g wlan0)
|
||||
* it controls.
|
||||
*/
|
||||
interface ISupplicantIface {
|
||||
/**
|
||||
* Retrieves the name of the network interface.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
* @return name Name of the network interface, e.g., wlan0
|
||||
*/
|
||||
getName() generates (SupplicantStatus status, string name);
|
||||
|
||||
/**
|
||||
* Add a new network to the interface.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
* @return network HIDL interface object representing the new network if
|
||||
* successful, null otherwise.
|
||||
*/
|
||||
addNetwork()
|
||||
generates (SupplicantStatus status, ISupplicantNetwork network);
|
||||
|
||||
/**
|
||||
* Remove a network from the interface.
|
||||
*
|
||||
* Use |ISupplicantNetwork.getId()| on the corresponding network HIDL
|
||||
* interface object to retrieve the ID.
|
||||
*
|
||||
* @param id Network ID allocated to the corresponding network.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_UNKNOWN|
|
||||
*/
|
||||
removeNetwork(SupplicantNetworkId id)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Gets a HIDL interface object for the network corresponding to the
|
||||
* |SupplicantNetworkId|.
|
||||
*
|
||||
* Use |ISupplicantNetwork.getId()| on the corresponding network HIDL
|
||||
* interface object to retrieve the ID.
|
||||
*
|
||||
* @param id Network ID allocated to the corresponding network.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_UNKNOWN|
|
||||
* @return network HIDL interface object representing the new network if
|
||||
* successful, null otherwise.
|
||||
*/
|
||||
getNetwork(SupplicantNetworkId id)
|
||||
generates (SupplicantStatus status, ISupplicantNetwork network);
|
||||
|
||||
/**
|
||||
* Retrieve a list of all the network Id's controlled by wpa_supplicant.
|
||||
*
|
||||
* The corresponding |ISupplicantNetwork| object for any network can be
|
||||
* retrieved using |getNetwork| method.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|
|
||||
* @return networkIds List of all network Id's controlled by wpa_supplicant.
|
||||
*/
|
||||
listNetworks()
|
||||
generates (SupplicantStatus status, vec<SupplicantNetworkId> networkIds);
|
||||
|
||||
/**
|
||||
* Register for callbacks from this interface.
|
||||
*
|
||||
* These callbacks are invoked for events that are specific to this interface.
|
||||
* Registration of multiple callback objects is supported. These objects must
|
||||
* be automatically deleted when the corresponding client process is dead or
|
||||
* if this interface is removed.
|
||||
*
|
||||
* @param callback An instance of the |ISupplicantIfaceCallback| HIDL
|
||||
* interface object.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
registerCallback(ISupplicantIfaceCallback callback)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Reconnect to the currently active network, even if we are already
|
||||
* connected.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
|
||||
*/
|
||||
reassociate() generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Reconnect to the currently active network, if we are currently
|
||||
* disconnected.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_DISABLED|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_NOT_DISCONNECTED|
|
||||
*/
|
||||
reconnect() generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Disconnect from the current active network.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
|
||||
*/
|
||||
disconnect() generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Turn on/off power save mode for the interface.
|
||||
*
|
||||
* @param enable Indicate if power save is to be turned on/off.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
|
||||
*/
|
||||
setPowerSave(bool enable) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Initiate TDLS discover with the provided peer mac address.
|
||||
*
|
||||
* @param macAddress MAC address of the peer.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
initiateTdlsDiscover(MacAddress macAddress)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Initiate TDLS setup with the provided peer mac address.
|
||||
*
|
||||
* @param macAddress MAC address of the peer.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
initiateTdlsSetup(MacAddress macAddress)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Initiate TDLS teardown with the provided peer mac address.
|
||||
*
|
||||
* @param macAddress MAC address of the peer.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_IFACE_INVALID|
|
||||
*/
|
||||
initiateTdlsTeardown(MacAddress macAddress)
|
||||
generates (SupplicantStatus status);
|
||||
};
|
141
wifi/1.0/ISupplicantIfaceCallback.hal
Normal file
141
wifi/1.0/ISupplicantIfaceCallback.hal
Normal file
|
@ -0,0 +1,141 @@
|
|||
/*
|
||||
* 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.0;
|
||||
|
||||
/**
|
||||
* Callback Interface exposed by the wpa_supplicant service
|
||||
* for each interface (ISupplicantIface).
|
||||
*
|
||||
* Clients need to host an instance of this HIDL interface object and
|
||||
* pass a reference of the object to wpa_supplicant via the
|
||||
* corresponding |ISupplicantIface.registerCallback| method.
|
||||
*/
|
||||
interface ISupplicantIfaceCallback {
|
||||
/** Various states of the interface reported by |onStateChanged|.*/
|
||||
enum State : uint32_t {
|
||||
/**
|
||||
* This state indicates that client is not associated, but is likely to
|
||||
* start looking for an access point. This state is entered when a
|
||||
* connection is lost.
|
||||
*/
|
||||
DISCONNECTED = 0,
|
||||
/**
|
||||
* This state is entered if the network interface is disabled, e.g.,
|
||||
* due to rfkill. wpa_supplicant refuses any new operations that would
|
||||
* use the radio until the interface has been enabled.
|
||||
*/
|
||||
INTERFACE_DISABLED = 1,
|
||||
/**
|
||||
* This state is entered if there are no enabled networks in the
|
||||
* configuration. wpa_supplicant is not trying to associate with a new
|
||||
* network and external interaction (e.g., ctrl_iface call to add or
|
||||
* enable a network) is needed to start association.
|
||||
*/
|
||||
INACTIVE = 2,
|
||||
/**
|
||||
* This state is entered when wpa_supplicant starts scanning for a
|
||||
* network.
|
||||
*/
|
||||
SCANNING = 3,
|
||||
/**
|
||||
* This state is entered when wpa_supplicant has found a suitable BSS
|
||||
* to authenticate with and the driver is configured to try to
|
||||
* authenticate with this BSS. This state is used only with drivers
|
||||
* that use wpa_supplicant as the SME.
|
||||
*/
|
||||
AUTHENTICATING = 4,
|
||||
/**
|
||||
* This state is entered when wpa_supplicant has found a suitable BSS
|
||||
* to associate with and the driver is configured to try to associate
|
||||
* with this BSS in ap_scan=1 mode. When using ap_scan=2 mode, this
|
||||
* state is entered when the driver is configured to try to associate
|
||||
* with a network using the configured SSID and security policy.
|
||||
*/
|
||||
ASSOCIATING = 5,
|
||||
/**
|
||||
* This state is entered when the driver reports that association has
|
||||
* been successfully completed with an AP. If IEEE 802.1X is used
|
||||
* (with or without WPA/WPA2), wpa_supplicant remains in this state
|
||||
* until the IEEE 802.1X/EAPOL authentication has been completed.
|
||||
*/
|
||||
ASSOCIATED = 6,
|
||||
/**
|
||||
* This state is entered when WPA/WPA2 4-Way Handshake is started. In
|
||||
* case of WPA-PSK, this happens when receiving the first EAPOL-Key
|
||||
* frame after association. In case of WPA-EAP, this state is entered
|
||||
* when the IEEE 802.1X/EAPOL authentication has been completed.
|
||||
*/
|
||||
FOURWAY_HANDSHAKE = 7,
|
||||
/**
|
||||
* This state is entered when 4-Way Key Handshake has been completed
|
||||
* (i.e., when the supplicant sends out message 4/4) and when Group
|
||||
* Key rekeying is started by the AP (i.e., when supplicant receives
|
||||
* message 1/2).
|
||||
*/
|
||||
GROUP_HANDSHAKE = 8,
|
||||
/**
|
||||
* This state is entered when the full authentication process is
|
||||
* completed. In case of WPA2, this happens when the 4-Way Handshake is
|
||||
* successfully completed. With WPA, this state is entered after the
|
||||
* Group Key Handshake; with IEEE 802.1X (non-WPA) connection is
|
||||
* completed after dynamic keys are received (or if not used, after
|
||||
* the EAP authentication has been completed). With static WEP keys and
|
||||
* plaintext connections, this state is entered when an association
|
||||
* has been completed.
|
||||
*
|
||||
* This state indicates that the supplicant has completed its
|
||||
* processing for the association phase and that data connection is
|
||||
* fully configured.
|
||||
*/
|
||||
COMPLETED = 9
|
||||
};
|
||||
|
||||
/**
|
||||
* Used to indicate that a new network has been added.
|
||||
*
|
||||
* @param id Network ID allocated to the corresponding network.
|
||||
*/
|
||||
oneway onNetworkAdded(SupplicantNetworkId id);
|
||||
|
||||
/**
|
||||
* Used to indicate that a network has been removed.
|
||||
*
|
||||
* @param id Network ID allocated to the corresponding network.
|
||||
*/
|
||||
oneway onNetworkRemoved(SupplicantNetworkId id);
|
||||
|
||||
/**
|
||||
* Used to indicate a state change event on this particular iface. If this
|
||||
* event is triggered by a particular network, the |SupplicantNetworkId|,
|
||||
* |ssid|, |bssid| parameters must indicate the parameters of the network/AP
|
||||
* which cased this state transition.
|
||||
*
|
||||
* @param newState New State of the interface. This must be one of the |State|
|
||||
* values above.
|
||||
* @param bssid BSSID of the corresponding AP which caused this state
|
||||
* change event. This must be zero'ed if this event is not
|
||||
* specific to a particular network.
|
||||
* @param id ID of the corresponding network which caused this
|
||||
* state change event. This must be invalid (UINT32_MAX) if this
|
||||
* event is not specific to a particular network.
|
||||
* @param ssid SSID of the corresponding network which caused this state
|
||||
* change event. This must be empty if this event is not specific
|
||||
* to a particular network.
|
||||
*/
|
||||
oneway onStateChanged(
|
||||
State newState, Bssid bssid, SupplicantNetworkId id, Ssid ssid);
|
||||
};
|
739
wifi/1.0/ISupplicantNetwork.hal
Normal file
739
wifi/1.0/ISupplicantNetwork.hal
Normal file
|
@ -0,0 +1,739 @@
|
|||
/*
|
||||
* 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.0;
|
||||
|
||||
import ISupplicantNetworkCallback;
|
||||
|
||||
/**
|
||||
* Interface exposed by wpa_supplicant for each network configuration it
|
||||
* controls.
|
||||
* A network is wpa_supplicant's way of representing the configuration
|
||||
* parameters of a Wifi service set. Service sets are identified by their
|
||||
* service set identitifier (SSID). The parameters for a network includes the
|
||||
* credentials, bssid, etc.
|
||||
*/
|
||||
interface ISupplicantNetwork {
|
||||
/**
|
||||
* Size limits for some of the params used in this interface.
|
||||
*/
|
||||
enum ParamSizeLimits : uint32_t {
|
||||
/** Max length of SSID param. */
|
||||
SSID_MAX_LEN_IN_BYTES = 32,
|
||||
|
||||
/** Min length of PSK passphrase param. */
|
||||
PSK_PASSPHRASE_MIN_LEN_IN_BYTES = 8,
|
||||
|
||||
/** Max length of PSK passphrase param. */
|
||||
PSK_PASSPHRASE_MAX_LEN_IN_BYTES = 63,
|
||||
|
||||
/** Max number of WEP keys param. */
|
||||
WEP_KEYS_MAX_NUM = 4,
|
||||
|
||||
/** Length of each WEP40 keys param. */
|
||||
WEP40_KEY_LEN_IN_BYTES = 5,
|
||||
/** Length of each WEP104 keys param. */
|
||||
WEP104_KEY_LEN_IN_BYTES = 13,
|
||||
};
|
||||
|
||||
/** Possble mask of values for KeyMgmt param. */
|
||||
enum KeyMgmtMask : uint32_t {
|
||||
WPA_EAP = 1 << 0,
|
||||
WPA_PSK = 1 << 1,
|
||||
NONE = 1 << 2,
|
||||
IEEE8021X = 1 << 3
|
||||
};
|
||||
|
||||
/** Possble mask of values for Proto param. */
|
||||
enum ProtoMask : uint32_t {
|
||||
WPA = 1 << 0,
|
||||
RSN = 1 << 1,
|
||||
/** Unused 1 << 2 */
|
||||
OSEN = 1 << 3
|
||||
};
|
||||
|
||||
/** Possble mask of values for AuthAlg param. */
|
||||
enum AuthAlgMask : uint32_t {
|
||||
OPEN = 1 << 0,
|
||||
SHARED = 1 << 1,
|
||||
LEAP = 1 << 2
|
||||
};
|
||||
|
||||
/** Possble mask of values for GroupCipher param. */
|
||||
enum GroupCipherMask : uint32_t {
|
||||
WEP40 = 1 << 1,
|
||||
WEP104 = 1 << 2,
|
||||
TKIP = 1 << 3,
|
||||
CCMP = 1 << 4
|
||||
};
|
||||
|
||||
/** Possble mask of values for PairwiseCipher param. */
|
||||
enum PairwiseCipherMask : uint32_t {
|
||||
NONE = 1 << 0,
|
||||
TKIP = 1 << 3,
|
||||
CCMP = 1 << 4
|
||||
};
|
||||
|
||||
/** Possble values for EapMethod param. */
|
||||
enum EapMethod : uint32_t {
|
||||
PEAP = 0,
|
||||
TLS = 1,
|
||||
TTLS = 2,
|
||||
PWD = 3,
|
||||
SIM = 4,
|
||||
AKA = 5,
|
||||
AKA_PRIME = 6,
|
||||
WFA_UNAUTH_TLS = 7
|
||||
};
|
||||
|
||||
/** Possble values for Phase2Method param. */
|
||||
enum EapPhase2Method : uint32_t {
|
||||
NONE = 0,
|
||||
PAP = 1,
|
||||
MSPAP = 2,
|
||||
MSPAPV2 = 3,
|
||||
GTC = 4
|
||||
};
|
||||
|
||||
/** Params of |sendNetworkEapSimGsmAuthResponse| request. (Refer RFC 4186) */
|
||||
struct NetworkResponseEapSimGsmAuthParams {
|
||||
uint8_t[8] kc;
|
||||
uint8_t[4] sres;
|
||||
};
|
||||
|
||||
/** Params of |sendNetworkEapSimUmtsAuthResponse| request. (Refer RFC 4187) */
|
||||
struct NetworkResponseEapSimUmtsAuthParams {
|
||||
vec<uint8_t> res;
|
||||
uint8_t[16] ik;
|
||||
uint8_t[16] ck;
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves the ID allocated to this network by wpa_supplicant.
|
||||
*
|
||||
* This is not the |SSID| of the network, but an internal identifier for
|
||||
* this network used by wpa_supplicant.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return id Network ID.
|
||||
*/
|
||||
getId() generates (SupplicantStatus status, SupplicantNetworkId id);
|
||||
|
||||
/**
|
||||
* Retrieves the name of the interface this network belongs to.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return Name of the network interface, e.g., wlan0
|
||||
*/
|
||||
getInterfaceName() generates (SupplicantStatus status, string name);
|
||||
|
||||
/**
|
||||
* Register for callbacks from this network.
|
||||
*
|
||||
* These callbacks are invoked for events that are specific to this network.
|
||||
* Registration of multiple callback objects is supported. These objects must
|
||||
* be automatically deleted when the corresponding client process is dead or
|
||||
* if this network is removed.
|
||||
*
|
||||
* @param callback An instance of the |ISupplicantNetworkCallback| HIDL
|
||||
* interface object.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
registerCallback(ISupplicantNetworkCallback callback)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Setters for the various network params.
|
||||
* These correspond to elements of |wpa_sssid| struct used internally by
|
||||
* wpa_supplicant to represent each network.
|
||||
*/
|
||||
/**
|
||||
* Set SSID for this network.
|
||||
*
|
||||
* @param ssid value to set.
|
||||
* Max length of |ParamSizeLimits.SSID_MAX_LEN_IN_BYTES|.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setSsid(Ssid ssid) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set the network to only connect to an AP with provided BSSID.
|
||||
*
|
||||
* @param bssid value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setBssid(Bssid bssid) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set whether to send probe requests for this network (hidden).
|
||||
*
|
||||
* @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|
|
||||
*/
|
||||
setScanSsid(bool enable) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set key management mask for the network.
|
||||
*
|
||||
* @param keyMgmtMask value to set.
|
||||
* Combination of |KeyMgmtMask| values.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setKeyMgmt(uint32_t keyMgmtMask) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set proto mask for the network.
|
||||
*
|
||||
* @param protoMask value to set.
|
||||
* Combination of |ProtoMask| values.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setProto(uint32_t protoMask) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set auth alg mask for the network.
|
||||
*
|
||||
* @param authAlgMask value to set.
|
||||
* Combination of |ProtoMask| values.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setAuthAlg(uint32_t authAlgMask) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set group cipher mask for the network.
|
||||
*
|
||||
* @param groupCipherMask value to set.
|
||||
* Combination of |ProtoMask| values.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setGroupCipher(uint32_t groupCipherMask)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set pairwise cipher mask for the network.
|
||||
*
|
||||
* @param pairwiseCipherMask value to set.
|
||||
* Combination of |ProtoMask| values.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setPairwiseCipher(uint32_t pairwiseCipherMask)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set passphrase for WPA_PSK network.
|
||||
*
|
||||
* @param psk value to set.
|
||||
* Length of value must be between
|
||||
* |ParamSizeLimits.PSK_PASSPHRASE_MIN_LEN_IN_BYTES| and
|
||||
* |ParamSizeLimits.PSK_PASSPHRASE_MAX_LEN_IN_BYTES|.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setPskPassphrase(string psk) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set WEP key for WEP network.
|
||||
*
|
||||
* @param keyIdx Index of wep key to set.
|
||||
* Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
|
||||
* @param wepKey value to set.
|
||||
* Length of each key must be either
|
||||
* |ParamSizeLimits.WEP40_KEY_LEN_IN_BYTES| or
|
||||
* |ParamSizeLimits.WEP104_KEY_LEN_IN_BYTES|.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setWepKey(uint32_t keyIdx, vec<uint8_t> wepKey)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set default Tx key index for WEP network.
|
||||
*
|
||||
* @param KeyIdx value to set.
|
||||
* Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setWepTxKeyIdx(uint32_t keyIdx)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set whether RequirePmf is enabled for this network.
|
||||
*
|
||||
* @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|
|
||||
*/
|
||||
setRequirePmf(bool enable) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP Method for this network.
|
||||
*
|
||||
* @param method value to be set.
|
||||
* Must be one of |EapMethod| values.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapMethod(EapMethod method)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP Phase2 Method for this network.
|
||||
*
|
||||
* @param method value to set.
|
||||
* Must be one of |EapPhase2Method| values.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapPhase2Method(EapPhase2Method method)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP Identity for this network.
|
||||
*
|
||||
* @param identity value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapIdentity(vec<uint8_t> identity)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP Anonymous Identity for this network.
|
||||
*
|
||||
* @param identity value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapAnonymousIdentity(vec<uint8_t> identity)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP Password for this network.
|
||||
*
|
||||
* @param password value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapPassword(vec<uint8_t> password)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP CA certificate file path for this network.
|
||||
*
|
||||
* @param path value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapCACert(string path) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP CA certificate directory path for this network.
|
||||
*
|
||||
* @param path value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapCAPath(string path) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP Client certificate file path for this network.
|
||||
*
|
||||
* @param path value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapClientCert(string path) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP private key file path for this network.
|
||||
*
|
||||
* @param path value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapPrivateKey(string path) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP subject match for this network.
|
||||
*
|
||||
* @param match value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapSubjectMatch(string match) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP Altsubject match for this network.
|
||||
*
|
||||
* @param match value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapAltSubjectMatch(string match)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Enable EAP Open SSL Engine for this network.
|
||||
*
|
||||
* @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|
|
||||
*/
|
||||
setEapEngine(bool enable) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP Open SSL Engine ID for this network.
|
||||
*
|
||||
* @param id value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapEngineID(string id) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Set EAP Domain suffix match for this network.
|
||||
*
|
||||
* @param match value to set.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
setEapDomainSuffixMatch(string match)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Getters for the various network params.
|
||||
*/
|
||||
/**
|
||||
* Get SSID for this network.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return ssid value set.
|
||||
*/
|
||||
getSsid() generates (SupplicantStatus status, Ssid ssid);
|
||||
|
||||
/**
|
||||
* Get the BSSID set for this network.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return bssid value set.
|
||||
*/
|
||||
getBssid() generates (SupplicantStatus status, Bssid bssid);
|
||||
|
||||
/**
|
||||
* Get whether Probe Requests are being sent for this network (hidden).
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return enabled true if set, false otherwise.
|
||||
*/
|
||||
getScanSsid() generates (SupplicantStatus status, bool enabled);
|
||||
|
||||
/**
|
||||
* Get the key mgmt mask set for the network.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return keyMgmtMask Combination of |KeyMgmtMask| values.
|
||||
*/
|
||||
getKeyMgmt()
|
||||
generates (SupplicantStatus status, uint32_t keyMgmtMask);
|
||||
|
||||
/**
|
||||
* Get the proto mask set for the network.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return protoMask Combination of |ProtoMask| values.
|
||||
*/
|
||||
getProto() generates (SupplicantStatus status, uint32_t protoMask);
|
||||
|
||||
/**
|
||||
* Get the auth alg mask set for the network.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return authAlgMask Combination of |AuthAlgMask| values.
|
||||
*/
|
||||
getAuthAlg()
|
||||
generates (SupplicantStatus status, uint32_t authAlgMask);
|
||||
|
||||
/**
|
||||
* Get the group cipher mask set for the network.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return groupCipherMask Combination of |GroupCipherMask| values.
|
||||
*/
|
||||
getGroupCipher()
|
||||
generates (SupplicantStatus status, uint32_t groupCipherMask);
|
||||
|
||||
/**
|
||||
* Get the pairwise cipher mask set for the network.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
|
||||
*/
|
||||
getPairwiseCipher()
|
||||
generates (SupplicantStatus status, uint32_t pairwiseCipherMask);
|
||||
|
||||
/**
|
||||
* Get passphrase for WPA_PSK network.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return psk value set.
|
||||
*/
|
||||
getPskPassphrase() generates (SupplicantStatus status, string psk);
|
||||
|
||||
/**
|
||||
* Get WEP key for WEP network.
|
||||
*
|
||||
* @param keyIdx Index of wep key to be fetched.
|
||||
* Max of |WEP_KEYS_MAX_NUM|.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return wepKey value set.
|
||||
*/
|
||||
getWepKey(uint32_t keyIdx)
|
||||
generates (SupplicantStatus status, vec<uint8_t> wepKey);
|
||||
|
||||
/**
|
||||
* Get default Tx key index for WEP network.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
* @return keyIdx value set.
|
||||
*/
|
||||
getWepTxKeyIdx()
|
||||
generates (SupplicantStatus status, uint32_t keyIdx);
|
||||
|
||||
/**
|
||||
* Get whether RequirePmf 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.
|
||||
*/
|
||||
getRequirePmf() generates (SupplicantStatus status, bool enabled);
|
||||
|
||||
/**
|
||||
* Enable the network for connection purposes.
|
||||
*
|
||||
* This must trigger a connection to the network if:
|
||||
* a) |noConnect| is false, and
|
||||
* b) This is the only network configured, and
|
||||
* c) Is visible in the current scan results.
|
||||
*
|
||||
* @param noConnect Only enable the network, dont trigger a connect.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
enable(bool noConnect) generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Disable the network for connection purposes.
|
||||
*
|
||||
* This must trigger a disconnection from the network, if currently
|
||||
* connected to this one.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
disable() generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Initiate connection to this network.
|
||||
*
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
select() generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Used to send a response to the
|
||||
* |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request.
|
||||
*
|
||||
* @param params Params to be used for EAP GSM authentication.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
sendNetworkEapSimGsmAuthResponse(NetworkResponseEapSimGsmAuthParams params)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Used to send a response to the
|
||||
* |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
|
||||
*
|
||||
* @param params Params to be used for EAP UMTS authentication.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
sendNetworkEapSimUmtsAuthResponse(NetworkResponseEapSimUmtsAuthParams params)
|
||||
generates (SupplicantStatus status);
|
||||
|
||||
/**
|
||||
* Used to send a response to the
|
||||
* |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request.
|
||||
*
|
||||
* @param identity Identity to be used for the network.
|
||||
* @return status Status of the operation.
|
||||
* Possible status codes:
|
||||
* |SupplicantStatusCode.SUCCESS|,
|
||||
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
|
||||
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
|
||||
*/
|
||||
sendNetworkEapIdentityResponse(vec<uint8_t> identity)
|
||||
generates (SupplicantStatus status);
|
||||
};
|
69
wifi/1.0/ISupplicantNetworkCallback.hal
Normal file
69
wifi/1.0/ISupplicantNetworkCallback.hal
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* 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.0;
|
||||
|
||||
/**
|
||||
* Callback Interface exposed by the wpa_supplicant service
|
||||
* for each network (ISupplicantNetwork).
|
||||
*
|
||||
* Clients need to host an instance of this HIDL interface object and
|
||||
* pass a reference of the object to wpa_supplicant via the
|
||||
* corresponding |ISupplicantNetwork.registerCallback| method.
|
||||
*/
|
||||
interface ISupplicantNetworkCallback {
|
||||
/** Params of |onNetworkEapSimGsmAuthRequest| request. (Refer RFC 4186) */
|
||||
typedef uint8_t[16] GsmRand;
|
||||
struct NetworkRequestEapSimGsmAuthParams {
|
||||
vec<GsmRand> rands;
|
||||
};
|
||||
|
||||
/** Params of |onNetworkEapSimUmtsAuthRequest| request. (Refer RFC 4187) */
|
||||
struct NetworkRequestEapSimUmtsAuthParams {
|
||||
uint8_t[16] rand;
|
||||
uint8_t[16] autn;
|
||||
};
|
||||
|
||||
/**
|
||||
* Used to request EAP GSM SIM authentication for this particular network.
|
||||
*
|
||||
* The response for the request must be sent using the corresponding
|
||||
* |ISupplicantNetwork.sendNetworkEapSimGsmAuthResponse| call.
|
||||
*
|
||||
* @param params Params associated with the request.
|
||||
*/
|
||||
oneway onNetworkEapSimGsmAuthRequest(
|
||||
NetworkRequestEapSimGsmAuthParams params);
|
||||
|
||||
/**
|
||||
* Used to request EAP UMTS SIM authentication for this particular network.
|
||||
*
|
||||
* The response for the request must be sent using the corresponding
|
||||
* |ISupplicantNetwork.sendNetworkEapSimUmtsAuthResponse| call.
|
||||
*
|
||||
* @param params Params associated with the request.
|
||||
*/
|
||||
oneway onNetworkEapSimUmtsAuthRequest(
|
||||
NetworkRequestEapSimUmtsAuthParams params);
|
||||
|
||||
/**
|
||||
* Used to request EAP Identity for this particular network.
|
||||
*
|
||||
* The response for the request must be sent using the corresponding
|
||||
* |ISupplicantNetwork.sendNetworkEapIdentityResponse| call.
|
||||
*/
|
||||
oneway onNetworkEapIdentityRequest();
|
||||
};
|
|
@ -44,3 +44,54 @@ struct FailureReason {
|
|||
* An identifier for a mode that the chip can be put in.
|
||||
*/
|
||||
typedef uint32_t ChipModeId;
|
||||
|
||||
/**
|
||||
* Enum values indicating the status of any supplicant operation.
|
||||
*/
|
||||
enum SupplicantStatusCode : uint32_t {
|
||||
/** No errors. */
|
||||
SUCCESS,
|
||||
/** Unknown failure occured. */
|
||||
FAILURE_UNKNOWN,
|
||||
/** One of the incoming args is invalid. */
|
||||
FAILURE_ARGS_INVALID,
|
||||
/** |ISupplicantIface| HIDL interface object is no longer valid. */
|
||||
FAILURE_IFACE_INVALID,
|
||||
/** Iface with the provided name does not exist. */
|
||||
FAILURE_IFACE_UNKNOWN,
|
||||
/** Iface with the provided name already exists. */
|
||||
FAILURE_IFACE_EXISTS,
|
||||
/** Iface is disabled and cannot be used. */
|
||||
FAILURE_IFACE_DISABLED,
|
||||
/** Iface is not currently disconnected, so cannot reconnect. */
|
||||
FAILURE_IFACE_NOT_DISCONNECTED,
|
||||
/** |ISupplicantNetwork| HIDL interface object is no longer valid. */
|
||||
FAILURE_NETWORK_INVALID,
|
||||
/** Network with the provided id does not exist. */
|
||||
FAILURE_NETWORK_UNKNOWN
|
||||
};
|
||||
|
||||
/**
|
||||
* Generic structure to return the status of any supplicant operation.
|
||||
*/
|
||||
struct SupplicantStatus {
|
||||
SupplicantStatusCode code;
|
||||
/**
|
||||
* A vendor specific error message to provide more information beyond the
|
||||
* status code.
|
||||
* This will be used for debbuging purposes only.
|
||||
*/
|
||||
string debugMessage;
|
||||
};
|
||||
|
||||
/** SSID type. Max of 32 octets representing service identifier of a network. */
|
||||
typedef vec<uint8_t> Ssid;
|
||||
|
||||
/** MAC Address type. 6 octets representing physical address of a device. */
|
||||
typedef uint8_t[6] MacAddress;
|
||||
|
||||
/** BSSID type. 6 octets representing the physical address of an AP. */
|
||||
typedef MacAddress Bssid;
|
||||
|
||||
/** Supplicant network ID type. */
|
||||
typedef uint32_t SupplicantNetworkId;
|
||||
|
|
Loading…
Reference in a new issue