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 |
| 88 | * interfaces only supported by the initial combination will be removed until |
| 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 |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 105 | * switching modes all interfaces will be torn down, the mode switch will be |
| 106 | * enacted and when it completes the new interfaces will be brought up. |
| 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 | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 134 | * Get the id assigned to this chip. |
| 135 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 136 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 137 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 138 | * |WifiStatusCode.SUCCESS|, |
| 139 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 140 | * @return id Assigned chip Id. |
| 141 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 142 | getId() generates (WifiStatus status, ChipId id); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 143 | |
| 144 | /** |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 145 | * Requests notifications of significant events on this chip. Multiple calls |
| 146 | * to this will register multiple callbacks each of which will receive all |
| 147 | * events. |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 148 | * |
| 149 | * @param callback An instance of the |IWifiChipEventCallback| HIDL interface |
| 150 | * object. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 151 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 152 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 153 | * |WifiStatusCode.SUCCESS|, |
| 154 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 155 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 156 | registerEventCallback(IWifiChipEventCallback callback) generates (WifiStatus status); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 157 | |
| 158 | /** |
| 159 | * Get the set of operation modes that the chip supports. |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 160 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 161 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 162 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 163 | * |WifiStatusCode.SUCCESS|, |
| 164 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 165 | * @return modes List of modes supported by the device. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 166 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 167 | getAvailableModes() generates (WifiStatus status, vec<ChipMode> modes); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 168 | |
| 169 | /** |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 170 | * Reconfigure the Chip. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 171 | * Any existing |IWifiIface| objects must be marked invalid after this call. |
| 172 | * If this fails then the chips is now in an undefined state and |
| 173 | * configureChip must be called again. |
| 174 | * Must trigger |IWifiChipEventCallback.onChipReconfigured| on success. |
| 175 | * Must trigger |IWifiEventCallback.onFailure| on failure. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 176 | * |
| 177 | * @param modeId The mode that the chip should switch to, corresponding to the |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 178 | * id property of the target ChipMode. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 179 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 180 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 181 | * |WifiStatusCode.SUCCESS|, |
| 182 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 183 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 184 | * |WifiStatusCode.ERROR_UNKNOWN| |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 185 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 186 | configureChip(ChipModeId modeId) generates (WifiStatus status); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 187 | |
| 188 | /** |
| 189 | * Get the current mode that the chip is in. |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 190 | * |
| 191 | * @return modeId The mode that the chip is currently configured to, |
| 192 | * corresponding to the id property of the target ChipMode. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 193 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 194 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 195 | * |WifiStatusCode.SUCCESS|, |
| 196 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 197 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 198 | getMode() generates (WifiStatus status, ChipModeId modeId); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 199 | |
| 200 | /** |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 201 | * Request information about the chip. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 202 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 203 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 204 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 205 | * |WifiStatusCode.SUCCESS|, |
| 206 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 207 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 208 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 209 | * @return chipDebugInfo Instance of |ChipDebugInfo|. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 210 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 211 | requestChipDebugInfo() generates (WifiStatus status, ChipDebugInfo chipDebugInfo); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 212 | |
| 213 | /** |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 214 | * Request vendor debug info from the driver. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 215 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 216 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 217 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 218 | * |WifiStatusCode.SUCCESS|, |
| 219 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 220 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 221 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 222 | * @param blob Vector of bytes retrieved from the driver. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 223 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 224 | requestDriverDebugDump() generates (WifiStatus status, vec<uint8_t> blob); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 225 | |
| 226 | /** |
Roshan Pius | 6f31d92 | 2016-10-04 15:08:05 -0700 | [diff] [blame] | 227 | * Request vendor debug info from the firmware. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 228 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 229 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 230 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 231 | * |WifiStatusCode.SUCCESS|, |
| 232 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 233 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 234 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 235 | * @param blob Vector of bytes retrieved from the driver. |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 236 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 237 | requestFirmwareDebugDump() generates (WifiStatus status, vec<uint8_t> blob); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 238 | |
| 239 | /** |
| 240 | * Create an AP iface on the chip. |
| 241 | * |
| 242 | * Depending on the mode the chip is configured in, the interface creation |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 243 | * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum |
| 244 | * allowed (specified in |ChipIfaceCombination|) number of ifaces of the AP |
| 245 | * type. |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 246 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 247 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 248 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 249 | * |WifiStatusCode.SUCCESS|, |
| 250 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 251 | * |WifiStatusCode.ERROR_NOT_SUPPORTED| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 252 | * @return iface HIDL interface object representing the iface if |
| 253 | * successful, null otherwise. |
| 254 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 255 | createApIface() generates (WifiStatus status, IWifiApIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 256 | |
| 257 | /** |
| 258 | * List all the AP iface names configured on the chip. |
| 259 | * The corresponding |IWifiApIface| object for any iface are |
| 260 | * retrieved using |getApIface| method. |
| 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| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 266 | * @return ifnames List of all AP iface names on the chip. |
| 267 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 268 | getApIfaceNames() generates (WifiStatus status, vec<string> ifnames); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 269 | |
| 270 | /** |
| 271 | * Gets a HIDL interface object for the AP Iface corresponding |
| 272 | * to the provided ifname. |
| 273 | * |
| 274 | * @param ifname Name of the iface. |
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| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 279 | * @return iface HIDL interface object representing the iface if |
| 280 | * it exists, null otherwise. |
| 281 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 282 | getApIface(string ifname) generates (WifiStatus status, IWifiApIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 283 | |
| 284 | /** |
| 285 | * Create a NAN iface on the chip. |
| 286 | * |
| 287 | * Depending on the mode the chip is configured in, the interface creation |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 288 | * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum |
| 289 | * allowed (specified in |ChipIfaceCombination|) number of ifaces of the NAN |
| 290 | * type. |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 291 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 292 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 293 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 294 | * |WifiStatusCode.SUCCESS|, |
| 295 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 296 | * |WifiStatusCode.ERROR_NOT_SUPPORTED| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 297 | * @return iface HIDL interface object representing the iface if |
| 298 | * successful, null otherwise. |
| 299 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 300 | createNanIface() generates (WifiStatus status, IWifiNanIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 301 | |
| 302 | /** |
| 303 | * List all the NAN iface names configured on the chip. |
| 304 | * The corresponding |IWifiNanIface| object for any iface are |
| 305 | * retrieved using |getNanIface| method. |
| 306 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 307 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 308 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 309 | * |WifiStatusCode.SUCCESS|, |
| 310 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 311 | * @return ifnames List of all NAN iface names on the chip. |
| 312 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 313 | getNanIfaceNames() generates (WifiStatus status, vec<string> ifnames); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 314 | |
| 315 | /** |
| 316 | * Gets a HIDL interface object for the NAN Iface corresponding |
| 317 | * to the provided ifname. |
| 318 | * |
| 319 | * @param ifname Name of the iface. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 320 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 321 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 322 | * |WifiStatusCode.SUCCESS|, |
| 323 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 324 | * @return iface HIDL interface object representing the iface if |
| 325 | * it exists, null otherwise. |
| 326 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 327 | getNanIface(string ifname) generates (WifiStatus status, IWifiNanIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 328 | |
| 329 | /** |
| 330 | * Create a P2P iface on the chip. |
| 331 | * |
| 332 | * Depending on the mode the chip is configured in, the interface creation |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 333 | * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum |
| 334 | * allowed (specified in |ChipIfaceCombination|) number of ifaces of the P2P |
| 335 | * type. |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 336 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 337 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 338 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 339 | * |WifiStatusCode.SUCCESS|, |
| 340 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 341 | * |WifiStatusCode.ERROR_NOT_SUPPORTED| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 342 | * @return iface HIDL interface object representing the iface if |
| 343 | * successful, null otherwise. |
| 344 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 345 | createP2pIface() generates (WifiStatus status, IWifiP2pIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 346 | |
| 347 | /** |
| 348 | * List all the P2P iface names configured on the chip. |
| 349 | * The corresponding |IWifiP2pIface| object for any iface are |
| 350 | * retrieved using |getP2pIface| method. |
| 351 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 352 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 353 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 354 | * |WifiStatusCode.SUCCESS|, |
| 355 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 356 | * @return ifnames List of all P2P iface names on the chip. |
| 357 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 358 | getP2pIfaceNames() generates (WifiStatus status, vec<string> ifnames); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 359 | |
| 360 | /** |
| 361 | * Gets a HIDL interface object for the P2P Iface corresponding |
| 362 | * to the provided ifname. |
| 363 | * |
| 364 | * @param ifname Name of the iface. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 365 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 366 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 367 | * |WifiStatusCode.SUCCESS|, |
| 368 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 369 | * @return iface HIDL interface object representing the iface if |
| 370 | * it exists, null otherwise. |
| 371 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 372 | getP2pIface(string ifname) generates (WifiStatus status, IWifiP2pIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 373 | |
| 374 | /** |
| 375 | * Create an STA iface on the chip. |
| 376 | * |
| 377 | * Depending on the mode the chip is configured in, the interface creation |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 378 | * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum |
| 379 | * allowed (specified in |ChipIfaceCombination|) number of ifaces of the STA |
| 380 | * type. |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 381 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 382 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 383 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 384 | * |WifiStatusCode.SUCCESS|, |
| 385 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|, |
| 386 | * |WifiStatusCode.ERROR_NOT_SUPPORTED| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 387 | * @return iface HIDL interface object representing the iface if |
| 388 | * successful, null otherwise. |
| 389 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 390 | createStaIface() generates (WifiStatus status, IWifiStaIface iface); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 391 | |
| 392 | /** |
| 393 | * List all the STA iface names configured on the chip. |
| 394 | * The corresponding |IWifiStaIface| object for any iface are |
| 395 | * retrieved using |getStaIface| method. |
| 396 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 397 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 398 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 399 | * |WifiStatusCode.SUCCESS|, |
| 400 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 401 | * @return ifnames List of all STA iface names on the chip. |
| 402 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 403 | getStaIfaceNames() generates (WifiStatus status, vec<string> ifnames); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 404 | |
| 405 | /** |
| 406 | * Gets a HIDL interface object for the STA Iface corresponding |
| 407 | * to the provided ifname. |
| 408 | * |
| 409 | * @param ifname Name of the iface. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 410 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 411 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 412 | * |WifiStatusCode.SUCCESS|, |
| 413 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 414 | * @return iface HIDL interface object representing the iface if |
| 415 | * it exists, null otherwise. |
| 416 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 417 | getStaIface(string ifname) generates (WifiStatus status, IWifiStaIface iface); |
Roshan Pius | fcbf923 | 2016-10-06 11:08:17 -0700 | [diff] [blame] | 418 | |
| 419 | /** |
| 420 | * Create a RTTController instance. |
| 421 | * |
| 422 | * RTT controller can be either: |
| 423 | * a) Bound to a specific iface by passing in the corresponding |IWifiIface| |
| 424 | * object in |iface| param, OR |
| 425 | * b) Let the implementation decide the iface to use for RTT operations by |
| 426 | * passing null in |iface| param. |
| 427 | * |
| 428 | * @param boundIface HIDL interface object representing the iface if |
| 429 | * the responder must be bound to a specific iface, null otherwise. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 430 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 431 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 432 | * |WifiStatusCode.SUCCESS|, |
| 433 | * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID| |
Roshan Pius | fcbf923 | 2016-10-06 11:08:17 -0700 | [diff] [blame] | 434 | */ |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 435 | createRttController(IWifiIface boundIface) |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame^] | 436 | generates (WifiStatus status, IWifiRttController rtt); |
Mitchell Wills | 5443a9f | 2016-08-18 11:44:58 -0700 | [diff] [blame] | 437 | }; |