OSDN Git Service

Merge "Make update-makefiles.sh exit if any of the hidl invocations fail"
[android-x86/hardware-interfaces.git] / wifi / 1.0 / IWifiChip.hal
index 3c085c3..d790404 100644 (file)
@@ -137,32 +137,36 @@ interface IWifiChip {
     /**
      * Memory dump of Firmware.
      */
-    DEBUG_MEMORY_FIRMWARE_DUMP_SUPPORTED = 1 << 0,
+    DEBUG_MEMORY_FIRMWARE_DUMP = 1 << 0,
     /**
      * Memory dump of Driver.
      */
-    DEBUG_MEMORY_DRIVER_DUMP_SUPPORTED = 1 << 1,
+    DEBUG_MEMORY_DRIVER_DUMP = 1 << 1,
     /**
      * Connectivity events reported via debug ring buffer.
      */
-    DEBUG_RING_BUFFER_CONNECT_EVENT_SUPPORTED = 1 << 2,
+    DEBUG_RING_BUFFER_CONNECT_EVENT = 1 << 2,
     /**
      * Power events reported via debug ring buffer.
      */
-    DEBUG_RING_BUFFER_POWER_EVENT_SUPPORTED = 1 << 3,
+    DEBUG_RING_BUFFER_POWER_EVENT = 1 << 3,
     /**
      * Wakelock events reported via debug ring buffer.
      */
-    DEBUG_RING_BUFFER_WAKELOCK_EVENT_SUPPORTED = 1 << 4,
+    DEBUG_RING_BUFFER_WAKELOCK_EVENT = 1 << 4,
     /**
      * Vendor data reported via debug ring buffer.
      * This mostly contains firmware event logs.
      */
-    DEBUG_RING_BUFFER_VENDOR_DATA_SUPPORTED = 1 << 5,
+    DEBUG_RING_BUFFER_VENDOR_DATA = 1 << 5,
     /**
      * Host wake reasons stats collection.
      */
     DEBUG_HOST_WAKE_REASON_STATS = 1 << 6,
+    /**
+     * Error alerts.
+     */
+    DEBUG_ERROR_ALERTS = 1 << 7
   };
 
   /**
@@ -288,7 +292,7 @@ interface IWifiChip {
    * Create an AP iface on the chip.
    *
    * Depending on the mode the chip is configured in, the interface creation
-   * may fail (code: |ERROR_NOT_SUPPORTED|) if we've already reached the maximum
+   * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
    * allowed (specified in |ChipIfaceCombination|) number of ifaces of the AP
    * type.
    *
@@ -323,17 +327,32 @@ interface IWifiChip {
    * @return status WifiStatus of the operation.
    *         Possible status codes:
    *         |WifiStatusCode.SUCCESS|,
-   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
+   *         |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_SUPPORTED|) if we've already reached the maximum
+   * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
    * allowed (specified in |ChipIfaceCombination|) number of ifaces of the NAN
    * type.
    *
@@ -368,17 +387,32 @@ interface IWifiChip {
    * @return status WifiStatus of the operation.
    *         Possible status codes:
    *         |WifiStatusCode.SUCCESS|,
-   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
+   *         |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_SUPPORTED|) if we've already reached the maximum
+   * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
    * allowed (specified in |ChipIfaceCombination|) number of ifaces of the P2P
    * type.
    *
@@ -413,17 +447,32 @@ interface IWifiChip {
    * @return status WifiStatus of the operation.
    *         Possible status codes:
    *         |WifiStatusCode.SUCCESS|,
-   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
+   *         |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_SUPPORTED|) if we've already reached the maximum
+   * may fail (code: |ERROR_NOT_AVAILABLE|) if we've already reached the maximum
    * allowed (specified in |ChipIfaceCombination|) number of ifaces of the STA
    * type.
    *
@@ -458,13 +507,28 @@ interface IWifiChip {
    * @return status WifiStatus of the operation.
    *         Possible status codes:
    *         |WifiStatusCode.SUCCESS|,
-   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|
+   *         |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:
@@ -494,7 +558,7 @@ interface IWifiChip {
    *   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.onDebugRingBuffer<Type>EntriesAvailable| callback.
+   *   |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|.
@@ -580,4 +644,21 @@ interface IWifiChip {
    */
   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|
+   */
+  enableDebugErrorAlerts(bool enable) generates (WifiStatus status);
 };