IWifiChip.hal revision fe9ad36cb272d346b42e54d51ff8aa089554f9e7
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;
20fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Piusimport IWifiIface;
21adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiApIface;
22adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiNanIface;
23adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiP2pIface;
24adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Piusimport IWifiStaIface;
25fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Piusimport IWifiRttController;
265443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
275443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills/**
285443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * Interface that represents a chip that must be configured as a single unit.
295443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * The HAL/driver/firmware will be responsible for determining which phy is used
305443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills * to perform operations like NAN, RTT, etc.
315443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills */
325443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Willsinterface IWifiChip {
335443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
345443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Set of interface types with the maximum number of interfaces that can have
35271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius   * one of the specified type for a given ChipIfaceCombination. See
36271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius   * ChipIfaceCombination for examples.
375443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
38271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius  struct ChipIfaceCombinationLimit {
397b77747bb565f50ced457ad931e8d0206385d3a1Roshan Pius    vec<IfaceType> types; // Each IfaceType must occur at most once.
405443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills    uint32_t maxIfaces;
415443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  };
425443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
435443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
445443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Set of interfaces that can operate concurrently when in a given mode. See
455443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * ChipMode below.
465443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
475443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * For example:
485443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *   [{STA} <= 2]
495443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       At most two STA interfaces are supported
505443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       [], [STA], [STA+STA]
515443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
525443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *   [{STA} <= 1, {NAN} <= 1, {AP} <= 1]
535443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       Any combination of STA, NAN, AP
545443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       [], [STA], [NAN], [AP], [STA+NAN], [STA+AP], [NAN+AP], [STA+NAN+AP]
555443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
565443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *   [{STA} <= 1, {NAN,P2P} <= 1]
575443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       Optionally a STA and either NAN or P2P
585443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       [], [STA], [STA+NAN], [STA+P2P], [NAN], [P2P]
595443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       Not included [NAN+P2P], [STA+NAN+P2P]
605443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
615443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *   [{STA} <= 1, {STA,NAN} <= 1]
625443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       Optionally a STA and either a second STA or a NAN
635443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       [], [STA], [STA+NAN], [STA+STA], [NAN]
645443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *       Not included [STA+STA+NAN]
655443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
66271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius  struct ChipIfaceCombination {
67271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius    vec<ChipIfaceCombinationLimit> limits;
685443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  };
695443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
705443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
715443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * A mode that the chip can be put in. A mode defines a set of constraints on
725443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * the interfaces that can exist while in that mode. Modes define a unit of
735443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * configuration where all interfaces must be torn down to switch to a
745443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * different mode. Some HALs may only have a single mode, but an example where
755443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * multiple modes would be required is if a chip has different firmwares with
765443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * different capabilities.
775443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
785443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * When in a mode, it must be possible to perform any combination of creating
795443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * and removing interfaces as long as at least one of the
80271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius   * ChipIfaceCombinations is satisfied. This means that if a chip has two
815443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * available combinations, [{STA} <= 1] and [{AP} <= 1] then it is expected
825443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * that exactly one STA interface or one AP interface can be created, but it
835443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * is not expected that both a STA and AP interface could be created. If it
845443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * was then there would be a single available combination
855443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * [{STA} <=1, {AP} <= 1].
865443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
875443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * When switching between two available combinations it is expected that
88e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * interfaces only supported by the initial combination must be removed until
895443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * the target combination is also satisfied. At that point new interfaces
905443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * satisfying only the target combination can be added (meaning the initial
915443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * combination limits will no longer satisfied). The addition of these new
927b77747bb565f50ced457ad931e8d0206385d3a1Roshan Pius   * interfaces must not impact the existence of interfaces that satisfy both
935443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * combinations.
945443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
955443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * For example, a chip with available combinations:
965443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *     [{STA} <= 2, {NAN} <=1] and [{STA} <=1, {NAN} <= 1, {AP} <= 1}]
975443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * If the chip currently has 3 interfaces STA, STA and NAN and wants to add an
985443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * AP interface in place of one of the STAs then first one of the STA
995443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * interfaces must be removed and then the AP interface can be created after
1005443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * the STA had been torn down. During this process the remaining STA and NAN
1017b77747bb565f50ced457ad931e8d0206385d3a1Roshan Pius   * interfaces must not be removed/recreated.
1025443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
1035443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * If a chip does not support this kind of reconfiguration in this mode then
1047b77747bb565f50ced457ad931e8d0206385d3a1Roshan Pius   * the combinations must be separated into two separate modes. Before
105e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * switching modes all interfaces must be torn down, the mode switch must be
106e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * enacted and when it completes the new interfaces must be brought up.
1075443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
1085443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  struct ChipMode {
1095443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills    /**
1105443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills     * Id that can be used to put the chip in this mode.
1115443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills     */
1125443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills    ChipModeId id;
1135443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1145443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills    /**
1155443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills     * A list of the possible interface combinations that the chip can have
1165443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills     * while in this mode.
1175443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills     */
118271f2c2d9ca5760a1cdd591bf426127077f6c683Roshan Pius    vec<ChipIfaceCombination> availableCombinations;
1195443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  };
1205443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1215443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
122a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * Information about the version of the driver and firmware running this chip.
123a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *
124a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * The information in these ASCII strings are vendor specific and does not
125a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * need to follow any particular format. It may be dumped as part of the bug
126a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * report.
127a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   */
128a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  struct ChipDebugInfo {
129a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius    string driverDescription;
130a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius    string firmwareDescription;
131a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  };
132a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius
133a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  /**
134fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   * Capabilities exposed by this chip.
135fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   */
136fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius  enum ChipCapabilityMask : uint32_t {
137fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    /**
138fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * Memory dump of Firmware.
139fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     */
140fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    DEBUG_MEMORY_FIRMWARE_DUMP_SUPPORTED = 1 << 0,
141fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    /**
142fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * Memory dump of Driver.
143fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     */
144fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    DEBUG_MEMORY_DRIVER_DUMP_SUPPORTED = 1 << 1,
145fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    /**
146fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * Connectivity events reported via debug ring buffer.
147fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     */
148fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    DEBUG_RING_BUFFER_CONNECT_EVENT_SUPPORTED = 1 << 2,
149fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    /**
150fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * Power events reported via debug ring buffer.
151fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     */
152fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    DEBUG_RING_BUFFER_POWER_EVENT_SUPPORTED = 1 << 3,
153fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    /**
154fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * Wakelock events reported via debug ring buffer.
155fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     */
156fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    DEBUG_RING_BUFFER_WAKELOCK_EVENT_SUPPORTED = 1 << 4,
157fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    /**
158fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * Vendor data reported via debug ring buffer.
159fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * This mostly contains firmware event logs.
160fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     */
161fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    DEBUG_RING_BUFFER_VENDOR_DATA_SUPPORTED = 1 << 5,
162fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius  };
163fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius
164fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius  /**
165adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Get the id assigned to this chip.
166adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
167a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
1681f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
169a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
170a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
171adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return id Assigned chip Id.
172adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
173a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getId() generates (WifiStatus status, ChipId id);
174adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
175adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
1765443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Requests notifications of significant events on this chip. Multiple calls
177e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * to this must register multiple callbacks each of which must receive all
1785443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * events.
1796f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *
1806f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * @param callback An instance of the |IWifiChipEventCallback| HIDL interface
1816f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *        object.
182a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
1831f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
184a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
185a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
1865443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
187a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  registerEventCallback(IWifiChipEventCallback callback) generates (WifiStatus status);
1885443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1895443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
190fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   * Get the capabilities supported by this chip.
191fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *
192fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   * @return status WifiStatus of the operation.
193fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         Possible status codes:
194fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.SUCCESS|,
195fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
196fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
197fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_UNKNOWN|
198fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   * @return capabilities Bitset of |ChipCapabilityMask| values.
199fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   */
200fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius  getCapabilities() generates (WifiStatus status, uint32_t capabilities);
201fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius
202fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius  /**
2035443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Get the set of operation modes that the chip supports.
2046f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *
205a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2061f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
207a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
208a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
2096f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * @return modes List of modes supported by the device.
2105443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
211a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getAvailableModes() generates (WifiStatus status, vec<ChipMode> modes);
2125443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
2135443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
2146f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Reconfigure the Chip.
215a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * Any existing |IWifiIface| objects must be marked invalid after this call.
216a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * If this fails then the chips is now in an undefined state and
217a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * configureChip must be called again.
218a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * Must trigger |IWifiChipEventCallback.onChipReconfigured| on success.
219a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * Must trigger |IWifiEventCallback.onFailure| on failure.
2205443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
22118680b7affe027388c0d299d9222c37c2833dda2Roshan Pius   * @param modeId The mode that the chip must switch to, corresponding to the
2226f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *        id property of the target ChipMode.
223a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2241f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
225a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
226a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
227a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
228a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_UNKNOWN|
2295443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
230a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  configureChip(ChipModeId modeId) generates (WifiStatus status);
2315443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
2325443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
2335443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Get the current mode that the chip is in.
2346f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *
2356f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * @return modeId The mode that the chip is currently configured to,
2366f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *         corresponding to the id property of the target ChipMode.
237a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2381f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
239a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
240a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
2415443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
242a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getMode() generates (WifiStatus status, ChipModeId modeId);
2435443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
2445443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
2456f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Request information about the chip.
2461f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *
247a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2481f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
249a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
250a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
251a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
252a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_UNKNOWN|
253a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return chipDebugInfo Instance of |ChipDebugInfo|.
2545443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
255a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  requestChipDebugInfo() generates (WifiStatus status, ChipDebugInfo chipDebugInfo);
2565443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
2575443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
2586f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Request vendor debug info from the driver.
2591f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *
260a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2611f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
262a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
263a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
264a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
265a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_UNKNOWN|
266a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @param blob Vector of bytes retrieved from the driver.
2675443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
268a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  requestDriverDebugDump() generates (WifiStatus status, vec<uint8_t> blob);
2695443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
2705443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
2716f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Request vendor debug info from the firmware.
2721f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *
273a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2741f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
275a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
276a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
277a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
278a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_UNKNOWN|
279a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @param blob Vector of bytes retrieved from the driver.
2805443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
281a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  requestFirmwareDebugDump() generates (WifiStatus status, vec<uint8_t> blob);
282adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
283adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
284adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create an AP iface on the chip.
285adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
286adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
287a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
288a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * allowed (specified in |ChipIfaceCombination|) number of ifaces of the AP
289a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * type.
290adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
291a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2921f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
293a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
294a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
295a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|
296adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
297adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
298adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
299a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  createApIface() generates (WifiStatus status, IWifiApIface iface);
300adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
301adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
302adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the AP iface names configured on the chip.
303adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiApIface| object for any iface are
304adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getApIface| method.
305adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
306a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3071f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
308a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
309a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
310adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all AP iface names on the chip.
311adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
312a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getApIfaceNames() generates (WifiStatus status, vec<string> ifnames);
313adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
314adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
315adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the AP Iface corresponding
316adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
317adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
318adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
319a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3201f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
321a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
322a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
323adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
324adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
325adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
326a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getApIface(string ifname) generates (WifiStatus status, IWifiApIface iface);
327adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
328adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
329adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create a NAN iface on the chip.
330adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
331adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
332a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
333a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * allowed (specified in |ChipIfaceCombination|) number of ifaces of the NAN
334a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * type.
335adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
336a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3371f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
338a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
339a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
340a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|
341adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
342adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
343adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
344a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  createNanIface() generates (WifiStatus status, IWifiNanIface iface);
345adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
346adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
347adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the NAN iface names configured on the chip.
348adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiNanIface| object for any iface are
349adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getNanIface| method.
350adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
351a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3521f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
353a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
354a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
355adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all NAN iface names on the chip.
356adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
357a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getNanIfaceNames() generates (WifiStatus status, vec<string> ifnames);
358adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
359adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
360adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the NAN Iface corresponding
361adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
362adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
363adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
364a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3651f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
366a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
367a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
368adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
369adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
370adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
371a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getNanIface(string ifname) generates (WifiStatus status, IWifiNanIface iface);
372adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
373adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
374adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create a P2P iface on the chip.
375adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
376adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
377a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
378a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * allowed (specified in |ChipIfaceCombination|) number of ifaces of the P2P
379a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * type.
380adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
381a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3821f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
383a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
384a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
385a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|
386adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
387adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
388adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
389a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  createP2pIface() generates (WifiStatus status, IWifiP2pIface iface);
390adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
391adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
392adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the P2P iface names configured on the chip.
393adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiP2pIface| object for any iface are
394adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getP2pIface| method.
395adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
396a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3971f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
398a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
399a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
400adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all P2P iface names on the chip.
401adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
402a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getP2pIfaceNames() generates (WifiStatus status, vec<string> ifnames);
403adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
404adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
405adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the P2P Iface corresponding
406adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
407adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
408adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
409a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
4101f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
411a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
412a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
413adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
414adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
415adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
416a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getP2pIface(string ifname) generates (WifiStatus status, IWifiP2pIface iface);
417adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
418adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
419adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create an STA iface on the chip.
420adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
421adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
422a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
423a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * allowed (specified in |ChipIfaceCombination|) number of ifaces of the STA
424a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * type.
425adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
426a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
4271f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
428a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
429a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
430a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|
431adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
432adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
433adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
434a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  createStaIface() generates (WifiStatus status, IWifiStaIface iface);
435adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
436adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
437adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the STA iface names configured on the chip.
438adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiStaIface| object for any iface are
439adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getStaIface| method.
440adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
441a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
4421f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
443a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
444a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
445adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all STA iface names on the chip.
446adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
447a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getStaIfaceNames() generates (WifiStatus status, vec<string> ifnames);
448adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
449adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
450adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the STA Iface corresponding
451adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
452adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
453adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
454a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
4551f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
456a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
457a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
458adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
459adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
460adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
461a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getStaIface(string ifname) generates (WifiStatus status, IWifiStaIface iface);
462fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius
463fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius  /**
464fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * Create a RTTController instance.
465fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   *
466fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * RTT controller can be either:
467fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * a) Bound to a specific iface by passing in the corresponding |IWifiIface|
468fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * object in |iface| param, OR
469fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * b) Let the implementation decide the iface to use for RTT operations by
470fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * passing null in |iface| param.
471fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   *
472fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * @param boundIface HIDL interface object representing the iface if
473fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   *        the responder must be bound to a specific iface, null otherwise.
474a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
4751f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
476a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
477a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
478fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   */
4791f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius  createRttController(IWifiIface boundIface)
480a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius      generates (WifiStatus status, IWifiRttController rtt);
481e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius
482e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  /**
483e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * WiFi debug ring buffer life cycle is as follow:
484e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * - At initialization time, framework must call |getDebugRingBuffersStatus|.
485e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   to obtain the names and list of supported ring buffers.
486e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   The driver may expose several different rings each holding a different
487e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   type of data (connection events, power events, etc).
488e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * - When WiFi operations start framework must call
489e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   |startLoggingToDebugRingBuffer| to trigger log collection for a specific
490e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   ring. The vebose level for each ring buffer can be specified in this API.
491e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * - During wifi operations, driver must periodically report per ring data to
492e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   framework by invoking the
493e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   |IWifiChipEventCallback.onDebugRingBuffer<Type>EntriesAvailable| callback.
494e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * - When capturing a bug report, framework must indicate to driver that all
495e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   the data has to be uploaded urgently by calling
496e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   |forceDumpToDebugRingBuffer|.
497e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *
498e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * The data uploaded by driver must be stored by framework in separate files,
499e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * with one stream of file per ring. Framework must store the files in pcapng
500e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * format, allowing for easy merging and parsing with network analyzer tools.
501e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * TODO: Since we're not longer dumping out the raw data, storing in separate
502e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * pcapng files for parsing later must not work anymore.
503e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   */
504e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  /**
505e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * API to get the status of all ring buffers supported by driver.
506e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *
507e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @return status WifiStatus of the operation.
508e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         Possible status codes:
509e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.SUCCESS|,
510e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
511fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
512e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.NOT_AVAILABLE|,
513e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.UNKNOWN|
514e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @return ringBuffers Vector of |WifiDebugRingBufferStatus| corresponding to the
515e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         status of each ring bufffer on the device.
516e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   */
517e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  getDebugRingBuffersStatus() generates (WifiStatus status,
518e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius                                         vec<WifiDebugRingBufferStatus> ringBuffers);
519e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius
520e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  /**
521e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * API to trigger the debug data collection.
522e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *
523e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @param ringName represent the name of the ring for which data collection
524e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *        shall start. This can be retrieved via the corresponding
525e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *        |WifiDebugRingBufferStatus|.
526e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @parm maxIntervalInSec Maximum interval in seconds for driver to invoke
527e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *       |onDebugRingBufferData|, ignore if zero.
528e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @parm minDataSizeInBytes: Minimum data size in buffer for driver to invoke
529e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *       |onDebugRingBufferData|, ignore if zero.
530e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @return status WifiStatus of the operation.
531e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         Possible status codes:
532e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.SUCCESS|,
533e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
534fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
535e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.NOT_AVAILABLE|,
536e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.UNKNOWN|
537e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   */
538e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  startLoggingToDebugRingBuffer(string ringName,
539e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius                                WifiDebugRingBufferVerboseLevel verboseLevel,
540e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius                                uint32_t maxIntervalInSec,
541e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius                                uint32_t minDataSizeInBytes)
542e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius      generates (WifiStatus status);
543e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius
544e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  /**
545e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * API to force dump data into the corresponding ring buffer.
546e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * This is to be invoked during bugreport collection.
547e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *
548e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @param ringName represent the name of the ring for which data collection
549e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *        shall be forced. This can be retrieved via the corresponding
550e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *        |WifiDebugRingBufferStatus|.
551e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @return status WifiStatus of the operation.
552e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         Possible status codes:
553e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.SUCCESS|,
554e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
555fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
556fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_NOT_STARTED|,
557e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.NOT_AVAILABLE|,
558e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.UNKNOWN|
559e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   */
560e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  forceDumpToDebugRingBuffer(string ringName) generates (WifiStatus status);
5615443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills};
562