blob: 80beedf7f7c4a9e5c5c4c2bfd63fae7b800f07e3 [file] [log] [blame]
Jimmy Chena8ae5ac2019-12-25 20:43: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.supplicant@1.4;
18
19import @1.3::ISupplicantStaNetwork;
Jimmy Chen77f2c072020-10-14 23:46:36 +080020import @1.4::ISupplicantStaNetworkCallback;
Jimmy Chena8ae5ac2019-12-25 20:43:40 +020021
22/**
23 * Interface exposed by the supplicant for each station mode network
24 * configuration it controls.
25 */
26interface ISupplicantStaNetwork extends @1.3::ISupplicantStaNetwork {
27 /**
Jimmy Chen7e792612020-10-16 14:09:47 +080028 * Possible mask of values for KeyMgmt param.
29 */
30 enum KeyMgmtMask : @1.3::ISupplicantStaNetwork.KeyMgmtMask {
31 /**
32 * SAE PK mode
33 */
34 SAE_PK,
35 };
36
37 /**
Jimmy Chena8ae5ac2019-12-25 20:43:40 +020038 * Possible mask of values for PairwiseCipher param.
39 */
40 enum PairwiseCipherMask : @1.3::ISupplicantStaNetwork.PairwiseCipherMask {
41 /**
42 * GCMP-128 Pairwise Cipher
43 */
44 GCMP_128 = 1 << 9,
45 };
46
47 /**
48 * Possible mask of values for GroupCipher param.
49 */
50 enum GroupCipherMask : @1.3::ISupplicantStaNetwork.GroupCipherMask {
51 /**
52 * GCMP-128 Group Cipher
53 */
54 GCMP_128 = 1 << 9,
55 };
56
57 /**
58 * Set group cipher mask for the network.
59 *
60 * @param groupCipherMask value to set.
61 * Combination of |ProtoMask| values.
62 * @return status Status of the operation.
63 * Possible status codes:
64 * |SupplicantStatusCode.SUCCESS|,
65 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
66 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
67 * |SupplicantStatusCode.FAILURE_UNKNOWN|
68 */
69 setGroupCipher_1_4(bitfield<GroupCipherMask> groupCipherMask)
70 generates (SupplicantStatus status);
71
72 /**
73 * Get the group cipher mask set for the network.
74 *
75 * @return status Status of the operation.
76 * Possible status codes:
77 * |SupplicantStatusCode.SUCCESS|,
78 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
79 * |SupplicantStatusCode.FAILURE_UNKNOWN|
80 * @return groupCipherMask Combination of |GroupCipherMask| values.
81 */
82 getGroupCipher_1_4()
83 generates (SupplicantStatus status, bitfield<GroupCipherMask> groupCipherMask);
84
85 /**
86 * Set pairwise cipher mask for the network.
87 *
88 * @param pairwiseCipherMask value to set.
89 * Combination of |ProtoMask| values.
90 * @return status Status of the operation.
91 * Possible status codes:
92 * |SupplicantStatusCode.SUCCESS|,
93 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
94 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
95 * |SupplicantStatusCode.FAILURE_UNKNOWN|
96 */
97 setPairwiseCipher_1_4(bitfield<PairwiseCipherMask> pairwiseCipherMask)
98 generates (SupplicantStatus status);
99
100 /**
101 * Get the pairwise cipher mask set for the network.
102 *
103 * @return status Status of the operation.
104 * Possible status codes:
105 * |SupplicantStatusCode.SUCCESS|,
106 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
107 * |SupplicantStatusCode.FAILURE_UNKNOWN|
108 * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
109 */
110 getPairwiseCipher_1_4()
111 generates (SupplicantStatus status, bitfield<PairwiseCipherMask> pairwiseCipherMask);
112
113 /**
114 * Set whether to enable enhanced directional multi-gigabit (802.11ay EDMG).
115 * Only allowed if hw mode is |HOSTAPD_MODE_IEEE80211AD|
116 *
117 * @param enable true to set, false otherwise.
118 * @return status Status of the operation.
119 * Possible status codes:
120 * |SupplicantStatusCode.SUCCESS|,
121 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
122 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
123 */
124 setEdmg(bool enable) generates (SupplicantStatus status);
125
126 /**
127 * Get whether enhanced directional multi-gigabit (802.11ay EDMG) is enabled for this network.
128 *
129 * @return status Status of the operation.
130 * Possible status codes:
131 * |SupplicantStatusCode.SUCCESS|,
132 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
133 * @return enabled true if set, false otherwise.
134 */
135 getEdmg() generates (SupplicantStatus status, bool enabled);
Jimmy Chen77f2c072020-10-14 23:46:36 +0800136
137 /**
138 * Register for callbacks from this network.
139 *
140 * These callbacks are invoked for events that are specific to this network.
141 * Registration of multiple callback objects is supported. These objects must
142 * be automatically deleted when the corresponding client process is dead or
143 * if this network is removed.
144 *
145 * @param callback An instance of the |ISupplicantStaNetworkCallback| HIDL
146 * interface object.
147 * @return status Status of the operation.
148 * Possible status codes:
149 * |SupplicantStatusCode.SUCCESS|,
150 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
151 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
152 */
153 registerCallback_1_4(ISupplicantStaNetworkCallback callback)
154 generates (SupplicantStatus status);
Jimmy Chen61ef86b2020-10-15 16:07:32 +0800155
156 /**
157 * Set whether to enable SAE H2E (Hash-to-Element) only mode.
158 *
159 * When enabled, only SAE H2E network is allowed; othewise
160 * H&P (Hunting and Pecking) and H2E are both allowed.
161 * H&P only mode is not supported.
162 * If this API is not called before connecting to a SAE
163 * network, the behavior is undefined.
164 *
165 * @param enable true to set, false otherwise.
166 * @return status Status of the operation.
167 * Possible status codes:
168 * |SupplicantStatusCode.SUCCESS|,
169 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
170 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
171 */
172 enableSaeH2eOnlyMode(bool enable) generates (SupplicantStatus status);
Jimmy Chen7e792612020-10-16 14:09:47 +0800173
174 /**
175 * Set whether to enable SAE PK (Public Key) only mode to enable public AP validation.
176 * When enabled, only SAE PK network is allowed; otherwise PK is optional.
177 * If this API is not called before connecting to an SAE
178 * network, SAE PK mode depends on SAE PK config in wpa_supplicant configuration.
179 * If SAE PK config of wpa_supplicant configuration is not set,
180 * the default mode is optional (support for both PK and standard mode).
181 *
182 * @param enable true to set, false otherwise.
183 * @return status Status of the operation.
184 * Possible status codes:
185 * |SupplicantStatusCode.SUCCESS|,
186 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
187 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
188 * |SupplicantStatusCode.FAILURE_UNSUPPORTED|
189 */
190 enableSaePkOnlyMode(bool enable) generates (SupplicantStatus status);
Jimmy Chena8ae5ac2019-12-25 20:43:40 +0200191};