Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -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 IWifiIface; |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 20 | import IWifiStaIfaceEventCallback; |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 21 | |
| 22 | /** |
| 23 | * Interface used to represent a single STA iface. |
| 24 | */ |
| 25 | interface IWifiStaIface extends IWifiIface { |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 26 | /** |
| 27 | * Mask of capabilities suported by this Iface. |
| 28 | */ |
| 29 | enum StaIfaceCapabilityMask : uint32_t { |
| 30 | /** |
| 31 | * If set indicates that the APF APIs are supported. |
| 32 | * APF (Android Packet Filter) is a BPF like packet filtering |
| 33 | * bytecode executed by the firmware. |
| 34 | */ |
| 35 | APF = 1 << 0, |
| 36 | /** |
| 37 | * If set indicates that the Background Scan APIs are supported. |
| 38 | * Background scan allow the host to send a number of buckets down to the |
| 39 | * firmware. Each bucket contains a set of channels, a period, and some |
| 40 | * parameters about how and when to report results. |
| 41 | */ |
| 42 | BACKGROUND_SCAN = 1 << 1, |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 43 | /** |
| 44 | * If set indicates that the link layer stats APIs are supported. |
| 45 | */ |
Roshan Pius | 5e25466 | 2016-10-26 10:10:48 -0700 | [diff] [blame] | 46 | LINK_LAYER_STATS = 1 << 2, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 47 | /** |
Roshan Pius | d476754 | 2016-12-06 10:04:05 -0800 | [diff] [blame] | 48 | * If set indicates that the RSSI monitor APIs are supported. |
| 49 | */ |
| 50 | RSSI_MONITOR = 1 << 3, |
| 51 | /** |
Roshan Pius | 26801cb | 2016-12-13 14:25:45 -0800 | [diff] [blame] | 52 | * If set indicates that the roaming API's are supported. |
| 53 | */ |
| 54 | CONTROL_ROAMING = 1 << 4, |
| 55 | /** |
| 56 | * If set indicates support for Probe IE white listing. |
| 57 | */ |
| 58 | PROBE_IE_WHITELIST = 1 << 5, |
| 59 | /** |
| 60 | * If set indicates support for MAC & Probe Sequence Number randomization. |
| 61 | */ |
| 62 | SCAN_RAND = 1 << 6, |
| 63 | /** |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 64 | * Tracks connection packets' fate. |
| 65 | */ |
Roshan Pius | 26801cb | 2016-12-13 14:25:45 -0800 | [diff] [blame] | 66 | DEBUG_PACKET_FATE_SUPPORTED = 1 << 7 |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 67 | }; |
| 68 | |
| 69 | /** |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 70 | * Requests notifications of significant events on this iface. Multiple calls |
| 71 | * to this must register multiple callbacks each of which must receive all |
| 72 | * events. |
| 73 | * |
| 74 | * @param callback An instance of the |IWifiStaIfaceEventCallback| HIDL interface |
| 75 | * object. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 76 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 77 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 78 | * |WifiStatusCode.SUCCESS|, |
| 79 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID| |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 80 | */ |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 81 | registerEventCallback(IWifiStaIfaceEventCallback callback) |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 82 | generates (WifiStatus status); |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 83 | |
| 84 | /** |
| 85 | * Get the capabilities supported by this STA iface. |
| 86 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 87 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 88 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 89 | * |WifiStatusCode.SUCCESS|, |
| 90 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 91 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 92 | * |WifiStatusCode.ERROR_UNKNOWN| |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 93 | * @return capabilities Bitset of |StaIfaceCapabilityMask| values. |
| 94 | */ |
Roshan Pius | 5e25466 | 2016-10-26 10:10:48 -0700 | [diff] [blame] | 95 | getCapabilities() generates (WifiStatus status, uint32_t capabilities); |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 96 | |
| 97 | /** |
| 98 | * Used to query additional information about the chip's APF capabilities. |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 99 | * Must fail if |StaIfaceCapabilityMask.APF| is not set. |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 100 | * |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 101 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 102 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 103 | * |WifiStatusCode.SUCCESS|, |
| 104 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 105 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 106 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 107 | * |WifiStatusCode.ERROR_UNKNOWN| |
Roshan Pius | 5e25466 | 2016-10-26 10:10:48 -0700 | [diff] [blame] | 108 | * @return capabilities Instance of |StaApfPacketFilterCapabilities|. |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 109 | */ |
| 110 | getApfPacketFilterCapabilities() |
Roshan Pius | 5e25466 | 2016-10-26 10:10:48 -0700 | [diff] [blame] | 111 | generates (WifiStatus status, StaApfPacketFilterCapabilities capabilities); |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 112 | |
| 113 | /** |
| 114 | * Installs an APF program on this iface, replacing an existing |
| 115 | * program if present. |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 116 | * Must fail if |StaIfaceCapabilityMask.APF| is not set. |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 117 | * |
| 118 | * @param cmdId command Id to use for this invocation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 119 | * @param APF Program to be set. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 120 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 121 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 122 | * |WifiStatusCode.SUCCESS|, |
| 123 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 124 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 125 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 126 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 127 | * |WifiStatusCode.ERROR_UNKNOWN| |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 128 | */ |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 129 | installApfPacketFilter(CommandId cmdId, vec<uint8_t> program) |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 130 | generates (WifiStatus status); |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 131 | |
| 132 | /** |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 133 | * Used to query additional information about the chip's Background Scan capabilities. |
| 134 | * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set. |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 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_IFACE_INVALID|, |
| 140 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 141 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 142 | * |WifiStatusCode.ERROR_UNKNOWN| |
Roshan Pius | 5e25466 | 2016-10-26 10:10:48 -0700 | [diff] [blame] | 143 | * @return capabilities Instance of |StaBackgroundScanCapabilities|. |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 144 | */ |
| 145 | getBackgroundScanCapabilities() |
Roshan Pius | 5e25466 | 2016-10-26 10:10:48 -0700 | [diff] [blame] | 146 | generates (WifiStatus status, StaBackgroundScanCapabilities capabilities); |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 147 | |
| 148 | /** |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 149 | * Used to query the list of valid frequencies (depending on country code set) |
| 150 | * for the provided band. These channels may be specifed in the |
| 151 | * |BackgroundScanBucketParameters.frequenciesInMhz| for a background scan |
| 152 | * request. |
| 153 | * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set. |
| 154 | * |
Roshan Pius | 5e25466 | 2016-10-26 10:10:48 -0700 | [diff] [blame] | 155 | * @param band Band for which the frequency list is being generated. |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 156 | * @return status WifiStatus of the operation. |
| 157 | * Possible status codes: |
| 158 | * |WifiStatusCode.SUCCESS|, |
| 159 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 160 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 161 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 162 | * |WifiStatusCode.ERROR_UNKNOWN| |
Roshan Pius | 120f94c | 2016-10-13 11:48:42 -0700 | [diff] [blame] | 163 | * @return frequencies vector of valid frequencies for the provided band. |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 164 | */ |
Roshan Pius | 5e25466 | 2016-10-26 10:10:48 -0700 | [diff] [blame] | 165 | getValidFrequenciesForBackgroundScan(StaBackgroundScanBand band) |
Roshan Pius | 120f94c | 2016-10-13 11:48:42 -0700 | [diff] [blame] | 166 | generates (WifiStatus status, vec<WifiChannelInMhz> frequencies); |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 167 | |
| 168 | /** |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 169 | * Start a background scan using the given cmdId as an identifier. Only one |
| 170 | * active background scan need be supported. |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 171 | * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set. |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 172 | * |
| 173 | * When this is called all requested buckets must be scanned, starting the |
| 174 | * beginning of the cycle. |
| 175 | * |
| 176 | * For example: |
| 177 | * If there are two buckets specified |
| 178 | * - Bucket 1: period=10s |
| 179 | * - Bucket 2: period=20s |
| 180 | * - Bucket 3: period=30s |
| 181 | * Then the following scans must occur |
| 182 | * - t=0 buckets 1, 2, and 3 are scanned |
| 183 | * - t=10 bucket 1 is scanned |
| 184 | * - t=20 bucket 1 and 2 are scanned |
| 185 | * - t=30 bucket 1 and 3 are scanned |
| 186 | * - t=40 bucket 1 and 2 are scanned |
| 187 | * - t=50 bucket 1 is scanned |
| 188 | * - t=60 buckets 1, 2, and 3 are scanned |
| 189 | * - and the patter repeats |
| 190 | * |
| 191 | * If any scan does not occur or is incomplete (error, interrupted, etc) then |
| 192 | * a cached scan result must still be recorded with the |
| 193 | * WIFI_SCAN_FLAG_INTERRUPTED flag set. |
| 194 | * |
| 195 | * @param cmdId command Id to use for this invocation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 196 | * @params Background scan parameters. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 197 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 198 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 199 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 200 | * |WifiStatusCode.ERROR_INVALID_ARGS|, |
| 201 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 202 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 203 | * |WifiStatusCode.ERROR_UNKNOWN| |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 204 | */ |
Roshan Pius | 5e25466 | 2016-10-26 10:10:48 -0700 | [diff] [blame] | 205 | startBackgroundScan(CommandId cmdId, StaBackgroundScanParameters params) |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 206 | generates (WifiStatus status); |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 207 | |
| 208 | /** |
| 209 | * Stop the background scan started. |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 210 | * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set. |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 211 | * |
| 212 | * @param cmdId command Id corresponding to the request. |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 213 | * @return status WifiStatus of the operation. |
Roshan Pius | 1f9073c | 2016-10-10 10:32:22 -0700 | [diff] [blame] | 214 | * Possible status codes: |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 215 | * |WifiStatusCode.SUCCESS|, |
| 216 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 217 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 218 | * |WifiStatusCode.ERROR_NOT_STARTED|, |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 219 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 220 | * |WifiStatusCode.ERROR_UNKNOWN| |
Roshan Pius | 7b77747 | 2016-10-07 13:15:59 -0700 | [diff] [blame] | 221 | */ |
Roshan Pius | a52dc73 | 2016-10-10 11:53:07 -0700 | [diff] [blame] | 222 | stopBackgroundScan(CommandId cmdId) generates (WifiStatus status); |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 223 | |
| 224 | /** |
| 225 | * Enable link layer stats collection. |
| 226 | * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set. |
| 227 | * |
| 228 | * Radio statistics (once started) must not stop until disabled. |
| 229 | * Iface statistics (once started) reset and start afresh after each |
| 230 | * connection until disabled. |
| 231 | * |
| 232 | * @param debug Set for field debug mode. Driver must collect all |
| 233 | * statistics regardless of performance impact. |
| 234 | * @return status WifiStatus of the operation. |
| 235 | * Possible status codes: |
| 236 | * |WifiStatusCode.SUCCESS|, |
| 237 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 238 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 239 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 240 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 241 | */ |
| 242 | enableLinkLayerStatsCollection(bool debug) |
| 243 | generates (WifiStatus status); |
| 244 | |
| 245 | /** |
| 246 | * Disable link layer stats collection. |
| 247 | * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set. |
| 248 | * |
| 249 | * @return status WifiStatus of the operation. |
| 250 | * Possible status codes: |
| 251 | * |WifiStatusCode.SUCCESS|, |
| 252 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 253 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 254 | * |WifiStatusCode.ERROR_NOT_STARTED|, |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 255 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 256 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 257 | */ |
| 258 | disableLinkLayerStatsCollection() generates (WifiStatus status); |
| 259 | |
| 260 | /** |
| 261 | * Retrieve the latest link layer stats. |
| 262 | * Must fail if |StaIfaceCapabilityMask.LINK_LAYER_STATS| is not set or if |
| 263 | * link layer stats collection hasn't been explicitly enabled. |
| 264 | * |
| 265 | * @return status WifiStatus of the operation. |
| 266 | * Possible status codes: |
| 267 | * |WifiStatusCode.SUCCESS|, |
| 268 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 269 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 270 | * |WifiStatusCode.ERROR_NOT_STARTED|, |
Roshan Pius | 18680b7 | 2016-10-12 08:25:48 -0700 | [diff] [blame] | 271 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 272 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 273 | * @return stats Instance of |LinkLayerStats|. |
| 274 | */ |
Roshan Pius | 5e25466 | 2016-10-26 10:10:48 -0700 | [diff] [blame] | 275 | getLinkLayerStats() generates (WifiStatus status, StaLinkLayerStats stats); |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 276 | |
| 277 | /** |
Roshan Pius | d476754 | 2016-12-06 10:04:05 -0800 | [diff] [blame] | 278 | * Start RSSI monitoring on the currently connected access point. |
| 279 | * Once the monitoring is enabled, |
| 280 | * |IWifiStaIfaceEventCallback.onRssiThresholdBreached| callback must be |
| 281 | * invoked to indicate if the RSSI goes above |maxRssi| or below |minRssi|. |
| 282 | * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set. |
| 283 | * |
| 284 | * @param cmdId command Id to use for this invocation. |
| 285 | * @param maxRssi Maximum RSSI threshold. |
| 286 | * @param minRssi Minimum RSSI threshold. |
| 287 | * @return status WifiStatus of the operation. |
| 288 | * Possible status codes: |
| 289 | * |WifiStatusCode.SUCCESS|, |
| 290 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 291 | * |WifiStatusCode.ERROR_ARGS_INVALID|, |
| 292 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 293 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 294 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 295 | */ |
| 296 | startRssiMonitoring(CommandId cmdId, Rssi maxRssi, Rssi minRssi) |
| 297 | generates (WifiStatus status); |
| 298 | |
| 299 | /** |
| 300 | * Stop RSSI monitoring. |
| 301 | * Must fail if |StaIfaceCapabilityMask.RSSI_MONITOR| is not set. |
| 302 | * |
| 303 | * @param cmdId command Id corresponding to the request. |
| 304 | * @return status WifiStatus of the operation. |
| 305 | * Possible status codes: |
| 306 | * |WifiStatusCode.SUCCESS|, |
| 307 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 308 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 309 | * |WifiStatusCode.ERROR_NOT_STARTED|, |
| 310 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 311 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 312 | */ |
| 313 | stopRssiMonitoring(CommandId cmdId) generates (WifiStatus status); |
| 314 | |
| 315 | /** |
Roshan Pius | 26801cb | 2016-12-13 14:25:45 -0800 | [diff] [blame] | 316 | * Get roaming control capabilities. |
| 317 | * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set. |
| 318 | * |
| 319 | * @return status WifiStatus of the operation. |
| 320 | * Possible status codes: |
| 321 | * |WifiStatusCode.SUCCESS|, |
| 322 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 323 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 324 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 325 | * @return caps Instance of |StaRoamingCapabilities|. |
| 326 | */ |
| 327 | getRoamingCapabilities() |
| 328 | generates (WifiStatus status, StaRoamingCapabilities caps); |
| 329 | |
| 330 | /** |
| 331 | * Configure roaming control parameters. |
| 332 | * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set. |
| 333 | * |
| 334 | * @param config Instance of |StaRoamingConfig|. |
| 335 | * @return status WifiStatus of the operation. |
| 336 | * Possible status codes: |
| 337 | * |WifiStatusCode.SUCCESS|, |
| 338 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 339 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 340 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 341 | */ |
| 342 | configureRoaming(StaRoamingConfig config) generates (WifiStatus status); |
| 343 | |
| 344 | /** |
| 345 | * Set the roaming control state with the parameters configured |
| 346 | * using |configureRoaming|. Depending on the roaming state set, the |
| 347 | * driver/firmware would enable/disable control over roaming decisions. |
| 348 | * Must fail if |StaIfaceCapabilityMask.CONTROL_ROAMING| is not set. |
| 349 | * |
| 350 | * @param state State of the roaming control. |
| 351 | * @return status WifiStatus of the operation. |
| 352 | * Possible status codes: |
| 353 | * |WifiStatusCode.SUCCESS|, |
| 354 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 355 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 356 | * |WifiStatusCode.ERROR_BUSY|, |
| 357 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 358 | */ |
| 359 | setRoamingState(StaRoamingState state) generates (WifiStatus status); |
| 360 | |
| 361 | /** |
Roshan Pius | fe9ad36 | 2016-10-19 16:45:12 -0700 | [diff] [blame] | 362 | * API to start packet fate monitoring. |
| 363 | * - Once stared, monitoring must remain active until HAL is unloaded. |
| 364 | * - When HAL is unloaded, all packet fate buffers must be cleared. |
| 365 | * - The packet fates are used to monitor the state of packets transmitted/ |
| 366 | * received during association. |
| 367 | * |
| 368 | * @return status WifiStatus of the operation. |
| 369 | * Possible status codes: |
| 370 | * |WifiStatusCode.SUCCESS|, |
| 371 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 372 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 373 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 374 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 375 | */ |
| 376 | startDebugPacketFateMonitoring() generates (WifiStatus status); |
| 377 | |
| 378 | /** |
| 379 | * API to stop packet fate monitoring. |
| 380 | * |
| 381 | * @return status WifiStatus of the operation. |
| 382 | * Possible status codes: |
| 383 | * |WifiStatusCode.SUCCESS|, |
| 384 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 385 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 386 | * |WifiStatusCode.ERROR_NOT_STARTED|, |
| 387 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 388 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 389 | */ |
| 390 | stopDebugPacketFateMonitoring() generates (WifiStatus status); |
| 391 | |
| 392 | /** |
| 393 | * API to retrieve fates of outbound packets. |
| 394 | * - HAL implementation must return the fates of |
| 395 | * all the frames transmitted for the most recent association. |
| 396 | * The fate reports must follow the same order as their respective |
| 397 | * packets. |
| 398 | * - HAL implementation may choose (but is not required) to include |
| 399 | * reports for management frames. |
| 400 | * - Packets reported by firmware, but not recognized by driver, |
| 401 | * must be included. However, the ordering of the corresponding |
| 402 | * reports is at the discretion of HAL implementation. |
| 403 | * - Framework must be able to call this API multiple times for the same |
| 404 | * association. |
| 405 | * |
| 406 | * @return status WifiStatus of the operation. |
| 407 | * Possible status codes: |
| 408 | * |WifiStatusCode.SUCCESS|, |
| 409 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 410 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 411 | * |WifiStatusCode.ERROR_NOT_STARTED|, |
| 412 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 413 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 414 | * @return fates Vector of |WifiDebugTxPacketFateReport| instances corresponding |
| 415 | * to the packet fates. |
| 416 | */ |
| 417 | getDebugTxPacketFates() |
| 418 | generates (WifiStatus status, vec<WifiDebugTxPacketFateReport> fates); |
| 419 | |
| 420 | /** |
| 421 | * API to retrieve fates of inbound packets. |
| 422 | * - HAL implementation must return the fates of |
| 423 | * all the frames received for the most recent association. |
| 424 | * The fate reports must follow the same order as their respective |
| 425 | * packets. |
| 426 | * - HAL implementation may choose (but is not required) to include |
| 427 | * reports for management frames. |
| 428 | * - Packets reported by firmware, but not recognized by driver, |
| 429 | * must be included. However, the ordering of the corresponding |
| 430 | * reports is at the discretion of HAL implementation. |
| 431 | * - Framework must be able to call this API multiple times for the same |
| 432 | * association. |
| 433 | * |
| 434 | * @return status WifiStatus of the operation. |
| 435 | * Possible status codes: |
| 436 | * |WifiStatusCode.SUCCESS|, |
| 437 | * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|, |
| 438 | * |WifiStatusCode.ERROR_NOT_SUPPORTED|, |
| 439 | * |WifiStatusCode.ERROR_NOT_STARTED|, |
| 440 | * |WifiStatusCode.ERROR_NOT_AVAILABLE|, |
| 441 | * |WifiStatusCode.ERROR_UNKNOWN| |
| 442 | * @return fates Vector of |WifiDebugRxPacketFateReport| instances corresponding |
| 443 | * to the packet fates. |
| 444 | */ |
| 445 | getDebugRxPacketFates() |
| 446 | generates (WifiStatus status, vec<WifiDebugRxPacketFateReport> fates); |
Roshan Pius | adcfba4 | 2016-10-05 10:19:06 -0700 | [diff] [blame] | 447 | }; |