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 | import IWifiChipEventCallback; |
Roshan Pius | fcbf923 | 2016-10-06 11:08:17 -0700 | [diff] [blame] | 20 | import IWifiIface; |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 21 | import IWifiApIface; |
| 22 | import IWifiNanIface; |
| 23 | import IWifiP2pIface; |
| 24 | import IWifiStaIface; |
Roshan Pius | fcbf923 | 2016-10-06 11:08:17 -0700 | [diff] [blame] | 25 | import IWifiRttController; |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 26 | |
| 27 | /** |
| 28 | * Interface that represents a chip that must be configured as a single unit. |
| 29 | * The HAL/driver/firmware will be responsible for determining which phy is used |
| 30 | * to perform operations like NAN, RTT, etc. |
| 31 | */ |
| 32 | interface IWifiChip { |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 33 | /** |
| 34 | * Set of interface types with the maximum number of interfaces that can have |
Roshan Pius | 271f2c2 | 2016-10-04 17:01:01 -0700 | [diff] [blame] | 35 | * one of the specified type for a given ChipIfaceCombination. See |
| 36 | * ChipIfaceCombination for examples. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 37 | */ |
Roshan Pius | 271f2c2 | 2016-10-04 17:01:01 -0700 | [diff] [blame] | 38 | struct ChipIfaceCombinationLimit { |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 39 | vec<IfaceType> types; // Each IfaceType must occur at most once. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 40 | uint32_t maxIfaces; |
| 41 | }; |
| 42 | |
| 43 | /** |
| 44 | * Set of interfaces that can operate concurrently when in a given mode. See |
| 45 | * ChipMode below. |
| 46 | * |
| 47 | * For example: |
| 48 | * [{STA} <= 2] |
| 49 | * At most two STA interfaces are supported |
| 50 | * [], [STA], [STA+STA] |
| 51 | * |
| 52 | * [{STA} <= 1, {NAN} <= 1, {AP} <= 1] |
| 53 | * Any combination of STA, NAN, AP |
| 54 | * [], [STA], [NAN], [AP], [STA+NAN], [STA+AP], [NAN+AP], [STA+NAN+AP] |
| 55 | * |
| 56 | * [{STA} <= 1, {NAN,P2P} <= 1] |
| 57 | * Optionally a STA and either NAN or P2P |
| 58 | * [], [STA], [STA+NAN], [STA+P2P], [NAN], [P2P] |
| 59 | * Not included [NAN+P2P], [STA+NAN+P2P] |
| 60 | * |
| 61 | * [{STA} <= 1, {STA,NAN} <= 1] |
| 62 | * Optionally a STA and either a second STA or a NAN |
| 63 | * [], [STA], [STA+NAN], [STA+STA], [NAN] |
| 64 | * Not included [STA+STA+NAN] |
| 65 | */ |
Roshan Pius | 271f2c2 | 2016-10-04 17:01:01 -0700 | [diff] [blame] | 66 | struct ChipIfaceCombination { |
| 67 | vec<ChipIfaceCombinationLimit> limits; |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 68 | }; |
| 69 | |
| 70 | /** |
| 71 | * A mode that the chip can be put in. A mode defines a set of constraints on |
| 72 | * the interfaces that can exist while in that mode. Modes define a unit of |
| 73 | * configuration where all interfaces must be torn down to switch to a |
| 74 | * different mode. Some HALs may only have a single mode, but an example where |
| 75 | * multiple modes would be required is if a chip has different firmwares with |
| 76 | * different capabilities. |
| 77 | * |
| 78 | * When in a mode, it must be possible to perform any combination of creating |
| 79 | * and removing interfaces as long as at least one of the |
Roshan Pius | 271f2c2 | 2016-10-04 17:01:01 -0700 | [diff] [blame] | 80 | * ChipIfaceCombinations is satisfied. This means that if a chip has two |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 81 | * available combinations, [{STA} <= 1] and [{AP} <= 1] then it is expected |
| 82 | * that exactly one STA interface or one AP interface can be created, but it |
| 83 | * is not expected that both a STA and AP interface could be created. If it |
| 84 | * was then there would be a single available combination |
| 85 | * [{STA} <=1, {AP} <= 1]. |
| 86 | * |
| 87 | * When switching between two available combinations it is expected that |
Roshan Pius | e3a02b0 | 2016-10-19 12:31:01 -0700 | [diff] [blame] | 88 | * interfaces only supported by the initial combination must be removed until |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 89 | * the target combination is also satisfied. At that point new interfaces |
| 90 | * satisfying only the target combination can be added (meaning the initial |
| 91 | * combination limits will no longer satisfied). The addition of these new |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 92 | * interfaces must not impact the existence of interfaces that satisfy both |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 93 | * combinations. |
| 94 | * |
| 95 | * For example, a chip with available combinations: |
| 96 | * [{STA} <= 2, {NAN} <=1] and [{STA} <=1, {NAN} <= 1, {AP} <= 1}] |
| 97 | * If the chip currently has 3 interfaces STA, STA and NAN and wants to add an |
| 98 | * AP interface in place of one of the STAs then first one of the STA |
| 99 | * interfaces must be removed and then the AP interface can be created after |
| 100 | * the STA had been torn down. During this process the remaining STA and NAN |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 101 | * interfaces must not be removed/recreated. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 102 | * |
| 103 | * If a chip does not support this kind of reconfiguration in this mode then |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 104 | * the combinations must be separated into two separate modes. Before |
Roshan Pius | e3a02b0 | 2016-10-19 12:31:01 -0700 | [diff] [blame] | 105 | * switching modes all interfaces must be torn down, the mode switch must be |
| 106 | * enacted and when it completes the new interfaces must be brought up. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 107 | */ |
| 108 | struct ChipMode { |
| 109 | /** |
| 110 | * Id that can be used to put the chip in this mode. |
| 111 | */ |
| 112 | ChipModeId id; |
| 113 | |
| 114 | /** |
| 115 | * A list of the possible interface combinations that the chip can have |
| 116 | * while in this mode. |
| 117 | */ |
Roshan Pius | 271f2c2 | 2016-10-04 17:01:01 -0700 | [diff] [blame] | 118 | vec<ChipIfaceCombination> availableCombinations; |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 119 | }; |
| 120 | |
| 121 | /** |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 122 | * Information about the version of the driver and firmware running this chip. |
| 123 | * |
| 124 | * The information in these ASCII strings are vendor specific and does not |
| 125 | * need to follow any particular format. It may be dumped as part of the bug |
| 126 | * report. |
| 127 | */ |
| 128 | struct ChipDebugInfo { |
| 129 | string driverDescription; |
| 130 | string firmwareDescription; |
| 131 | }; |
| 132 | |
| 133 | /** |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 134 | * Capabilities exposed by this chip. |
| 135 | */ |
| 136 | enum ChipCapabilityMask : uint32_t { |
| 137 | /** |
| 138 | * Memory dump of Firmware. |
| 139 | */ |
Roshan Pius | a2d369d | 2016-12-15 22:38:00 -0800 | [diff] [blame] | 140 | DEBUG_MEMORY_FIRMWARE_DUMP = 1 << 0, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 141 | /** |
| 142 | * Memory dump of Driver. |
| 143 | */ |
Roshan Pius | a2d369d | 2016-12-15 22:38:00 -0800 | [diff] [blame] | 144 | DEBUG_MEMORY_DRIVER_DUMP = 1 << 1, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 145 | /** |
| 146 | * Connectivity events reported via debug ring buffer. |
| 147 | */ |
Roshan Pius | a2d369d | 2016-12-15 22:38:00 -0800 | [diff] [blame] | 148 | DEBUG_RING_BUFFER_CONNECT_EVENT = 1 << 2, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 149 | /** |
| 150 | * Power events reported via debug ring buffer. |
| 151 | */ |
Roshan Pius | a2d369d | 2016-12-15 22:38:00 -0800 | [diff] [blame] | 152 | DEBUG_RING_BUFFER_POWER_EVENT = 1 << 3, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 153 | /** |
| 154 | * Wakelock events reported via debug ring buffer. |
| 155 | */ |
Roshan Pius | a2d369d | 2016-12-15 22:38:00 -0800 | [diff] [blame] | 156 | DEBUG_RING_BUFFER_WAKELOCK_EVENT = 1 << 4, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 157 | /** |
| 158 | * Vendor data reported via debug ring buffer. |
| 159 | * This mostly contains firmware event logs. |
| 160 | */ |
Roshan Pius | a2d369d | 2016-12-15 22:38:00 -0800 | [diff] [blame] | 161 | DEBUG_RING_BUFFER_VENDOR_DATA = 1 << 5, |
Roshan Pius | e0724f9 | 2016-10-20 09:33:26 -0700 | [diff] [blame] | 162 | /** |
| 163 | * Host wake reasons stats collection. |
| 164 | */ |
| 165 | DEBUG_HOST_WAKE_REASON_STATS = 1 << 6, |
Roshan Pius | 203cb03 | 2016-12-14 17:41:20 -0800 | [diff] [blame] | 166 | /** |
| 167 | * Error alerts. |
| 168 | */ |
| 169 | DEBUG_ERROR_ALERTS = 1 << 7 |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 170 | }; |
| 171 | |
| 172 | /** |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 173 | * Get the id assigned to this chip. |
| 174 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 175 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 176 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 177 | * |WifiStatusCode.SUCCESS|, |
| 178 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 179 | * @return id Assigned chip Id. |
| 180 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 181 | getId() generates (WifiStatus status, ChipId id); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 182 | |
| 183 | /** |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 184 | * Requests notifications of significant events on this chip. Multiple calls |
Roshan Pius | e3a02b0 | 2016-10-19 12:31:01 -0700 | [diff] [blame] | 185 | * to this must register multiple callbacks each of which must receive all |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 186 | * events. |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 187 | * |
| 188 | * @param callback An instance of the |IWifiChipEventCallback| HIDL interface |
| 189 | * object. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 190 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 191 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 192 | * |WifiStatusCode.SUCCESS|, |
| 193 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 194 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 195 | registerEventCallback(IWifiChipEventCallback callback) generates (WifiStatus status); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 196 | |
| 197 | /** |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 198 | * Get the capabilities supported by this chip. |
| 199 | * |
| 200 | * @return status WifiStatus of the operation. |
| 201 | * Possible status codes: |
| 202 | * |WifiStatusCode.SUCCESS|, |
| 203 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 204 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 205 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 206 | * @return capabilities Bitset of |ChipCapabilityMask| values. |
| 207 | */ |
Roshan Pius | 5c3a0d9 | 2017-01-18 09:23:18 -0800 | [diff] [blame] | 208 | getCapabilities() |
| 209 | generates (WifiStatus status, bitfield<ChipCapabilityMask> capabilities); |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 210 | |
| 211 | /** |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 212 | * Get the set of operation modes that the chip supports. |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 213 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 214 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 215 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 216 | * |WifiStatusCode.SUCCESS|, |
| 217 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 218 | * @return modes List of modes supported by the device. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 219 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 220 | getAvailableModes() generates (WifiStatus status, vec<ChipMode> modes); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 221 | |
| 222 | /** |
Ningyuan Wang | b1ad3a7 | 2017-04-18 14:20:41 -0700 | [diff] [blame] | 223 | * Configure the Chip. |
| 224 | * This may NOT be called to reconfigure a chip due to an internal |
| 225 | * limitation. Calling this when chip is already configured in a different |
| 226 | * mode must trigger an ERROR_NOT_SUPPORTED failure. |
| 227 | * If you want to do reconfiguration, please call IWifi.stop() and IWifi.start() |
| 228 | * to restart Wifi HAL before calling this. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 229 | * Any existing |IWifiIface| objects must be marked invalid after this call. |
| 230 | * If this fails then the chips is now in an undefined state and |
| 231 | * configureChip must be called again. |
| 232 | * Must trigger |IWifiChipEventCallback.onChipReconfigured| on success. |
| 233 | * Must trigger |IWifiEventCallback.onFailure| on failure. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 234 | * |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 235 | * @param modeId The mode that the chip must switch to, corresponding to the |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 236 | * id property of the target ChipMode. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 237 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 238 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 239 | * |WifiStatusCode.SUCCESS|, |
| 240 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 241 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
Ningyuan Wang | b1ad3a7 | 2017-04-18 14:20:41 -0700 | [diff] [blame] | 242 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 243 | * |WifiStatusCode.ERROR_UNKNOWN| |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 244 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 245 | configureChip(ChipModeId modeId) generates (WifiStatus status); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 246 | |
| 247 | /** |
| 248 | * Get the current mode that the chip is in. |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 249 | * |
| 250 | * @return modeId The mode that the chip is currently configured to, |
| 251 | * corresponding to the id property of the target ChipMode. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 252 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 253 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 254 | * |WifiStatusCode.SUCCESS|, |
| 255 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 256 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 257 | getMode() generates (WifiStatus status, ChipModeId modeId); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 258 | |
| 259 | /** |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 260 | * Request information about the chip. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 261 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 262 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 263 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 264 | * |WifiStatusCode.SUCCESS|, |
| 265 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 266 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 267 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 268 | * @return chipDebugInfo Instance of |ChipDebugInfo|. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 269 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 270 | requestChipDebugInfo() generates (WifiStatus status, ChipDebugInfo chipDebugInfo); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 271 | |
| 272 | /** |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 273 | * Request vendor debug info from the driver. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 274 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 275 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 276 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 277 | * |WifiStatusCode.SUCCESS|, |
| 278 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 279 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 280 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 281 | * @param blob Vector of bytes retrieved from the driver. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 282 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 283 | requestDriverDebugDump() generates (WifiStatus status, vec<uint8_t> blob); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 284 | |
| 285 | /** |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 286 | * Request vendor debug info from the firmware. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 287 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 288 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 289 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 290 | * |WifiStatusCode.SUCCESS|, |
| 291 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 292 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 293 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 294 | * @param blob Vector of bytes retrieved from the driver. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 295 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 296 | requestFirmwareDebugDump() generates (WifiStatus status, vec<uint8_t> blob); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 297 | |
| 298 | /** |
| 299 | * Create an AP iface on the chip. |
| 300 | * |
| 301 | * Depending on the mode the chip is configured in, the interface creation |
Roshan Pius | a2d369d | 2016-12-15 22:38:00 -0800 | [diff] [blame] | 302 | * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 303 | * allowed (specified in |ChipIfaceCombination|) number of ifaces of the AP |
| 304 | * type. |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 305 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 306 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 307 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 308 | * |WifiStatusCode.SUCCESS|, |
| 309 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 310 | * |WifiStatusCode.ERROR_NOT_SUPPORTED| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 311 | * @return iface HIDL interface object representing the iface if |
| 312 | * successful, null otherwise. |
| 313 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 314 | createApIface() generates (WifiStatus status, IWifiApIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 315 | |
| 316 | /** |
| 317 | * List all the AP iface names configured on the chip. |
| 318 | * The corresponding |IWifiApIface| object for any iface are |
| 319 | * retrieved using |getApIface| method. |
| 320 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 321 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 322 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 323 | * |WifiStatusCode.SUCCESS|, |
| 324 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 325 | * @return ifnames List of all AP iface names on the chip. |
| 326 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 327 | getApIfaceNames() generates (WifiStatus status, vec<string> ifnames); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 328 | |
| 329 | /** |
| 330 | * Gets a HIDL interface object for the AP Iface corresponding |
| 331 | * to the provided ifname. |
| 332 | * |
| 333 | * @param ifname Name of the iface. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 334 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 335 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 336 | * |WifiStatusCode.SUCCESS|, |
Roshan Pius | 8b55e6f | 2016-12-09 12:05:12 -0800 | [diff] [blame] | 337 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 338 | * |WifiStatusCode.ERROR_INVALID_ARGS| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 339 | * @return iface HIDL interface object representing the iface if |
| 340 | * it exists, null otherwise. |
| 341 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 342 | getApIface(string ifname) generates (WifiStatus status, IWifiApIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 343 | |
| 344 | /** |
Roshan Pius | 8b55e6f | 2016-12-09 12:05:12 -0800 | [diff] [blame] | 345 | * Removes the AP Iface with the provided ifname. |
| 346 | * Any further calls on the corresponding |IWifiApIface| HIDL interface |
| 347 | * object must fail. |
| 348 | * |
| 349 | * @param ifname Name of the iface. |
| 350 | * @return status WifiStatus of the operation. |
| 351 | * Possible status codes: |
| 352 | * |WifiStatusCode.SUCCESS|, |
| 353 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 354 | * |WifiStatusCode.ERROR_INVALID_ARGS| |
| 355 | */ |
| 356 | removeApIface(string ifname) generates (WifiStatus status); |
| 357 | |
| 358 | /** |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 359 | * Create a NAN iface on the chip. |
| 360 | * |
| 361 | * Depending on the mode the chip is configured in, the interface creation |
Roshan Pius | a2d369d | 2016-12-15 22:38:00 -0800 | [diff] [blame] | 362 | * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 363 | * allowed (specified in |ChipIfaceCombination|) number of ifaces of the NAN |
| 364 | * type. |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 365 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 366 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 367 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 368 | * |WifiStatusCode.SUCCESS|, |
| 369 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 370 | * |WifiStatusCode.ERROR_NOT_SUPPORTED| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 371 | * @return iface HIDL interface object representing the iface if |
| 372 | * successful, null otherwise. |
| 373 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 374 | createNanIface() generates (WifiStatus status, IWifiNanIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 375 | |
| 376 | /** |
| 377 | * List all the NAN iface names configured on the chip. |
| 378 | * The corresponding |IWifiNanIface| object for any iface are |
| 379 | * retrieved using |getNanIface| method. |
| 380 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 381 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 382 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 383 | * |WifiStatusCode.SUCCESS|, |
| 384 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 385 | * @return ifnames List of all NAN iface names on the chip. |
| 386 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 387 | getNanIfaceNames() generates (WifiStatus status, vec<string> ifnames); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 388 | |
| 389 | /** |
| 390 | * Gets a HIDL interface object for the NAN Iface corresponding |
| 391 | * to the provided ifname. |
| 392 | * |
| 393 | * @param ifname Name of the iface. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 394 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 395 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 396 | * |WifiStatusCode.SUCCESS|, |
Roshan Pius | 8b55e6f | 2016-12-09 12:05:12 -0800 | [diff] [blame] | 397 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 398 | * |WifiStatusCode.ERROR_INVALID_ARGS| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 399 | * @return iface HIDL interface object representing the iface if |
| 400 | * it exists, null otherwise. |
| 401 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 402 | getNanIface(string ifname) generates (WifiStatus status, IWifiNanIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 403 | |
| 404 | /** |
Roshan Pius | 8b55e6f | 2016-12-09 12:05:12 -0800 | [diff] [blame] | 405 | * Removes the NAN Iface with the provided ifname. |
| 406 | * Any further calls on the corresponding |IWifiNanIface| HIDL interface |
| 407 | * object must fail. |
| 408 | * |
| 409 | * @param ifname Name of the iface. |
| 410 | * @return status WifiStatus of the operation. |
| 411 | * Possible status codes: |
| 412 | * |WifiStatusCode.SUCCESS|, |
| 413 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 414 | * |WifiStatusCode.ERROR_INVALID_ARGS| |
| 415 | */ |
| 416 | removeNanIface(string ifname) generates (WifiStatus status); |
| 417 | |
| 418 | /** |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 419 | * Create a P2P iface on the chip. |
| 420 | * |
| 421 | * Depending on the mode the chip is configured in, the interface creation |
Roshan Pius | a2d369d | 2016-12-15 22:38:00 -0800 | [diff] [blame] | 422 | * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 423 | * allowed (specified in |ChipIfaceCombination|) number of ifaces of the P2P |
| 424 | * type. |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 425 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 426 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 427 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 428 | * |WifiStatusCode.SUCCESS|, |
| 429 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 430 | * |WifiStatusCode.ERROR_NOT_SUPPORTED| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 431 | * @return iface HIDL interface object representing the iface if |
| 432 | * successful, null otherwise. |
| 433 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 434 | createP2pIface() generates (WifiStatus status, IWifiP2pIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 435 | |
| 436 | /** |
| 437 | * List all the P2P iface names configured on the chip. |
| 438 | * The corresponding |IWifiP2pIface| object for any iface are |
| 439 | * retrieved using |getP2pIface| method. |
| 440 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 441 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 442 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 443 | * |WifiStatusCode.SUCCESS|, |
| 444 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 445 | * @return ifnames List of all P2P iface names on the chip. |
| 446 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 447 | getP2pIfaceNames() generates (WifiStatus status, vec<string> ifnames); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 448 | |
| 449 | /** |
| 450 | * Gets a HIDL interface object for the P2P Iface corresponding |
| 451 | * to the provided ifname. |
| 452 | * |
| 453 | * @param ifname Name of the iface. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 454 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 455 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 456 | * |WifiStatusCode.SUCCESS|, |
Roshan Pius | 8b55e6f | 2016-12-09 12:05:12 -0800 | [diff] [blame] | 457 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 458 | * |WifiStatusCode.ERROR_INVALID_ARGS| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 459 | * @return iface HIDL interface object representing the iface if |
| 460 | * it exists, null otherwise. |
| 461 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 462 | getP2pIface(string ifname) generates (WifiStatus status, IWifiP2pIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 463 | |
| 464 | /** |
Roshan Pius | 8b55e6f | 2016-12-09 12:05:12 -0800 | [diff] [blame] | 465 | * Removes the P2P Iface with the provided ifname. |
| 466 | * Any further calls on the corresponding |IWifiP2pIface| HIDL interface |
| 467 | * object must fail. |
| 468 | * |
| 469 | * @param ifname Name of the iface. |
| 470 | * @return status WifiStatus of the operation. |
| 471 | * Possible status codes: |
| 472 | * |WifiStatusCode.SUCCESS|, |
| 473 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 474 | * |WifiStatusCode.ERROR_INVALID_ARGS| |
| 475 | */ |
| 476 | removeP2pIface(string ifname) generates (WifiStatus status); |
| 477 | |
| 478 | /** |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 479 | * Create an STA iface on the chip. |
| 480 | * |
| 481 | * Depending on the mode the chip is configured in, the interface creation |
Roshan Pius | a2d369d | 2016-12-15 22:38:00 -0800 | [diff] [blame] | 482 | * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 483 | * allowed (specified in |ChipIfaceCombination|) number of ifaces of the STA |
| 484 | * type. |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 485 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 486 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 487 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 488 | * |WifiStatusCode.SUCCESS|, |
| 489 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 490 | * |WifiStatusCode.ERROR_NOT_SUPPORTED| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 491 | * @return iface HIDL interface object representing the iface if |
| 492 | * successful, null otherwise. |
| 493 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 494 | createStaIface() generates (WifiStatus status, IWifiStaIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 495 | |
| 496 | /** |
| 497 | * List all the STA iface names configured on the chip. |
| 498 | * The corresponding |IWifiStaIface| object for any iface are |
| 499 | * retrieved using |getStaIface| method. |
| 500 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 501 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 502 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 503 | * |WifiStatusCode.SUCCESS|, |
| 504 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 505 | * @return ifnames List of all STA iface names on the chip. |
| 506 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 507 | getStaIfaceNames() generates (WifiStatus status, vec<string> ifnames); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 508 | |
| 509 | /** |
| 510 | * Gets a HIDL interface object for the STA Iface corresponding |
| 511 | * to the provided ifname. |
| 512 | * |
| 513 | * @param ifname Name of the iface. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 514 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 515 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 516 | * |WifiStatusCode.SUCCESS|, |
Roshan Pius | 8b55e6f | 2016-12-09 12:05:12 -0800 | [diff] [blame] | 517 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 518 | * |WifiStatusCode.ERROR_INVALID_ARGS| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 519 | * @return iface HIDL interface object representing the iface if |
| 520 | * it exists, null otherwise. |
| 521 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 522 | getStaIface(string ifname) generates (WifiStatus status, IWifiStaIface iface); |
Roshan Pius | fcbf923 | 2016-10-06 11:08:17 -0700 | [diff] [blame] | 523 | |
| 524 | /** |
Roshan Pius | 8b55e6f | 2016-12-09 12:05:12 -0800 | [diff] [blame] | 525 | * Removes the STA Iface with the provided ifname. |
| 526 | * Any further calls on the corresponding |IWifiStaIface| HIDL interface |
| 527 | * object must fail. |
| 528 | * |
| 529 | * @param ifname Name of the iface. |
| 530 | * @return status WifiStatus of the operation. |
| 531 | * Possible status codes: |
| 532 | * |WifiStatusCode.SUCCESS|, |
| 533 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 534 | * |WifiStatusCode.ERROR_INVALID_ARGS| |
| 535 | */ |
| 536 | removeStaIface(string ifname) generates (WifiStatus status); |
| 537 | |
| 538 | /** |
Roshan Pius | fcbf923 | 2016-10-06 11:08:17 -0700 | [diff] [blame] | 539 | * Create a RTTController instance. |
| 540 | * |
| 541 | * RTT controller can be either: |
| 542 | * a) Bound to a specific iface by passing in the corresponding |IWifiIface| |
| 543 | * object in |iface| param, OR |
| 544 | * b) Let the implementation decide the iface to use for RTT operations by |
| 545 | * passing null in |iface| param. |
| 546 | * |
| 547 | * @param boundIface HIDL interface object representing the iface if |
| 548 | * the responder must be bound to a specific iface, null otherwise. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 549 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 550 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 551 | * |WifiStatusCode.SUCCESS|, |
| 552 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | fcbf923 | 2016-10-06 11:08:17 -0700 | [diff] [blame] | 553 | */ |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 554 | createRttController(IWifiIface boundIface) |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 555 | generates (WifiStatus status, IWifiRttController rtt); |
Roshan Pius | e3a02b0 | 2016-10-19 12:31:01 -0700 | [diff] [blame] | 556 | |
| 557 | /** |
| 558 | * WiFi debug ring buffer life cycle is as follow: |
| 559 | * - At initialization time, framework must call |getDebugRingBuffersStatus|. |
| 560 | * to obtain the names and list of supported ring buffers. |
| 561 | * The driver may expose several different rings each holding a different |
| 562 | * type of data (connection events, power events, etc). |
| 563 | * - When WiFi operations start framework must call |
| 564 | * |startLoggingToDebugRingBuffer| to trigger log collection for a specific |
| 565 | * ring. The vebose level for each ring buffer can be specified in this API. |
| 566 | * - During wifi operations, driver must periodically report per ring data to |
| 567 | * framework by invoking the |
Roshan Pius | 48185b2 | 2016-12-15 19:10:30 -0800 | [diff] [blame] | 568 | * |IWifiChipEventCallback.onDebugRingBufferDataAvailable| callback. |
Roshan Pius | e3a02b0 | 2016-10-19 12:31:01 -0700 | [diff] [blame] | 569 | * - When capturing a bug report, framework must indicate to driver that all |
| 570 | * the data has to be uploaded urgently by calling |
| 571 | * |forceDumpToDebugRingBuffer|. |
| 572 | * |
| 573 | * The data uploaded by driver must be stored by framework in separate files, |
| 574 | * with one stream of file per ring. Framework must store the files in pcapng |
| 575 | * format, allowing for easy merging and parsing with network analyzer tools. |
| 576 | * TODO: Since we're not longer dumping out the raw data, storing in separate |
| 577 | * pcapng files for parsing later must not work anymore. |
| 578 | */ |
| 579 | /** |
| 580 | * API to get the status of all ring buffers supported by driver. |
| 581 | * |
| 582 | * @return status WifiStatus of the operation. |
| 583 | * Possible status codes: |
| 584 | * |WifiStatusCode.SUCCESS|, |
| 585 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 586 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
Roshan Pius | e3a02b0 | 2016-10-19 12:31:01 -0700 | [diff] [blame] | 587 | * |WifiStatusCode.NOT_AVAILABLE|, |
| 588 | * |WifiStatusCode.UNKNOWN| |
| 589 | * @return ringBuffers Vector of |WifiDebugRingBufferStatus| corresponding to the |
| 590 | * status of each ring bufffer on the device. |
| 591 | */ |
| 592 | getDebugRingBuffersStatus() generates (WifiStatus status, |
| 593 | vec<WifiDebugRingBufferStatus> ringBuffers); |
| 594 | |
| 595 | /** |
| 596 | * API to trigger the debug data collection. |
| 597 | * |
| 598 | * @param ringName represent the name of the ring for which data collection |
| 599 | * shall start. This can be retrieved via the corresponding |
| 600 | * |WifiDebugRingBufferStatus|. |
| 601 | * @parm maxIntervalInSec Maximum interval in seconds for driver to invoke |
| 602 | * |onDebugRingBufferData|, ignore if zero. |
| 603 | * @parm minDataSizeInBytes: Minimum data size in buffer for driver to invoke |
| 604 | * |onDebugRingBufferData|, ignore if zero. |
| 605 | * @return status WifiStatus of the operation. |
| 606 | * Possible status codes: |
| 607 | * |WifiStatusCode.SUCCESS|, |
| 608 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 609 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
Roshan Pius | e3a02b0 | 2016-10-19 12:31:01 -0700 | [diff] [blame] | 610 | * |WifiStatusCode.NOT_AVAILABLE|, |
| 611 | * |WifiStatusCode.UNKNOWN| |
| 612 | */ |
| 613 | startLoggingToDebugRingBuffer(string ringName, |
| 614 | WifiDebugRingBufferVerboseLevel verboseLevel, |
| 615 | uint32_t maxIntervalInSec, |
| 616 | uint32_t minDataSizeInBytes) |
| 617 | generates (WifiStatus status); |
| 618 | |
| 619 | /** |
| 620 | * API to force dump data into the corresponding ring buffer. |
| 621 | * This is to be invoked during bugreport collection. |
| 622 | * |
| 623 | * @param ringName represent the name of the ring for which data collection |
| 624 | * shall be forced. This can be retrieved via the corresponding |
| 625 | * |WifiDebugRingBufferStatus|. |
| 626 | * @return status WifiStatus of the operation. |
| 627 | * Possible status codes: |
| 628 | * |WifiStatusCode.SUCCESS|, |
| 629 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 630 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 631 | * |WifiStatusCode.ERROR_NOT_STARTED|, |
Roshan Pius | e3a02b0 | 2016-10-19 12:31:01 -0700 | [diff] [blame] | 632 | * |WifiStatusCode.NOT_AVAILABLE|, |
| 633 | * |WifiStatusCode.UNKNOWN| |
| 634 | */ |
| 635 | forceDumpToDebugRingBuffer(string ringName) generates (WifiStatus status); |
Roshan Pius | e0724f9 | 2016-10-20 09:33:26 -0700 | [diff] [blame] | 636 | |
| 637 | /** |
Roshan Pius | 8c0c8e9 | 2017-02-24 08:07:42 -0800 | [diff] [blame] | 638 | * API to stop the debug data collection for all ring buffers. |
| 639 | * |
| 640 | * @return status WifiStatus of the operation. |
| 641 | * Possible status codes: |
| 642 | * |WifiStatusCode.SUCCESS|, |
| 643 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 644 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 645 | * |WifiStatusCode.NOT_AVAILABLE|, |
| 646 | * |WifiStatusCode.UNKNOWN| |
| 647 | */ |
| 648 | stopLoggingToDebugRingBuffer() generates (WifiStatus status); |
| 649 | |
| 650 | /** |
Roshan Pius | e0724f9 | 2016-10-20 09:33:26 -0700 | [diff] [blame] | 651 | * API to retrieve the wifi wake up reason stats for debugging. |
| 652 | * The driver is expected to start maintaining these stats once the chip |
| 653 | * is configured using |configureChip|. These stats must be reset whenever |
| 654 | * the chip is reconfigured or the HAL is stopped. |
| 655 | * |
| 656 | * @return status WifiStatus of the operation. |
| 657 | * Possible status codes: |
| 658 | * |WifiStatusCode.SUCCESS|, |
| 659 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 660 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 661 | * |WifiStatusCode.NOT_AVAILABLE|, |
| 662 | * |WifiStatusCode.UNKNOWN| |
| 663 | * @return stats Instance of |WifiDebugHostWakeReasonStats|. |
| 664 | */ |
| 665 | getDebugHostWakeReasonStats() |
| 666 | generates (WifiStatus status, WifiDebugHostWakeReasonStats stats); |
Roshan Pius | 203cb03 | 2016-12-14 17:41:20 -0800 | [diff] [blame] | 667 | |
| 668 | /** |
| 669 | * API to enable/disable alert notifications from the chip. |
| 670 | * These alerts must be used to notify framework of any fatal error events |
| 671 | * that the chip encounters via |IWifiChipEventCallback.onDebugErrorAlert| method. |
| 672 | * Must fail if |ChipCapabilityMask.DEBUG_ERROR_ALERTS| is not set. |
| 673 | * |
| 674 | * @param enable true to enable, false to disable. |
| 675 | * @return status WifiStatus of the operation. |
| 676 | * Possible status codes: |
| 677 | * |WifiStatusCode.SUCCESS|, |
| 678 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 679 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 680 | * |WifiStatusCode.NOT_AVAILABLE|, |
| 681 | * |WifiStatusCode.UNKNOWN| |
| 682 | */ |
| 683 | enableDebugErrorAlerts(bool enable) generates (WifiStatus status); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 684 | }; |