blob: 7dad8aff5afdcbfef4314cb8c034101bd20ce690 [file] [log] [blame]
Roshan Piusadcfba42016-10-05 10:19:06 -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 IWifiIface;
Roshan Pius7b777472016-10-07 13:15:59 -070020import IWifiStaIfaceEventCallback;
Roshan Piusadcfba42016-10-05 10:19:06 -070021
22/**
23 * Interface used to represent a single STA iface.
24 */
25interface IWifiStaIface extends IWifiIface {
Roshan Pius7b777472016-10-07 13:15:59 -070026 /**
27 * Mask of capabilities suported by this Iface.
28 */
29 enum StaIfaceCapabilityMask : uint32_t {
30 /**
31 * If set indicates that the APF APIs are supported.
32 * APF (Android Packet Filter) is a BPF like packet filtering
33 * bytecode executed by the firmware.
34 */
35 APF = 1 << 0,
36 /**
37 * If set indicates that the Background Scan APIs are supported.
38 * Background scan allow the host to send a number of buckets down to the
39 * firmware. Each bucket contains a set of channels, a period, and some
40 * parameters about how and when to report results.
41 */
42 BACKGROUND_SCAN = 1 << 1,
Roshan Pius18680b72016-10-12 08:25:48 -070043 /**
44 * If set indicates that the link layer stats APIs are supported.
45 */
Roshan Pius5e254662016-10-26 10:10:48 -070046 LINK_LAYER_STATS = 1 << 2,
Roshan Piusfe9ad362016-10-19 16:45:12 -070047 /**
Roshan Piusd4767542016-12-06 10:04:05 -080048 * If set indicates that the RSSI monitor APIs are supported.
49 */
50 RSSI_MONITOR = 1 << 3,
51 /**
Roshan Pius26801cb2016-12-13 14:25:45 -080052 * If set indicates that the roaming API's are supported.
53 */
54 CONTROL_ROAMING = 1 << 4,
55 /**
56 * If set indicates support for Probe IE white listing.
57 */
58 PROBE_IE_WHITELIST = 1 << 5,
59 /**
60 * If set indicates support for MAC & Probe Sequence Number randomization.
61 */
62 SCAN_RAND = 1 << 6,
63 /**
Roshan Piusa2d369d2016-12-15 22:38:00 -080064 * Support for 5 GHz Band.
Roshan Piusfe9ad362016-10-19 16:45:12 -070065 */
Roshan Piusa2d369d2016-12-15 22:38:00 -080066 STA_5G = 1 << 7,
67 /**
68 * Support for GAS/ANQP queries.
69 */
70 HOTSPOT = 1 << 8,
71 /**
72 * Support for Preferred Network Offload.
73 */
74 PNO = 1 << 9,
75 /**
76 * Support for Tunneled Direct Link Setup.
77 */
78 TDLS = 1 << 10,
79 /**
80 * Support for Tunneled Direct Link Setup off channel.
81 */
82 TDLS_OFFCHANNEL = 1 << 11,
83 /**
Roshan Pius656f8202017-01-17 12:58:05 -080084 * Support for neighbour discovery offload.
85 */
86 ND_OFFLOAD = 1 << 12,
87 /**
Roshan Pius9a9869a2017-01-11 16:42:16 -080088 * Support for keep alive packet offload.
89 */
Roshan Pius656f8202017-01-17 12:58:05 -080090 KEEP_ALIVE = 1 << 13,
Roshan Pius9a9869a2017-01-11 16:42:16 -080091 /**
Roshan Piusa2d369d2016-12-15 22:38:00 -080092 * Support for tracking connection packets' fate.
93 */
Roshan Pius656f8202017-01-17 12:58:05 -080094 DEBUG_PACKET_FATE = 1 << 14
Roshan Pius18680b72016-10-12 08:25:48 -070095 };
96
97 /**
Roshan Pius7b777472016-10-07 13:15:59 -070098 * Requests notifications of significant events on this iface. Multiple calls
99 * to this must register multiple callbacks each of which must receive all
100 * events.
101 *
102 * @param callback An instance of the |IWifiStaIfaceEventCallback| HIDL interface
103 * object.
Roshan Piusa52dc732016-10-10 11:53:07 -0700104 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700105 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700106 * |WifiStatusCode.SUCCESS|,
107 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
Roshan Pius7b777472016-10-07 13:15:59 -0700108 */
Roshan Pius1f9073c2016-10-10 10:32:22 -0700109 registerEventCallback(IWifiStaIfaceEventCallback callback)
Roshan Piusa52dc732016-10-10 11:53:07 -0700110 generates (WifiStatus status);
Roshan Pius7b777472016-10-07 13:15:59 -0700111
112 /**
113 * Get the capabilities supported by this STA iface.
114 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700115 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700116 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700117 * |WifiStatusCode.SUCCESS|,
118 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
119 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
120 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700121 * @return capabilities Bitset of |StaIfaceCapabilityMask| values.
122 */
Roshan Pius5e254662016-10-26 10:10:48 -0700123 getCapabilities() generates (WifiStatus status, uint32_t capabilities);
Roshan Pius7b777472016-10-07 13:15:59 -0700124
125 /**
126 * Used to query additional information about the chip's APF capabilities.
Roshan Pius18680b72016-10-12 08:25:48 -0700127 * Must fail if |StaIfaceCapabilityMask.APF| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700128 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700129 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700130 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700131 * |WifiStatusCode.SUCCESS|,
132 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
133 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
134 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
135 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius5e254662016-10-26 10:10:48 -0700136 * @return capabilities Instance of |StaApfPacketFilterCapabilities|.
Roshan Pius7b777472016-10-07 13:15:59 -0700137 */
138 getApfPacketFilterCapabilities()
Roshan Pius5e254662016-10-26 10:10:48 -0700139 generates (WifiStatus status, StaApfPacketFilterCapabilities capabilities);
Roshan Pius7b777472016-10-07 13:15:59 -0700140
141 /**
142 * Installs an APF program on this iface, replacing an existing
143 * program if present.
Roshan Pius18680b72016-10-12 08:25:48 -0700144 * Must fail if |StaIfaceCapabilityMask.APF| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700145 *
146 * @param cmdId command Id to use for this invocation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700147 * @param APF Program to be set.
Roshan Piusa52dc732016-10-10 11:53:07 -0700148 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700149 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700150 * |WifiStatusCode.SUCCESS|,
151 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
152 * |WifiStatusCode.ERROR_INVALID_ARGS|,
153 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
154 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
155 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700156 */
Roshan Pius1f9073c2016-10-10 10:32:22 -0700157 installApfPacketFilter(CommandId cmdId, vec<uint8_t> program)
Roshan Piusa52dc732016-10-10 11:53:07 -0700158 generates (WifiStatus status);
Roshan Pius7b777472016-10-07 13:15:59 -0700159
160 /**
Roshan Pius18680b72016-10-12 08:25:48 -0700161 * Used to query additional information about the chip's Background Scan capabilities.
162 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700163 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700164 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700165 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700166 * |WifiStatusCode.SUCCESS|,
167 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
168 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
169 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
170 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius5e254662016-10-26 10:10:48 -0700171 * @return capabilities Instance of |StaBackgroundScanCapabilities|.
Roshan Pius7b777472016-10-07 13:15:59 -0700172 */
173 getBackgroundScanCapabilities()
Roshan Pius5e254662016-10-26 10:10:48 -0700174 generates (WifiStatus status, StaBackgroundScanCapabilities capabilities);
Roshan Pius7b777472016-10-07 13:15:59 -0700175
176 /**
Roshan Pius18680b72016-10-12 08:25:48 -0700177 * Used to query the list of valid frequencies (depending on country code set)
178 * for the provided band. These channels may be specifed in the
179 * |BackgroundScanBucketParameters.frequenciesInMhz| for a background scan
180 * request.
181 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
182 *
Roshan Pius5e254662016-10-26 10:10:48 -0700183 * @param band Band for which the frequency list is being generated.
Roshan Pius18680b72016-10-12 08:25:48 -0700184 * @return status WifiStatus of the operation.
185 * Possible status codes:
186 * |WifiStatusCode.SUCCESS|,
187 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
188 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
189 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
190 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius120f94c2016-10-13 11:48:42 -0700191 * @return frequencies vector of valid frequencies for the provided band.
Roshan Pius18680b72016-10-12 08:25:48 -0700192 */
Roshan Pius5e254662016-10-26 10:10:48 -0700193 getValidFrequenciesForBackgroundScan(StaBackgroundScanBand band)
Roshan Pius120f94c2016-10-13 11:48:42 -0700194 generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
Roshan Pius18680b72016-10-12 08:25:48 -0700195
196 /**
Roshan Pius7b777472016-10-07 13:15:59 -0700197 * Start a background scan using the given cmdId as an identifier. Only one
198 * active background scan need be supported.
Roshan Pius18680b72016-10-12 08:25:48 -0700199 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700200 *
201 * When this is called all requested buckets must be scanned, starting the
202 * beginning of the cycle.
203 *
204 * For example:
205 * If there are two buckets specified
206 * - Bucket 1: period=10s
207 * - Bucket 2: period=20s
208 * - Bucket 3: period=30s
209 * Then the following scans must occur
210 * - t=0 buckets 1, 2, and 3 are scanned
211 * - t=10 bucket 1 is scanned
212 * - t=20 bucket 1 and 2 are scanned
213 * - t=30 bucket 1 and 3 are scanned
214 * - t=40 bucket 1 and 2 are scanned
215 * - t=50 bucket 1 is scanned
216 * - t=60 buckets 1, 2, and 3 are scanned
217 * - and the patter repeats
218 *
219 * If any scan does not occur or is incomplete (error, interrupted, etc) then
220 * a cached scan result must still be recorded with the
221 * WIFI_SCAN_FLAG_INTERRUPTED flag set.
222 *
223 * @param cmdId command Id to use for this invocation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700224 * @params Background scan parameters.
Roshan Piusa52dc732016-10-10 11:53:07 -0700225 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700226 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700227 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
228 * |WifiStatusCode.ERROR_INVALID_ARGS|,
229 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
230 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
231 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700232 */
Roshan Pius5e254662016-10-26 10:10:48 -0700233 startBackgroundScan(CommandId cmdId, StaBackgroundScanParameters params)
Roshan Piusa52dc732016-10-10 11:53:07 -0700234 generates (WifiStatus status);
Roshan Pius7b777472016-10-07 13:15:59 -0700235
236 /**
237 * Stop the background scan started.
Roshan Pius18680b72016-10-12 08:25:48 -0700238 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700239 *
240 * @param cmdId command Id corresponding to the request.
Roshan Piusa52dc732016-10-10 11:53:07 -0700241 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700242 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700243 * |WifiStatusCode.SUCCESS|,
244 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
245 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700246 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Piusa52dc732016-10-10 11:53:07 -0700247 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
248 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700249 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700250 stopBackgroundScan(CommandId cmdId) generates (WifiStatus status);
Roshan Pius18680b72016-10-12 08:25:48 -0700251
252 /**
253 * Enable link layer stats collection.
254 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set.
255 *
256 * Radio statistics (once started) must not stop until disabled.
257 * Iface statistics (once started) reset and start afresh after each
258 * connection until disabled.
259 *
260 * @param debug Set for field debug mode. Driver must collect all
261 * statistics regardless of performance impact.
262 * @return status WifiStatus of the operation.
263 * Possible status codes:
264 * |WifiStatusCode.SUCCESS|,
265 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
266 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
267 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
268 * |WifiStatusCode.ERROR_UNKNOWN|
269 */
270 enableLinkLayerStatsCollection(bool debug)
271 generates (WifiStatus status);
272
273 /**
274 * Disable link layer stats collection.
275 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set.
276 *
277 * @return status WifiStatus of the operation.
278 * Possible status codes:
279 * |WifiStatusCode.SUCCESS|,
280 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
281 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700282 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Pius18680b72016-10-12 08:25:48 -0700283 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
284 * |WifiStatusCode.ERROR_UNKNOWN|
285 */
286 disableLinkLayerStatsCollection() generates (WifiStatus status);
287
288 /**
289 * Retrieve the latest link layer stats.
290 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set or if
291 * link layer stats collection hasn't been explicitly enabled.
292 *
293 * @return status WifiStatus of the operation.
294 * Possible status codes:
295 * |WifiStatusCode.SUCCESS|,
296 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
297 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700298 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Pius18680b72016-10-12 08:25:48 -0700299 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
300 * |WifiStatusCode.ERROR_UNKNOWN|
301 * @return stats Instance of |LinkLayerStats|.
302 */
Roshan Pius5e254662016-10-26 10:10:48 -0700303 getLinkLayerStats() generates (WifiStatus status, StaLinkLayerStats stats);
Roshan Piusfe9ad362016-10-19 16:45:12 -0700304
305 /**
Roshan Piusd4767542016-12-06 10:04:05 -0800306 * Start RSSI monitoring on the currently connected access point.
307 * Once the monitoring is enabled,
308 * |IWifiStaIfaceEventCallback.onRssiThresholdBreached| callback must be
309 * invoked to indicate if the RSSI goes above |maxRssi| or below |minRssi|.
310 * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set.
311 *
312 * @param cmdId command Id to use for this invocation.
313 * @param maxRssi Maximum RSSI threshold.
314 * @param minRssi Minimum RSSI threshold.
315 * @return status WifiStatus of the operation.
316 * Possible status codes:
317 * |WifiStatusCode.SUCCESS|,
318 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
319 * |WifiStatusCode.ERROR_ARGS_INVALID|,
320 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
321 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
322 * |WifiStatusCode.ERROR_UNKNOWN|
323 */
324 startRssiMonitoring(CommandId cmdId, Rssi maxRssi, Rssi minRssi)
325 generates (WifiStatus status);
326
327 /**
328 * Stop RSSI monitoring.
329 * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set.
330 *
331 * @param cmdId command Id corresponding to the request.
332 * @return status WifiStatus of the operation.
333 * Possible status codes:
334 * |WifiStatusCode.SUCCESS|,
335 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
336 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
337 * |WifiStatusCode.ERROR_NOT_STARTED|,
338 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
339 * |WifiStatusCode.ERROR_UNKNOWN|
340 */
341 stopRssiMonitoring(CommandId cmdId) generates (WifiStatus status);
342
343 /**
Roshan Pius26801cb2016-12-13 14:25:45 -0800344 * Get roaming control capabilities.
345 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
346 *
347 * @return status WifiStatus of the operation.
348 * Possible status codes:
349 * |WifiStatusCode.SUCCESS|,
350 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
351 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
352 * |WifiStatusCode.ERROR_UNKNOWN|
353 * @return caps Instance of |StaRoamingCapabilities|.
354 */
355 getRoamingCapabilities()
356 generates (WifiStatus status, StaRoamingCapabilities caps);
357
358 /**
359 * Configure roaming control parameters.
360 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
361 *
362 * @param config Instance of |StaRoamingConfig|.
363 * @return status WifiStatus of the operation.
364 * Possible status codes:
365 * |WifiStatusCode.SUCCESS|,
366 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
367 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
368 * |WifiStatusCode.ERROR_UNKNOWN|
369 */
370 configureRoaming(StaRoamingConfig config) generates (WifiStatus status);
371
372 /**
373 * Set the roaming control state with the parameters configured
374 * using |configureRoaming|. Depending on the roaming state set, the
375 * driver/firmware would enable/disable control over roaming decisions.
376 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
377 *
378 * @param state State of the roaming control.
379 * @return status WifiStatus of the operation.
380 * Possible status codes:
381 * |WifiStatusCode.SUCCESS|,
382 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
383 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
384 * |WifiStatusCode.ERROR_BUSY|,
385 * |WifiStatusCode.ERROR_UNKNOWN|
386 */
387 setRoamingState(StaRoamingState state) generates (WifiStatus status);
388
389 /**
Roshan Piusaf727c02017-01-11 15:37:25 -0800390 * Enable/Disable Neighbour discovery offload functionality in the firmware.
391 *
392 * @param enable true to enable, false to disable.
393 * @return status WifiStatus of the operation.
394 * Possible status codes:
395 * |WifiStatusCode.SUCCESS|,
396 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
397 * |WifiStatusCode.ERROR_UNKNOWN|
398 */
399 enableNdOffload(bool enable) generates (WifiStatus status);
400
401 /**
Roshan Pius9a9869a2017-01-11 16:42:16 -0800402 * Start sending the specified keep alive packets periodically.
403 *
404 * @param cmdId command Id to use for this invocation.
405 * @param ipPacketData IP packet contents to be transmitted.
406 * @param etherType 16 bit ether type to be set in the ethernet frame
407 * transmitted.
408 * @param srcAddress Source MAC address of the packet.
409 * @param dstAddress Destination MAC address of the packet.
410 * @param periodInMs Interval at which this packet must be transmitted.
411 * @return status WifiStatus of the operation.
412 * Possible status codes:
413 * |WifiStatusCode.SUCCESS|,
414 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
415 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
416 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
417 * |WifiStatusCode.ERROR_UNKNOWN|
418 */
419 startSendingKeepAlivePackets(
420 CommandId cmdId, vec<uint8_t> ipPacketData, uint16_t etherType,
421 MacAddress srcAddress, MacAddress dstAddress, uint32_t periodInMs)
422 generates (WifiStatus status);
423
424 /**
425 * Stop sending the specified keep alive packets.
426 *
427 * @param cmdId command Id corresponding to the request.
428 * @return status WifiStatus of the operation.
429 * Possible status codes:
430 * |WifiStatusCode.SUCCESS|,
431 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
432 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
433 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
434 * |WifiStatusCode.ERROR_UNKNOWN|
435 */
436 stopSendingKeepAlivePackets(CommandId cmdId) generates (WifiStatus status);
437
438 /**
Roshan Piusfe9ad362016-10-19 16:45:12 -0700439 * API to start packet fate monitoring.
440 * - Once stared, monitoring must remain active until HAL is unloaded.
441 * - When HAL is unloaded, all packet fate buffers must be cleared.
442 * - The packet fates are used to monitor the state of packets transmitted/
443 * received during association.
444 *
445 * @return status WifiStatus of the operation.
446 * Possible status codes:
447 * |WifiStatusCode.SUCCESS|,
448 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
449 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
450 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
451 * |WifiStatusCode.ERROR_UNKNOWN|
452 */
453 startDebugPacketFateMonitoring() generates (WifiStatus status);
454
455 /**
456 * API to stop packet fate monitoring.
457 *
458 * @return status WifiStatus of the operation.
459 * Possible status codes:
460 * |WifiStatusCode.SUCCESS|,
461 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
462 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
463 * |WifiStatusCode.ERROR_NOT_STARTED|,
464 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
465 * |WifiStatusCode.ERROR_UNKNOWN|
466 */
467 stopDebugPacketFateMonitoring() generates (WifiStatus status);
468
469 /**
470 * API to retrieve fates of outbound packets.
471 * - HAL implementation must return the fates of
472 * all the frames transmitted for the most recent association.
473 * The fate reports must follow the same order as their respective
474 * packets.
475 * - HAL implementation may choose (but is not required) to include
476 * reports for management frames.
477 * - Packets reported by firmware, but not recognized by driver,
478 * must be included. However, the ordering of the corresponding
479 * reports is at the discretion of HAL implementation.
480 * - Framework must be able to call this API multiple times for the same
481 * association.
482 *
483 * @return status WifiStatus of the operation.
484 * Possible status codes:
485 * |WifiStatusCode.SUCCESS|,
486 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
487 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
488 * |WifiStatusCode.ERROR_NOT_STARTED|,
489 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
490 * |WifiStatusCode.ERROR_UNKNOWN|
491 * @return fates Vector of |WifiDebugTxPacketFateReport| instances corresponding
492 * to the packet fates.
493 */
494 getDebugTxPacketFates()
495 generates (WifiStatus status, vec<WifiDebugTxPacketFateReport> fates);
496
497 /**
498 * API to retrieve fates of inbound packets.
499 * - HAL implementation must return the fates of
500 * all the frames received for the most recent association.
501 * The fate reports must follow the same order as their respective
502 * packets.
503 * - HAL implementation may choose (but is not required) to include
504 * reports for management frames.
505 * - Packets reported by firmware, but not recognized by driver,
506 * must be included. However, the ordering of the corresponding
507 * reports is at the discretion of HAL implementation.
508 * - Framework must be able to call this API multiple times for the same
509 * association.
510 *
511 * @return status WifiStatus of the operation.
512 * Possible status codes:
513 * |WifiStatusCode.SUCCESS|,
514 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
515 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
516 * |WifiStatusCode.ERROR_NOT_STARTED|,
517 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
518 * |WifiStatusCode.ERROR_UNKNOWN|
519 * @return fates Vector of |WifiDebugRxPacketFateReport| instances corresponding
520 * to the packet fates.
521 */
522 getDebugRxPacketFates()
523 generates (WifiStatus status, vec<WifiDebugRxPacketFateReport> fates);
Roshan Piusadcfba42016-10-05 10:19:06 -0700524};