blob: 2161c5d4a7c9216b43567bfe9265484efe4254b1 [file] [log] [blame]
Mitchell Wills5443a9f2016-08-18 11:44:58 -07001/*
2 * Copyright 2016 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.0;
18
19interface IWifiChipEventCallback {
20 /**
21 * Callback indicating that the chip has been reconfigured successfully. At
22 * this point the interfaces available in the mode must be able to be
23 * configured. When this is called any previous interface indexes will be
24 * considered invalid.
25 *
26 * @param modeId The mode that the chip switched to, corresponding to the id
Roshan Pius6f31d922016-10-04 15:08:05 -070027 * property of the target ChipMode.
Mitchell Wills5443a9f2016-08-18 11:44:58 -070028 */
29 oneway onChipReconfigured(ChipModeId modeId);
30
31 /**
32 * If this happens then the chips is now in an undefined state and
33 * configureChip must be called again. Any interface indexes will be
34 * assumed to be invalid.
35 *
36 * @param modeId The mode that the chip failed switched to, corresponding to
Roshan Pius6f31d922016-10-04 15:08:05 -070037 * the id property of the target ChipMode.
38 * @param reason Failure reason code.
Mitchell Wills5443a9f2016-08-18 11:44:58 -070039 */
40 oneway onChipReconfigureFailure(ChipModeId modeId, FailureReason reason);
41
42 /**
43 * Information about the version of the driver and firmware running this chip.
44 *
45 * This information is vendor specific and does not need to take any
46 * particular format. It will be dumped as part of the bug report.
47 */
48 struct ChipDebugInfo {
49 string driverDescription;
50 string firmwareDescription;
51 };
52
53 /**
54 * Callback with debug information about this chip
Roshan Pius6f31d922016-10-04 15:08:05 -070055 *
56 * @param info Instance of |ChipDebugInfo|.
Mitchell Wills5443a9f2016-08-18 11:44:58 -070057 */
58 oneway onChipDebugInfoAvailable(ChipDebugInfo info);
59
60 /**
Roshan Pius6f31d922016-10-04 15:08:05 -070061 * Callback to be invoked on failure to fetch debug info about this chip.
62 *
63 * @param reason Failure reason code.
Mitchell Wills5443a9f2016-08-18 11:44:58 -070064 */
Roshan Pius6f31d922016-10-04 15:08:05 -070065 oneway onChipDebugInfoFailure(FailureReason reason);
Mitchell Wills5443a9f2016-08-18 11:44:58 -070066
67 /**
68 * Callback with a vendor specific debug blob from the driver.
69 * This blob will be dumped as part of the bug report.
Roshan Pius6f31d922016-10-04 15:08:05 -070070 *
71 * @param blob Vector of bytes retrieved from the driver.
72 */
73 oneway onDriverDebugDumpAvailable(vec<uint8_t> blob);
74
75 /**
76 * Callback to be invoked on failure to fetch debug blob from driver.
77 *
78 * @param reason Failure reason code.
79 */
80 oneway onDriverDebugDumpFailure(FailureReason reason);
81
82 /**
83 * Callback with a vendor specific debug blob from the driver.
84 * This blob will be dumped as part of the bug report.
85 *
86 * @param blob Vector of bytes retrieved from the driver.
Mitchell Wills5443a9f2016-08-18 11:44:58 -070087 */
88 oneway onFirmwareDebugDumpAvailable(vec<uint8_t> blob);
Roshan Pius6f31d922016-10-04 15:08:05 -070089
90 /**
91 * Callback to be invoked on failure to fetch debug blob from driver.
92 *
93 * @param reason Failure reason code.
94 */
95 oneway onFirmwareDebugDumpFailure(FailureReason reason);
Mitchell Wills5443a9f2016-08-18 11:44:58 -070096};