IWifiChip.hal revision a2d369dd033541e77ca27df9bcfbbf9d7b3e701c
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     */
140a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius    DEBUG_MEMORY_FIRMWARE_DUMP = 1 << 0,
141fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    /**
142fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * Memory dump of Driver.
143fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     */
144a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius    DEBUG_MEMORY_DRIVER_DUMP = 1 << 1,
145fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    /**
146fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * Connectivity events reported via debug ring buffer.
147fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     */
148a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius    DEBUG_RING_BUFFER_CONNECT_EVENT = 1 << 2,
149fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    /**
150fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * Power events reported via debug ring buffer.
151fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     */
152a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius    DEBUG_RING_BUFFER_POWER_EVENT = 1 << 3,
153fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    /**
154fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * Wakelock events reported via debug ring buffer.
155fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     */
156a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius    DEBUG_RING_BUFFER_WAKELOCK_EVENT = 1 << 4,
157fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius    /**
158fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * Vendor data reported via debug ring buffer.
159fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     * This mostly contains firmware event logs.
160fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius     */
161a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius    DEBUG_RING_BUFFER_VENDOR_DATA = 1 << 5,
162e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius    /**
163e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius     * Host wake reasons stats collection.
164e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius     */
165e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius    DEBUG_HOST_WAKE_REASON_STATS = 1 << 6,
166203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius    /**
167203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius     * Error alerts.
168203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius     */
169203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius    DEBUG_ERROR_ALERTS = 1 << 7
170fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius  };
171fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius
172fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius  /**
173adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Get the id assigned to this chip.
174adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
175a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
1761f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
177a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
178a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
179adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return id Assigned chip Id.
180adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
181a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getId() generates (WifiStatus status, ChipId id);
182adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
183adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
1845443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Requests notifications of significant events on this chip. Multiple calls
185e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * to this must register multiple callbacks each of which must receive all
1865443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * events.
1876f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *
1886f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * @param callback An instance of the |IWifiChipEventCallback| HIDL interface
1896f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *        object.
190a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
1911f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
192a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
193a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
1945443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
195a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  registerEventCallback(IWifiChipEventCallback callback) generates (WifiStatus status);
1965443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
1975443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
198fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   * Get the capabilities supported by this chip.
199fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *
200fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   * @return status WifiStatus of the operation.
201fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         Possible status codes:
202fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.SUCCESS|,
203fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
204fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
205fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_UNKNOWN|
206fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   * @return capabilities Bitset of |ChipCapabilityMask| values.
207fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   */
208fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius  getCapabilities() generates (WifiStatus status, uint32_t capabilities);
209fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius
210fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius  /**
2115443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Get the set of operation modes that the chip supports.
2126f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *
213a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2141f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
215a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
216a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
2176f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * @return modes List of modes supported by the device.
2185443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
219a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getAvailableModes() generates (WifiStatus status, vec<ChipMode> modes);
2205443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
2215443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
2226f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Reconfigure the Chip.
223a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * Any existing |IWifiIface| objects must be marked invalid after this call.
224a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * If this fails then the chips is now in an undefined state and
225a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * configureChip must be called again.
226a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * Must trigger |IWifiChipEventCallback.onChipReconfigured| on success.
227a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * Must trigger |IWifiEventCallback.onFailure| on failure.
2285443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   *
22918680b7affe027388c0d299d9222c37c2833dda2Roshan Pius   * @param modeId The mode that the chip must switch to, corresponding to the
2306f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *        id property of the target ChipMode.
231a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2321f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
233a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
234a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
235a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
236a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_UNKNOWN|
2375443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
238a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  configureChip(ChipModeId modeId) generates (WifiStatus status);
2395443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
2405443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
2415443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   * Get the current mode that the chip is in.
2426f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *
2436f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * @return modeId The mode that the chip is currently configured to,
2446f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   *         corresponding to the id property of the target ChipMode.
245a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2461f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
247a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
248a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
2495443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
250a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getMode() generates (WifiStatus status, ChipModeId modeId);
2515443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
2525443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
2536f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Request information about the chip.
2541f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *
255a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2561f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
257a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
258a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
259a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
260a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_UNKNOWN|
261a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return chipDebugInfo Instance of |ChipDebugInfo|.
2625443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
263a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  requestChipDebugInfo() generates (WifiStatus status, ChipDebugInfo chipDebugInfo);
2645443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
2655443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
2666f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Request vendor debug info from the driver.
2671f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *
268a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2691f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
270a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
271a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
272a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
273a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_UNKNOWN|
274a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @param blob Vector of bytes retrieved from the driver.
2755443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
276a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  requestDriverDebugDump() generates (WifiStatus status, vec<uint8_t> blob);
2775443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills
2785443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills  /**
2796f31d92e59d25130ae67a29022f9255bd19029aeRoshan Pius   * Request vendor debug info from the firmware.
2801f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *
281a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
2821f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
283a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
284a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
285a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
286a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_UNKNOWN|
287a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @param blob Vector of bytes retrieved from the driver.
2885443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills   */
289a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  requestFirmwareDebugDump() generates (WifiStatus status, vec<uint8_t> blob);
290adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
291adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
292adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create an AP iface on the chip.
293adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
294adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
295a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius   * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
296a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * allowed (specified in |ChipIfaceCombination|) number of ifaces of the AP
297a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * type.
298adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
299a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3001f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
301a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
302a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
303a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|
304adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
305adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
306adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
307a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  createApIface() generates (WifiStatus status, IWifiApIface iface);
308adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
309adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
310adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the AP iface names configured on the chip.
311adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiApIface| object for any iface are
312adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getApIface| method.
313adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
314a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3151f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
316a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
317a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
318adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all AP iface names on the chip.
319adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
320a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getApIfaceNames() generates (WifiStatus status, vec<string> ifnames);
321adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
322adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
323adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the AP Iface corresponding
324adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
325adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
326adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
327a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3281f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
329a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
3308b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
3318b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_INVALID_ARGS|
332adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
333adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
334adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
335a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getApIface(string ifname) generates (WifiStatus status, IWifiApIface iface);
336adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
337adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
3388b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * Removes the AP Iface with the provided ifname.
3398b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * Any further calls on the corresponding |IWifiApIface| HIDL interface
3408b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * object must fail.
3418b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *
3428b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * @param ifname Name of the iface.
3438b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * @return status WifiStatus of the operation.
3448b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         Possible status codes:
3458b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.SUCCESS|,
3468b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
3478b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_INVALID_ARGS|
3488b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   */
3498b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius  removeApIface(string ifname) generates (WifiStatus status);
3508b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius
3518b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius  /**
352adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create a NAN iface on the chip.
353adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
354adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
355a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius   * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
356a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * allowed (specified in |ChipIfaceCombination|) number of ifaces of the NAN
357a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * type.
358adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
359a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3601f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
361a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
362a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
363a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|
364adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
365adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
366adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
367a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  createNanIface() generates (WifiStatus status, IWifiNanIface iface);
368adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
369adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
370adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the NAN iface names configured on the chip.
371adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiNanIface| object for any iface are
372adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getNanIface| method.
373adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
374a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3751f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
376a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
377a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
378adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all NAN iface names on the chip.
379adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
380a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getNanIfaceNames() generates (WifiStatus status, vec<string> ifnames);
381adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
382adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
383adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the NAN Iface corresponding
384adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
385adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
386adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
387a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
3881f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
389a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
3908b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
3918b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_INVALID_ARGS|
392adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
393adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
394adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
395a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getNanIface(string ifname) generates (WifiStatus status, IWifiNanIface iface);
396adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
397adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
3988b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * Removes the NAN Iface with the provided ifname.
3998b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * Any further calls on the corresponding |IWifiNanIface| HIDL interface
4008b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * object must fail.
4018b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *
4028b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * @param ifname Name of the iface.
4038b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * @return status WifiStatus of the operation.
4048b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         Possible status codes:
4058b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.SUCCESS|,
4068b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
4078b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_INVALID_ARGS|
4088b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   */
4098b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius  removeNanIface(string ifname) generates (WifiStatus status);
4108b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius
4118b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius  /**
412adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create a P2P iface on the chip.
413adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
414adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
415a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius   * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
416a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * allowed (specified in |ChipIfaceCombination|) number of ifaces of the P2P
417a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * type.
418adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
419a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
4201f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
421a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
422a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
423a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|
424adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
425adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
426adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
427a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  createP2pIface() generates (WifiStatus status, IWifiP2pIface iface);
428adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
429adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
430adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the P2P iface names configured on the chip.
431adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiP2pIface| object for any iface are
432adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getP2pIface| method.
433adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
434a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
4351f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
436a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
437a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
438adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all P2P iface names on the chip.
439adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
440a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getP2pIfaceNames() generates (WifiStatus status, vec<string> ifnames);
441adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
442adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
443adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the P2P Iface corresponding
444adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
445adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
446adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
447a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
4481f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
449a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
4508b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
4518b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_INVALID_ARGS|
452adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
453adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
454adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
455a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getP2pIface(string ifname) generates (WifiStatus status, IWifiP2pIface iface);
456adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
457adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
4588b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * Removes the P2P Iface with the provided ifname.
4598b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * Any further calls on the corresponding |IWifiP2pIface| HIDL interface
4608b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * object must fail.
4618b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *
4628b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * @param ifname Name of the iface.
4638b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * @return status WifiStatus of the operation.
4648b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         Possible status codes:
4658b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.SUCCESS|,
4668b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
4678b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_INVALID_ARGS|
4688b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   */
4698b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius  removeP2pIface(string ifname) generates (WifiStatus status);
4708b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius
4718b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius  /**
472adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Create an STA iface on the chip.
473adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
474adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Depending on the mode the chip is configured in, the interface creation
475a2d369dd033541e77ca27df9bcfbbf9d7b3e701cRoshan Pius   * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
476a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * allowed (specified in |ChipIfaceCombination|) number of ifaces of the STA
477a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * type.
478adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
479a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
4801f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
481a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
482a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
483a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|
484adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
485adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         successful, null otherwise.
486adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
487a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  createStaIface() generates (WifiStatus status, IWifiStaIface iface);
488adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
489adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
490adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * List all the STA iface names configured on the chip.
491adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * The corresponding |IWifiStaIface| object for any iface are
492adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * retrieved using |getStaIface| method.
493adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
494a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
4951f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
496a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
497a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
498adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return ifnames List of all STA iface names on the chip.
499adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
500a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getStaIfaceNames() generates (WifiStatus status, vec<string> ifnames);
501adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius
502adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius  /**
503adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * Gets a HIDL interface object for the STA Iface corresponding
504adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * to the provided ifname.
505adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *
506adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @param ifname Name of the iface.
507a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
5081f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
509a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
5108b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
5118b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_INVALID_ARGS|
512adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   * @return iface HIDL interface object representing the iface if
513adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   *         it exists, null otherwise.
514adcfba4b09b6d708cafe8d8e0cc35ed8888cde9cRoshan Pius   */
515a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius  getStaIface(string ifname) generates (WifiStatus status, IWifiStaIface iface);
516fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius
517fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius  /**
5188b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * Removes the STA Iface with the provided ifname.
5198b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * Any further calls on the corresponding |IWifiStaIface| HIDL interface
5208b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * object must fail.
5218b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *
5228b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * @param ifname Name of the iface.
5238b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   * @return status WifiStatus of the operation.
5248b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         Possible status codes:
5258b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.SUCCESS|,
5268b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
5278b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   *         |WifiStatusCode.ERROR_INVALID_ARGS|
5288b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius   */
5298b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius  removeStaIface(string ifname) generates (WifiStatus status);
5308b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius
5318b55e6f475f77183b6420e9bc74316763d1bb987Roshan Pius  /**
532fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * Create a RTTController instance.
533fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   *
534fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * RTT controller can be either:
535fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * a) Bound to a specific iface by passing in the corresponding |IWifiIface|
536fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * object in |iface| param, OR
537fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * b) Let the implementation decide the iface to use for RTT operations by
538fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * passing null in |iface| param.
539fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   *
540fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   * @param boundIface HIDL interface object representing the iface if
541fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   *        the responder must be bound to a specific iface, null otherwise.
542a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   * @return status WifiStatus of the operation.
5431f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius   *         Possible status codes:
544a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.SUCCESS|,
545a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
546fcbf923d3ae52c0d5f585dc2bd8e45e4814ce1dbRoshan Pius   */
5471f9073cfcb1a9674beb839efa24046851dee0222Roshan Pius  createRttController(IWifiIface boundIface)
548a52dc7322d39347c97c6b700bae6c7fa62090cd3Roshan Pius      generates (WifiStatus status, IWifiRttController rtt);
549e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius
550e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  /**
551e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * WiFi debug ring buffer life cycle is as follow:
552e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * - At initialization time, framework must call |getDebugRingBuffersStatus|.
553e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   to obtain the names and list of supported ring buffers.
554e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   The driver may expose several different rings each holding a different
555e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   type of data (connection events, power events, etc).
556e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * - When WiFi operations start framework must call
557e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   |startLoggingToDebugRingBuffer| to trigger log collection for a specific
558e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   ring. The vebose level for each ring buffer can be specified in this API.
559e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * - During wifi operations, driver must periodically report per ring data to
560e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   framework by invoking the
56148185b2a2d267a248001448574905b58ea84845dRoshan Pius   *   |IWifiChipEventCallback.onDebugRingBufferDataAvailable| callback.
562e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * - When capturing a bug report, framework must indicate to driver that all
563e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   the data has to be uploaded urgently by calling
564e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *   |forceDumpToDebugRingBuffer|.
565e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *
566e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * The data uploaded by driver must be stored by framework in separate files,
567e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * with one stream of file per ring. Framework must store the files in pcapng
568e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * format, allowing for easy merging and parsing with network analyzer tools.
569e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * TODO: Since we're not longer dumping out the raw data, storing in separate
570e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * pcapng files for parsing later must not work anymore.
571e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   */
572e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  /**
573e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * API to get the status of all ring buffers supported by driver.
574e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *
575e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @return status WifiStatus of the operation.
576e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         Possible status codes:
577e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.SUCCESS|,
578e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
579fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
580e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.NOT_AVAILABLE|,
581e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.UNKNOWN|
582e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @return ringBuffers Vector of |WifiDebugRingBufferStatus| corresponding to the
583e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         status of each ring bufffer on the device.
584e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   */
585e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  getDebugRingBuffersStatus() generates (WifiStatus status,
586e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius                                         vec<WifiDebugRingBufferStatus> ringBuffers);
587e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius
588e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  /**
589e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * API to trigger the debug data collection.
590e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *
591e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @param ringName represent the name of the ring for which data collection
592e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *        shall start. This can be retrieved via the corresponding
593e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *        |WifiDebugRingBufferStatus|.
594e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @parm maxIntervalInSec Maximum interval in seconds for driver to invoke
595e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *       |onDebugRingBufferData|, ignore if zero.
596e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @parm minDataSizeInBytes: Minimum data size in buffer for driver to invoke
597e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *       |onDebugRingBufferData|, ignore if zero.
598e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @return status WifiStatus of the operation.
599e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         Possible status codes:
600e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.SUCCESS|,
601e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
602fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
603e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.NOT_AVAILABLE|,
604e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.UNKNOWN|
605e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   */
606e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  startLoggingToDebugRingBuffer(string ringName,
607e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius                                WifiDebugRingBufferVerboseLevel verboseLevel,
608e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius                                uint32_t maxIntervalInSec,
609e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius                                uint32_t minDataSizeInBytes)
610e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius      generates (WifiStatus status);
611e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius
612e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  /**
613e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * API to force dump data into the corresponding ring buffer.
614e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * This is to be invoked during bugreport collection.
615e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *
616e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @param ringName represent the name of the ring for which data collection
617e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *        shall be forced. This can be retrieved via the corresponding
618e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *        |WifiDebugRingBufferStatus|.
619e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   * @return status WifiStatus of the operation.
620e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         Possible status codes:
621e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.SUCCESS|,
622e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
623fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
624fe9ad36cb272d346b42e54d51ff8aa089554f9e7Roshan Pius   *         |WifiStatusCode.ERROR_NOT_STARTED|,
625e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.NOT_AVAILABLE|,
626e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   *         |WifiStatusCode.UNKNOWN|
627e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius   */
628e3a02b07b62fa70d37849c5b45957f5b5e697215Roshan Pius  forceDumpToDebugRingBuffer(string ringName) generates (WifiStatus status);
629e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius
630e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius  /**
631e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   * API to retrieve the wifi wake up reason stats for debugging.
632e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   * The driver is expected to start maintaining these stats once the chip
633e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   * is configured using |configureChip|. These stats must be reset whenever
634e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   * the chip is reconfigured or the HAL is stopped.
635e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   *
636e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   * @return status WifiStatus of the operation.
637e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   *         Possible status codes:
638e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   *         |WifiStatusCode.SUCCESS|,
639e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
640e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
641e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   *         |WifiStatusCode.NOT_AVAILABLE|,
642e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   *         |WifiStatusCode.UNKNOWN|
643e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   * @return stats Instance of |WifiDebugHostWakeReasonStats|.
644e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius   */
645e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius  getDebugHostWakeReasonStats()
646e0724f98b0fe7f9bf2257d3a1351839f0b19224bRoshan Pius      generates (WifiStatus status, WifiDebugHostWakeReasonStats stats);
647203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius
648203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius  /**
649203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   * API to enable/disable alert notifications from the chip.
650203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   * These alerts must be used to notify framework of any fatal error events
651203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   * that the chip encounters via |IWifiChipEventCallback.onDebugErrorAlert| method.
652203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   * Must fail if |ChipCapabilityMask.DEBUG_ERROR_ALERTS| is not set.
653203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   *
654203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   * @param enable true to enable, false to disable.
655203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   * @return status WifiStatus of the operation.
656203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   *         Possible status codes:
657203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   *         |WifiStatusCode.SUCCESS|,
658203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
659203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
660203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   *         |WifiStatusCode.NOT_AVAILABLE|,
661203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   *         |WifiStatusCode.UNKNOWN|
662203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius   */
663203cb031df35ebfe647e93b6b0d9634602693668Roshan Pius  enableDebugErrorAlerts(bool enable) generates (WifiStatus status);
6645443a9fc9b7e7f334cd298aea19741290ad55555Mitchell Wills};
665