blob: dcc927900a4d972d9ad3afe1c005b4fb28deac59 [file] [log] [blame]
Jimmy Chen1bdf1a72019-12-23 17:53:40 +02001/*
2 * Copyright 2020 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.5;
18
19import @1.0::WifiStatus;
20import @1.0::IWifiIface;
21import @1.3::IWifiChip;
22import @1.4::IWifiChip;
23
24/**
25 * Interface that represents a chip that must be configured as a single unit.
26 */
27interface IWifiChip extends @1.4::IWifiChip {
28 /**
29 * Capabilities exposed by this chip.
30 */
31 enum ChipCapabilityMask : @1.3::IWifiChip.ChipCapabilityMask {
32 /**
33 * chip can operate in the 60GHz band(WiGig chip)
34 */
35 WIGIG = 1 << 14,
36 };
37
38 /**
Roshan Piuse9d1e7d2020-11-04 11:44:16 -080039 * When there are 2 or more simultaneous STA connections, this use case hint indicates what
40 * use-case is being enabled by the framework. This use case hint can be used by the firmware
41 * to modify various firmware configurations like:
42 * - Allowed BSSIDs the firmware can choose for the initial connection/roaming attempts.
43 * - Duty cycle to choose for the 2 STA connections if the radio is in MCC mode.
44 * - Whether roaming, APF and other offloads needs to be enabled or not.
45 * Note:
46 * - This will be invoked before an active wifi connection is established on the second
47 * interface.
48 * - This use-case hint is implicitly void when the second STA interface is brought down.
49 */
50 enum MultiStaUseCase : uint8_t {
51 /**
52 * Usage:
53 * - This will be sent down for make before break use-case.
54 * - Platform is trying to speculatively connect to a second network and evaluate it without
55 * disrupting the primary connection.
56 * Requirements for Firmware:
57 * - Do not reduce the number of tx/rx chains of primary connection.
58 * - If using MCC, should set the MCC duty cycle of the primary connection to be higher than
59 * the secondary connection (maybe 70/30 split).
60 * - Should pick the best BSSID for the secondary STA (disregard the chip mode) independent
61 * of the primary STA:
62 * - Don’t optimize for DBS vs MCC/SCC
63 * - Should not impact the primary connection’s bssid selection:
64 * - Don’t downgrade chains of the existing primary connection.
65 * - Don’t optimize for DBS vs MCC/SCC.
66 */
67 DUAL_STA_TRANSIENT_PREFER_PRIMARY = 0,
68 /**
69 * Usage:
70 * - This will be sent down for any app requested peer to peer connections.
71 * - In this case, both the connections needs to be allocated equal resources.
72 * - For the peer to peer use case, BSSID for the secondary connection will be chosen by the
73 * framework.
74 *
75 * Requirements for Firmware:
76 * - Can choose MCC or DBS mode depending on the MCC efficiency and HW capability.
77 * - If using MCC, set the MCC duty cycle of the primary connection to be equal to the
78 * secondary connection.
79 * - Prefer BSSID candidates which will help provide the best "overall" performance for both
80 * the connections.
81 */
82 DUAL_STA_NON_TRANSIENT_UNBIASED = 1,
83 };
84
85 /**
Jimmy Chen1bdf1a72019-12-23 17:53:40 +020086 * Get the capabilities supported by this chip.
87 *
88 * @return status WifiStatus of the operation.
89 * Possible status codes:
90 * |WifiStatusCode.SUCCESS|,
91 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
92 * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
93 * |WifiStatusCode.ERROR_UNKNOWN|
94 * @return capabilities Bitset of |ChipCapabilityMask| values.
95 */
96 getCapabilities_1_5()
97 generates (WifiStatus status, bitfield<ChipCapabilityMask> capabilities);
Roshan Piuse9d1e7d2020-11-04 11:44:16 -080098
99 /**
100 * Invoked to indicate that the provided iface is the primary STA iface when there are more
101 * than 1 STA iface concurrently active.
102 * Note: If the wifi firmware/chip cannot support multiple instances of any offload
103 * (like roaming, APF, rssi threshold, etc), the firmware should ensure that these
104 * offloads are at least enabled for the primary interface. If the new primary interface is
105 * already connected to a network, the firmware must switch all the offloads on
106 * this new interface without disconnecting.
107 *
108 * @param ifname Name of the STA iface.
109 * @return status WifiStatus of the operation.
110 * Possible status codes:
111 * |WifiStatusCode.SUCCESS|,
112 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
113 * |WifiStatusCode.ERROR_INVALID_ARGS|
114 */
115 setMultiStaPrimaryConnection(string ifName) generates (WifiStatus status);
116
117 /**
118 * Invoked to indicate the STA + STA use-case that is active.
119 *
120 * Refer to documentation of |MultiStaUseCase| for details.
121 *
122 * @param useCase Use case that is active.
123 * @return status WifiStatus of the operation.
124 * Possible status codes:
125 * |WifiStatusCode.SUCCESS|,
126 * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
127 * |WifiStatusCode.ERROR_INVALID_ARGS|
128 */
129 setMultiStaUseCase(MultiStaUseCase useCase) generates (WifiStatus status);
Jimmy Chen1bdf1a72019-12-23 17:53:40 +0200130};