blob: 0d6b5604fcb11be2e8a30c5bec6ee290c2b2a0fc [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 Pius9a9869a2017-01-11 16:42:16 -080084 * Support for keep alive packet offload.
85 */
86 KEEP_ALIVE = 1 << 12,
87 /**
Roshan Piusa2d369d2016-12-15 22:38:00 -080088 * Support for tracking connection packets' fate.
89 */
Roshan Pius9a9869a2017-01-11 16:42:16 -080090 DEBUG_PACKET_FATE = 1 << 13
Roshan Pius18680b72016-10-12 08:25:48 -070091 };
92
93 /**
Roshan Pius7b777472016-10-07 13:15:59 -070094 * Requests notifications of significant events on this iface. Multiple calls
95 * to this must register multiple callbacks each of which must receive all
96 * events.
97 *
98 * @param callback An instance of the |IWifiStaIfaceEventCallback| HIDL interface
99 * object.
Roshan Piusa52dc732016-10-10 11:53:07 -0700100 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700101 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700102 * |WifiStatusCode.SUCCESS|,
103 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|
Roshan Pius7b777472016-10-07 13:15:59 -0700104 */
Roshan Pius1f9073c2016-10-10 10:32:22 -0700105 registerEventCallback(IWifiStaIfaceEventCallback callback)
Roshan Piusa52dc732016-10-10 11:53:07 -0700106 generates (WifiStatus status);
Roshan Pius7b777472016-10-07 13:15:59 -0700107
108 /**
109 * Get the capabilities supported by this STA iface.
110 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700111 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700112 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700113 * |WifiStatusCode.SUCCESS|,
114 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
115 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
116 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700117 * @return capabilities Bitset of |StaIfaceCapabilityMask| values.
118 */
Roshan Pius5e254662016-10-26 10:10:48 -0700119 getCapabilities() generates (WifiStatus status, uint32_t capabilities);
Roshan Pius7b777472016-10-07 13:15:59 -0700120
121 /**
122 * Used to query additional information about the chip's APF capabilities.
Roshan Pius18680b72016-10-12 08:25:48 -0700123 * Must fail if |StaIfaceCapabilityMask.APF| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700124 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700125 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700126 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700127 * |WifiStatusCode.SUCCESS|,
128 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
129 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
130 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
131 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius5e254662016-10-26 10:10:48 -0700132 * @return capabilities Instance of |StaApfPacketFilterCapabilities|.
Roshan Pius7b777472016-10-07 13:15:59 -0700133 */
134 getApfPacketFilterCapabilities()
Roshan Pius5e254662016-10-26 10:10:48 -0700135 generates (WifiStatus status, StaApfPacketFilterCapabilities capabilities);
Roshan Pius7b777472016-10-07 13:15:59 -0700136
137 /**
138 * Installs an APF program on this iface, replacing an existing
139 * program if present.
Roshan Pius18680b72016-10-12 08:25:48 -0700140 * Must fail if |StaIfaceCapabilityMask.APF| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700141 *
142 * @param cmdId command Id to use for this invocation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700143 * @param APF Program to be set.
Roshan Piusa52dc732016-10-10 11:53:07 -0700144 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700145 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700146 * |WifiStatusCode.SUCCESS|,
147 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
148 * |WifiStatusCode.ERROR_INVALID_ARGS|,
149 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
150 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
151 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700152 */
Roshan Pius1f9073c2016-10-10 10:32:22 -0700153 installApfPacketFilter(CommandId cmdId, vec<uint8_t> program)
Roshan Piusa52dc732016-10-10 11:53:07 -0700154 generates (WifiStatus status);
Roshan Pius7b777472016-10-07 13:15:59 -0700155
156 /**
Roshan Pius18680b72016-10-12 08:25:48 -0700157 * Used to query additional information about the chip's Background Scan capabilities.
158 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700159 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700160 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700161 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700162 * |WifiStatusCode.SUCCESS|,
163 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
164 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
165 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
166 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius5e254662016-10-26 10:10:48 -0700167 * @return capabilities Instance of |StaBackgroundScanCapabilities|.
Roshan Pius7b777472016-10-07 13:15:59 -0700168 */
169 getBackgroundScanCapabilities()
Roshan Pius5e254662016-10-26 10:10:48 -0700170 generates (WifiStatus status, StaBackgroundScanCapabilities capabilities);
Roshan Pius7b777472016-10-07 13:15:59 -0700171
172 /**
Roshan Pius18680b72016-10-12 08:25:48 -0700173 * Used to query the list of valid frequencies (depending on country code set)
174 * for the provided band. These channels may be specifed in the
175 * |BackgroundScanBucketParameters.frequenciesInMhz| for a background scan
176 * request.
177 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
178 *
Roshan Pius5e254662016-10-26 10:10:48 -0700179 * @param band Band for which the frequency list is being generated.
Roshan Pius18680b72016-10-12 08:25:48 -0700180 * @return status WifiStatus of the operation.
181 * Possible status codes:
182 * |WifiStatusCode.SUCCESS|,
183 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
184 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
185 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
186 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius120f94c2016-10-13 11:48:42 -0700187 * @return frequencies vector of valid frequencies for the provided band.
Roshan Pius18680b72016-10-12 08:25:48 -0700188 */
Roshan Pius5e254662016-10-26 10:10:48 -0700189 getValidFrequenciesForBackgroundScan(StaBackgroundScanBand band)
Roshan Pius120f94c2016-10-13 11:48:42 -0700190 generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
Roshan Pius18680b72016-10-12 08:25:48 -0700191
192 /**
Roshan Pius7b777472016-10-07 13:15:59 -0700193 * Start a background scan using the given cmdId as an identifier. Only one
194 * active background scan need be supported.
Roshan Pius18680b72016-10-12 08:25:48 -0700195 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700196 *
197 * When this is called all requested buckets must be scanned, starting the
198 * beginning of the cycle.
199 *
200 * For example:
201 * If there are two buckets specified
202 * - Bucket 1: period=10s
203 * - Bucket 2: period=20s
204 * - Bucket 3: period=30s
205 * Then the following scans must occur
206 * - t=0 buckets 1, 2, and 3 are scanned
207 * - t=10 bucket 1 is scanned
208 * - t=20 bucket 1 and 2 are scanned
209 * - t=30 bucket 1 and 3 are scanned
210 * - t=40 bucket 1 and 2 are scanned
211 * - t=50 bucket 1 is scanned
212 * - t=60 buckets 1, 2, and 3 are scanned
213 * - and the patter repeats
214 *
215 * If any scan does not occur or is incomplete (error, interrupted, etc) then
216 * a cached scan result must still be recorded with the
217 * WIFI_SCAN_FLAG_INTERRUPTED flag set.
218 *
219 * @param cmdId command Id to use for this invocation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700220 * @params Background scan parameters.
Roshan Piusa52dc732016-10-10 11:53:07 -0700221 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700222 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700223 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
224 * |WifiStatusCode.ERROR_INVALID_ARGS|,
225 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
226 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
227 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700228 */
Roshan Pius5e254662016-10-26 10:10:48 -0700229 startBackgroundScan(CommandId cmdId, StaBackgroundScanParameters params)
Roshan Piusa52dc732016-10-10 11:53:07 -0700230 generates (WifiStatus status);
Roshan Pius7b777472016-10-07 13:15:59 -0700231
232 /**
233 * Stop the background scan started.
Roshan Pius18680b72016-10-12 08:25:48 -0700234 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700235 *
236 * @param cmdId command Id corresponding to the request.
Roshan Piusa52dc732016-10-10 11:53:07 -0700237 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700238 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700239 * |WifiStatusCode.SUCCESS|,
240 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
241 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700242 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Piusa52dc732016-10-10 11:53:07 -0700243 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
244 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700245 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700246 stopBackgroundScan(CommandId cmdId) generates (WifiStatus status);
Roshan Pius18680b72016-10-12 08:25:48 -0700247
248 /**
249 * Enable link layer stats collection.
250 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set.
251 *
252 * Radio statistics (once started) must not stop until disabled.
253 * Iface statistics (once started) reset and start afresh after each
254 * connection until disabled.
255 *
256 * @param debug Set for field debug mode. Driver must collect all
257 * statistics regardless of performance impact.
258 * @return status WifiStatus of the operation.
259 * Possible status codes:
260 * |WifiStatusCode.SUCCESS|,
261 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
262 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
263 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
264 * |WifiStatusCode.ERROR_UNKNOWN|
265 */
266 enableLinkLayerStatsCollection(bool debug)
267 generates (WifiStatus status);
268
269 /**
270 * Disable link layer stats collection.
271 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set.
272 *
273 * @return status WifiStatus of the operation.
274 * Possible status codes:
275 * |WifiStatusCode.SUCCESS|,
276 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
277 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700278 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Pius18680b72016-10-12 08:25:48 -0700279 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
280 * |WifiStatusCode.ERROR_UNKNOWN|
281 */
282 disableLinkLayerStatsCollection() generates (WifiStatus status);
283
284 /**
285 * Retrieve the latest link layer stats.
286 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set or if
287 * link layer stats collection hasn't been explicitly enabled.
288 *
289 * @return status WifiStatus of the operation.
290 * Possible status codes:
291 * |WifiStatusCode.SUCCESS|,
292 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
293 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700294 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Pius18680b72016-10-12 08:25:48 -0700295 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
296 * |WifiStatusCode.ERROR_UNKNOWN|
297 * @return stats Instance of |LinkLayerStats|.
298 */
Roshan Pius5e254662016-10-26 10:10:48 -0700299 getLinkLayerStats() generates (WifiStatus status, StaLinkLayerStats stats);
Roshan Piusfe9ad362016-10-19 16:45:12 -0700300
301 /**
Roshan Piusd4767542016-12-06 10:04:05 -0800302 * Start RSSI monitoring on the currently connected access point.
303 * Once the monitoring is enabled,
304 * |IWifiStaIfaceEventCallback.onRssiThresholdBreached| callback must be
305 * invoked to indicate if the RSSI goes above |maxRssi| or below |minRssi|.
306 * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set.
307 *
308 * @param cmdId command Id to use for this invocation.
309 * @param maxRssi Maximum RSSI threshold.
310 * @param minRssi Minimum RSSI threshold.
311 * @return status WifiStatus of the operation.
312 * Possible status codes:
313 * |WifiStatusCode.SUCCESS|,
314 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
315 * |WifiStatusCode.ERROR_ARGS_INVALID|,
316 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
317 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
318 * |WifiStatusCode.ERROR_UNKNOWN|
319 */
320 startRssiMonitoring(CommandId cmdId, Rssi maxRssi, Rssi minRssi)
321 generates (WifiStatus status);
322
323 /**
324 * Stop RSSI monitoring.
325 * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set.
326 *
327 * @param cmdId command Id corresponding to the request.
328 * @return status WifiStatus of the operation.
329 * Possible status codes:
330 * |WifiStatusCode.SUCCESS|,
331 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
332 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
333 * |WifiStatusCode.ERROR_NOT_STARTED|,
334 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
335 * |WifiStatusCode.ERROR_UNKNOWN|
336 */
337 stopRssiMonitoring(CommandId cmdId) generates (WifiStatus status);
338
339 /**
Roshan Pius26801cb2016-12-13 14:25:45 -0800340 * Get roaming control capabilities.
341 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
342 *
343 * @return status WifiStatus of the operation.
344 * Possible status codes:
345 * |WifiStatusCode.SUCCESS|,
346 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
347 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
348 * |WifiStatusCode.ERROR_UNKNOWN|
349 * @return caps Instance of |StaRoamingCapabilities|.
350 */
351 getRoamingCapabilities()
352 generates (WifiStatus status, StaRoamingCapabilities caps);
353
354 /**
355 * Configure roaming control parameters.
356 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
357 *
358 * @param config Instance of |StaRoamingConfig|.
359 * @return status WifiStatus of the operation.
360 * Possible status codes:
361 * |WifiStatusCode.SUCCESS|,
362 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
363 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
364 * |WifiStatusCode.ERROR_UNKNOWN|
365 */
366 configureRoaming(StaRoamingConfig config) generates (WifiStatus status);
367
368 /**
369 * Set the roaming control state with the parameters configured
370 * using |configureRoaming|. Depending on the roaming state set, the
371 * driver/firmware would enable/disable control over roaming decisions.
372 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
373 *
374 * @param state State of the roaming control.
375 * @return status WifiStatus of the operation.
376 * Possible status codes:
377 * |WifiStatusCode.SUCCESS|,
378 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
379 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
380 * |WifiStatusCode.ERROR_BUSY|,
381 * |WifiStatusCode.ERROR_UNKNOWN|
382 */
383 setRoamingState(StaRoamingState state) generates (WifiStatus status);
384
385 /**
Roshan Piusaf727c02017-01-11 15:37:25 -0800386 * Enable/Disable Neighbour discovery offload functionality in the firmware.
387 *
388 * @param enable true to enable, false to disable.
389 * @return status WifiStatus of the operation.
390 * Possible status codes:
391 * |WifiStatusCode.SUCCESS|,
392 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
393 * |WifiStatusCode.ERROR_UNKNOWN|
394 */
395 enableNdOffload(bool enable) generates (WifiStatus status);
396
397 /**
Roshan Pius9a9869a2017-01-11 16:42:16 -0800398 * Start sending the specified keep alive packets periodically.
399 *
400 * @param cmdId command Id to use for this invocation.
401 * @param ipPacketData IP packet contents to be transmitted.
402 * @param etherType 16 bit ether type to be set in the ethernet frame
403 * transmitted.
404 * @param srcAddress Source MAC address of the packet.
405 * @param dstAddress Destination MAC address of the packet.
406 * @param periodInMs Interval at which this packet must be transmitted.
407 * @return status WifiStatus of the operation.
408 * Possible status codes:
409 * |WifiStatusCode.SUCCESS|,
410 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
411 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
412 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
413 * |WifiStatusCode.ERROR_UNKNOWN|
414 */
415 startSendingKeepAlivePackets(
416 CommandId cmdId, vec<uint8_t> ipPacketData, uint16_t etherType,
417 MacAddress srcAddress, MacAddress dstAddress, uint32_t periodInMs)
418 generates (WifiStatus status);
419
420 /**
421 * Stop sending the specified keep alive packets.
422 *
423 * @param cmdId command Id corresponding to the request.
424 * @return status WifiStatus of the operation.
425 * Possible status codes:
426 * |WifiStatusCode.SUCCESS|,
427 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
428 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
429 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
430 * |WifiStatusCode.ERROR_UNKNOWN|
431 */
432 stopSendingKeepAlivePackets(CommandId cmdId) generates (WifiStatus status);
433
434 /**
Roshan Piusfe9ad362016-10-19 16:45:12 -0700435 * API to start packet fate monitoring.
436 * - Once stared, monitoring must remain active until HAL is unloaded.
437 * - When HAL is unloaded, all packet fate buffers must be cleared.
438 * - The packet fates are used to monitor the state of packets transmitted/
439 * received during association.
440 *
441 * @return status WifiStatus of the operation.
442 * Possible status codes:
443 * |WifiStatusCode.SUCCESS|,
444 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
445 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
446 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
447 * |WifiStatusCode.ERROR_UNKNOWN|
448 */
449 startDebugPacketFateMonitoring() generates (WifiStatus status);
450
451 /**
452 * API to stop packet fate monitoring.
453 *
454 * @return status WifiStatus of the operation.
455 * Possible status codes:
456 * |WifiStatusCode.SUCCESS|,
457 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
458 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
459 * |WifiStatusCode.ERROR_NOT_STARTED|,
460 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
461 * |WifiStatusCode.ERROR_UNKNOWN|
462 */
463 stopDebugPacketFateMonitoring() generates (WifiStatus status);
464
465 /**
466 * API to retrieve fates of outbound packets.
467 * - HAL implementation must return the fates of
468 * all the frames transmitted for the most recent association.
469 * The fate reports must follow the same order as their respective
470 * packets.
471 * - HAL implementation may choose (but is not required) to include
472 * reports for management frames.
473 * - Packets reported by firmware, but not recognized by driver,
474 * must be included. However, the ordering of the corresponding
475 * reports is at the discretion of HAL implementation.
476 * - Framework must be able to call this API multiple times for the same
477 * association.
478 *
479 * @return status WifiStatus of the operation.
480 * Possible status codes:
481 * |WifiStatusCode.SUCCESS|,
482 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
483 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
484 * |WifiStatusCode.ERROR_NOT_STARTED|,
485 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
486 * |WifiStatusCode.ERROR_UNKNOWN|
487 * @return fates Vector of |WifiDebugTxPacketFateReport| instances corresponding
488 * to the packet fates.
489 */
490 getDebugTxPacketFates()
491 generates (WifiStatus status, vec<WifiDebugTxPacketFateReport> fates);
492
493 /**
494 * API to retrieve fates of inbound packets.
495 * - HAL implementation must return the fates of
496 * all the frames received for the most recent association.
497 * The fate reports must follow the same order as their respective
498 * packets.
499 * - HAL implementation may choose (but is not required) to include
500 * reports for management frames.
501 * - Packets reported by firmware, but not recognized by driver,
502 * must be included. However, the ordering of the corresponding
503 * reports is at the discretion of HAL implementation.
504 * - Framework must be able to call this API multiple times for the same
505 * association.
506 *
507 * @return status WifiStatus of the operation.
508 * Possible status codes:
509 * |WifiStatusCode.SUCCESS|,
510 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
511 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
512 * |WifiStatusCode.ERROR_NOT_STARTED|,
513 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
514 * |WifiStatusCode.ERROR_UNKNOWN|
515 * @return fates Vector of |WifiDebugRxPacketFateReport| instances corresponding
516 * to the packet fates.
517 */
518 getDebugRxPacketFates()
519 generates (WifiStatus status, vec<WifiDebugRxPacketFateReport> fates);
Roshan Piusadcfba42016-10-05 10:19:06 -0700520};