IWifiChip.hal revision adcfba4b09b6d708cafe8d8e0cc35ed8888cde9c
15443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills/*
25443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Copyright 2016 The Android Open Source Project
35443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills *
45443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Licensed under the Apache License, Version 2.0 (the "License");
55443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * you may not use this file except in compliance with the License.
65443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * You may obtain a copy of the License at
75443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills *
85443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills *      http://www.apache.org/licenses/LICENSE-2.0
95443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills *
105443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Unless required by applicable law or agreed to in writing, software
115443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * distributed under the License is distributed on an "AS IS" BASIS,
125443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
135443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * See the License for the specific language governing permissions and
145443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * limitations under the License.
155443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */
165443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
175443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Willspackage android.hardware.wifi@1.0;
185443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
195443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Willsimport IWifiChipEventCallback;
20adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiApIface;
21adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiNanIface;
22adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiP2pIface;
23adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiStaIface;
245443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
255443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills/**
265443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Interface that represents a chip that must be configured as a single unit.
275443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * The HAL/driver/firmware will be responsible for determining which phy is used
285443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * to perform operations like NAN, RTT, etc.
295443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */
305443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Willsinterface IWifiChip {
315443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
325443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Set of interface types with the maximum number of interfaces that can have
33271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius   * one of the specified type for a given ChipIfaceCombination. See
34271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius   * ChipIfaceCombination for examples.
355443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
36271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius  struct ChipIfaceCombinationLimit {
37271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius    vec<IfaceType> types; // Each IfaceType may occur at most once
385443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills    uint32_t maxIfaces;
395443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  };
405443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
415443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
425443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Set of interfaces that can operate concurrently when in a given mode. See
435443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * ChipMode below.
445443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
455443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * For example:
465443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *   [{STA} <= 2]
475443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       At most two STA interfaces are supported
485443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       [], [STA], [STA+STA]
495443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
505443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *   [{STA} <= 1, {NAN} <= 1, {AP} <= 1]
515443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       Any combination of STA, NAN, AP
525443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       [], [STA], [NAN], [AP], [STA+NAN], [STA+AP], [NAN+AP], [STA+NAN+AP]
535443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
545443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *   [{STA} <= 1, {NAN,P2P} <= 1]
555443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       Optionally a STA and either NAN or P2P
565443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       [], [STA], [STA+NAN], [STA+P2P], [NAN], [P2P]
575443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       Not included [NAN+P2P], [STA+NAN+P2P]
585443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
595443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *   [{STA} <= 1, {STA,NAN} <= 1]
605443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       Optionally a STA and either a second STA or a NAN
615443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       [], [STA], [STA+NAN], [STA+STA], [NAN]
625443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       Not included [STA+STA+NAN]
635443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
64271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius  struct ChipIfaceCombination {
65271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius    vec<ChipIfaceCombinationLimit> limits;
665443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  };
675443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
685443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
695443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * A mode that the chip can be put in. A mode defines a set of constraints on
705443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * the interfaces that can exist while in that mode. Modes define a unit of
715443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * configuration where all interfaces must be torn down to switch to a
725443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * different mode. Some HALs may only have a single mode, but an example where
735443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * multiple modes would be required is if a chip has different firmwares with
745443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * different capabilities.
755443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
765443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * When in a mode, it must be possible to perform any combination of creating
775443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * and removing interfaces as long as at least one of the
78271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius   * ChipIfaceCombinations is satisfied. This means that if a chip has two
795443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * available combinations, [{STA} <= 1] and [{AP} <= 1] then it is expected
805443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * that exactly one STA interface or one AP interface can be created, but it
815443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * is not expected that both a STA and AP interface could be created. If it
825443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * was then there would be a single available combination
835443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * [{STA} <=1, {AP} <= 1].
845443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
855443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * When switching between two available combinations it is expected that
865443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * interfaces only supported by the initial combination will be removed until
875443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * the target combination is also satisfied. At that point new interfaces
885443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * satisfying only the target combination can be added (meaning the initial
895443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * combination limits will no longer satisfied). The addition of these new
905443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * interfaces should not impact the existence of interfaces that satisfy both
915443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * combinations.
925443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
935443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * For example, a chip with available combinations:
945443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *     [{STA} <= 2, {NAN} <=1] and [{STA} <=1, {NAN} <= 1, {AP} <= 1}]
955443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * If the chip currently has 3 interfaces STA, STA and NAN and wants to add an
965443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * AP interface in place of one of the STAs then first one of the STA
975443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * interfaces must be removed and then the AP interface can be created after
985443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * the STA had been torn down. During this process the remaining STA and NAN
995443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * interfaces should not be removed/recreated.
1005443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
1015443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * If a chip does not support this kind of reconfiguration in this mode then
1025443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * the combinations should be separated into two separate modes. Before
1035443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * switching modes all interfaces will be torn down, the mode switch will be
1045443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * enacted and when it completes the new interfaces will be brought up.
1055443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
1065443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  struct ChipMode {
1075443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills    /**
1085443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills     * Id that can be used to put the chip in this mode.
1095443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills     */
1105443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills    ChipModeId id;
1115443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1125443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills    /**
1135443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills     * A list of the possible interface combinations that the chip can have
1145443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills     * while in this mode.
1155443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills     */
116271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius    vec<ChipIfaceCombination> availableCombinations;
1175443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  };
1185443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1195443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
120adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Get the id assigned to this chip.
121adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
122adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return id Assigned chip Id.
123adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
124adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  getId() generates (ChipId id);
125adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
126adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
1275443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Requests notifications of significant events on this chip. Multiple calls
1285443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * to this will register multiple callbacks each of which will receive all
1295443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * events.
1306f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *
1316f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * @param callback An instance of the |IWifiChipEventCallback| HIDL interface
1326f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *        object.
1335443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
1345443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  oneway registerEventCallback(IWifiChipEventCallback callback);
1355443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1365443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
1375443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Get the set of operation modes that the chip supports.
1386f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *
1396f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * @return modes List of modes supported by the device.
1405443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
1415443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  getAvailableModes() generates (vec<ChipMode> modes);
1425443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1435443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
1446f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Reconfigure the Chip.
1456f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Must trigger |IWifiChipEventCallback.onChipReconfigured| on sucess,
1466f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * or |IWifiChipEventCallback.onChipReconfigureFailure| on failure.
1475443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
1485443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * @param modeId The mode that the chip should switch to, corresponding to the
1496f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *        id property of the target ChipMode.
1505443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
1515443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  oneway configureChip(ChipModeId modeId);
1525443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1535443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
1545443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Get the current mode that the chip is in.
1556f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *
1566f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * @return modeId The mode that the chip is currently configured to,
1576f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *         corresponding to the id property of the target ChipMode.
1585443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
1595443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  getMode() generates (ChipModeId modeId);
1605443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1615443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
1626f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Request information about the chip.
1636f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Must trigger |IWifiChipEventCallback.onChipDebugInfoAvailable| on sucess,
1646f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * or |IWifiChipEventCallback.onChipDebugInfoFailure| on failure.
1655443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
1665443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  oneway requestChipDebugInfo();
1675443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1685443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
1696f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Request vendor debug info from the driver.
1706f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Must trigger |IWifiChipEventCallback.onDriverDebugDumpAvailable| on success,
1716f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * or |IWifiChipEventCallback.onDriverDebugDumpFailure| on failure.
1725443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
1735443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  oneway requestDriverDebugDump();
1745443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1755443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
1766f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Request vendor debug info from the firmware.
1776f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Must trigger |IWifiChipEventCallback.onFirmwareDebugDumpAvailable| on
1786f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * success, or |IWifiChipEventCallback.onFirmwareDebugDumpFailure| on failure.
1795443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
1805443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  oneway requestFirmwareDebugDump();
181adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
182adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
183adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create an AP iface on the chip.
184adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
185adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
186adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * may fail if we've already reached the maximum allowed
187adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * (specified in |ChipIfaceCombination|) number of ifaces of the AP type.
188adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
189adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
190adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
191adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
192adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  createApIface() generates (IWifiApIface iface);
193adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
194adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
195adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the AP iface names configured on the chip.
196adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiApIface| object for any iface are
197adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getApIface| method.
198adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
199adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all AP iface names on the chip.
200adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
201adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  getApIfaceNames() generates (vec<string> ifnames);
202adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
203adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
204adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the AP Iface corresponding
205adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
206adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
207adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
208adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
209adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
210adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
211adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  getApIface(string ifname) generates (IWifiApIface iface);
212adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
213adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
214adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create a NAN iface on the chip.
215adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
216adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
217adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * may fail if we've already reached the maximum allowed
218adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * (specified in |ChipIfaceCombination|) number of ifaces of the NAN type.
219adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
220adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
221adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
222adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
223adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  createNanIface() generates (IWifiNanIface iface);
224adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
225adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
226adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the NAN iface names configured on the chip.
227adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiNanIface| object for any iface are
228adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getNanIface| method.
229adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
230adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all NAN iface names on the chip.
231adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
232adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  getNanIfaceNames() generates (vec<string> ifnames);
233adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
234adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
235adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the NAN Iface corresponding
236adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
237adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
238adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
239adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
240adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
241adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
242adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  getNanIface(string ifname) generates (IWifiNanIface iface);
243adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
244adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
245adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create a P2P iface on the chip.
246adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
247adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
248adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * may fail if we've already reached the maximum allowed
249adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * (specified in |ChipIfaceCombination|) number of ifaces of the P2P type.
250adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
251adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
252adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
253adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
254adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  createP2pIface() generates (IWifiP2pIface iface);
255adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
256adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
257adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the P2P iface names configured on the chip.
258adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiP2pIface| object for any iface are
259adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getP2pIface| method.
260adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
261adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all P2P iface names on the chip.
262adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
263adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  getP2pIfaceNames() generates (vec<string> ifnames);
264adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
265adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
266adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the P2P Iface corresponding
267adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
268adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
269adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
270adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
271adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
272adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
273adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  getP2pIface(string ifname) generates (IWifiP2pIface iface);
274adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
275adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
276adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create an STA iface on the chip.
277adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
278adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
279adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * may fail if we've already reached the maximum allowed
280adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * (specified in |ChipIfaceCombination|) number of ifaces of the STA type.
281adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
282adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
283adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
284adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
285adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  createStaIface() generates (IWifiStaIface iface);
286adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
287adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
288adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the STA iface names configured on the chip.
289adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiStaIface| object for any iface are
290adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getStaIface| method.
291adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
292adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all STA iface names on the chip.
293adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
294adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  getStaIfaceNames() generates (vec<string> ifnames);
295adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
296adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
297adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the STA Iface corresponding
298adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
299adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
300adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
301adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
302adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
303adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
304adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  getStaIface(string ifname) generates (IWifiStaIface iface);
3055443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills};
306