+ * Create an AP iface on the chip.
+ *
+ * Depending on the mode the chip is configured in, the interface creation
+ * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
+ * allowed (specified in |ChipIfaceCombination|) number of ifaces of the AP
+ * type.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|
+ * @return iface HIDL interface object representing the iface if
+ * successful, null otherwise.
+ */
+ createApIface() generates (WifiStatus status, IWifiApIface iface);
+
+ /**
+ * List all the AP iface names configured on the chip.
+ * The corresponding |IWifiApIface| object for any iface are
+ * retrieved using |getApIface| method.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
+ * @return ifnames List of all AP iface names on the chip.
+ */
+ getApIfaceNames() generates (WifiStatus status, vec<string> ifnames);
+
+ /**
+ * Gets a HIDL interface object for the AP Iface corresponding
+ * to the provided ifname.
+ *
+ * @param ifname Name of the iface.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|
+ * @return iface HIDL interface object representing the iface if
+ * it exists, null otherwise.
+ */
+ getApIface(string ifname) generates (WifiStatus status, IWifiApIface iface);
+
+ /**
+ * Removes the AP Iface with the provided ifname.
+ * Any further calls on the corresponding |IWifiApIface| HIDL interface
+ * object must fail.
+ *
+ * @param ifname Name of the iface.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|
+ */
+ removeApIface(string ifname) generates (WifiStatus status);
+
+ /**
+ * Create a NAN iface on the chip.
+ *
+ * Depending on the mode the chip is configured in, the interface creation
+ * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
+ * allowed (specified in |ChipIfaceCombination|) number of ifaces of the NAN
+ * type.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|
+ * @return iface HIDL interface object representing the iface if
+ * successful, null otherwise.
+ */
+ createNanIface() generates (WifiStatus status, IWifiNanIface iface);
+
+ /**
+ * List all the NAN iface names configured on the chip.
+ * The corresponding |IWifiNanIface| object for any iface are
+ * retrieved using |getNanIface| method.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
+ * @return ifnames List of all NAN iface names on the chip.
+ */
+ getNanIfaceNames() generates (WifiStatus status, vec<string> ifnames);
+
+ /**
+ * Gets a HIDL interface object for the NAN Iface corresponding
+ * to the provided ifname.
+ *
+ * @param ifname Name of the iface.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|
+ * @return iface HIDL interface object representing the iface if
+ * it exists, null otherwise.
+ */
+ getNanIface(string ifname) generates (WifiStatus status, IWifiNanIface iface);
+
+ /**
+ * Removes the NAN Iface with the provided ifname.
+ * Any further calls on the corresponding |IWifiNanIface| HIDL interface
+ * object must fail.
+ *
+ * @param ifname Name of the iface.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|
+ */
+ removeNanIface(string ifname) generates (WifiStatus status);
+
+ /**
+ * Create a P2P iface on the chip.
+ *
+ * Depending on the mode the chip is configured in, the interface creation
+ * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
+ * allowed (specified in |ChipIfaceCombination|) number of ifaces of the P2P
+ * type.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|
+ * @return iface HIDL interface object representing the iface if
+ * successful, null otherwise.
+ */
+ createP2pIface() generates (WifiStatus status, IWifiP2pIface iface);
+
+ /**
+ * List all the P2P iface names configured on the chip.
+ * The corresponding |IWifiP2pIface| object for any iface are
+ * retrieved using |getP2pIface| method.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
+ * @return ifnames List of all P2P iface names on the chip.
+ */
+ getP2pIfaceNames() generates (WifiStatus status, vec<string> ifnames);
+
+ /**
+ * Gets a HIDL interface object for the P2P Iface corresponding
+ * to the provided ifname.
+ *
+ * @param ifname Name of the iface.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|
+ * @return iface HIDL interface object representing the iface if
+ * it exists, null otherwise.
+ */
+ getP2pIface(string ifname) generates (WifiStatus status, IWifiP2pIface iface);
+
+ /**
+ * Removes the P2P Iface with the provided ifname.
+ * Any further calls on the corresponding |IWifiP2pIface| HIDL interface
+ * object must fail.
+ *
+ * @param ifname Name of the iface.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|
+ */
+ removeP2pIface(string ifname) generates (WifiStatus status);
+
+ /**
+ * Create an STA iface on the chip.
+ *
+ * Depending on the mode the chip is configured in, the interface creation
+ * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
+ * allowed (specified in |ChipIfaceCombination|) number of ifaces of the STA
+ * type.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|
+ * @return iface HIDL interface object representing the iface if
+ * successful, null otherwise.
+ */
+ createStaIface() generates (WifiStatus status, IWifiStaIface iface);
+
+ /**
+ * List all the STA iface names configured on the chip.
+ * The corresponding |IWifiStaIface| object for any iface are
+ * retrieved using |getStaIface| method.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
+ * @return ifnames List of all STA iface names on the chip.
+ */
+ getStaIfaceNames() generates (WifiStatus status, vec<string> ifnames);
+
+ /**
+ * Gets a HIDL interface object for the STA Iface corresponding
+ * to the provided ifname.
+ *
+ * @param ifname Name of the iface.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|
+ * @return iface HIDL interface object representing the iface if
+ * it exists, null otherwise.
+ */
+ getStaIface(string ifname) generates (WifiStatus status, IWifiStaIface iface);
+
+ /**
+ * Removes the STA Iface with the provided ifname.
+ * Any further calls on the corresponding |IWifiStaIface| HIDL interface
+ * object must fail.
+ *
+ * @param ifname Name of the iface.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_INVALID_ARGS|
+ */
+ removeStaIface(string ifname) generates (WifiStatus status);
+
+ /**
+ * Create a RTTController instance.
+ *
+ * RTT controller can be either:
+ * a) Bound to a specific iface by passing in the corresponding |IWifiIface|
+ * object in |iface| param, OR
+ * b) Let the implementation decide the iface to use for RTT operations by
+ * passing null in |iface| param.
+ *
+ * @param boundIface HIDL interface object representing the iface if
+ * the responder must be bound to a specific iface, null otherwise.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
+ */
+ createRttController(IWifiIface boundIface)
+ generates (WifiStatus status, IWifiRttController rtt);
+
+ /**
+ * WiFi debug ring buffer life cycle is as follow:
+ * - At initialization time, framework must call |getDebugRingBuffersStatus|.
+ * to obtain the names and list of supported ring buffers.
+ * The driver may expose several different rings each holding a different
+ * type of data (connection events, power events, etc).
+ * - When WiFi operations start framework must call
+ * |startLoggingToDebugRingBuffer| to trigger log collection for a specific
+ * ring. The vebose level for each ring buffer can be specified in this API.
+ * - During wifi operations, driver must periodically report per ring data to
+ * framework by invoking the
+ * |IWifiChipEventCallback.onDebugRingBufferDataAvailable| callback.
+ * - When capturing a bug report, framework must indicate to driver that all
+ * the data has to be uploaded urgently by calling
+ * |forceDumpToDebugRingBuffer|.
+ *
+ * The data uploaded by driver must be stored by framework in separate files,
+ * with one stream of file per ring. Framework must store the files in pcapng
+ * format, allowing for easy merging and parsing with network analyzer tools.
+ * TODO: Since we're not longer dumping out the raw data, storing in separate
+ * pcapng files for parsing later must not work anymore.
+ */
+ /**
+ * API to get the status of all ring buffers supported by driver.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+ * |WifiStatusCode.NOT_AVAILABLE|,
+ * |WifiStatusCode.UNKNOWN|
+ * @return ringBuffers Vector of |WifiDebugRingBufferStatus| corresponding to the
+ * status of each ring bufffer on the device.
+ */
+ getDebugRingBuffersStatus() generates (WifiStatus status,
+ vec<WifiDebugRingBufferStatus> ringBuffers);
+
+ /**
+ * API to trigger the debug data collection.
+ *
+ * @param ringName represent the name of the ring for which data collection
+ * shall start. This can be retrieved via the corresponding
+ * |WifiDebugRingBufferStatus|.
+ * @parm maxIntervalInSec Maximum interval in seconds for driver to invoke
+ * |onDebugRingBufferData|, ignore if zero.
+ * @parm minDataSizeInBytes: Minimum data size in buffer for driver to invoke
+ * |onDebugRingBufferData|, ignore if zero.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+ * |WifiStatusCode.NOT_AVAILABLE|,
+ * |WifiStatusCode.UNKNOWN|
+ */
+ startLoggingToDebugRingBuffer(string ringName,
+ WifiDebugRingBufferVerboseLevel verboseLevel,
+ uint32_t maxIntervalInSec,
+ uint32_t minDataSizeInBytes)
+ generates (WifiStatus status);
+
+ /**
+ * API to force dump data into the corresponding ring buffer.
+ * This is to be invoked during bugreport collection.
+ *
+ * @param ringName represent the name of the ring for which data collection
+ * shall be forced. This can be retrieved via the corresponding
+ * |WifiDebugRingBufferStatus|.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+ * |WifiStatusCode.ERROR_NOT_STARTED|,
+ * |WifiStatusCode.NOT_AVAILABLE|,
+ * |WifiStatusCode.UNKNOWN|
+ */
+ forceDumpToDebugRingBuffer(string ringName) generates (WifiStatus status);
+
+ /**
+ * API to retrieve the wifi wake up reason stats for debugging.
+ * The driver is expected to start maintaining these stats once the chip
+ * is configured using |configureChip|. These stats must be reset whenever
+ * the chip is reconfigured or the HAL is stopped.
+ *
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+ * |WifiStatusCode.NOT_AVAILABLE|,
+ * |WifiStatusCode.UNKNOWN|
+ * @return stats Instance of |WifiDebugHostWakeReasonStats|.
+ */
+ getDebugHostWakeReasonStats()
+ generates (WifiStatus status, WifiDebugHostWakeReasonStats stats);
+
+ /**
+ * API to enable/disable alert notifications from the chip.
+ * These alerts must be used to notify framework of any fatal error events
+ * that the chip encounters via |IWifiChipEventCallback.onDebugErrorAlert| method.
+ * Must fail if |ChipCapabilityMask.DEBUG_ERROR_ALERTS| is not set.
+ *
+ * @param enable true to enable, false to disable.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+ * |WifiStatusCode.NOT_AVAILABLE|,
+ * |WifiStatusCode.UNKNOWN|