blob: 166cfb409a66d7582606fc5a4326e1072741c3fb [file] [log] [blame]
Mitchell Wills5443a9f2016-08-18 11:44:58 -07001/*
2 * Copyright 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.wifi@1.0;
18
19import IWifiChipEventCallback;
Roshan Piusfcbf9232016-10-06 11:08:17 -070020import IWifiIface;
Roshan Piusadcfba42016-10-05 10:19:06 -070021import IWifiApIface;
22import IWifiNanIface;
23import IWifiP2pIface;
24import IWifiStaIface;
Roshan Piusfcbf9232016-10-06 11:08:17 -070025import IWifiRttController;
Mitchell Wills5443a9f2016-08-18 11:44:58 -070026
27/**
28 * Interface that represents a chip that must be configured as a single unit.
29 * The HAL/driver/firmware will be responsible for determining which phy is used
30 * to perform operations like NAN, RTT, etc.
31 */
32interface IWifiChip {
Mitchell Wills5443a9f2016-08-18 11:44:58 -070033 /**
34 * Set of interface types with the maximum number of interfaces that can have
Roshan Pius271f2c22016-10-04 17:01:01 -070035 * one of the specified type for a given ChipIfaceCombination. See
36 * ChipIfaceCombination for examples.
Mitchell Wills5443a9f2016-08-18 11:44:58 -070037 */
Roshan Pius271f2c22016-10-04 17:01:01 -070038 struct ChipIfaceCombinationLimit {
Roshan Pius7b777472016-10-07 13:15:59 -070039 vec<IfaceType> types; // Each IfaceType must occur at most once.
Mitchell Wills5443a9f2016-08-18 11:44:58 -070040 uint32_t maxIfaces;
41 };
42
43 /**
44 * Set of interfaces that can operate concurrently when in a given mode. See
45 * ChipMode below.
46 *
47 * For example:
48 * [{STA} <= 2]
49 * At most two STA interfaces are supported
50 * [], [STA], [STA+STA]
51 *
52 * [{STA} <= 1, {NAN} <= 1, {AP} <= 1]
53 * Any combination of STA, NAN, AP
54 * [], [STA], [NAN], [AP], [STA+NAN], [STA+AP], [NAN+AP], [STA+NAN+AP]
55 *
56 * [{STA} <= 1, {NAN,P2P} <= 1]
57 * Optionally a STA and either NAN or P2P
58 * [], [STA], [STA+NAN], [STA+P2P], [NAN], [P2P]
59 * Not included [NAN+P2P], [STA+NAN+P2P]
60 *
61 * [{STA} <= 1, {STA,NAN} <= 1]
62 * Optionally a STA and either a second STA or a NAN
63 * [], [STA], [STA+NAN], [STA+STA], [NAN]
64 * Not included [STA+STA+NAN]
65 */
Roshan Pius271f2c22016-10-04 17:01:01 -070066 struct ChipIfaceCombination {
67 vec<ChipIfaceCombinationLimit> limits;
Mitchell Wills5443a9f2016-08-18 11:44:58 -070068 };
69
70 /**
71 * A mode that the chip can be put in. A mode defines a set of constraints on
72 * the interfaces that can exist while in that mode. Modes define a unit of
73 * configuration where all interfaces must be torn down to switch to a
74 * different mode. Some HALs may only have a single mode, but an example where
75 * multiple modes would be required is if a chip has different firmwares with
76 * different capabilities.
77 *
78 * When in a mode, it must be possible to perform any combination of creating
79 * and removing interfaces as long as at least one of the
Roshan Pius271f2c22016-10-04 17:01:01 -070080 * ChipIfaceCombinations is satisfied. This means that if a chip has two
Mitchell Wills5443a9f2016-08-18 11:44:58 -070081 * available combinations, [{STA} <= 1] and [{AP} <= 1] then it is expected
82 * that exactly one STA interface or one AP interface can be created, but it
83 * is not expected that both a STA and AP interface could be created. If it
84 * was then there would be a single available combination
85 * [{STA} <=1, {AP} <= 1].
86 *
87 * When switching between two available combinations it is expected that
88 * interfaces only supported by the initial combination will be removed until
89 * the target combination is also satisfied. At that point new interfaces
90 * satisfying only the target combination can be added (meaning the initial
91 * combination limits will no longer satisfied). The addition of these new
Roshan Pius7b777472016-10-07 13:15:59 -070092 * interfaces must not impact the existence of interfaces that satisfy both
Mitchell Wills5443a9f2016-08-18 11:44:58 -070093 * combinations.
94 *
95 * For example, a chip with available combinations:
96 * [{STA} <= 2, {NAN} <=1] and [{STA} <=1, {NAN} <= 1, {AP} <= 1}]
97 * If the chip currently has 3 interfaces STA, STA and NAN and wants to add an
98 * AP interface in place of one of the STAs then first one of the STA
99 * interfaces must be removed and then the AP interface can be created after
100 * the STA had been torn down. During this process the remaining STA and NAN
Roshan Pius7b777472016-10-07 13:15:59 -0700101 * interfaces must not be removed/recreated.
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700102 *
103 * If a chip does not support this kind of reconfiguration in this mode then
Roshan Pius7b777472016-10-07 13:15:59 -0700104 * the combinations must be separated into two separate modes. Before
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700105 * switching modes all interfaces will be torn down, the mode switch will be
106 * enacted and when it completes the new interfaces will be brought up.
107 */
108 struct ChipMode {
109 /**
110 * Id that can be used to put the chip in this mode.
111 */
112 ChipModeId id;
113
114 /**
115 * A list of the possible interface combinations that the chip can have
116 * while in this mode.
117 */
Roshan Pius271f2c22016-10-04 17:01:01 -0700118 vec<ChipIfaceCombination> availableCombinations;
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700119 };
120
121 /**
Roshan Piusa52dc732016-10-10 11:53:07 -0700122 * Information about the version of the driver and firmware running this chip.
123 *
124 * The information in these ASCII strings are vendor specific and does not
125 * need to follow any particular format. It may be dumped as part of the bug
126 * report.
127 */
128 struct ChipDebugInfo {
129 string driverDescription;
130 string firmwareDescription;
131 };
132
133 /**
Roshan Piusadcfba42016-10-05 10:19:06 -0700134 * Get the id assigned to this chip.
135 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700136 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700137 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700138 * |WifiStatusCode.SUCCESS|,
139 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Roshan Piusadcfba42016-10-05 10:19:06 -0700140 * @return id Assigned chip Id.
141 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700142 getId() generates (WifiStatus status, ChipId id);
Roshan Piusadcfba42016-10-05 10:19:06 -0700143
144 /**
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700145 * Requests notifications of significant events on this chip. Multiple calls
146 * to this will register multiple callbacks each of which will receive all
147 * events.
Roshan Pius6f31d922016-10-04 15:08:05 -0700148 *
149 * @param callback An instance of the |IWifiChipEventCallback| HIDL interface
150 * object.
Roshan Piusa52dc732016-10-10 11:53:07 -0700151 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700152 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700153 * |WifiStatusCode.SUCCESS|,
154 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700155 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700156 registerEventCallback(IWifiChipEventCallback callback) generates (WifiStatus status);
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700157
158 /**
159 * Get the set of operation modes that the chip supports.
Roshan Pius6f31d922016-10-04 15:08:05 -0700160 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700161 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700162 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700163 * |WifiStatusCode.SUCCESS|,
164 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Roshan Pius6f31d922016-10-04 15:08:05 -0700165 * @return modes List of modes supported by the device.
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700166 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700167 getAvailableModes() generates (WifiStatus status, vec<ChipMode> modes);
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700168
169 /**
Roshan Pius6f31d922016-10-04 15:08:05 -0700170 * Reconfigure the Chip.
Roshan Piusa52dc732016-10-10 11:53:07 -0700171 * Any existing |IWifiIface| objects must be marked invalid after this call.
172 * If this fails then the chips is now in an undefined state and
173 * configureChip must be called again.
174 * Must trigger |IWifiChipEventCallback.onChipReconfigured| on success.
175 * Must trigger |IWifiEventCallback.onFailure| on failure.
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700176 *
177 * @param modeId The mode that the chip should switch to, corresponding to the
Roshan Pius6f31d922016-10-04 15:08:05 -0700178 * id property of the target ChipMode.
Roshan Piusa52dc732016-10-10 11:53:07 -0700179 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700180 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700181 * |WifiStatusCode.SUCCESS|,
182 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
183 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
184 * |WifiStatusCode.ERROR_UNKNOWN|
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700185 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700186 configureChip(ChipModeId modeId) generates (WifiStatus status);
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700187
188 /**
189 * Get the current mode that the chip is in.
Roshan Pius6f31d922016-10-04 15:08:05 -0700190 *
191 * @return modeId The mode that the chip is currently configured to,
192 * corresponding to the id property of the target ChipMode.
Roshan Piusa52dc732016-10-10 11:53:07 -0700193 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700194 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700195 * |WifiStatusCode.SUCCESS|,
196 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700197 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700198 getMode() generates (WifiStatus status, ChipModeId modeId);
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700199
200 /**
Roshan Pius6f31d922016-10-04 15:08:05 -0700201 * Request information about the chip.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700202 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700203 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700204 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700205 * |WifiStatusCode.SUCCESS|,
206 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
207 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
208 * |WifiStatusCode.ERROR_UNKNOWN|
209 * @return chipDebugInfo Instance of |ChipDebugInfo|.
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700210 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700211 requestChipDebugInfo() generates (WifiStatus status, ChipDebugInfo chipDebugInfo);
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700212
213 /**
Roshan Pius6f31d922016-10-04 15:08:05 -0700214 * Request vendor debug info from the driver.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700215 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700216 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700217 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700218 * |WifiStatusCode.SUCCESS|,
219 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
220 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
221 * |WifiStatusCode.ERROR_UNKNOWN|
222 * @param blob Vector of bytes retrieved from the driver.
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700223 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700224 requestDriverDebugDump() generates (WifiStatus status, vec<uint8_t> blob);
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700225
226 /**
Roshan Pius6f31d922016-10-04 15:08:05 -0700227 * Request vendor debug info from the firmware.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700228 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700229 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700230 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700231 * |WifiStatusCode.SUCCESS|,
232 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
233 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
234 * |WifiStatusCode.ERROR_UNKNOWN|
235 * @param blob Vector of bytes retrieved from the driver.
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700236 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700237 requestFirmwareDebugDump() generates (WifiStatus status, vec<uint8_t> blob);
Roshan Piusadcfba42016-10-05 10:19:06 -0700238
239 /**
240 * Create an AP iface on the chip.
241 *
242 * Depending on the mode the chip is configured in, the interface creation
Roshan Piusa52dc732016-10-10 11:53:07 -0700243 * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
244 * allowed (specified in |ChipIfaceCombination|) number of ifaces of the AP
245 * type.
Roshan Piusadcfba42016-10-05 10:19:06 -0700246 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700247 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700248 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700249 * |WifiStatusCode.SUCCESS|,
250 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
251 * |WifiStatusCode.ERROR_NOT_SUPPORTED|
Roshan Piusadcfba42016-10-05 10:19:06 -0700252 * @return iface HIDL interface object representing the iface if
253 * successful, null otherwise.
254 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700255 createApIface() generates (WifiStatus status, IWifiApIface iface);
Roshan Piusadcfba42016-10-05 10:19:06 -0700256
257 /**
258 * List all the AP iface names configured on the chip.
259 * The corresponding |IWifiApIface| object for any iface are
260 * retrieved using |getApIface| method.
261 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700262 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700263 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700264 * |WifiStatusCode.SUCCESS|,
265 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Roshan Piusadcfba42016-10-05 10:19:06 -0700266 * @return ifnames List of all AP iface names on the chip.
267 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700268 getApIfaceNames() generates (WifiStatus status, vec<string> ifnames);
Roshan Piusadcfba42016-10-05 10:19:06 -0700269
270 /**
271 * Gets a HIDL interface object for the AP Iface corresponding
272 * to the provided ifname.
273 *
274 * @param ifname Name of the iface.
Roshan Piusa52dc732016-10-10 11:53:07 -0700275 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700276 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700277 * |WifiStatusCode.SUCCESS|,
278 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Roshan Piusadcfba42016-10-05 10:19:06 -0700279 * @return iface HIDL interface object representing the iface if
280 * it exists, null otherwise.
281 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700282 getApIface(string ifname) generates (WifiStatus status, IWifiApIface iface);
Roshan Piusadcfba42016-10-05 10:19:06 -0700283
284 /**
285 * Create a NAN iface on the chip.
286 *
287 * Depending on the mode the chip is configured in, the interface creation
Roshan Piusa52dc732016-10-10 11:53:07 -0700288 * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
289 * allowed (specified in |ChipIfaceCombination|) number of ifaces of the NAN
290 * type.
Roshan Piusadcfba42016-10-05 10:19:06 -0700291 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700292 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700293 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700294 * |WifiStatusCode.SUCCESS|,
295 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
296 * |WifiStatusCode.ERROR_NOT_SUPPORTED|
Roshan Piusadcfba42016-10-05 10:19:06 -0700297 * @return iface HIDL interface object representing the iface if
298 * successful, null otherwise.
299 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700300 createNanIface() generates (WifiStatus status, IWifiNanIface iface);
Roshan Piusadcfba42016-10-05 10:19:06 -0700301
302 /**
303 * List all the NAN iface names configured on the chip.
304 * The corresponding |IWifiNanIface| object for any iface are
305 * retrieved using |getNanIface| method.
306 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700307 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700308 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700309 * |WifiStatusCode.SUCCESS|,
310 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Roshan Piusadcfba42016-10-05 10:19:06 -0700311 * @return ifnames List of all NAN iface names on the chip.
312 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700313 getNanIfaceNames() generates (WifiStatus status, vec<string> ifnames);
Roshan Piusadcfba42016-10-05 10:19:06 -0700314
315 /**
316 * Gets a HIDL interface object for the NAN Iface corresponding
317 * to the provided ifname.
318 *
319 * @param ifname Name of the iface.
Roshan Piusa52dc732016-10-10 11:53:07 -0700320 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700321 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700322 * |WifiStatusCode.SUCCESS|,
323 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Roshan Piusadcfba42016-10-05 10:19:06 -0700324 * @return iface HIDL interface object representing the iface if
325 * it exists, null otherwise.
326 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700327 getNanIface(string ifname) generates (WifiStatus status, IWifiNanIface iface);
Roshan Piusadcfba42016-10-05 10:19:06 -0700328
329 /**
330 * Create a P2P iface on the chip.
331 *
332 * Depending on the mode the chip is configured in, the interface creation
Roshan Piusa52dc732016-10-10 11:53:07 -0700333 * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
334 * allowed (specified in |ChipIfaceCombination|) number of ifaces of the P2P
335 * type.
Roshan Piusadcfba42016-10-05 10:19:06 -0700336 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700337 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700338 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700339 * |WifiStatusCode.SUCCESS|,
340 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
341 * |WifiStatusCode.ERROR_NOT_SUPPORTED|
Roshan Piusadcfba42016-10-05 10:19:06 -0700342 * @return iface HIDL interface object representing the iface if
343 * successful, null otherwise.
344 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700345 createP2pIface() generates (WifiStatus status, IWifiP2pIface iface);
Roshan Piusadcfba42016-10-05 10:19:06 -0700346
347 /**
348 * List all the P2P iface names configured on the chip.
349 * The corresponding |IWifiP2pIface| object for any iface are
350 * retrieved using |getP2pIface| method.
351 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700352 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700353 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700354 * |WifiStatusCode.SUCCESS|,
355 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Roshan Piusadcfba42016-10-05 10:19:06 -0700356 * @return ifnames List of all P2P iface names on the chip.
357 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700358 getP2pIfaceNames() generates (WifiStatus status, vec<string> ifnames);
Roshan Piusadcfba42016-10-05 10:19:06 -0700359
360 /**
361 * Gets a HIDL interface object for the P2P Iface corresponding
362 * to the provided ifname.
363 *
364 * @param ifname Name of the iface.
Roshan Piusa52dc732016-10-10 11:53:07 -0700365 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700366 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700367 * |WifiStatusCode.SUCCESS|,
368 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Roshan Piusadcfba42016-10-05 10:19:06 -0700369 * @return iface HIDL interface object representing the iface if
370 * it exists, null otherwise.
371 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700372 getP2pIface(string ifname) generates (WifiStatus status, IWifiP2pIface iface);
Roshan Piusadcfba42016-10-05 10:19:06 -0700373
374 /**
375 * Create an STA iface on the chip.
376 *
377 * Depending on the mode the chip is configured in, the interface creation
Roshan Piusa52dc732016-10-10 11:53:07 -0700378 * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
379 * allowed (specified in |ChipIfaceCombination|) number of ifaces of the STA
380 * type.
Roshan Piusadcfba42016-10-05 10:19:06 -0700381 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700382 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700383 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700384 * |WifiStatusCode.SUCCESS|,
385 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
386 * |WifiStatusCode.ERROR_NOT_SUPPORTED|
Roshan Piusadcfba42016-10-05 10:19:06 -0700387 * @return iface HIDL interface object representing the iface if
388 * successful, null otherwise.
389 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700390 createStaIface() generates (WifiStatus status, IWifiStaIface iface);
Roshan Piusadcfba42016-10-05 10:19:06 -0700391
392 /**
393 * List all the STA iface names configured on the chip.
394 * The corresponding |IWifiStaIface| object for any iface are
395 * retrieved using |getStaIface| method.
396 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700397 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700398 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700399 * |WifiStatusCode.SUCCESS|,
400 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Roshan Piusadcfba42016-10-05 10:19:06 -0700401 * @return ifnames List of all STA iface names on the chip.
402 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700403 getStaIfaceNames() generates (WifiStatus status, vec<string> ifnames);
Roshan Piusadcfba42016-10-05 10:19:06 -0700404
405 /**
406 * Gets a HIDL interface object for the STA Iface corresponding
407 * to the provided ifname.
408 *
409 * @param ifname Name of the iface.
Roshan Piusa52dc732016-10-10 11:53:07 -0700410 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700411 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700412 * |WifiStatusCode.SUCCESS|,
413 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Roshan Piusadcfba42016-10-05 10:19:06 -0700414 * @return iface HIDL interface object representing the iface if
415 * it exists, null otherwise.
416 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700417 getStaIface(string ifname) generates (WifiStatus status, IWifiStaIface iface);
Roshan Piusfcbf9232016-10-06 11:08:17 -0700418
419 /**
420 * Create a RTTController instance.
421 *
422 * RTT controller can be either:
423 * a) Bound to a specific iface by passing in the corresponding |IWifiIface|
424 * object in |iface| param, OR
425 * b) Let the implementation decide the iface to use for RTT operations by
426 * passing null in |iface| param.
427 *
428 * @param boundIface HIDL interface object representing the iface if
429 * the responder must be bound to a specific iface, null otherwise.
Roshan Piusa52dc732016-10-10 11:53:07 -0700430 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700431 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700432 * |WifiStatusCode.SUCCESS|,
433 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
Roshan Piusfcbf9232016-10-06 11:08:17 -0700434 */
Roshan Pius1f9073c2016-10-10 10:32:22 -0700435 createRttController(IWifiIface boundIface)
Roshan Piusa52dc732016-10-10 11:53:07 -0700436 generates (WifiStatus status, IWifiRttController rtt);
Mitchell Wills5443a9f2016-08-18 11:44:58 -0700437};