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