blob: 43c312659e2b67c87d674d90200025b578167454 [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.
Roshan Pius18680b72016-10-12 08:25:48 -0700183 *
Roshan Pius5e254662016-10-26 10:10:48 -0700184 * @param band Band for which the frequency list is being generated.
Roshan Pius18680b72016-10-12 08:25:48 -0700185 * @return status WifiStatus of the operation.
186 * Possible status codes:
187 * |WifiStatusCode.SUCCESS|,
188 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
189 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
190 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
191 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius120f94c2016-10-13 11:48:42 -0700192 * @return frequencies vector of valid frequencies for the provided band.
Roshan Pius18680b72016-10-12 08:25:48 -0700193 */
Roshan Pius7f4574d2017-02-22 09:48:03 -0800194 getValidFrequenciesForBand(WifiBand band)
Roshan Pius120f94c2016-10-13 11:48:42 -0700195 generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
Roshan Pius18680b72016-10-12 08:25:48 -0700196
197 /**
Roshan Pius7b777472016-10-07 13:15:59 -0700198 * Start a background scan using the given cmdId as an identifier. Only one
199 * active background scan need be supported.
Roshan Pius18680b72016-10-12 08:25:48 -0700200 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700201 *
202 * When this is called all requested buckets must be scanned, starting the
203 * beginning of the cycle.
204 *
205 * For example:
206 * If there are two buckets specified
207 * - Bucket 1: period=10s
208 * - Bucket 2: period=20s
209 * - Bucket 3: period=30s
210 * Then the following scans must occur
211 * - t=0 buckets 1, 2, and 3 are scanned
212 * - t=10 bucket 1 is scanned
213 * - t=20 bucket 1 and 2 are scanned
214 * - t=30 bucket 1 and 3 are scanned
215 * - t=40 bucket 1 and 2 are scanned
216 * - t=50 bucket 1 is scanned
217 * - t=60 buckets 1, 2, and 3 are scanned
218 * - and the patter repeats
219 *
220 * If any scan does not occur or is incomplete (error, interrupted, etc) then
221 * a cached scan result must still be recorded with the
222 * WIFI_SCAN_FLAG_INTERRUPTED flag set.
223 *
224 * @param cmdId command Id to use for this invocation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700225 * @params Background scan parameters.
Roshan Piusa52dc732016-10-10 11:53:07 -0700226 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700227 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700228 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
229 * |WifiStatusCode.ERROR_INVALID_ARGS|,
230 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
231 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
232 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700233 */
Roshan Pius5e254662016-10-26 10:10:48 -0700234 startBackgroundScan(CommandId cmdId, StaBackgroundScanParameters params)
Roshan Piusa52dc732016-10-10 11:53:07 -0700235 generates (WifiStatus status);
Roshan Pius7b777472016-10-07 13:15:59 -0700236
237 /**
238 * Stop the background scan started.
Roshan Pius18680b72016-10-12 08:25:48 -0700239 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700240 *
241 * @param cmdId command Id corresponding to the request.
Roshan Piusa52dc732016-10-10 11:53:07 -0700242 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700243 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700244 * |WifiStatusCode.SUCCESS|,
245 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
246 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700247 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Piusa52dc732016-10-10 11:53:07 -0700248 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
249 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700250 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700251 stopBackgroundScan(CommandId cmdId) generates (WifiStatus status);
Roshan Pius18680b72016-10-12 08:25:48 -0700252
253 /**
254 * Enable link layer stats collection.
255 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set.
256 *
257 * Radio statistics (once started) must not stop until disabled.
258 * Iface statistics (once started) reset and start afresh after each
259 * connection until disabled.
260 *
261 * @param debug Set for field debug mode. Driver must collect all
262 * statistics regardless of performance impact.
263 * @return status WifiStatus of the operation.
264 * Possible status codes:
265 * |WifiStatusCode.SUCCESS|,
266 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
267 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
268 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
269 * |WifiStatusCode.ERROR_UNKNOWN|
270 */
271 enableLinkLayerStatsCollection(bool debug)
272 generates (WifiStatus status);
273
274 /**
275 * Disable link layer stats collection.
276 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set.
277 *
278 * @return status WifiStatus of the operation.
279 * Possible status codes:
280 * |WifiStatusCode.SUCCESS|,
281 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
282 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700283 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Pius18680b72016-10-12 08:25:48 -0700284 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
285 * |WifiStatusCode.ERROR_UNKNOWN|
286 */
287 disableLinkLayerStatsCollection() generates (WifiStatus status);
288
289 /**
290 * Retrieve the latest link layer stats.
291 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set or if
292 * link layer stats collection hasn't been explicitly enabled.
293 *
294 * @return status WifiStatus of the operation.
295 * Possible status codes:
296 * |WifiStatusCode.SUCCESS|,
297 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
298 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700299 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Pius18680b72016-10-12 08:25:48 -0700300 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
301 * |WifiStatusCode.ERROR_UNKNOWN|
302 * @return stats Instance of |LinkLayerStats|.
303 */
Roshan Pius5e254662016-10-26 10:10:48 -0700304 getLinkLayerStats() generates (WifiStatus status, StaLinkLayerStats stats);
Roshan Piusfe9ad362016-10-19 16:45:12 -0700305
306 /**
Roshan Piusd4767542016-12-06 10:04:05 -0800307 * Start RSSI monitoring on the currently connected access point.
308 * Once the monitoring is enabled,
309 * |IWifiStaIfaceEventCallback.onRssiThresholdBreached| callback must be
310 * invoked to indicate if the RSSI goes above |maxRssi| or below |minRssi|.
311 * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set.
312 *
313 * @param cmdId command Id to use for this invocation.
314 * @param maxRssi Maximum RSSI threshold.
315 * @param minRssi Minimum RSSI threshold.
316 * @return status WifiStatus of the operation.
317 * Possible status codes:
318 * |WifiStatusCode.SUCCESS|,
319 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
320 * |WifiStatusCode.ERROR_ARGS_INVALID|,
321 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
322 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
323 * |WifiStatusCode.ERROR_UNKNOWN|
324 */
325 startRssiMonitoring(CommandId cmdId, Rssi maxRssi, Rssi minRssi)
326 generates (WifiStatus status);
327
328 /**
329 * Stop RSSI monitoring.
330 * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set.
331 *
332 * @param cmdId command Id corresponding to the request.
333 * @return status WifiStatus of the operation.
334 * Possible status codes:
335 * |WifiStatusCode.SUCCESS|,
336 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
337 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
338 * |WifiStatusCode.ERROR_NOT_STARTED|,
339 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
340 * |WifiStatusCode.ERROR_UNKNOWN|
341 */
342 stopRssiMonitoring(CommandId cmdId) generates (WifiStatus status);
343
344 /**
Roshan Pius26801cb2016-12-13 14:25:45 -0800345 * Get roaming control capabilities.
346 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
347 *
348 * @return status WifiStatus of the operation.
349 * Possible status codes:
350 * |WifiStatusCode.SUCCESS|,
351 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
352 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
353 * |WifiStatusCode.ERROR_UNKNOWN|
354 * @return caps Instance of |StaRoamingCapabilities|.
355 */
356 getRoamingCapabilities()
357 generates (WifiStatus status, StaRoamingCapabilities caps);
358
359 /**
360 * Configure roaming control parameters.
361 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
362 *
363 * @param config Instance of |StaRoamingConfig|.
364 * @return status WifiStatus of the operation.
365 * Possible status codes:
366 * |WifiStatusCode.SUCCESS|,
367 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
368 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
369 * |WifiStatusCode.ERROR_UNKNOWN|
370 */
371 configureRoaming(StaRoamingConfig config) generates (WifiStatus status);
372
373 /**
374 * Set the roaming control state with the parameters configured
375 * using |configureRoaming|. Depending on the roaming state set, the
376 * driver/firmware would enable/disable control over roaming decisions.
377 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
378 *
379 * @param state State of the roaming control.
380 * @return status WifiStatus of the operation.
381 * Possible status codes:
382 * |WifiStatusCode.SUCCESS|,
383 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
384 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
385 * |WifiStatusCode.ERROR_BUSY|,
386 * |WifiStatusCode.ERROR_UNKNOWN|
387 */
388 setRoamingState(StaRoamingState state) generates (WifiStatus status);
389
390 /**
Roshan Piusaf727c02017-01-11 15:37:25 -0800391 * Enable/Disable Neighbour discovery offload functionality in the firmware.
392 *
393 * @param enable true to enable, false to disable.
394 * @return status WifiStatus of the operation.
395 * Possible status codes:
396 * |WifiStatusCode.SUCCESS|,
397 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
398 * |WifiStatusCode.ERROR_UNKNOWN|
399 */
400 enableNdOffload(bool enable) generates (WifiStatus status);
401
402 /**
Roshan Pius9a9869a2017-01-11 16:42:16 -0800403 * Start sending the specified keep alive packets periodically.
404 *
405 * @param cmdId command Id to use for this invocation.
406 * @param ipPacketData IP packet contents to be transmitted.
407 * @param etherType 16 bit ether type to be set in the ethernet frame
408 * transmitted.
409 * @param srcAddress Source MAC address of the packet.
410 * @param dstAddress Destination MAC address of the packet.
411 * @param periodInMs Interval at which this packet must be transmitted.
412 * @return status WifiStatus of the operation.
413 * Possible status codes:
414 * |WifiStatusCode.SUCCESS|,
415 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
416 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
417 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
418 * |WifiStatusCode.ERROR_UNKNOWN|
419 */
420 startSendingKeepAlivePackets(
421 CommandId cmdId, vec<uint8_t> ipPacketData, uint16_t etherType,
422 MacAddress srcAddress, MacAddress dstAddress, uint32_t periodInMs)
423 generates (WifiStatus status);
424
425 /**
426 * Stop sending the specified keep alive packets.
427 *
428 * @param cmdId command Id corresponding to the request.
429 * @return status WifiStatus of the operation.
430 * Possible status codes:
431 * |WifiStatusCode.SUCCESS|,
432 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
433 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
434 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
435 * |WifiStatusCode.ERROR_UNKNOWN|
436 */
437 stopSendingKeepAlivePackets(CommandId cmdId) generates (WifiStatus status);
438
439 /**
Roshan Pius795bb812017-02-01 13:09:08 -0800440 * Set the MAC OUI during scanning.
441 * An OUI {Organizationally Unique Identifier} is a 24-bit number that
442 * uniquely identifies a vendor or manufacturer.
443 *
444 * @return status WifiStatus of the operation.
445 * Possible status codes:
446 * |WifiStatusCode.SUCCESS|,
447 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
448 * |WifiStatusCode.ERROR_UNKNOWN|
449 */
450 setScanningMacOui(uint8_t[3] oui) generates (WifiStatus status);
451
452 /**
Roshan Piusfe9ad362016-10-19 16:45:12 -0700453 * API to start packet fate monitoring.
Roshan Pius32fc12e2017-01-25 17:44:42 -0800454 * - Once started, monitoring must remain active until HAL is stopped or the
455 * chip is reconfigured.
Roshan Piusfe9ad362016-10-19 16:45:12 -0700456 * - When HAL is unloaded, all packet fate buffers must be cleared.
457 * - The packet fates are used to monitor the state of packets transmitted/
458 * received during association.
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_AVAILABLE|,
466 * |WifiStatusCode.ERROR_UNKNOWN|
467 */
468 startDebugPacketFateMonitoring() generates (WifiStatus status);
469
470 /**
Roshan Piusfe9ad362016-10-19 16:45:12 -0700471 * API to retrieve fates of outbound packets.
472 * - HAL implementation must return the fates of
473 * all the frames transmitted for the most recent association.
474 * The fate reports must follow the same order as their respective
475 * packets.
476 * - HAL implementation may choose (but is not required) to include
477 * reports for management frames.
478 * - Packets reported by firmware, but not recognized by driver,
479 * must be included. However, the ordering of the corresponding
480 * reports is at the discretion of HAL implementation.
481 * - Framework must be able to call this API multiple times for the same
482 * association.
483 *
484 * @return status WifiStatus of the operation.
485 * Possible status codes:
486 * |WifiStatusCode.SUCCESS|,
487 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
488 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
489 * |WifiStatusCode.ERROR_NOT_STARTED|,
490 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
491 * |WifiStatusCode.ERROR_UNKNOWN|
492 * @return fates Vector of |WifiDebugTxPacketFateReport| instances corresponding
493 * to the packet fates.
494 */
495 getDebugTxPacketFates()
496 generates (WifiStatus status, vec<WifiDebugTxPacketFateReport> fates);
497
498 /**
499 * API to retrieve fates of inbound packets.
500 * - HAL implementation must return the fates of
501 * all the frames received for the most recent association.
502 * The fate reports must follow the same order as their respective
503 * packets.
504 * - HAL implementation may choose (but is not required) to include
505 * reports for management frames.
506 * - Packets reported by firmware, but not recognized by driver,
507 * must be included. However, the ordering of the corresponding
508 * reports is at the discretion of HAL implementation.
509 * - Framework must be able to call this API multiple times for the same
510 * association.
511 *
512 * @return status WifiStatus of the operation.
513 * Possible status codes:
514 * |WifiStatusCode.SUCCESS|,
515 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
516 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
517 * |WifiStatusCode.ERROR_NOT_STARTED|,
518 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
519 * |WifiStatusCode.ERROR_UNKNOWN|
520 * @return fates Vector of |WifiDebugRxPacketFateReport| instances corresponding
521 * to the packet fates.
522 */
523 getDebugRxPacketFates()
524 generates (WifiStatus status, vec<WifiDebugRxPacketFateReport> fates);
Roshan Piusadcfba42016-10-05 10:19:06 -0700525};