wpa_supplicant(interface): Support add/remove interfaces

Add HIDL API's for adding/removing interfaces dynamically.

Bug: 65673678
Test: VTS tests
Test: Manual test modifying framework to add wlan0 dynamically.
Change-Id: Ifebfc9e8848e3388f5c4829bb225e3cb0bd82b05
diff --git a/wifi/supplicant/1.1/ISupplicant.hal b/wifi/supplicant/1.1/ISupplicant.hal
index 5c60b35..508a545 100644
--- a/wifi/supplicant/1.1/ISupplicant.hal
+++ b/wifi/supplicant/1.1/ISupplicant.hal
@@ -17,6 +17,8 @@
 package android.hardware.wifi.supplicant@1.1;
 
 import @1.0::ISupplicant;
+import @1.0::ISupplicantIface;
+import @1.0::SupplicantStatus;
 
 /**
  * Interface exposed by the supplicant HIDL service registered
@@ -24,4 +26,32 @@
  * This is the root level object for any the supplicant interactions.
  */
 interface ISupplicant extends @1.0::ISupplicant {
+    /**
+     * Registers a wireless interface in supplicant.
+     *
+     * @param ifaceInfo Combination of the interface type and name(e.g wlan0).
+     * @return status Status of the operation.
+     *         Possible status codes:
+     *         |SupplicantStatusCode.SUCCESS|,
+     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
+     *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+     *         |SupplicantStatusCode.FAILURE_IFACE_EXISTS|
+     * @return iface HIDL interface object representing the interface if
+     *         successful, null otherwise.
+     */
+    addInterface(IfaceInfo ifaceInfo)
+        generates (SupplicantStatus status, ISupplicantIface iface);
+
+    /**
+     * Deregisters a wireless interface from supplicant.
+     *
+     * @param ifaceInfo Combination of the interface type and name(e.g wlan0).
+     * @return status Status of the operation.
+     *         Possible status codes:
+     *         |SupplicantStatusCode.SUCCESS|,
+     *         |SupplicantStatusCode.FAILURE_ARGS_INVALID|,
+     *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+     *         |SupplicantStatusCode.FAILURE_IFACE_UNKOWN|
+     */
+    removeInterface(IfaceInfo ifaceInfo) generates (SupplicantStatus status);
 };