blob: 644e78a4e503f40869aaa1e9336099c4f0e9099c [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 *
Roshan Piusc7888912017-03-27 10:03:38 -0700148 * APF docs
149 * ==========================================================================
150 * APF functionality, instructions and bytecode/binary format is described in:
151 * http://android.googlesource.com/platform/hardware/google/apf/
152 * +/b75c9f3714cfae3dad3d976958e063150781437e/apf.h
153 *
154 * The interpreter API is described here:
155 * http://android.googlesource.com/platform/hardware/google/apf/+/
156 * b75c9f3714cfae3dad3d976958e063150781437e/apf_interpreter.h#32
157 *
158 * The assembler/generator API is described in javadocs here:
159 * http://android.googlesource.com/platform/frameworks/base/+/
160 * 4456f33a958a7f09e608399da83c4d12b2e7d191/services/net/java/android/net/
161 * apf/ApfGenerator.java
162 *
163 * Disassembler usage is described here:
164 * http://android.googlesource.com/platform/hardware/google/apf/+/
165 * b75c9f3714cfae3dad3d976958e063150781437e/apf_disassembler.c#65
166 *
167 * The BPF to APF translator usage is described here:
168 * http://android.googlesource.com/platform/frameworks/base/+/
169 * 4456f33a958a7f09e608399da83c4d12b2e7d191/tests/net/java/android/net/
170 * apf/Bpf2Apf.java
171 * ==========================================================================
172 *
Roshan Pius7b777472016-10-07 13:15:59 -0700173 * @param cmdId command Id to use for this invocation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700174 * @param APF Program to be set.
Roshan Piusa52dc732016-10-10 11:53:07 -0700175 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700176 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700177 * |WifiStatusCode.SUCCESS|,
178 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
179 * |WifiStatusCode.ERROR_INVALID_ARGS|,
180 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
181 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
182 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700183 */
Roshan Pius1f9073c2016-10-10 10:32:22 -0700184 installApfPacketFilter(CommandId cmdId, vec<uint8_t> program)
Roshan Piusa52dc732016-10-10 11:53:07 -0700185 generates (WifiStatus status);
Roshan Pius7b777472016-10-07 13:15:59 -0700186
187 /**
Roshan Pius18680b72016-10-12 08:25:48 -0700188 * Used to query additional information about the chip's Background Scan capabilities.
189 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700190 *
Roshan Piusa52dc732016-10-10 11:53:07 -0700191 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700192 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700193 * |WifiStatusCode.SUCCESS|,
194 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
195 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
196 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
197 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius5e254662016-10-26 10:10:48 -0700198 * @return capabilities Instance of |StaBackgroundScanCapabilities|.
Roshan Pius7b777472016-10-07 13:15:59 -0700199 */
200 getBackgroundScanCapabilities()
Roshan Pius5e254662016-10-26 10:10:48 -0700201 generates (WifiStatus status, StaBackgroundScanCapabilities capabilities);
Roshan Pius7b777472016-10-07 13:15:59 -0700202
203 /**
Roshan Pius18680b72016-10-12 08:25:48 -0700204 * Used to query the list of valid frequencies (depending on country code set)
205 * for the provided band. These channels may be specifed in the
206 * |BackgroundScanBucketParameters.frequenciesInMhz| for a background scan
207 * request.
Roshan Pius18680b72016-10-12 08:25:48 -0700208 *
Roshan Pius5e254662016-10-26 10:10:48 -0700209 * @param band Band for which the frequency list is being generated.
Roshan Pius18680b72016-10-12 08:25:48 -0700210 * @return status WifiStatus of the operation.
211 * Possible status codes:
212 * |WifiStatusCode.SUCCESS|,
213 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
214 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
215 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
216 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius120f94c2016-10-13 11:48:42 -0700217 * @return frequencies vector of valid frequencies for the provided band.
Roshan Pius18680b72016-10-12 08:25:48 -0700218 */
Roshan Pius7f4574d2017-02-22 09:48:03 -0800219 getValidFrequenciesForBand(WifiBand band)
Roshan Pius120f94c2016-10-13 11:48:42 -0700220 generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
Roshan Pius18680b72016-10-12 08:25:48 -0700221
222 /**
Roshan Pius7b777472016-10-07 13:15:59 -0700223 * Start a background scan using the given cmdId as an identifier. Only one
224 * active background scan need be supported.
Roshan Pius18680b72016-10-12 08:25:48 -0700225 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700226 *
227 * When this is called all requested buckets must be scanned, starting the
228 * beginning of the cycle.
229 *
230 * For example:
231 * If there are two buckets specified
232 * - Bucket 1: period=10s
233 * - Bucket 2: period=20s
234 * - Bucket 3: period=30s
235 * Then the following scans must occur
236 * - t=0 buckets 1, 2, and 3 are scanned
237 * - t=10 bucket 1 is scanned
238 * - t=20 bucket 1 and 2 are scanned
239 * - t=30 bucket 1 and 3 are scanned
240 * - t=40 bucket 1 and 2 are scanned
241 * - t=50 bucket 1 is scanned
242 * - t=60 buckets 1, 2, and 3 are scanned
243 * - and the patter repeats
244 *
245 * If any scan does not occur or is incomplete (error, interrupted, etc) then
246 * a cached scan result must still be recorded with the
247 * WIFI_SCAN_FLAG_INTERRUPTED flag set.
248 *
249 * @param cmdId command Id to use for this invocation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700250 * @params Background scan parameters.
Roshan Piusa52dc732016-10-10 11:53:07 -0700251 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700252 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700253 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
254 * |WifiStatusCode.ERROR_INVALID_ARGS|,
255 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
256 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
257 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700258 */
Roshan Pius5e254662016-10-26 10:10:48 -0700259 startBackgroundScan(CommandId cmdId, StaBackgroundScanParameters params)
Roshan Piusa52dc732016-10-10 11:53:07 -0700260 generates (WifiStatus status);
Roshan Pius7b777472016-10-07 13:15:59 -0700261
262 /**
263 * Stop the background scan started.
Roshan Pius18680b72016-10-12 08:25:48 -0700264 * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
Roshan Pius7b777472016-10-07 13:15:59 -0700265 *
266 * @param cmdId command Id corresponding to the request.
Roshan Piusa52dc732016-10-10 11:53:07 -0700267 * @return status WifiStatus of the operation.
Roshan Pius1f9073c2016-10-10 10:32:22 -0700268 * Possible status codes:
Roshan Piusa52dc732016-10-10 11:53:07 -0700269 * |WifiStatusCode.SUCCESS|,
270 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
271 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700272 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Piusa52dc732016-10-10 11:53:07 -0700273 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
274 * |WifiStatusCode.ERROR_UNKNOWN|
Roshan Pius7b777472016-10-07 13:15:59 -0700275 */
Roshan Piusa52dc732016-10-10 11:53:07 -0700276 stopBackgroundScan(CommandId cmdId) generates (WifiStatus status);
Roshan Pius18680b72016-10-12 08:25:48 -0700277
278 /**
279 * Enable link layer stats collection.
280 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set.
281 *
282 * Radio statistics (once started) must not stop until disabled.
283 * Iface statistics (once started) reset and start afresh after each
284 * connection until disabled.
285 *
286 * @param debug Set for field debug mode. Driver must collect all
287 * statistics regardless of performance impact.
288 * @return status WifiStatus of the operation.
289 * Possible status codes:
290 * |WifiStatusCode.SUCCESS|,
291 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
292 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
293 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
294 * |WifiStatusCode.ERROR_UNKNOWN|
295 */
296 enableLinkLayerStatsCollection(bool debug)
297 generates (WifiStatus status);
298
299 /**
300 * Disable link layer stats collection.
301 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set.
302 *
303 * @return status WifiStatus of the operation.
304 * Possible status codes:
305 * |WifiStatusCode.SUCCESS|,
306 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
307 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700308 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Pius18680b72016-10-12 08:25:48 -0700309 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
310 * |WifiStatusCode.ERROR_UNKNOWN|
311 */
312 disableLinkLayerStatsCollection() generates (WifiStatus status);
313
314 /**
315 * Retrieve the latest link layer stats.
316 * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set or if
317 * link layer stats collection hasn't been explicitly enabled.
318 *
319 * @return status WifiStatus of the operation.
320 * Possible status codes:
321 * |WifiStatusCode.SUCCESS|,
322 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
323 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
Roshan Piusfe9ad362016-10-19 16:45:12 -0700324 * |WifiStatusCode.ERROR_NOT_STARTED|,
Roshan Pius18680b72016-10-12 08:25:48 -0700325 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
326 * |WifiStatusCode.ERROR_UNKNOWN|
327 * @return stats Instance of |LinkLayerStats|.
328 */
Roshan Pius5e254662016-10-26 10:10:48 -0700329 getLinkLayerStats() generates (WifiStatus status, StaLinkLayerStats stats);
Roshan Piusfe9ad362016-10-19 16:45:12 -0700330
331 /**
Roshan Piusd4767542016-12-06 10:04:05 -0800332 * Start RSSI monitoring on the currently connected access point.
333 * Once the monitoring is enabled,
334 * |IWifiStaIfaceEventCallback.onRssiThresholdBreached| callback must be
335 * invoked to indicate if the RSSI goes above |maxRssi| or below |minRssi|.
336 * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set.
337 *
338 * @param cmdId command Id to use for this invocation.
339 * @param maxRssi Maximum RSSI threshold.
340 * @param minRssi Minimum RSSI threshold.
341 * @return status WifiStatus of the operation.
342 * Possible status codes:
343 * |WifiStatusCode.SUCCESS|,
344 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
345 * |WifiStatusCode.ERROR_ARGS_INVALID|,
346 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
347 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
348 * |WifiStatusCode.ERROR_UNKNOWN|
349 */
350 startRssiMonitoring(CommandId cmdId, Rssi maxRssi, Rssi minRssi)
351 generates (WifiStatus status);
352
353 /**
354 * Stop RSSI monitoring.
355 * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set.
356 *
357 * @param cmdId command Id corresponding to the request.
358 * @return status WifiStatus of the operation.
359 * Possible status codes:
360 * |WifiStatusCode.SUCCESS|,
361 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
362 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
363 * |WifiStatusCode.ERROR_NOT_STARTED|,
364 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
365 * |WifiStatusCode.ERROR_UNKNOWN|
366 */
367 stopRssiMonitoring(CommandId cmdId) generates (WifiStatus status);
368
369 /**
Roshan Pius26801cb2016-12-13 14:25:45 -0800370 * Get roaming control capabilities.
371 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
372 *
373 * @return status WifiStatus of the operation.
374 * Possible status codes:
375 * |WifiStatusCode.SUCCESS|,
376 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
377 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
378 * |WifiStatusCode.ERROR_UNKNOWN|
379 * @return caps Instance of |StaRoamingCapabilities|.
380 */
381 getRoamingCapabilities()
382 generates (WifiStatus status, StaRoamingCapabilities caps);
383
384 /**
385 * Configure roaming control parameters.
386 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
387 *
388 * @param config Instance of |StaRoamingConfig|.
389 * @return status WifiStatus of the operation.
390 * Possible status codes:
391 * |WifiStatusCode.SUCCESS|,
392 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
393 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
394 * |WifiStatusCode.ERROR_UNKNOWN|
395 */
396 configureRoaming(StaRoamingConfig config) generates (WifiStatus status);
397
398 /**
399 * Set the roaming control state with the parameters configured
400 * using |configureRoaming|. Depending on the roaming state set, the
401 * driver/firmware would enable/disable control over roaming decisions.
402 * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set.
403 *
404 * @param state State of the roaming control.
405 * @return status WifiStatus of the operation.
406 * Possible status codes:
407 * |WifiStatusCode.SUCCESS|,
408 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
409 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
410 * |WifiStatusCode.ERROR_BUSY|,
411 * |WifiStatusCode.ERROR_UNKNOWN|
412 */
413 setRoamingState(StaRoamingState state) generates (WifiStatus status);
414
415 /**
Roshan Piusaf727c02017-01-11 15:37:25 -0800416 * Enable/Disable Neighbour discovery offload functionality in the firmware.
417 *
418 * @param enable true to enable, false to disable.
419 * @return status WifiStatus of the operation.
420 * Possible status codes:
421 * |WifiStatusCode.SUCCESS|,
422 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
423 * |WifiStatusCode.ERROR_UNKNOWN|
424 */
425 enableNdOffload(bool enable) generates (WifiStatus status);
426
427 /**
Roshan Pius9a9869a2017-01-11 16:42:16 -0800428 * Start sending the specified keep alive packets periodically.
429 *
430 * @param cmdId command Id to use for this invocation.
431 * @param ipPacketData IP packet contents to be transmitted.
432 * @param etherType 16 bit ether type to be set in the ethernet frame
433 * transmitted.
434 * @param srcAddress Source MAC address of the packet.
435 * @param dstAddress Destination MAC address of the packet.
436 * @param periodInMs Interval at which this packet must be transmitted.
437 * @return status WifiStatus of the operation.
438 * Possible status codes:
439 * |WifiStatusCode.SUCCESS|,
440 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
441 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
442 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
443 * |WifiStatusCode.ERROR_UNKNOWN|
444 */
445 startSendingKeepAlivePackets(
446 CommandId cmdId, vec<uint8_t> ipPacketData, uint16_t etherType,
447 MacAddress srcAddress, MacAddress dstAddress, uint32_t periodInMs)
448 generates (WifiStatus status);
449
450 /**
451 * Stop sending the specified keep alive packets.
452 *
453 * @param cmdId command Id corresponding to the request.
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_AVAILABLE|,
460 * |WifiStatusCode.ERROR_UNKNOWN|
461 */
462 stopSendingKeepAlivePackets(CommandId cmdId) generates (WifiStatus status);
463
464 /**
Roshan Pius795bb812017-02-01 13:09:08 -0800465 * Set the MAC OUI during scanning.
466 * An OUI {Organizationally Unique Identifier} is a 24-bit number that
467 * uniquely identifies a vendor or manufacturer.
468 *
469 * @return status WifiStatus of the operation.
470 * Possible status codes:
471 * |WifiStatusCode.SUCCESS|,
472 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
473 * |WifiStatusCode.ERROR_UNKNOWN|
474 */
475 setScanningMacOui(uint8_t[3] oui) generates (WifiStatus status);
476
477 /**
Roshan Piusfe9ad362016-10-19 16:45:12 -0700478 * API to start packet fate monitoring.
Roshan Pius32fc12e2017-01-25 17:44:42 -0800479 * - Once started, monitoring must remain active until HAL is stopped or the
480 * chip is reconfigured.
Roshan Piusfe9ad362016-10-19 16:45:12 -0700481 * - When HAL is unloaded, all packet fate buffers must be cleared.
482 * - The packet fates are used to monitor the state of packets transmitted/
483 * received during 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_AVAILABLE|,
491 * |WifiStatusCode.ERROR_UNKNOWN|
492 */
493 startDebugPacketFateMonitoring() generates (WifiStatus status);
494
495 /**
Roshan Piusfe9ad362016-10-19 16:45:12 -0700496 * API to retrieve fates of outbound packets.
497 * - HAL implementation must return the fates of
498 * all the frames transmitted for the most recent association.
499 * The fate reports must follow the same order as their respective
500 * packets.
501 * - HAL implementation may choose (but is not required) to include
502 * reports for management frames.
503 * - Packets reported by firmware, but not recognized by driver,
504 * must be included. However, the ordering of the corresponding
505 * reports is at the discretion of HAL implementation.
506 * - Framework must be able to call this API multiple times for the same
507 * association.
508 *
509 * @return status WifiStatus of the operation.
510 * Possible status codes:
511 * |WifiStatusCode.SUCCESS|,
512 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
513 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
514 * |WifiStatusCode.ERROR_NOT_STARTED|,
515 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
516 * |WifiStatusCode.ERROR_UNKNOWN|
517 * @return fates Vector of |WifiDebugTxPacketFateReport| instances corresponding
518 * to the packet fates.
519 */
520 getDebugTxPacketFates()
521 generates (WifiStatus status, vec<WifiDebugTxPacketFateReport> fates);
522
523 /**
524 * API to retrieve fates of inbound packets.
525 * - HAL implementation must return the fates of
526 * all the frames received for the most recent association.
527 * The fate reports must follow the same order as their respective
528 * packets.
529 * - HAL implementation may choose (but is not required) to include
530 * reports for management frames.
531 * - Packets reported by firmware, but not recognized by driver,
532 * must be included. However, the ordering of the corresponding
533 * reports is at the discretion of HAL implementation.
534 * - Framework must be able to call this API multiple times for the same
535 * association.
536 *
537 * @return status WifiStatus of the operation.
538 * Possible status codes:
539 * |WifiStatusCode.SUCCESS|,
540 * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
541 * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
542 * |WifiStatusCode.ERROR_NOT_STARTED|,
543 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
544 * |WifiStatusCode.ERROR_UNKNOWN|
545 * @return fates Vector of |WifiDebugRxPacketFateReport| instances corresponding
546 * to the packet fates.
547 */
548 getDebugRxPacketFates()
549 generates (WifiStatus status, vec<WifiDebugRxPacketFateReport> fates);
Roshan Piusadcfba42016-10-05 10:19:06 -0700550};