Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.hardware.wifi@1.0; |
| 18 | |
| 19 | interface 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 Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame^] | 27 | * property of the target ChipMode. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 28 | */ |
| 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 Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame^] | 37 | * the id property of the target ChipMode. |
| 38 | * @param reason Failure reason code. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 39 | */ |
| 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 Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame^] | 55 | * |
| 56 | * @param info Instance of |ChipDebugInfo|. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 57 | */ |
| 58 | oneway onChipDebugInfoAvailable(ChipDebugInfo info); |
| 59 | |
| 60 | /** |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame^] | 61 | * Callback to be invoked on failure to fetch debug info about this chip. |
| 62 | * |
| 63 | * @param reason Failure reason code. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 64 | */ |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame^] | 65 | oneway onChipDebugInfoFailure(FailureReason reason); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 66 | |
| 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 Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame^] | 70 | * |
| 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 Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 87 | */ |
| 88 | oneway onFirmwareDebugDumpAvailable(vec<uint8_t> blob); |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame^] | 89 | |
| 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 Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 96 | }; |