blob: 6a738a90927c92e100a6a7f04282a1cb2798537d [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 Pius5c3a0d92017-01-18 09:23:18 -0800123 getCapabilities()
124 generates (WifiStatus status,
125 bitfield<StaIfaceCapabilityMask> capabilities);
Roshan Pius7b777472016-10-07 13:15:59 -0700126
127 /**
128 * Used to query additional information about the chip's APF capabilities.
Roshan Pius18680b72016-10-12 08:25:48 -0700129 * Must fail if |StaIfaceCapabilityMask.APF| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700130 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700131 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700132 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700133 * |WifiStatusCode.SUCCESS|,
134 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
135 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
136 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
137 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius5e254662016-10-26 10:10:48 -0700138 * @return capabilities Instance of |StaApfPacketFilterCapabilities|.
Roshan Pius7b777472016-10-07 13:15:59 -0700139 */
140 getApfPacketFilterCapabilities()
Roshan Pius5e254662016-10-26 10:10:48 -0700141 generates (WifiStatus status, StaApfPacketFilterCapabilities capabilities);
Roshan Pius7b777472016-10-07 13:15:59 -0700142
143 /**
144 * Installs an APF program on this iface, replacing an existing
145 * program if present.
Roshan Pius18680b72016-10-12 08:25:48 -0700146 * Must fail if |StaIfaceCapabilityMask.APF| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700147 *
148 * @param cmdId command Id to use for this invocation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700149 * @param APF Program to be set.
Roshan Piusa52dc732016-10-10 11:53:07 -0700150 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700151 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700152 * |WifiStatusCode.SUCCESS|,
153 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
154 * |WifiStatusCode.ERROR_INVALID_ARGS|,
155 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
156 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
157 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700158 */
Roshan Pius1f9073c2016-10-10 10:32:22 -0700159 installApfPacketFilter(CommandId cmdId, vec<uint8_t> program)
Roshan Piusa52dc732016-10-10 11:53:07 -0700160 generates (WifiStatus status);
Roshan Pius7b777472016-10-07 13:15:59 -0700161
162 /**
Roshan Pius18680b72016-10-12 08:25:48 -0700163 * Used to query additional information about the chip's Background Scan capabilities.
164 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700165 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700166 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700167 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700168 * |WifiStatusCode.SUCCESS|,
169 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
170 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
171 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
172 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius5e254662016-10-26 10:10:48 -0700173 * @return capabilities Instance of |StaBackgroundScanCapabilities|.
Roshan Pius7b777472016-10-07 13:15:59 -0700174 */
175 getBackgroundScanCapabilities()
Roshan Pius5e254662016-10-26 10:10:48 -0700176 generates (WifiStatus status, StaBackgroundScanCapabilities capabilities);
Roshan Pius7b777472016-10-07 13:15:59 -0700177
178 /**
Roshan Pius18680b72016-10-12 08:25:48 -0700179 * Used to query the list of valid frequencies (depending on country code set)
180 * for the provided band. These channels may be specifed in the
181 * |BackgroundScanBucketParameters.frequenciesInMhz| for a background scan
182 * request.
183 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
184 *
Roshan Pius5e254662016-10-26 10:10:48 -0700185 * @param band Band for which the frequency list is being generated.
Roshan Pius18680b72016-10-12 08:25:48 -0700186 * @return status WifiStatus of the operation.
187 * Possible status codes:
188 * |WifiStatusCode.SUCCESS|,
189 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
190 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
191 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
192 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius120f94c2016-10-13 11:48:42 -0700193 * @return frequencies vector of valid frequencies for the provided band.
Roshan Pius18680b72016-10-12 08:25:48 -0700194 */
Roshan Pius5e254662016-10-26 10:10:48 -0700195 getValidFrequenciesForBackgroundScan(StaBackgroundScanBand band)
Roshan Pius120f94c2016-10-13 11:48:42 -0700196 generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
Roshan Pius18680b72016-10-12 08:25:48 -0700197
198 /**
Roshan Pius7b777472016-10-07 13:15:59 -0700199 * Start a background scan using the given cmdId as an identifier. Only one
200 * active background scan need be supported.
Roshan Pius18680b72016-10-12 08:25:48 -0700201 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700202 *
203 * When this is called all requested buckets must be scanned, starting the
204 * beginning of the cycle.
205 *
206 * For example:
207 * If there are two buckets specified
208 * - Bucket 1: period=10s
209 * - Bucket 2: period=20s
210 * - Bucket 3: period=30s
211 * Then the following scans must occur
212 * - t=0 buckets 1, 2, and 3 are scanned
213 * - t=10 bucket 1 is scanned
214 * - t=20 bucket 1 and 2 are scanned
215 * - t=30 bucket 1 and 3 are scanned
216 * - t=40 bucket 1 and 2 are scanned
217 * - t=50 bucket 1 is scanned
218 * - t=60 buckets 1, 2, and 3 are scanned
219 * - and the patter repeats
220 *
221 * If any scan does not occur or is incomplete (error, interrupted, etc) then
222 * a cached scan result must still be recorded with the
223 * WIFI_SCAN_FLAG_INTERRUPTED flag set.
224 *
225 * @param cmdId command Id to use for this invocation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700226 * @params Background scan parameters.
Roshan Piusa52dc732016-10-10 11:53:07 -0700227 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700228 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700229 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
230 * |WifiStatusCode.ERROR_INVALID_ARGS|,
231 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
232 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
233 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700234 */
Roshan Pius5e254662016-10-26 10:10:48 -0700235 startBackgroundScan(CommandId cmdId, StaBackgroundScanParameters params)
Roshan Piusa52dc732016-10-10 11:53:07 -0700236 generates (WifiStatus status);
Roshan Pius7b777472016-10-07 13:15:59 -0700237
238 /**
239 * Stop the background scan started.
Roshan Pius18680b72016-10-12 08:25:48 -0700240 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700241 *
242 * @param cmdId command Id corresponding to the request.
Roshan Piusa52dc732016-10-10 11:53:07 -0700243 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700244 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700245 * |WifiStatusCode.SUCCESS|,
246 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
247 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700248 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Piusa52dc732016-10-10 11:53:07 -0700249 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
250 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700251 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700252 stopBackgroundScan(CommandId cmdId) generates (WifiStatus status);
Roshan Pius18680b72016-10-12 08:25:48 -0700253
254 /**
255 * Enable link layer stats collection.
256 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set.
257 *
258 * Radio statistics (once started) must not stop until disabled.
259 * Iface statistics (once started) reset and start afresh after each
260 * connection until disabled.
261 *
262 * @param debug Set for field debug mode. Driver must collect all
263 * statistics regardless of performance impact.
264 * @return status WifiStatus of the operation.
265 * Possible status codes:
266 * |WifiStatusCode.SUCCESS|,
267 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
268 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
269 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
270 * |WifiStatusCode.ERROR_UNKNOWN|
271 */
272 enableLinkLayerStatsCollection(bool debug)
273 generates (WifiStatus status);
274
275 /**
276 * Disable link layer stats collection.
277 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set.
278 *
279 * @return status WifiStatus of the operation.
280 * Possible status codes:
281 * |WifiStatusCode.SUCCESS|,
282 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
283 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700284 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Pius18680b72016-10-12 08:25:48 -0700285 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
286 * |WifiStatusCode.ERROR_UNKNOWN|
287 */
288 disableLinkLayerStatsCollection() generates (WifiStatus status);
289
290 /**
291 * Retrieve the latest link layer stats.
292 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set or if
293 * link layer stats collection hasn't been explicitly enabled.
294 *
295 * @return status WifiStatus of the operation.
296 * Possible status codes:
297 * |WifiStatusCode.SUCCESS|,
298 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
299 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700300 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Pius18680b72016-10-12 08:25:48 -0700301 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
302 * |WifiStatusCode.ERROR_UNKNOWN|
303 * @return stats Instance of |LinkLayerStats|.
304 */
Roshan Pius5e254662016-10-26 10:10:48 -0700305 getLinkLayerStats() generates (WifiStatus status, StaLinkLayerStats stats);
Roshan Piusfe9ad362016-10-19 16:45:12 -0700306
307 /**
Roshan Piusd4767542016-12-06 10:04:05 -0800308 * Start RSSI monitoring on the currently connected access point.
309 * Once the monitoring is enabled,
310 * |IWifiStaIfaceEventCallback.onRssiThresholdBreached| callback must be
311 * invoked to indicate if the RSSI goes above |maxRssi| or below |minRssi|.
312 * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set.
313 *
314 * @param cmdId command Id to use for this invocation.
315 * @param maxRssi Maximum RSSI threshold.
316 * @param minRssi Minimum RSSI threshold.
317 * @return status WifiStatus of the operation.
318 * Possible status codes:
319 * |WifiStatusCode.SUCCESS|,
320 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
321 * |WifiStatusCode.ERROR_ARGS_INVALID|,
322 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
323 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
324 * |WifiStatusCode.ERROR_UNKNOWN|
325 */
326 startRssiMonitoring(CommandId cmdId, Rssi maxRssi, Rssi minRssi)
327 generates (WifiStatus status);
328
329 /**
330 * Stop RSSI monitoring.
331 * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set.
332 *
333 * @param cmdId command Id corresponding to the request.
334 * @return status WifiStatus of the operation.
335 * Possible status codes:
336 * |WifiStatusCode.SUCCESS|,
337 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
338 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
339 * |WifiStatusCode.ERROR_NOT_STARTED|,
340 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
341 * |WifiStatusCode.ERROR_UNKNOWN|
342 */
343 stopRssiMonitoring(CommandId cmdId) generates (WifiStatus status);
344
345 /**
Roshan Pius26801cb2016-12-13 14:25:45 -0800346 * Get roaming control capabilities.
347 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
348 *
349 * @return status WifiStatus of the operation.
350 * Possible status codes:
351 * |WifiStatusCode.SUCCESS|,
352 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
353 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
354 * |WifiStatusCode.ERROR_UNKNOWN|
355 * @return caps Instance of |StaRoamingCapabilities|.
356 */
357 getRoamingCapabilities()
358 generates (WifiStatus status, StaRoamingCapabilities caps);
359
360 /**
361 * Configure roaming control parameters.
362 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
363 *
364 * @param config Instance of |StaRoamingConfig|.
365 * @return status WifiStatus of the operation.
366 * Possible status codes:
367 * |WifiStatusCode.SUCCESS|,
368 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
369 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
370 * |WifiStatusCode.ERROR_UNKNOWN|
371 */
372 configureRoaming(StaRoamingConfig config) generates (WifiStatus status);
373
374 /**
375 * Set the roaming control state with the parameters configured
376 * using |configureRoaming|. Depending on the roaming state set, the
377 * driver/firmware would enable/disable control over roaming decisions.
378 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
379 *
380 * @param state State of the roaming control.
381 * @return status WifiStatus of the operation.
382 * Possible status codes:
383 * |WifiStatusCode.SUCCESS|,
384 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
385 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
386 * |WifiStatusCode.ERROR_BUSY|,
387 * |WifiStatusCode.ERROR_UNKNOWN|
388 */
389 setRoamingState(StaRoamingState state) generates (WifiStatus status);
390
391 /**
Roshan Piusaf727c02017-01-11 15:37:25 -0800392 * Enable/Disable Neighbour discovery offload functionality in the firmware.
393 *
394 * @param enable true to enable, false to disable.
395 * @return status WifiStatus of the operation.
396 * Possible status codes:
397 * |WifiStatusCode.SUCCESS|,
398 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
399 * |WifiStatusCode.ERROR_UNKNOWN|
400 */
401 enableNdOffload(bool enable) generates (WifiStatus status);
402
403 /**
Roshan Pius9a9869a2017-01-11 16:42:16 -0800404 * Start sending the specified keep alive packets periodically.
405 *
406 * @param cmdId command Id to use for this invocation.
407 * @param ipPacketData IP packet contents to be transmitted.
408 * @param etherType 16 bit ether type to be set in the ethernet frame
409 * transmitted.
410 * @param srcAddress Source MAC address of the packet.
411 * @param dstAddress Destination MAC address of the packet.
412 * @param periodInMs Interval at which this packet must be transmitted.
413 * @return status WifiStatus of the operation.
414 * Possible status codes:
415 * |WifiStatusCode.SUCCESS|,
416 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
417 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
418 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
419 * |WifiStatusCode.ERROR_UNKNOWN|
420 */
421 startSendingKeepAlivePackets(
422 CommandId cmdId, vec<uint8_t> ipPacketData, uint16_t etherType,
423 MacAddress srcAddress, MacAddress dstAddress, uint32_t periodInMs)
424 generates (WifiStatus status);
425
426 /**
427 * Stop sending the specified keep alive packets.
428 *
429 * @param cmdId command Id corresponding to the request.
430 * @return status WifiStatus of the operation.
431 * Possible status codes:
432 * |WifiStatusCode.SUCCESS|,
433 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
434 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
435 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
436 * |WifiStatusCode.ERROR_UNKNOWN|
437 */
438 stopSendingKeepAlivePackets(CommandId cmdId) generates (WifiStatus status);
439
440 /**
Roshan Piusfe9ad362016-10-19 16:45:12 -0700441 * API to start packet fate monitoring.
442 * - Once stared, monitoring must remain active until HAL is unloaded.
443 * - When HAL is unloaded, all packet fate buffers must be cleared.
444 * - The packet fates are used to monitor the state of packets transmitted/
445 * received during association.
446 *
447 * @return status WifiStatus of the operation.
448 * Possible status codes:
449 * |WifiStatusCode.SUCCESS|,
450 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
451 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
452 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
453 * |WifiStatusCode.ERROR_UNKNOWN|
454 */
455 startDebugPacketFateMonitoring() generates (WifiStatus status);
456
457 /**
458 * API to stop packet fate monitoring.
459 *
460 * @return status WifiStatus of the operation.
461 * Possible status codes:
462 * |WifiStatusCode.SUCCESS|,
463 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
464 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
465 * |WifiStatusCode.ERROR_NOT_STARTED|,
466 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
467 * |WifiStatusCode.ERROR_UNKNOWN|
468 */
469 stopDebugPacketFateMonitoring() generates (WifiStatus status);
470
471 /**
472 * API to retrieve fates of outbound packets.
473 * - HAL implementation must return the fates of
474 * all the frames transmitted for the most recent association.
475 * The fate reports must follow the same order as their respective
476 * packets.
477 * - HAL implementation may choose (but is not required) to include
478 * reports for management frames.
479 * - Packets reported by firmware, but not recognized by driver,
480 * must be included. However, the ordering of the corresponding
481 * reports is at the discretion of HAL implementation.
482 * - Framework must be able to call this API multiple times for the same
483 * association.
484 *
485 * @return status WifiStatus of the operation.
486 * Possible status codes:
487 * |WifiStatusCode.SUCCESS|,
488 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
489 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
490 * |WifiStatusCode.ERROR_NOT_STARTED|,
491 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
492 * |WifiStatusCode.ERROR_UNKNOWN|
493 * @return fates Vector of |WifiDebugTxPacketFateReport| instances corresponding
494 * to the packet fates.
495 */
496 getDebugTxPacketFates()
497 generates (WifiStatus status, vec<WifiDebugTxPacketFateReport> fates);
498
499 /**
500 * API to retrieve fates of inbound packets.
501 * - HAL implementation must return the fates of
502 * all the frames received for the most recent association.
503 * The fate reports must follow the same order as their respective
504 * packets.
505 * - HAL implementation may choose (but is not required) to include
506 * reports for management frames.
507 * - Packets reported by firmware, but not recognized by driver,
508 * must be included. However, the ordering of the corresponding
509 * reports is at the discretion of HAL implementation.
510 * - Framework must be able to call this API multiple times for the same
511 * association.
512 *
513 * @return status WifiStatus of the operation.
514 * Possible status codes:
515 * |WifiStatusCode.SUCCESS|,
516 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
517 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
518 * |WifiStatusCode.ERROR_NOT_STARTED|,
519 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
520 * |WifiStatusCode.ERROR_UNKNOWN|
521 * @return fates Vector of |WifiDebugRxPacketFateReport| instances corresponding
522 * to the packet fates.
523 */
524 getDebugRxPacketFates()
525 generates (WifiStatus status, vec<WifiDebugRxPacketFateReport> fates);
Roshan Piusadcfba42016-10-05 10:19:06 -0700526};