blob: 72ba160ec9d44eef98c3a202e9edc4d274c2250c [file] [log] [blame]
Jimmy Chen1eb82362019-08-28 17:54:29 +08001/*
2 * Copyright 2019 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.3;
18
19import @1.2::ISupplicantStaIfaceCallback;
20
21/**
22 * Callback Interface exposed by the supplicant service
23 * for each station mode interface (ISupplicantStaIface).
24 *
25 * Clients need to host an instance of this HIDL interface object and
26 * pass a reference of the object to the supplicant via the
27 * corresponding |ISupplicantStaIface.registerCallback_1_3| method.
28 */
29interface ISupplicantStaIfaceCallback extends @1.2::ISupplicantStaIfaceCallback {
30 /**
Sunil Ravic6489a52019-12-06 18:03:24 -080031 * IEEE Std 802.11-2016 - Table 9-357.
32 * BTM status code filled in BSS transition management response frame.
33 */
34 enum BssTmStatusCode : uint8_t {
35 ACCEPT = 0,
36 REJECT_UNSPECIFIED = 1,
37 REJECT_INSUFFICIENT_BEACON = 2,
38 REJECT_INSUFFICIENT_CAPABITY = 3,
39 REJECT_BSS_TERMINATION_UNDESIRED = 4,
40 REJECT_BSS_TERMINATION_DELAY_REQUEST = 5,
41 REJECT_STA_CANDIDATE_LIST_PROVIDED = 6,
42 REJECT_NO_SUITABLE_CANDIDATES = 7,
43 REJECT_LEAVING_ESS = 8,
44 };
45
46 /**
47 * Bitmask of various information retrieved from BSS transition management request frame.
48 */
49 enum BssTmDataFlagsMask : uint32_t {
50 /**
51 * Preferred candidate list included.
52 */
53 WNM_MODE_PREFERRED_CANDIDATE_LIST_INCLUDED = 1 << 0,
54 /**
55 * Abridged.
56 */
57 WNM_MODE_ABRIDGED = 1 << 1,
58 /**
59 * Disassociation Imminent.
60 */
61 WNM_MODE_DISASSOCIATION_IMMINENT = 1 << 2,
62 /**
63 * BSS termination included.
64 */
65 WNM_MODE_BSS_TERMINATION_INCLUDED = 1 << 3,
66 /**
67 * ESS Disassociation Imminent.
68 */
69 WNM_MODE_ESS_DISASSOCIATION_IMMINENT = 1 << 4,
70 /**
71 * MBO transition reason code included.
72 */
73 MBO_TRANSITION_REASON_CODE_INCLUDED = 1 << 5,
74 /**
75 * MBO retry delay time included.
76 */
77 MBO_ASSOC_RETRY_DELAY_INCLUDED = 1 << 6,
78 /**
79 * MBO cellular data connection preference value included.
80 */
81 MBO_CELLULAR_DATA_CONNECTION_PREFERENCE_INCLUDED = 1 << 7,
82 };
83
84 /**
85 * MBO spec v1.2, 4.2.6 Table 18: MBO transition reason code attribute
86 * values.
87 */
88 enum MboTransitionReasonCode : uint8_t {
89 UNSPECIFIED = 0,
90 EXCESSIVE_FRAME_LOSS = 1,
91 EXCESSIVE_TRAFFIC_DELAY = 2,
92 INSUFFICIENT_BANDWIDTH = 3,
93 LOAD_BALANCING = 4,
94 LOW_RSSI = 5,
95 RX_EXCESSIVE_RETRIES = 6,
96 HIGH_INTERFERENCE = 7,
97 GRAY_ZONE = 8,
98 TRANSITION_TO_PREMIUM_AP = 9,
99 };
100
101 /**
102 * MBO spec v1.2, 4.2.5 Table 16: MBO Cellular Data connection preference
103 * attribute values. AP use this to indicate STA, its preference for the
104 * STA to move from BSS to cellular network.
105 */
106 enum MboCellularDataConnectionPrefValue : uint8_t {
107 EXCLUDED = 0,
108 NOT_PREFERRED = 1,
109 /*
110 * 2-254 Reserved.
111 */
112 PREFERRED = 255,
113 };
114
115 /**
116 * Data retrieved from received BSS transition management request frame.
117 */
118 struct BssTmData {
119 /*
120 * Status code filled in BSS transition management response frame
121 */
122 BssTmStatusCode status;
123
124 /*
125 * Bitmask of BssTmDataFlagsMask
126 */
127 bitfield<BssTmDataFlagsMask> flags;
128
129 /*
130 * Duration for which STA shouldn't try to re-associate.
131 */
132 uint32_t assocRetryDelayMs;
133
134 /*
135 * Reason for BSS transition request.
136 */
137 MboTransitionReasonCode mboTransitionReason;
138
139 /*
140 * Cellular Data Connection preference value.
141 */
142 MboCellularDataConnectionPrefValue mboCellPreference;
143 };
144
145 /**
Jimmy Chen1eb82362019-08-28 17:54:29 +0800146 * Indicates PMK cache added event.
147 *
148 * @param expirationTimeInSec expiration time in seconds
149 * @param serializedEntry is serialized PMK cache entry, the content is
150 * opaque for the framework and depends on the native implementation.
151 */
152 oneway onPmkCacheAdded(int64_t expirationTimeInSec, vec<uint8_t> serializedEntry);
Hai Shalom36768042019-12-04 15:50:57 -0800153
154 /**
155 * Indicates a DPP success event.
156 */
157 oneway onDppSuccess(DppSuccessCode code);
158
159 /**
160 * Indicates a DPP progress event.
161 */
162 oneway onDppProgress_1_3(DppProgressCode code);
163
164 /**
165 * Indicates a DPP failure event.
166 *
167 * ssid: A string indicating the SSID for the AP that the Enrollee attempted to connect.
168 * channelList: A string containing a list of operating channels and operating classes
169 * indicating the channels that the Enrollee scanned in attempting to discover the AP.
170 * The list conforms to the following ABNF syntax:
171 * channel-list2 = class-and-channels *(“,” class-and-channels)
172 * class-and-channels = class “/” channel *(“,” channel)
173 * class = 1*3DIGIT
174 * channel = 1*3DIGIT
175 * bandList: A list of band parameters that are supported by the Enrollee expressed as the
176 * Operating Class.
177 */
178 oneway onDppFailure_1_3(DppFailureCode code, string ssid, string channelList,
Sunil Ravic6489a52019-12-06 18:03:24 -0800179 vec<uint16_t> bandList);
180
181 /**
182 * Indicates BTM request frame handling status.
183 *
184 * @param BssTmData Data retrieved from received BSS transition management
185 * request frame.
186 */
187 oneway onBssTmHandlingDone(BssTmData tmData);
Jimmy Chen1eb82362019-08-28 17:54:29 +0800188};