Loading wifi/1.0/Android.bp +40 −0 Original line number Diff line number Diff line Loading @@ -7,16 +7,26 @@ genrule { srcs: [ "types.hal", "IWifi.hal", "IWifiApIface.hal", "IWifiChip.hal", "IWifiChipEventCallback.hal", "IWifiEventCallback.hal", "IWifiIface.hal", "IWifiNanIface.hal", "IWifiP2pIface.hal", "IWifiStaIface.hal", ], out: [ "android/hardware/wifi/1.0/types.cpp", "android/hardware/wifi/1.0/WifiAll.cpp", "android/hardware/wifi/1.0/WifiApIfaceAll.cpp", "android/hardware/wifi/1.0/WifiChipAll.cpp", "android/hardware/wifi/1.0/WifiChipEventCallbackAll.cpp", "android/hardware/wifi/1.0/WifiEventCallbackAll.cpp", "android/hardware/wifi/1.0/WifiIfaceAll.cpp", "android/hardware/wifi/1.0/WifiNanIfaceAll.cpp", "android/hardware/wifi/1.0/WifiP2pIfaceAll.cpp", "android/hardware/wifi/1.0/WifiStaIfaceAll.cpp", ], } Loading @@ -27,9 +37,14 @@ genrule { srcs: [ "types.hal", "IWifi.hal", "IWifiApIface.hal", "IWifiChip.hal", "IWifiChipEventCallback.hal", "IWifiEventCallback.hal", "IWifiIface.hal", "IWifiNanIface.hal", "IWifiP2pIface.hal", "IWifiStaIface.hal", ], out: [ "android/hardware/wifi/1.0/types.h", Loading @@ -38,6 +53,11 @@ genrule { "android/hardware/wifi/1.0/BnWifi.h", "android/hardware/wifi/1.0/BpWifi.h", "android/hardware/wifi/1.0/BsWifi.h", "android/hardware/wifi/1.0/IWifiApIface.h", "android/hardware/wifi/1.0/IHwWifiApIface.h", "android/hardware/wifi/1.0/BnWifiApIface.h", "android/hardware/wifi/1.0/BpWifiApIface.h", "android/hardware/wifi/1.0/BsWifiApIface.h", "android/hardware/wifi/1.0/IWifiChip.h", "android/hardware/wifi/1.0/IHwWifiChip.h", "android/hardware/wifi/1.0/BnWifiChip.h", Loading @@ -53,6 +73,26 @@ genrule { "android/hardware/wifi/1.0/BnWifiEventCallback.h", "android/hardware/wifi/1.0/BpWifiEventCallback.h", "android/hardware/wifi/1.0/BsWifiEventCallback.h", "android/hardware/wifi/1.0/IWifiIface.h", "android/hardware/wifi/1.0/IHwWifiIface.h", "android/hardware/wifi/1.0/BnWifiIface.h", "android/hardware/wifi/1.0/BpWifiIface.h", "android/hardware/wifi/1.0/BsWifiIface.h", "android/hardware/wifi/1.0/IWifiNanIface.h", "android/hardware/wifi/1.0/IHwWifiNanIface.h", "android/hardware/wifi/1.0/BnWifiNanIface.h", "android/hardware/wifi/1.0/BpWifiNanIface.h", "android/hardware/wifi/1.0/BsWifiNanIface.h", "android/hardware/wifi/1.0/IWifiP2pIface.h", "android/hardware/wifi/1.0/IHwWifiP2pIface.h", "android/hardware/wifi/1.0/BnWifiP2pIface.h", "android/hardware/wifi/1.0/BpWifiP2pIface.h", "android/hardware/wifi/1.0/BsWifiP2pIface.h", "android/hardware/wifi/1.0/IWifiStaIface.h", "android/hardware/wifi/1.0/IHwWifiStaIface.h", "android/hardware/wifi/1.0/BnWifiStaIface.h", "android/hardware/wifi/1.0/BpWifiStaIface.h", "android/hardware/wifi/1.0/BsWifiStaIface.h", ], } Loading wifi/1.0/Android.mk +244 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,23 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build types.hal (IfaceType) # GEN := $(intermediates)/android/hardware/wifi/1.0/IfaceType.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.IfaceType $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifi.hal # Loading @@ -57,6 +74,8 @@ $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiChip.hal $(GEN): $(LOCAL_PATH)/IWifiChip.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiEventCallback.hal $(GEN): $(LOCAL_PATH)/IWifiEventCallback.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) \ Loading @@ -67,6 +86,25 @@ $(GEN): $(LOCAL_PATH)/IWifi.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiApIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiApIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiApIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiApIface $(GEN): $(LOCAL_PATH)/IWifiApIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiChip.hal # Loading @@ -74,8 +112,16 @@ GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiChip.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiChip.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiApIface.hal $(GEN): $(LOCAL_PATH)/IWifiApIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiChipEventCallback.hal $(GEN): $(LOCAL_PATH)/IWifiChipEventCallback.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal $(GEN): $(LOCAL_PATH)/types.hal $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) Loading Loading @@ -125,6 +171,82 @@ $(GEN): PRIVATE_CUSTOM_TOOL = \ $(GEN): $(LOCAL_PATH)/IWifiEventCallback.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiIface.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::IWifiIface $(GEN): $(LOCAL_PATH)/IWifiIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiNanIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiNanIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiNanIface $(GEN): $(LOCAL_PATH)/IWifiNanIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiP2pIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiP2pIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiP2pIface $(GEN): $(LOCAL_PATH)/IWifiP2pIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiStaIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiStaIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiStaIface $(GEN): $(LOCAL_PATH)/IWifiStaIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) include $(BUILD_JAVA_LIBRARY) Loading Loading @@ -172,6 +294,23 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build types.hal (IfaceType) # GEN := $(intermediates)/android/hardware/wifi/1.0/IfaceType.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.IfaceType $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifi.hal # Loading @@ -183,6 +322,8 @@ $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiChip.hal $(GEN): $(LOCAL_PATH)/IWifiChip.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiEventCallback.hal $(GEN): $(LOCAL_PATH)/IWifiEventCallback.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) \ Loading @@ -193,6 +334,25 @@ $(GEN): $(LOCAL_PATH)/IWifi.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiApIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiApIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiApIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiApIface $(GEN): $(LOCAL_PATH)/IWifiApIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiChip.hal # Loading @@ -200,8 +360,16 @@ GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiChip.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiChip.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiApIface.hal $(GEN): $(LOCAL_PATH)/IWifiApIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiChipEventCallback.hal $(GEN): $(LOCAL_PATH)/IWifiChipEventCallback.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal $(GEN): $(LOCAL_PATH)/types.hal $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) Loading Loading @@ -251,6 +419,82 @@ $(GEN): PRIVATE_CUSTOM_TOOL = \ $(GEN): $(LOCAL_PATH)/IWifiEventCallback.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiIface.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::IWifiIface $(GEN): $(LOCAL_PATH)/IWifiIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiNanIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiNanIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiNanIface $(GEN): $(LOCAL_PATH)/IWifiNanIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiP2pIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiP2pIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiP2pIface $(GEN): $(LOCAL_PATH)/IWifiP2pIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiStaIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiStaIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiStaIface $(GEN): $(LOCAL_PATH)/IWifiStaIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) include $(BUILD_STATIC_JAVA_LIBRARY) Loading wifi/1.0/IWifi.hal +15 −3 Original line number Diff line number Diff line Loading @@ -70,10 +70,22 @@ interface IWifi { @callflow(next={"registerEventCallback", "start", "stop"}) oneway stop(); // TODO(b/30570663) return vec<IWifiChip> instead /** * Get the configurable chip on the device. * Retrieve the list of all chip Id's on the device. * The corresponding |IWifiChip| object for any chip can be * retrieved using |getChip| method. * * @return chipIds List of all chip Id's on the device. */ @callflow(next={"*"}) getChipIds() generates (vec<ChipId> chipIds); /** * Gets a HIDL interface object for the chip corresponding to the * provided chipId. * * @return chip HIDL interface object representing the chip. */ @callflow(next={"*"}) getChip() generates (IWifiChip chip); getChip(ChipId chipId) generates (IWifiChip chip); }; wifi/1.0/IWifiApIface.hal 0 → 100644 +26 −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.0; import IWifiIface; /** * Interface used to represent a single AP iface. */ interface IWifiApIface extends IWifiIface { /** TODO(rpius): Add methods to the interface. */ }; wifi/1.0/IWifiChip.hal +135 −9 Original line number Diff line number Diff line Loading @@ -17,6 +17,10 @@ package android.hardware.wifi@1.0; import IWifiChipEventCallback; import IWifiApIface; import IWifiNanIface; import IWifiP2pIface; import IWifiStaIface; /** * Interface that represents a chip that must be configured as a single unit. Loading @@ -24,15 +28,6 @@ import IWifiChipEventCallback; * to perform operations like NAN, RTT, etc. */ interface IWifiChip { enum IfaceType : uint32_t { STA, AP, P2P, /** * NAN control interface. Datapath support may be queried and created * through this interface. */ NAN, }; /** * Set of interface types with the maximum number of interfaces that can have * one of the specified type for a given ChipIfaceCombination. See Loading Loading @@ -121,6 +116,13 @@ interface IWifiChip { vec<ChipIfaceCombination> availableCombinations; }; /** * Get the id assigned to this chip. * * @return id Assigned chip Id. */ getId() generates (ChipId id); /** * Requests notifications of significant events on this chip. Multiple calls * to this will register multiple callbacks each of which will receive all Loading Loading @@ -176,4 +178,128 @@ interface IWifiChip { * success, or |IWifiChipEventCallback.onFirmwareDebugDumpFailure| on failure. */ oneway requestFirmwareDebugDump(); /** * Create an AP iface on the chip. * * Depending on the mode the chip is configured in, the interface creation * may fail if we've already reached the maximum allowed * (specified in |ChipIfaceCombination|) number of ifaces of the AP type. * * @return iface HIDL interface object representing the iface if * successful, null otherwise. */ createApIface() generates (IWifiApIface iface); /** * List all the AP iface names configured on the chip. * The corresponding |IWifiApIface| object for any iface are * retrieved using |getApIface| method. * * @return ifnames List of all AP iface names on the chip. */ getApIfaceNames() generates (vec<string> ifnames); /** * Gets a HIDL interface object for the AP Iface corresponding * to the provided ifname. * * @param ifname Name of the iface. * @return iface HIDL interface object representing the iface if * it exists, null otherwise. */ getApIface(string ifname) generates (IWifiApIface iface); /** * Create a NAN iface on the chip. * * Depending on the mode the chip is configured in, the interface creation * may fail if we've already reached the maximum allowed * (specified in |ChipIfaceCombination|) number of ifaces of the NAN type. * * @return iface HIDL interface object representing the iface if * successful, null otherwise. */ createNanIface() generates (IWifiNanIface iface); /** * List all the NAN iface names configured on the chip. * The corresponding |IWifiNanIface| object for any iface are * retrieved using |getNanIface| method. * * @return ifnames List of all NAN iface names on the chip. */ getNanIfaceNames() generates (vec<string> ifnames); /** * Gets a HIDL interface object for the NAN Iface corresponding * to the provided ifname. * * @param ifname Name of the iface. * @return iface HIDL interface object representing the iface if * it exists, null otherwise. */ getNanIface(string ifname) generates (IWifiNanIface iface); /** * Create a P2P iface on the chip. * * Depending on the mode the chip is configured in, the interface creation * may fail if we've already reached the maximum allowed * (specified in |ChipIfaceCombination|) number of ifaces of the P2P type. * * @return iface HIDL interface object representing the iface if * successful, null otherwise. */ createP2pIface() generates (IWifiP2pIface iface); /** * List all the P2P iface names configured on the chip. * The corresponding |IWifiP2pIface| object for any iface are * retrieved using |getP2pIface| method. * * @return ifnames List of all P2P iface names on the chip. */ getP2pIfaceNames() generates (vec<string> ifnames); /** * Gets a HIDL interface object for the P2P Iface corresponding * to the provided ifname. * * @param ifname Name of the iface. * @return iface HIDL interface object representing the iface if * it exists, null otherwise. */ getP2pIface(string ifname) generates (IWifiP2pIface iface); /** * Create an STA iface on the chip. * * Depending on the mode the chip is configured in, the interface creation * may fail if we've already reached the maximum allowed * (specified in |ChipIfaceCombination|) number of ifaces of the STA type. * * @return iface HIDL interface object representing the iface if * successful, null otherwise. */ createStaIface() generates (IWifiStaIface iface); /** * List all the STA iface names configured on the chip. * The corresponding |IWifiStaIface| object for any iface are * retrieved using |getStaIface| method. * * @return ifnames List of all STA iface names on the chip. */ getStaIfaceNames() generates (vec<string> ifnames); /** * Gets a HIDL interface object for the STA Iface corresponding * to the provided ifname. * * @param ifname Name of the iface. * @return iface HIDL interface object representing the iface if * it exists, null otherwise. */ getStaIface(string ifname) generates (IWifiStaIface iface); }; Loading
wifi/1.0/Android.bp +40 −0 Original line number Diff line number Diff line Loading @@ -7,16 +7,26 @@ genrule { srcs: [ "types.hal", "IWifi.hal", "IWifiApIface.hal", "IWifiChip.hal", "IWifiChipEventCallback.hal", "IWifiEventCallback.hal", "IWifiIface.hal", "IWifiNanIface.hal", "IWifiP2pIface.hal", "IWifiStaIface.hal", ], out: [ "android/hardware/wifi/1.0/types.cpp", "android/hardware/wifi/1.0/WifiAll.cpp", "android/hardware/wifi/1.0/WifiApIfaceAll.cpp", "android/hardware/wifi/1.0/WifiChipAll.cpp", "android/hardware/wifi/1.0/WifiChipEventCallbackAll.cpp", "android/hardware/wifi/1.0/WifiEventCallbackAll.cpp", "android/hardware/wifi/1.0/WifiIfaceAll.cpp", "android/hardware/wifi/1.0/WifiNanIfaceAll.cpp", "android/hardware/wifi/1.0/WifiP2pIfaceAll.cpp", "android/hardware/wifi/1.0/WifiStaIfaceAll.cpp", ], } Loading @@ -27,9 +37,14 @@ genrule { srcs: [ "types.hal", "IWifi.hal", "IWifiApIface.hal", "IWifiChip.hal", "IWifiChipEventCallback.hal", "IWifiEventCallback.hal", "IWifiIface.hal", "IWifiNanIface.hal", "IWifiP2pIface.hal", "IWifiStaIface.hal", ], out: [ "android/hardware/wifi/1.0/types.h", Loading @@ -38,6 +53,11 @@ genrule { "android/hardware/wifi/1.0/BnWifi.h", "android/hardware/wifi/1.0/BpWifi.h", "android/hardware/wifi/1.0/BsWifi.h", "android/hardware/wifi/1.0/IWifiApIface.h", "android/hardware/wifi/1.0/IHwWifiApIface.h", "android/hardware/wifi/1.0/BnWifiApIface.h", "android/hardware/wifi/1.0/BpWifiApIface.h", "android/hardware/wifi/1.0/BsWifiApIface.h", "android/hardware/wifi/1.0/IWifiChip.h", "android/hardware/wifi/1.0/IHwWifiChip.h", "android/hardware/wifi/1.0/BnWifiChip.h", Loading @@ -53,6 +73,26 @@ genrule { "android/hardware/wifi/1.0/BnWifiEventCallback.h", "android/hardware/wifi/1.0/BpWifiEventCallback.h", "android/hardware/wifi/1.0/BsWifiEventCallback.h", "android/hardware/wifi/1.0/IWifiIface.h", "android/hardware/wifi/1.0/IHwWifiIface.h", "android/hardware/wifi/1.0/BnWifiIface.h", "android/hardware/wifi/1.0/BpWifiIface.h", "android/hardware/wifi/1.0/BsWifiIface.h", "android/hardware/wifi/1.0/IWifiNanIface.h", "android/hardware/wifi/1.0/IHwWifiNanIface.h", "android/hardware/wifi/1.0/BnWifiNanIface.h", "android/hardware/wifi/1.0/BpWifiNanIface.h", "android/hardware/wifi/1.0/BsWifiNanIface.h", "android/hardware/wifi/1.0/IWifiP2pIface.h", "android/hardware/wifi/1.0/IHwWifiP2pIface.h", "android/hardware/wifi/1.0/BnWifiP2pIface.h", "android/hardware/wifi/1.0/BpWifiP2pIface.h", "android/hardware/wifi/1.0/BsWifiP2pIface.h", "android/hardware/wifi/1.0/IWifiStaIface.h", "android/hardware/wifi/1.0/IHwWifiStaIface.h", "android/hardware/wifi/1.0/BnWifiStaIface.h", "android/hardware/wifi/1.0/BpWifiStaIface.h", "android/hardware/wifi/1.0/BsWifiStaIface.h", ], } Loading
wifi/1.0/Android.mk +244 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,23 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build types.hal (IfaceType) # GEN := $(intermediates)/android/hardware/wifi/1.0/IfaceType.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.IfaceType $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifi.hal # Loading @@ -57,6 +74,8 @@ $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiChip.hal $(GEN): $(LOCAL_PATH)/IWifiChip.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiEventCallback.hal $(GEN): $(LOCAL_PATH)/IWifiEventCallback.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) \ Loading @@ -67,6 +86,25 @@ $(GEN): $(LOCAL_PATH)/IWifi.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiApIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiApIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiApIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiApIface $(GEN): $(LOCAL_PATH)/IWifiApIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiChip.hal # Loading @@ -74,8 +112,16 @@ GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiChip.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiChip.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiApIface.hal $(GEN): $(LOCAL_PATH)/IWifiApIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiChipEventCallback.hal $(GEN): $(LOCAL_PATH)/IWifiChipEventCallback.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal $(GEN): $(LOCAL_PATH)/types.hal $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) Loading Loading @@ -125,6 +171,82 @@ $(GEN): PRIVATE_CUSTOM_TOOL = \ $(GEN): $(LOCAL_PATH)/IWifiEventCallback.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiIface.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::IWifiIface $(GEN): $(LOCAL_PATH)/IWifiIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiNanIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiNanIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiNanIface $(GEN): $(LOCAL_PATH)/IWifiNanIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiP2pIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiP2pIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiP2pIface $(GEN): $(LOCAL_PATH)/IWifiP2pIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiStaIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiStaIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiStaIface $(GEN): $(LOCAL_PATH)/IWifiStaIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) include $(BUILD_JAVA_LIBRARY) Loading Loading @@ -172,6 +294,23 @@ $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build types.hal (IfaceType) # GEN := $(intermediates)/android/hardware/wifi/1.0/IfaceType.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.IfaceType $(GEN): $(LOCAL_PATH)/types.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifi.hal # Loading @@ -183,6 +322,8 @@ $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiChip.hal $(GEN): $(LOCAL_PATH)/IWifiChip.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiEventCallback.hal $(GEN): $(LOCAL_PATH)/IWifiEventCallback.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) \ Loading @@ -193,6 +334,25 @@ $(GEN): $(LOCAL_PATH)/IWifi.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiApIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiApIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiApIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiApIface $(GEN): $(LOCAL_PATH)/IWifiApIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiChip.hal # Loading @@ -200,8 +360,16 @@ GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiChip.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiChip.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiApIface.hal $(GEN): $(LOCAL_PATH)/IWifiApIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiChipEventCallback.hal $(GEN): $(LOCAL_PATH)/IWifiChipEventCallback.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal $(GEN): $(LOCAL_PATH)/types.hal $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates) Loading Loading @@ -251,6 +419,82 @@ $(GEN): PRIVATE_CUSTOM_TOOL = \ $(GEN): $(LOCAL_PATH)/IWifiEventCallback.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiIface.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::IWifiIface $(GEN): $(LOCAL_PATH)/IWifiIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiNanIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiNanIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiNanIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiNanIface $(GEN): $(LOCAL_PATH)/IWifiNanIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiP2pIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiP2pIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiP2pIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiP2pIface $(GEN): $(LOCAL_PATH)/IWifiP2pIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) # # Build IWifiStaIface.hal # GEN := $(intermediates)/android/hardware/wifi/1.0/IWifiStaIface.java $(GEN): $(HIDL) $(GEN): PRIVATE_HIDL := $(HIDL) $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IWifiStaIface.hal $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IWifiIface.hal $(GEN): $(LOCAL_PATH)/IWifiIface.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::IWifiStaIface $(GEN): $(LOCAL_PATH)/IWifiStaIface.hal $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) include $(BUILD_STATIC_JAVA_LIBRARY) Loading
wifi/1.0/IWifi.hal +15 −3 Original line number Diff line number Diff line Loading @@ -70,10 +70,22 @@ interface IWifi { @callflow(next={"registerEventCallback", "start", "stop"}) oneway stop(); // TODO(b/30570663) return vec<IWifiChip> instead /** * Get the configurable chip on the device. * Retrieve the list of all chip Id's on the device. * The corresponding |IWifiChip| object for any chip can be * retrieved using |getChip| method. * * @return chipIds List of all chip Id's on the device. */ @callflow(next={"*"}) getChipIds() generates (vec<ChipId> chipIds); /** * Gets a HIDL interface object for the chip corresponding to the * provided chipId. * * @return chip HIDL interface object representing the chip. */ @callflow(next={"*"}) getChip() generates (IWifiChip chip); getChip(ChipId chipId) generates (IWifiChip chip); };
wifi/1.0/IWifiApIface.hal 0 → 100644 +26 −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.0; import IWifiIface; /** * Interface used to represent a single AP iface. */ interface IWifiApIface extends IWifiIface { /** TODO(rpius): Add methods to the interface. */ };
wifi/1.0/IWifiChip.hal +135 −9 Original line number Diff line number Diff line Loading @@ -17,6 +17,10 @@ package android.hardware.wifi@1.0; import IWifiChipEventCallback; import IWifiApIface; import IWifiNanIface; import IWifiP2pIface; import IWifiStaIface; /** * Interface that represents a chip that must be configured as a single unit. Loading @@ -24,15 +28,6 @@ import IWifiChipEventCallback; * to perform operations like NAN, RTT, etc. */ interface IWifiChip { enum IfaceType : uint32_t { STA, AP, P2P, /** * NAN control interface. Datapath support may be queried and created * through this interface. */ NAN, }; /** * Set of interface types with the maximum number of interfaces that can have * one of the specified type for a given ChipIfaceCombination. See Loading Loading @@ -121,6 +116,13 @@ interface IWifiChip { vec<ChipIfaceCombination> availableCombinations; }; /** * Get the id assigned to this chip. * * @return id Assigned chip Id. */ getId() generates (ChipId id); /** * Requests notifications of significant events on this chip. Multiple calls * to this will register multiple callbacks each of which will receive all Loading Loading @@ -176,4 +178,128 @@ interface IWifiChip { * success, or |IWifiChipEventCallback.onFirmwareDebugDumpFailure| on failure. */ oneway requestFirmwareDebugDump(); /** * Create an AP iface on the chip. * * Depending on the mode the chip is configured in, the interface creation * may fail if we've already reached the maximum allowed * (specified in |ChipIfaceCombination|) number of ifaces of the AP type. * * @return iface HIDL interface object representing the iface if * successful, null otherwise. */ createApIface() generates (IWifiApIface iface); /** * List all the AP iface names configured on the chip. * The corresponding |IWifiApIface| object for any iface are * retrieved using |getApIface| method. * * @return ifnames List of all AP iface names on the chip. */ getApIfaceNames() generates (vec<string> ifnames); /** * Gets a HIDL interface object for the AP Iface corresponding * to the provided ifname. * * @param ifname Name of the iface. * @return iface HIDL interface object representing the iface if * it exists, null otherwise. */ getApIface(string ifname) generates (IWifiApIface iface); /** * Create a NAN iface on the chip. * * Depending on the mode the chip is configured in, the interface creation * may fail if we've already reached the maximum allowed * (specified in |ChipIfaceCombination|) number of ifaces of the NAN type. * * @return iface HIDL interface object representing the iface if * successful, null otherwise. */ createNanIface() generates (IWifiNanIface iface); /** * List all the NAN iface names configured on the chip. * The corresponding |IWifiNanIface| object for any iface are * retrieved using |getNanIface| method. * * @return ifnames List of all NAN iface names on the chip. */ getNanIfaceNames() generates (vec<string> ifnames); /** * Gets a HIDL interface object for the NAN Iface corresponding * to the provided ifname. * * @param ifname Name of the iface. * @return iface HIDL interface object representing the iface if * it exists, null otherwise. */ getNanIface(string ifname) generates (IWifiNanIface iface); /** * Create a P2P iface on the chip. * * Depending on the mode the chip is configured in, the interface creation * may fail if we've already reached the maximum allowed * (specified in |ChipIfaceCombination|) number of ifaces of the P2P type. * * @return iface HIDL interface object representing the iface if * successful, null otherwise. */ createP2pIface() generates (IWifiP2pIface iface); /** * List all the P2P iface names configured on the chip. * The corresponding |IWifiP2pIface| object for any iface are * retrieved using |getP2pIface| method. * * @return ifnames List of all P2P iface names on the chip. */ getP2pIfaceNames() generates (vec<string> ifnames); /** * Gets a HIDL interface object for the P2P Iface corresponding * to the provided ifname. * * @param ifname Name of the iface. * @return iface HIDL interface object representing the iface if * it exists, null otherwise. */ getP2pIface(string ifname) generates (IWifiP2pIface iface); /** * Create an STA iface on the chip. * * Depending on the mode the chip is configured in, the interface creation * may fail if we've already reached the maximum allowed * (specified in |ChipIfaceCombination|) number of ifaces of the STA type. * * @return iface HIDL interface object representing the iface if * successful, null otherwise. */ createStaIface() generates (IWifiStaIface iface); /** * List all the STA iface names configured on the chip. * The corresponding |IWifiStaIface| object for any iface are * retrieved using |getStaIface| method. * * @return ifnames List of all STA iface names on the chip. */ getStaIfaceNames() generates (vec<string> ifnames); /** * Gets a HIDL interface object for the STA Iface corresponding * to the provided ifname. * * @param ifname Name of the iface. * @return iface HIDL interface object representing the iface if * it exists, null otherwise. */ getStaIface(string ifname) generates (IWifiStaIface iface); };