blob: fc6dbac40e097cc73f2c62fe55b0985e18961f68 [file] [log] [blame]
Ahmed ElArabawy7d975e92018-10-26 09:06:00 -07001/*
2 * Copyright 2018 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.3;
18
19import @1.0::WifiStatus;
20import @1.2::IWifiChip;
21
22/**
23 * Interface that represents a chip that must be configured as a single unit.
24 */
25interface IWifiChip extends @1.2::IWifiChip {
26
27 /**
28 * Capabilities exposed by this chip.
29 */
30 enum ChipCapabilityMask : @1.2::IWifiChip.ChipCapabilityMask {
31 /**
32 * Set Latency Mode.
33 */
Jimmy Chend87a0ee2018-12-14 15:38:58 +080034 SET_LATENCY_MODE = 1 << 12,
35
36 /**
37 * Support P2P MAC randomization
38 */
39 P2P_RAND_MAC = 1 << 13
Ahmed ElArabawy7d975e92018-10-26 09:06:00 -070040 };
41
42 /**
43 * Get the capabilities supported by this chip.
44 *
45 * @return status WifiStatus of the operation.
46 * Possible status codes:
47 * |WifiStatusCode.SUCCESS|,
48 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
49 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
50 * |WifiStatusCode.ERROR_UNKNOWN|
51 * @return capabilities Bitset of |ChipCapabilityMask| values.
52 */
53 getCapabilities_1_3()
54 generates (WifiStatus status, bitfield<ChipCapabilityMask> capabilities);
55
56 /**
57 * This enum represents the different latency modes that can be set through
58 * setLatencyMode()
59 */
60 enum LatencyMode : uint32_t {
61 NORMAL = 0,
62 LOW = 1
63 };
64
65 /**
66 * API to set the wifi latency mode
67 *
68 * Latency mode determines whether or not to optimize for reducing wifi
69 * latency as a tradeoff with other wifi functionality such as scanning,
70 * roaming, etc. This optimization is suitable for some applications such
71 * as gaming and virtual reality applications.
72 */
73 setLatencyMode(LatencyMode mode) generates (WifiStatus status);
Roger Wangb294c762018-11-02 15:34:39 +080074
75 /**
76 * API to flush debug ring buffer data to files.
77 *
78 * Force flush debug ring buffer using IBase::debug.
79 * This API help to collect firmware/driver/pkt logs.
80 *
81 * @return status WifiStatus of the operation.
82 * Possible status codes:
83 * |WifiStatusCode.SUCCESS|,
84 * |WifiStatusCode.UNKNOWN|
85 */
86 flushRingBufferToFile() generates (WifiStatus status);
Ahmed ElArabawy7d975e92018-10-26 09:06:00 -070087};