blob: 42958792b6744eae1ffdd171d3d9fbefd9ae9762 [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 /**
28 * Possible mask of values for PairwiseCipher param.
29 */
30 enum PairwiseCipherMask : @1.3::ISupplicantStaNetwork.PairwiseCipherMask {
31 /**
32 * GCMP-128 Pairwise Cipher
33 */
34 GCMP_128 = 1 << 9,
35 };
36
37 /**
38 * Possible mask of values for GroupCipher param.
39 */
40 enum GroupCipherMask : @1.3::ISupplicantStaNetwork.GroupCipherMask {
41 /**
42 * GCMP-128 Group Cipher
43 */
44 GCMP_128 = 1 << 9,
45 };
46
47 /**
48 * Set group cipher mask for the network.
49 *
50 * @param groupCipherMask value to set.
51 * Combination of |ProtoMask| values.
52 * @return status Status of the operation.
53 * Possible status codes:
54 * |SupplicantStatusCode.SUCCESS|,
55 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
56 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
57 * |SupplicantStatusCode.FAILURE_UNKNOWN|
58 */
59 setGroupCipher_1_4(bitfield<GroupCipherMask> groupCipherMask)
60 generates (SupplicantStatus status);
61
62 /**
63 * Get the group cipher mask set for the network.
64 *
65 * @return status Status of the operation.
66 * Possible status codes:
67 * |SupplicantStatusCode.SUCCESS|,
68 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
69 * |SupplicantStatusCode.FAILURE_UNKNOWN|
70 * @return groupCipherMask Combination of |GroupCipherMask| values.
71 */
72 getGroupCipher_1_4()
73 generates (SupplicantStatus status, bitfield<GroupCipherMask> groupCipherMask);
74
75 /**
76 * Set pairwise cipher mask for the network.
77 *
78 * @param pairwiseCipherMask value to set.
79 * Combination of |ProtoMask| values.
80 * @return status Status of the operation.
81 * Possible status codes:
82 * |SupplicantStatusCode.SUCCESS|,
83 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
84 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
85 * |SupplicantStatusCode.FAILURE_UNKNOWN|
86 */
87 setPairwiseCipher_1_4(bitfield<PairwiseCipherMask> pairwiseCipherMask)
88 generates (SupplicantStatus status);
89
90 /**
91 * Get the pairwise cipher mask set for the network.
92 *
93 * @return status Status of the operation.
94 * Possible status codes:
95 * |SupplicantStatusCode.SUCCESS|,
96 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
97 * |SupplicantStatusCode.FAILURE_UNKNOWN|
98 * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
99 */
100 getPairwiseCipher_1_4()
101 generates (SupplicantStatus status, bitfield<PairwiseCipherMask> pairwiseCipherMask);
102
103 /**
104 * Set whether to enable enhanced directional multi-gigabit (802.11ay EDMG).
105 * Only allowed if hw mode is |HOSTAPD_MODE_IEEE80211AD|
106 *
107 * @param enable true to set, false otherwise.
108 * @return status Status of the operation.
109 * Possible status codes:
110 * |SupplicantStatusCode.SUCCESS|,
111 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
112 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
113 */
114 setEdmg(bool enable) generates (SupplicantStatus status);
115
116 /**
117 * Get whether enhanced directional multi-gigabit (802.11ay EDMG) is enabled for this network.
118 *
119 * @return status Status of the operation.
120 * Possible status codes:
121 * |SupplicantStatusCode.SUCCESS|,
122 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
123 * @return enabled true if set, false otherwise.
124 */
125 getEdmg() generates (SupplicantStatus status, bool enabled);
Jimmy Chen77f2c072020-10-14 23:46:36 +0800126
127 /**
128 * Register for callbacks from this network.
129 *
130 * These callbacks are invoked for events that are specific to this network.
131 * Registration of multiple callback objects is supported. These objects must
132 * be automatically deleted when the corresponding client process is dead or
133 * if this network is removed.
134 *
135 * @param callback An instance of the |ISupplicantStaNetworkCallback| HIDL
136 * interface object.
137 * @return status Status of the operation.
138 * Possible status codes:
139 * |SupplicantStatusCode.SUCCESS|,
140 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
141 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
142 */
143 registerCallback_1_4(ISupplicantStaNetworkCallback callback)
144 generates (SupplicantStatus status);
Jimmy Chen61ef86b2020-10-15 16:07:32 +0800145
146 /**
147 * Set whether to enable SAE H2E (Hash-to-Element) only mode.
148 *
149 * When enabled, only SAE H2E network is allowed; othewise
150 * H&P (Hunting and Pecking) and H2E are both allowed.
151 * H&P only mode is not supported.
152 * If this API is not called before connecting to a SAE
153 * network, the behavior is undefined.
154 *
155 * @param enable true to set, false otherwise.
156 * @return status Status of the operation.
157 * Possible status codes:
158 * |SupplicantStatusCode.SUCCESS|,
159 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
160 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
161 */
162 enableSaeH2eOnlyMode(bool enable) generates (SupplicantStatus status);
Jimmy Chena8ae5ac2019-12-25 20:43:40 +0200163};