blob: f12ace46f44846c96d368a31d4422919186e4dd0 [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 +020021import @1.0::SupplicantStatus;
22
23/**
24 * Interface exposed by the supplicant for each station mode network
25 * configuration it controls.
26 */
27interface ISupplicantStaNetwork extends @1.3::ISupplicantStaNetwork {
28 /**
29 * Possible mask of values for PairwiseCipher param.
30 */
31 enum PairwiseCipherMask : @1.3::ISupplicantStaNetwork.PairwiseCipherMask {
32 /**
33 * GCMP-128 Pairwise Cipher
34 */
35 GCMP_128 = 1 << 9,
36 };
37
38 /**
39 * Possible mask of values for GroupCipher param.
40 */
41 enum GroupCipherMask : @1.3::ISupplicantStaNetwork.GroupCipherMask {
42 /**
43 * GCMP-128 Group Cipher
44 */
45 GCMP_128 = 1 << 9,
46 };
47
48 /**
49 * Set group cipher mask for the network.
50 *
51 * @param groupCipherMask value to set.
52 * Combination of |ProtoMask| values.
53 * @return status Status of the operation.
54 * Possible status codes:
55 * |SupplicantStatusCode.SUCCESS|,
56 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
57 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
58 * |SupplicantStatusCode.FAILURE_UNKNOWN|
59 */
60 setGroupCipher_1_4(bitfield<GroupCipherMask> groupCipherMask)
61 generates (SupplicantStatus status);
62
63 /**
64 * Get the group cipher mask set for the network.
65 *
66 * @return status Status of the operation.
67 * Possible status codes:
68 * |SupplicantStatusCode.SUCCESS|,
69 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
70 * |SupplicantStatusCode.FAILURE_UNKNOWN|
71 * @return groupCipherMask Combination of |GroupCipherMask| values.
72 */
73 getGroupCipher_1_4()
74 generates (SupplicantStatus status, bitfield<GroupCipherMask> groupCipherMask);
75
76 /**
77 * Set pairwise cipher mask for the network.
78 *
79 * @param pairwiseCipherMask value to set.
80 * Combination of |ProtoMask| values.
81 * @return status Status of the operation.
82 * Possible status codes:
83 * |SupplicantStatusCode.SUCCESS|,
84 * |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
85 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
86 * |SupplicantStatusCode.FAILURE_UNKNOWN|
87 */
88 setPairwiseCipher_1_4(bitfield<PairwiseCipherMask> pairwiseCipherMask)
89 generates (SupplicantStatus status);
90
91 /**
92 * Get the pairwise cipher mask set for the network.
93 *
94 * @return status Status of the operation.
95 * Possible status codes:
96 * |SupplicantStatusCode.SUCCESS|,
97 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|,
98 * |SupplicantStatusCode.FAILURE_UNKNOWN|
99 * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
100 */
101 getPairwiseCipher_1_4()
102 generates (SupplicantStatus status, bitfield<PairwiseCipherMask> pairwiseCipherMask);
103
104 /**
105 * Set whether to enable enhanced directional multi-gigabit (802.11ay EDMG).
106 * Only allowed if hw mode is |HOSTAPD_MODE_IEEE80211AD|
107 *
108 * @param enable true to set, false otherwise.
109 * @return status Status of the operation.
110 * Possible status codes:
111 * |SupplicantStatusCode.SUCCESS|,
112 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
113 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
114 */
115 setEdmg(bool enable) generates (SupplicantStatus status);
116
117 /**
118 * Get whether enhanced directional multi-gigabit (802.11ay EDMG) is enabled for this network.
119 *
120 * @return status Status of the operation.
121 * Possible status codes:
122 * |SupplicantStatusCode.SUCCESS|,
123 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
124 * @return enabled true if set, false otherwise.
125 */
126 getEdmg() generates (SupplicantStatus status, bool enabled);
Jimmy Chen77f2c072020-10-14 23:46:36 +0800127
128 /**
129 * Register for callbacks from this network.
130 *
131 * These callbacks are invoked for events that are specific to this network.
132 * Registration of multiple callback objects is supported. These objects must
133 * be automatically deleted when the corresponding client process is dead or
134 * if this network is removed.
135 *
136 * @param callback An instance of the |ISupplicantStaNetworkCallback| HIDL
137 * interface object.
138 * @return status Status of the operation.
139 * Possible status codes:
140 * |SupplicantStatusCode.SUCCESS|,
141 * |SupplicantStatusCode.FAILURE_UNKNOWN|,
142 * |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
143 */
144 registerCallback_1_4(ISupplicantStaNetworkCallback callback)
145 generates (SupplicantStatus status);
Jimmy Chena8ae5ac2019-12-25 20:43:40 +0200146};