Merge "Extend HIDL interface for Radio (RIL)."
diff --git a/benchmarks/msgq/1.0/Android.bp b/benchmarks/msgq/1.0/Android.bp
index b222cfb..5fe6203 100644
--- a/benchmarks/msgq/1.0/Android.bp
+++ b/benchmarks/msgq/1.0/Android.bp
@@ -39,9 +39,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/bluetooth/1.0/Android.bp b/bluetooth/1.0/Android.bp
index ef7f109..ab0b1a9 100644
--- a/bluetooth/1.0/Android.bp
+++ b/bluetooth/1.0/Android.bp
@@ -51,9 +51,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/boot/1.0/Android.bp b/boot/1.0/Android.bp
index dc30038..6c959d9 100644
--- a/boot/1.0/Android.bp
+++ b/boot/1.0/Android.bp
@@ -43,9 +43,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/nfc/1.0/Android.bp b/nfc/1.0/Android.bp
index 2b8f3af..9c3bb5f 100644
--- a/nfc/1.0/Android.bp
+++ b/nfc/1.0/Android.bp
@@ -51,9 +51,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/radio/1.0/Android.bp b/radio/1.0/Android.bp
index 65a5d79..5927549 100644
--- a/radio/1.0/Android.bp
+++ b/radio/1.0/Android.bp
@@ -75,9 +75,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/tests/bar/1.0/Android.bp b/tests/bar/1.0/Android.bp
index 06db6d0..4af053c 100644
--- a/tests/bar/1.0/Android.bp
+++ b/tests/bar/1.0/Android.bp
@@ -48,9 +48,9 @@
         "libcutils",
         "android.hardware.tests.foo@1.0",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/tests/bar/1.0/IBar.hal b/tests/bar/1.0/IBar.hal
index b57d9a0..82c6fc1 100644
--- a/tests/bar/1.0/IBar.hal
+++ b/tests/bar/1.0/IBar.hal
@@ -17,6 +17,7 @@
 package android.hardware.tests.bar@1.0;
 
 import android.hardware.tests.foo@1.0::IFoo;
+import android.hardware.tests.foo@1.0::Abc;
 import android.hardware.tests.foo@1.0::Unrelated;
 
 interface IBar extends android.hardware.tests.foo@1.0::IFoo {
@@ -29,4 +30,5 @@
     };
 
     thisIsNew();
+    expectNullHandle(handle h, Abc xyz) generates (bool hIsNull, bool xyzHasNull);
 };
diff --git a/tests/bar/1.0/default/Bar.cpp b/tests/bar/1.0/default/Bar.cpp
index 0257ee0..4ff9e6b 100644
--- a/tests/bar/1.0/default/Bar.cpp
+++ b/tests/bar/1.0/default/Bar.cpp
@@ -153,6 +153,12 @@
     return Void();
 }
 
+Return<void> Bar::expectNullHandle(const native_handle_t* h, const Abc& xyz, expectNullHandle_cb _hidl_cb) {
+    ALOGI("SERVER(Bar) h = %p, xyz.z = %p", h, xyz.z);
+    _hidl_cb(h == nullptr, xyz.z == nullptr);
+    return Void();
+}
+
 IBar* HIDL_FETCH_IBar(const char* /* name */) {
     return new Bar();
 }
diff --git a/tests/bar/1.0/default/Bar.h b/tests/bar/1.0/default/Bar.h
index ec55e8b..4e22b61 100644
--- a/tests/bar/1.0/default/Bar.h
+++ b/tests/bar/1.0/default/Bar.h
@@ -64,6 +64,7 @@
 
     // Methods from ::android::hardware::tests::bar::V1_0::IBar follow.
     Return<void> thisIsNew()  override;
+    Return<void> expectNullHandle(const native_handle_t* h, const Abc& xyz, expectNullHandle_cb _hidl_cb)  override;
 
 private:
     sp<IFoo> mFoo;
diff --git a/tests/baz/1.0/Android.bp b/tests/baz/1.0/Android.bp
index 64a8803..18a554d 100644
--- a/tests/baz/1.0/Android.bp
+++ b/tests/baz/1.0/Android.bp
@@ -59,9 +59,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/tests/baz/1.0/IBaz.hal b/tests/baz/1.0/IBaz.hal
index 4cb9689..c8fe2b6 100644
--- a/tests/baz/1.0/IBaz.hal
+++ b/tests/baz/1.0/IBaz.hal
@@ -34,6 +34,12 @@
         blah = goober
     };
 
+    typedef int32_t[3] ThreeInts;
+    struct T {
+        ThreeInts[5]  matrix5x3;
+        int32_t[3][5] matrix3x5;
+    };
+
     @Fragile @NoReally(very="yes", array={"a","b","c"})
     oneway doThis(float param);
 
diff --git a/tests/expression/1.0/Android.bp b/tests/expression/1.0/Android.bp
index 2ad94fa..2061283 100644
--- a/tests/expression/1.0/Android.bp
+++ b/tests/expression/1.0/Android.bp
@@ -47,9 +47,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/tests/foo/1.0/Android.bp b/tests/foo/1.0/Android.bp
index 96133ac..7a556ed 100644
--- a/tests/foo/1.0/Android.bp
+++ b/tests/foo/1.0/Android.bp
@@ -75,9 +75,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/tests/inheritance/1.0/Android.bp b/tests/inheritance/1.0/Android.bp
index e4a3439..92d6fe7 100644
--- a/tests/inheritance/1.0/Android.bp
+++ b/tests/inheritance/1.0/Android.bp
@@ -63,9 +63,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/tests/inheritance/1.0/default/Fetcher.cpp b/tests/inheritance/1.0/default/Fetcher.cpp
index 28dffaa..74f8d07 100644
--- a/tests/inheritance/1.0/default/Fetcher.cpp
+++ b/tests/inheritance/1.0/default/Fetcher.cpp
@@ -23,7 +23,7 @@
     if (sendRemote) {
         toSend = IChild::getService("child");
         if (!toSend->isRemote()) {
-            return Status::fromExceptionCode(Status::EX_ILLEGAL_STATE);
+            toSend = nullptr;
         }
     } else {
         toSend = local;
diff --git a/tests/libhwbinder/1.0/Android.bp b/tests/libhwbinder/1.0/Android.bp
index 52a8186..aad24a6 100644
--- a/tests/libhwbinder/1.0/Android.bp
+++ b/tests/libhwbinder/1.0/Android.bp
@@ -39,9 +39,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/tests/msgq/1.0/Android.bp b/tests/msgq/1.0/Android.bp
index 58ee3d4..2eb36c0 100644
--- a/tests/msgq/1.0/Android.bp
+++ b/tests/msgq/1.0/Android.bp
@@ -39,9 +39,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/tests/pointer/1.0/Android.bp b/tests/pointer/1.0/Android.bp
index 2601a5b..2b1e8b2 100644
--- a/tests/pointer/1.0/Android.bp
+++ b/tests/pointer/1.0/Android.bp
@@ -47,9 +47,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/tests/pointer/1.0/default/Pointer.h b/tests/pointer/1.0/default/Pointer.h
index 1579aea..41d96fd 100644
--- a/tests/pointer/1.0/default/Pointer.h
+++ b/tests/pointer/1.0/default/Pointer.h
@@ -156,20 +156,20 @@
     Return<void> foo20(const hidl_vec<IPointer::Sam const*>&) override {
         return Void();
     }
-    Return<void> foo21(hidl_array<IPointer::Ada, 3, 2, 1> const* a_array_ptr) override {
-        const hidl_array<IPointer::Ada, 3, 2, 1>& a_array = *a_array_ptr;
+    Return<void> foo21(hidl_array<IPointer::Ada, 1, 2, 3> const* a_array_ptr) override {
+        const hidl_array<IPointer::Ada, 1, 2, 3>& a_array = *a_array_ptr;
         PUSH_ERROR_IF(a_array[0][0][0].s_ptr->data != 500);
-        for(size_t i = 0; i < 3; i++)
+        for(size_t i = 0; i < 1; i++)
             for(size_t j = 0; j < 2; j++)
-                for(size_t k = 0; k < 1; k++)
+                for(size_t k = 0; k < 3; k++)
                     PUSH_ERROR_IF(a_array[i][j][k].s_ptr != a_array[0][0][0].s_ptr);
         return Void();
     }
-    Return<void> foo22(const hidl_array<IPointer::Ada const*, 3, 2, 1>& a_ptr_array) override {
+    Return<void> foo22(const hidl_array<IPointer::Ada const*, 1, 2, 3>& a_ptr_array) override {
         PUSH_ERROR_IF(a_ptr_array[0][0][0]->s_ptr->data != 500);
-        for(size_t i = 0; i < 3; i++)
+        for(size_t i = 0; i < 1; i++)
             for(size_t j = 0; j < 2; j++)
-                for(size_t k = 0; k < 1; k++)
+                for(size_t k = 0; k < 3; k++)
                     PUSH_ERROR_IF(a_ptr_array[i][j][k] != a_ptr_array[0][0][0]);
         return Void();
     }
@@ -315,19 +315,19 @@
         return Void();
     }
     Return<void> bar21(bar21_cb _cb) override {
-        hidl_array<IPointer::Ada, 3, 2, 1> a_array;
-        for(size_t i = 0; i < 3; i++)
+        hidl_array<IPointer::Ada, 1, 2, 3> a_array;
+        for(size_t i = 0; i < 1; i++)
             for(size_t j = 0; j < 2; j++)
-                for(size_t k = 0; k < 1; k++)
+                for(size_t k = 0; k < 3; k++)
                     a_array[i][j][k] = *a;
         _cb(&a_array);
         return Void();
     }
     Return<void> bar22(bar22_cb _cb) override {
-        hidl_array<const IPointer::Ada *, 3, 2, 1> a_ptr_array;
-        for(size_t i = 0; i < 3; i++)
+        hidl_array<const IPointer::Ada *, 1, 2, 3> a_ptr_array;
+        for(size_t i = 0; i < 1; i++)
             for(size_t j = 0; j < 2; j++)
-                for(size_t k = 0; k < 1; k++)
+                for(size_t k = 0; k < 3; k++)
                     a_ptr_array[i][j][k] = a;
         _cb(a_ptr_array);
         return Void();
diff --git a/wifi/1.0/Android.bp b/wifi/1.0/Android.bp
index 504da7b..7453fe7 100644
--- a/wifi/1.0/Android.bp
+++ b/wifi/1.0/Android.bp
@@ -115,9 +115,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/wifi/supplicant/1.0/Android.bp b/wifi/supplicant/1.0/Android.bp
index a60179d..d4247d2 100644
--- a/wifi/supplicant/1.0/Android.bp
+++ b/wifi/supplicant/1.0/Android.bp
@@ -9,18 +9,30 @@
         "ISupplicant.hal",
         "ISupplicantCallback.hal",
         "ISupplicantIface.hal",
-        "ISupplicantIfaceCallback.hal",
         "ISupplicantNetwork.hal",
-        "ISupplicantNetworkCallback.hal",
+        "ISupplicantP2pIface.hal",
+        "ISupplicantP2pIfaceCallback.hal",
+        "ISupplicantP2pNetwork.hal",
+        "ISupplicantP2pNetworkCallback.hal",
+        "ISupplicantStaIface.hal",
+        "ISupplicantStaIfaceCallback.hal",
+        "ISupplicantStaNetwork.hal",
+        "ISupplicantStaNetworkCallback.hal",
     ],
     out: [
         "android/hardware/wifi/supplicant/1.0/types.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantAll.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantCallbackAll.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantIfaceAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantIfaceCallbackAll.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantNetworkAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantNetworkCallbackAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceCallbackAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkCallbackAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaIfaceAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaIfaceCallbackAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkCallbackAll.cpp",
     ],
 }
 
@@ -33,9 +45,15 @@
         "ISupplicant.hal",
         "ISupplicantCallback.hal",
         "ISupplicantIface.hal",
-        "ISupplicantIfaceCallback.hal",
         "ISupplicantNetwork.hal",
-        "ISupplicantNetworkCallback.hal",
+        "ISupplicantP2pIface.hal",
+        "ISupplicantP2pIfaceCallback.hal",
+        "ISupplicantP2pNetwork.hal",
+        "ISupplicantP2pNetworkCallback.hal",
+        "ISupplicantStaIface.hal",
+        "ISupplicantStaIfaceCallback.hal",
+        "ISupplicantStaNetwork.hal",
+        "ISupplicantStaNetworkCallback.hal",
     ],
     out: [
         "android/hardware/wifi/supplicant/1.0/types.h",
@@ -54,21 +72,51 @@
         "android/hardware/wifi/supplicant/1.0/BnSupplicantIface.h",
         "android/hardware/wifi/supplicant/1.0/BpSupplicantIface.h",
         "android/hardware/wifi/supplicant/1.0/BsSupplicantIface.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BnSupplicantIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BpSupplicantIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantIfaceCallback.h",
         "android/hardware/wifi/supplicant/1.0/ISupplicantNetwork.h",
         "android/hardware/wifi/supplicant/1.0/IHwSupplicantNetwork.h",
         "android/hardware/wifi/supplicant/1.0/BnSupplicantNetwork.h",
         "android/hardware/wifi/supplicant/1.0/BpSupplicantNetwork.h",
         "android/hardware/wifi/supplicant/1.0/BsSupplicantNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BnSupplicantNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BpSupplicantNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pIface.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pIface.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pIface.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pIface.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pIface.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantStaIface.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaIface.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantStaIface.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantStaIface.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaIface.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantStaIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantStaIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantStaNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantStaNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantStaNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantStaNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaNetworkCallback.h",
     ],
 }
 
@@ -83,9 +131,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/wifi/supplicant/1.0/Android.mk b/wifi/supplicant/1.0/Android.mk
index b2c39f5..1f25c10 100644
--- a/wifi/supplicant/1.0/Android.mk
+++ b/wifi/supplicant/1.0/Android.mk
@@ -13,6 +13,23 @@
 HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
 
 #
+# Build types.hal (IfaceType)
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/IfaceType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::types.IfaceType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (SupplicantStatus)
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/SupplicantStatus.java
@@ -93,8 +110,6 @@
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
 $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIface.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
 $(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
@@ -110,33 +125,12 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build ISupplicantIfaceCallback.hal
-#
-GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantIfaceCallback.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava -randroid.hardware:hardware/interfaces \
-        android.hardware.wifi.supplicant@1.0::ISupplicantIfaceCallback
-
-$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
 # Build ISupplicantNetwork.hal
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantNetwork.java
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
 $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetwork.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
-$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
 $(GEN): $(LOCAL_PATH)/types.hal
 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
@@ -150,19 +144,166 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build ISupplicantNetworkCallback.hal
+# Build ISupplicantP2pIface.hal
 #
-GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantNetworkCallback.java
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pIface.java
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
 $(GEN): PRIVATE_CUSTOM_TOOL = \
         $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
         -Ljava -randroid.hardware:hardware/interfaces \
-        android.hardware.wifi.supplicant@1.0::ISupplicantNetworkCallback
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pIface
 
-$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIface.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pIfaceCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pIfaceCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pNetwork.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetwork.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetwork
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetwork.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pNetworkCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetworkCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaIface.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaIface.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaIface
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIface.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaIfaceCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaIfaceCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaNetwork.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaNetwork
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetwork.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaNetworkCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaNetworkCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
 	$(transform-generated-source)
 LOCAL_GENERATED_SOURCES += $(GEN)
 include $(BUILD_JAVA_LIBRARY)
@@ -179,6 +320,23 @@
 HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
 
 #
+# Build types.hal (IfaceType)
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/IfaceType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::types.IfaceType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (SupplicantStatus)
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/SupplicantStatus.java
@@ -259,8 +417,6 @@
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
 $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIface.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
 $(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
@@ -276,33 +432,12 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build ISupplicantIfaceCallback.hal
-#
-GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantIfaceCallback.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava -randroid.hardware:hardware/interfaces \
-        android.hardware.wifi.supplicant@1.0::ISupplicantIfaceCallback
-
-$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
 # Build ISupplicantNetwork.hal
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantNetwork.java
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
 $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetwork.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
-$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
 $(GEN): $(LOCAL_PATH)/types.hal
 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
@@ -316,19 +451,166 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build ISupplicantNetworkCallback.hal
+# Build ISupplicantP2pIface.hal
 #
-GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantNetworkCallback.java
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pIface.java
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
 $(GEN): PRIVATE_CUSTOM_TOOL = \
         $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
         -Ljava -randroid.hardware:hardware/interfaces \
-        android.hardware.wifi.supplicant@1.0::ISupplicantNetworkCallback
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pIface
 
-$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIface.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pIfaceCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pIfaceCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pNetwork.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetwork.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetwork
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetwork.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pNetworkCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetworkCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaIface.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaIface.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaIface
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIface.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaIfaceCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaIfaceCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaNetwork.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaNetwork
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetwork.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaNetworkCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaNetworkCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
 	$(transform-generated-source)
 LOCAL_GENERATED_SOURCES += $(GEN)
 include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/wifi/supplicant/1.0/ISupplicant.hal b/wifi/supplicant/1.0/ISupplicant.hal
index 75b0aa0..c0131c5 100644
--- a/wifi/supplicant/1.0/ISupplicant.hal
+++ b/wifi/supplicant/1.0/ISupplicant.hal
@@ -40,37 +40,26 @@
   };
 
   /**
-   * Registers a wireless interface in wpa_supplicant.
-   *
-   * @param ifName Name of the network interface, e.g., wlan0
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_EXISTS|
-   * @return iface HIDL interface object representing the interface if
-   *         successful, null otherwise.
+   * Structure describing the type and name of an iface
+   * controlled by wpa_supplicant.
    */
-  createInterface(string ifName)
-      generates (SupplicantStatus status, ISupplicantIface iface);
+  struct IfaceInfo {
+      /**
+       * Type of the network interface.
+       */
+      IfaceType type;
+      /**
+       * Name of the network interface, e.g., wlan0
+       */
+      string name;
+  };
 
   /**
-   * Deregisters a wireless interface from wpa_supplicant.
+   * Gets a HIDL interface object for the interface corresponding to iface
+   * name which wpa_supplicant already controls.
    *
-   * @param ifName Name of the network interface, e.g., wlan0
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_UNKOWN|
-   */
-  removeInterface(string ifName) generates (SupplicantStatus status);
-
-  /**
-   * Gets a HIDL interface object for the interface corresponding to ifName
-   * which wpa_supplicant already controls.
-   *
-   * @param ifName Name of the network interface, e.g., wlan0
+   * @param ifaceInfo Combination of the iface type and name retrieved
+   *        using |listInterfaces|.
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
@@ -79,11 +68,11 @@
    * @return iface HIDL interface object representing the interface if
    *         successful, null otherwise.
    */
-  getInterface(string ifName)
+  getInterface(IfaceInfo ifaceInfo)
       generates (SupplicantStatus status, ISupplicantIface iface);
 
   /**
-   * Retrieve a list of all the interface names controlled by wpa_supplicant.
+   * Retrieve a list of all the interfaces controlled by wpa_supplicant.
    *
    * The corresponding |ISupplicantIface| object for any interface can be
    * retrieved using |getInterface| method.
@@ -92,9 +81,9 @@
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
    *         |SupplicantStatusCode.FAILURE_UNKNOWN|
-   * @return ifNames List of all interface names controlled by wpa_supplicant.
+   * @return ifaces List of all interfaces controlled by wpa_supplicant.
    */
-  listInterfaces() generates (SupplicantStatus status, vec<string> ifNames);
+  listInterfaces() generates (SupplicantStatus status, vec<IfaceInfo> ifaces);
 
   /**
    * Register for callbacks from the wpa_supplicant service.
diff --git a/wifi/supplicant/1.0/ISupplicantIface.hal b/wifi/supplicant/1.0/ISupplicantIface.hal
index 7b4f86f..afbfd8e 100644
--- a/wifi/supplicant/1.0/ISupplicantIface.hal
+++ b/wifi/supplicant/1.0/ISupplicantIface.hal
@@ -16,7 +16,6 @@
 
 package android.hardware.wifi.supplicant@1.0;
 
-import ISupplicantIfaceCallback;
 import ISupplicantNetwork;
 
 /**
@@ -36,6 +35,17 @@
   getName() generates (SupplicantStatus status, string name);
 
   /**
+   * Retrieves the type of the network interface.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   * @return type Type of the network interface, e.g., STA.
+   */
+  getType() generates (SupplicantStatus status, IfaceType type);
+
+  /**
    * Add a new network to the interface.
    *
    * @return status Status of the operation.
@@ -100,114 +110,4 @@
    */
   listNetworks()
       generates (SupplicantStatus status, vec<SupplicantNetworkId> networkIds);
-
-  /**
-   * Register for callbacks from this interface.
-   *
-   * These callbacks are invoked for events that are specific to this interface.
-   * Registration of multiple callback objects is supported. These objects must
-   * be automatically deleted when the corresponding client process is dead or
-   * if this interface is removed.
-   *
-   * @param callback An instance of the |ISupplicantIfaceCallback| HIDL
-   *        interface object.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
-   */
-  registerCallback(ISupplicantIfaceCallback callback)
-      generates (SupplicantStatus status);
-
-  /**
-   * Reconnect to the currently active network, even if we are already
-   * connected.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
-   */
-  reassociate() generates (SupplicantStatus status);
-
-  /**
-   * Reconnect to the currently active network, if we are currently
-   * disconnected.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_NOT_DISCONNECTED|
-   */
-  reconnect() generates (SupplicantStatus status);
-
-  /**
-   * Disconnect from the current active network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
-   */
-  disconnect() generates (SupplicantStatus status);
-
-  /**
-   * Turn on/off power save mode for the interface.
-   *
-   * @param enable Indicate if power save is to be turned on/off.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
-   */
-  setPowerSave(bool enable) generates (SupplicantStatus status);
-
-  /**
-   * Initiate TDLS discover with the provided peer mac address.
-   *
-   * @param macAddress MAC address of the peer.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
-   */
-  initiateTdlsDiscover(MacAddress macAddress)
-      generates (SupplicantStatus status);
-
-  /**
-   * Initiate TDLS setup with the provided peer mac address.
-   *
-   * @param macAddress MAC address of the peer.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
-   */
-  initiateTdlsSetup(MacAddress macAddress)
-      generates (SupplicantStatus status);
-
-  /**
-   * Initiate TDLS teardown with the provided peer mac address.
-   *
-   * @param macAddress MAC address of the peer.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
-   */
-  initiateTdlsTeardown(MacAddress macAddress)
-      generates (SupplicantStatus status);
 };
diff --git a/wifi/supplicant/1.0/ISupplicantNetwork.hal b/wifi/supplicant/1.0/ISupplicantNetwork.hal
index fce3c5d..acc3359 100644
--- a/wifi/supplicant/1.0/ISupplicantNetwork.hal
+++ b/wifi/supplicant/1.0/ISupplicantNetwork.hal
@@ -16,8 +16,6 @@
 
 package android.hardware.wifi.supplicant@1.0;
 
-import ISupplicantNetworkCallback;
-
 /**
  * Interface exposed by wpa_supplicant for each network configuration it
  * controls.
@@ -28,100 +26,6 @@
  */
 interface ISupplicantNetwork {
   /**
-   * Size limits for some of the params used in this interface.
-   */
-  enum ParamSizeLimits : uint32_t {
-    /** Max length of SSID param. */
-    SSID_MAX_LEN_IN_BYTES = 32,
-
-    /** Min length of PSK passphrase param. */
-    PSK_PASSPHRASE_MIN_LEN_IN_BYTES = 8,
-
-    /** Max length of PSK passphrase param. */
-    PSK_PASSPHRASE_MAX_LEN_IN_BYTES = 63,
-
-    /** Max number of WEP keys param. */
-    WEP_KEYS_MAX_NUM = 4,
-
-    /** Length of each WEP40 keys param. */
-    WEP40_KEY_LEN_IN_BYTES = 5,
-    /** Length of each WEP104 keys param. */
-    WEP104_KEY_LEN_IN_BYTES = 13,
-  };
-
-  /** Possble mask of values for KeyMgmt param. */
-  enum KeyMgmtMask : uint32_t {
-    WPA_EAP = 1 << 0,
-    WPA_PSK = 1 << 1,
-    NONE = 1 << 2,
-    IEEE8021X = 1 << 3
-  };
-
-  /** Possble mask of values for Proto param. */
-  enum ProtoMask : uint32_t {
-    WPA = 1 << 0,
-    RSN = 1 << 1,
-    /** Unused 1 << 2 */
-    OSEN = 1 << 3
-  };
-
-  /** Possble mask of values for AuthAlg param. */
-  enum AuthAlgMask : uint32_t {
-    OPEN = 1 << 0,
-    SHARED = 1 << 1,
-    LEAP = 1 << 2
-  };
-
-  /** Possble mask of values for GroupCipher param. */
-  enum GroupCipherMask : uint32_t {
-    WEP40 = 1 << 1,
-    WEP104 = 1 << 2,
-    TKIP = 1 << 3,
-    CCMP = 1 << 4
-  };
-
-  /** Possble mask of values for PairwiseCipher param. */
-  enum PairwiseCipherMask : uint32_t {
-    NONE = 1 << 0,
-    TKIP = 1 << 3,
-    CCMP = 1 << 4
-  };
-
-  /** Possble values for EapMethod param. */
-  enum EapMethod : uint32_t {
-    PEAP = 0,
-    TLS = 1,
-    TTLS = 2,
-    PWD = 3,
-    SIM = 4,
-    AKA = 5,
-    AKA_PRIME = 6,
-    WFA_UNAUTH_TLS = 7
-  };
-
-  /** Possble values for Phase2Method param. */
-  enum EapPhase2Method : uint32_t {
-    NONE = 0,
-    PAP = 1,
-    MSPAP = 2,
-    MSPAPV2 = 3,
-    GTC = 4
-  };
-
-  /** Params of |sendNetworkEapSimGsmAuthResponse| request. (Refer RFC 4186) */
-  struct NetworkResponseEapSimGsmAuthParams {
-    uint8_t[8] kc;
-    uint8_t[4] sres;
-  };
-
-  /** Params of |sendNetworkEapSimUmtsAuthResponse| request. (Refer RFC 4187) */
-  struct NetworkResponseEapSimUmtsAuthParams {
-    vec<uint8_t> res;
-    uint8_t[16] ik;
-    uint8_t[16] ck;
-  };
-
-  /**
    * Retrieves the ID allocated to this network by wpa_supplicant.
    *
    * This is not the |SSID| of the network, but an internal identifier for
@@ -147,593 +51,13 @@
   getInterfaceName() generates (SupplicantStatus status, string name);
 
   /**
-   * Register for callbacks from this network.
-   *
-   * These callbacks are invoked for events that are specific to this network.
-   * Registration of multiple callback objects is supported. These objects must
-   * be automatically deleted when the corresponding client process is dead or
-   * if this network is removed.
-   *
-   * @param callback An instance of the |ISupplicantNetworkCallback| HIDL
-   *        interface object.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  registerCallback(ISupplicantNetworkCallback callback)
-      generates (SupplicantStatus status);
-
-  /**
-   * Setters for the various network params.
-   * These correspond to elements of |wpa_sssid| struct used internally by
-   * wpa_supplicant to represent each network.
-   */
-  /**
-   * Set SSID for this network.
-   *
-   * @param ssid value to set.
-   *        Max length of |ParamSizeLimits.SSID_MAX_LEN_IN_BYTES|.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setSsid(Ssid ssid) generates (SupplicantStatus status);
-
-  /**
-   * Set the network to only connect to an AP with provided BSSID.
-   *
-   * @param bssid value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setBssid(Bssid bssid) generates (SupplicantStatus status);
-
-  /**
-   * Set whether to send probe requests for this network (hidden).
-   *
-   * @param enable true to set, false otherwise.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setScanSsid(bool enable) generates (SupplicantStatus status);
-
-  /**
-   * Set key management mask for the network.
-   *
-   * @param keyMgmtMask value to set.
-   *        Combination of |KeyMgmtMask| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setKeyMgmt(uint32_t keyMgmtMask) generates (SupplicantStatus status);
-
-  /**
-   * Set proto mask for the network.
-   *
-   * @param protoMask value to set.
-   *        Combination of |ProtoMask| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setProto(uint32_t protoMask) generates (SupplicantStatus status);
-
-  /**
-   * Set auth alg mask for the network.
-   *
-   * @param authAlgMask value to set.
-   *        Combination of |ProtoMask| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setAuthAlg(uint32_t authAlgMask) generates (SupplicantStatus status);
-
-  /**
-   * Set group cipher mask for the network.
-   *
-   * @param groupCipherMask value to set.
-   *        Combination of |ProtoMask| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setGroupCipher(uint32_t groupCipherMask)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set pairwise cipher mask for the network.
-   *
-   * @param pairwiseCipherMask value to set.
-   *        Combination of |ProtoMask| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setPairwiseCipher(uint32_t pairwiseCipherMask)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set passphrase for WPA_PSK network.
-   *
-   * @param psk value to set.
-   *        Length of value must be between
-   *        |ParamSizeLimits.PSK_PASSPHRASE_MIN_LEN_IN_BYTES| and
-   *        |ParamSizeLimits.PSK_PASSPHRASE_MAX_LEN_IN_BYTES|.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setPskPassphrase(string psk) generates (SupplicantStatus status);
-
-  /**
-   * Set WEP key for WEP network.
-   *
-   * @param keyIdx Index of wep key to set.
-   *        Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
-   * @param wepKey value to set.
-   *        Length of each key must be either
-   *        |ParamSizeLimits.WEP40_KEY_LEN_IN_BYTES| or
-   *        |ParamSizeLimits.WEP104_KEY_LEN_IN_BYTES|.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setWepKey(uint32_t keyIdx, vec<uint8_t> wepKey)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set default Tx key index for WEP network.
-   *
-   * @param KeyIdx value to set.
-   *        Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setWepTxKeyIdx(uint32_t keyIdx)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set whether RequirePmf is enabled for this network.
-   *
-   * @param enable true to set, false otherwise.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setRequirePmf(bool enable) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Method for this network.
-   *
-   * @param method value to be set.
-   *        Must be one of |EapMethod| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapMethod(EapMethod method)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Phase2 Method for this network.
-   *
-   * @param method value to set.
-   *        Must be one of |EapPhase2Method| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapPhase2Method(EapPhase2Method method)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Identity for this network.
-   *
-   * @param identity value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapIdentity(vec<uint8_t> identity)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Anonymous Identity for this network.
-   *
-   * @param identity value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapAnonymousIdentity(vec<uint8_t> identity)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Password for this network.
-   *
-   * @param password value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapPassword(vec<uint8_t> password)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set EAP CA certificate file path for this network.
-   *
-   * @param path value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapCACert(string path) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP CA certificate directory path for this network.
-   *
-   * @param path value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapCAPath(string path) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Client certificate file path for this network.
-   *
-   * @param path value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapClientCert(string path) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP private key file path for this network.
-   *
-   * @param path value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapPrivateKey(string path) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP subject match for this network.
-   *
-   * @param match value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapSubjectMatch(string match) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Altsubject match for this network.
-   *
-   * @param match value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapAltSubjectMatch(string match)
-      generates (SupplicantStatus status);
-
-  /**
-   * Enable EAP Open SSL Engine for this network.
-   *
-   * @param enable true to set, false otherwise.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapEngine(bool enable) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Open SSL Engine ID for this network.
-   *
-   * @param id value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapEngineID(string id) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Domain suffix match for this network.
-   *
-   * @param match value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapDomainSuffixMatch(string match)
-      generates (SupplicantStatus status);
-
-  /**
-   * Getters for the various network params.
-   */
-  /**
-   * Get SSID for this network.
+   * Retrieves the type of the interface this network belongs to.
    *
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return ssid value set.
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   * @return type Type of the network interface, e.g., STA.
    */
-  getSsid() generates (SupplicantStatus status, Ssid ssid);
-
-  /**
-   * Get the BSSID set for this network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return bssid value set.
-   */
-  getBssid() generates (SupplicantStatus status, Bssid bssid);
-
-  /**
-   * Get whether Probe Requests are being sent for this network (hidden).
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return enabled true if set, false otherwise.
-   */
-  getScanSsid() generates (SupplicantStatus status, bool enabled);
-
-  /**
-   * Get the key mgmt mask set for the network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return keyMgmtMask Combination of |KeyMgmtMask| values.
-   */
-  getKeyMgmt()
-      generates (SupplicantStatus status, uint32_t keyMgmtMask);
-
-  /**
-   * Get the proto mask set for the network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return protoMask Combination of |ProtoMask| values.
-   */
-  getProto() generates (SupplicantStatus status, uint32_t protoMask);
-
-  /**
-   * Get the auth alg mask set for the network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return authAlgMask Combination of |AuthAlgMask| values.
-   */
-  getAuthAlg()
-      generates (SupplicantStatus status, uint32_t authAlgMask);
-
-  /**
-   * Get the group cipher mask set for the network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return groupCipherMask Combination of |GroupCipherMask| values.
-   */
-  getGroupCipher()
-      generates (SupplicantStatus status, uint32_t groupCipherMask);
-
-  /**
-   * Get the pairwise cipher mask set for the network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
-   */
-  getPairwiseCipher()
-      generates (SupplicantStatus status, uint32_t pairwiseCipherMask);
-
-  /**
-   * Get passphrase for WPA_PSK network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return psk value set.
-   */
-  getPskPassphrase() generates (SupplicantStatus status, string psk);
-
-  /**
-   * Get WEP key for WEP network.
-   *
-   * @param keyIdx Index of wep key to be fetched.
-   *        Max of |WEP_KEYS_MAX_NUM|.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return wepKey value set.
-   */
-  getWepKey(uint32_t keyIdx)
-      generates (SupplicantStatus status, vec<uint8_t> wepKey);
-
-  /**
-   * Get default Tx key index for WEP network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return keyIdx value set.
-   */
-  getWepTxKeyIdx()
-      generates (SupplicantStatus status, uint32_t keyIdx);
-
-  /**
-   * Get whether RequirePmf is enabled for this network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return enabled true if set, false otherwise.
-   */
-  getRequirePmf() generates (SupplicantStatus status, bool enabled);
-
-  /**
-   * Enable the network for connection purposes.
-   *
-   * This must trigger a connection to the network if:
-   * a) |noConnect| is false, and
-   * b) This is the only network configured, and
-   * c) Is visible in the current scan results.
-   *
-   * @param noConnect Only enable the network, dont trigger a connect.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  enable(bool noConnect) generates (SupplicantStatus status);
-
-  /**
-   * Disable the network for connection purposes.
-   *
-   * This must trigger a disconnection from the network, if currently
-   * connected to this one.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  disable() generates (SupplicantStatus status);
-
-  /**
-   * Initiate connection to this network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  select() generates (SupplicantStatus status);
-
-  /**
-   * Used to send a response to the
-   * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request.
-   *
-   * @param params Params to be used for EAP GSM authentication.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  sendNetworkEapSimGsmAuthResponse(NetworkResponseEapSimGsmAuthParams params)
-      generates (SupplicantStatus status);
-
-  /**
-   * Used to send a response to the
-   * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
-   *
-   * @param params Params to be used for EAP UMTS authentication.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  sendNetworkEapSimUmtsAuthResponse(NetworkResponseEapSimUmtsAuthParams params)
-      generates (SupplicantStatus status);
-
-  /**
-   * Used to send a response to the
-   * |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request.
-   *
-   * @param identity Identity to be used for the network.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  sendNetworkEapIdentityResponse(vec<uint8_t> identity)
-      generates (SupplicantStatus status);
+  getType() generates (SupplicantStatus status, IfaceType type);
 };
diff --git a/wifi/supplicant/1.0/ISupplicantP2pIface.hal b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
new file mode 100644
index 0000000..ea0878b
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.wifi.supplicant@1.0;
+
+import ISupplicantIface;
+import ISupplicantP2pIfaceCallback;
+
+/**
+ * Interface exposed by wpa_supplicant for each P2P mode network
+ * interface (e.g p2p0) it controls.
+ */
+interface ISupplicantP2pIface extends ISupplicantIface {
+  /**
+   * Register for callbacks from this interface.
+   *
+   * These callbacks are invoked for events that are specific to this interface.
+   * Registration of multiple callback objects is supported. These objects must
+   * be automatically deleted when the corresponding client process is dead or
+   * if this interface is removed.
+   *
+   * @param callback An instance of the |ISupplicantP2pIfaceCallback| HIDL
+   *        interface object.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  registerCallback(ISupplicantP2pIfaceCallback callback)
+      generates (SupplicantStatus status);
+};
diff --git a/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal b/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal
new file mode 100644
index 0000000..1574e6a
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.wifi.supplicant@1.0;
+
+/**
+ * Callback Interface exposed by the wpa_supplicant service
+ * for each P2P mode interface (ISupplicantP2pIface).
+ *
+ * Clients need to host an instance of this HIDL interface object and
+ * pass a reference of the object to wpa_supplicant via the
+ * corresponding |ISupplicantP2pIface.registerCallback| method.
+ */
+interface ISupplicantP2pIfaceCallback {
+  /**
+   * Used to indicate that a new network has been added.
+   *
+   * @param id Network ID allocated to the corresponding network.
+   */
+  oneway onNetworkAdded(SupplicantNetworkId id);
+
+  /**
+   * Used to indicate that a network has been removed.
+   *
+   * @param id Network ID allocated to the corresponding network.
+   */
+  oneway onNetworkRemoved(SupplicantNetworkId id);
+};
diff --git a/wifi/supplicant/1.0/ISupplicantP2pNetwork.hal b/wifi/supplicant/1.0/ISupplicantP2pNetwork.hal
new file mode 100644
index 0000000..13eeae7
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantP2pNetwork.hal
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.wifi.supplicant@1.0;
+
+import ISupplicantNetwork;
+import ISupplicantP2pNetworkCallback;
+
+/**
+ * Interface exposed by wpa_supplicant for each P2P mode network
+ * configuration it controls.
+ */
+interface ISupplicantP2pNetwork extends ISupplicantNetwork {
+  /**
+   * Register for callbacks from this network.
+   *
+   * These callbacks are invoked for events that are specific to this network.
+   * Registration of multiple callback objects is supported. These objects must
+   * be automatically deleted when the corresponding client process is dead or
+   * if this network is removed.
+   *
+   * @param callback An instance of the |ISupplicantP2pNetworkCallback| HIDL
+   *        interface object.
+   * @return status P2ptus of the operation.
+   *         Possible status codes:
+   *         |SupplicantP2ptusCode.SUCCESS|,
+   *         |SupplicantP2ptusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantP2ptusCode.FAILURE_NETWORK_INVALID|
+   */
+  registerCallback(ISupplicantP2pNetworkCallback callback)
+      generates (SupplicantStatus status);
+};
diff --git a/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.hal b/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.hal
new file mode 100644
index 0000000..d171a09
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.hal
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.wifi.supplicant@1.0;
+
+/**
+ * Callback Interface exposed by the wpa_supplicant service
+ * for each network (ISupplicantP2pNetwork).
+ *
+ * Clients need to host an instance of this HIDL interface object and
+ * pass a reference of the object to wpa_supplicant via the
+ * corresponding |ISupplicantP2pNetwork.registerCallback| method.
+ */
+interface ISupplicantP2pNetworkCallback {
+    // TODO(rpius): Add the reqd callbacks.
+};
diff --git a/wifi/supplicant/1.0/ISupplicantStaIface.hal b/wifi/supplicant/1.0/ISupplicantStaIface.hal
new file mode 100644
index 0000000..4e2c7c8
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantStaIface.hal
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.wifi.supplicant@1.0;
+
+import ISupplicantIface;
+import ISupplicantStaIfaceCallback;
+
+/**
+ * Interface exposed by wpa_supplicant for each station mode network
+ * interface (e.g wlan0) it controls.
+ */
+interface ISupplicantStaIface extends ISupplicantIface {
+  /**
+   * Register for callbacks from this interface.
+   *
+   * These callbacks are invoked for events that are specific to this interface.
+   * Registration of multiple callback objects is supported. These objects must
+   * be automatically deleted when the corresponding client process is dead or
+   * if this interface is removed.
+   *
+   * @param callback An instance of the |ISupplicantStaIfaceCallback| HIDL
+   *        interface object.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  registerCallback(ISupplicantStaIfaceCallback callback)
+      generates (SupplicantStatus status);
+
+  /**
+   * Reconnect to the currently active network, even if we are already
+   * connected.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
+   */
+  reassociate() generates (SupplicantStatus status);
+
+  /**
+   * Reconnect to the currently active network, if we are currently
+   * disconnected.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_NOT_DISCONNECTED|
+   */
+  reconnect() generates (SupplicantStatus status);
+
+  /**
+   * Disconnect from the current active network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
+   */
+  disconnect() generates (SupplicantStatus status);
+
+  /**
+   * Turn on/off power save mode for the interface.
+   *
+   * @param enable Indicate if power save is to be turned on/off.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
+   */
+  setPowerSave(bool enable) generates (SupplicantStatus status);
+
+  /**
+   * Initiate TDLS discover with the provided peer mac address.
+   *
+   * @param macAddress MAC address of the peer.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  initiateTdlsDiscover(MacAddress macAddress)
+      generates (SupplicantStatus status);
+
+  /**
+   * Initiate TDLS setup with the provided peer mac address.
+   *
+   * @param macAddress MAC address of the peer.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  initiateTdlsSetup(MacAddress macAddress)
+      generates (SupplicantStatus status);
+
+  /**
+   * Initiate TDLS teardown with the provided peer mac address.
+   *
+   * @param macAddress MAC address of the peer.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  initiateTdlsTeardown(MacAddress macAddress)
+      generates (SupplicantStatus status);
+};
diff --git a/wifi/supplicant/1.0/ISupplicantIfaceCallback.hal b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
similarity index 96%
rename from wifi/supplicant/1.0/ISupplicantIfaceCallback.hal
rename to wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
index 8e193cd..d104814 100644
--- a/wifi/supplicant/1.0/ISupplicantIfaceCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
@@ -18,13 +18,13 @@
 
 /**
  * Callback Interface exposed by the wpa_supplicant service
- * for each interface (ISupplicantIface).
+ * for each station mode interface (ISupplicantStaIface).
  *
  * Clients need to host an instance of this HIDL interface object and
  * pass a reference of the object to wpa_supplicant via the
- * corresponding |ISupplicantIface.registerCallback| method.
+ * corresponding |ISupplicantStaIface.registerCallback| method.
  */
-interface ISupplicantIfaceCallback {
+interface ISupplicantStaIfaceCallback {
   /** Various states of the interface reported by |onStateChanged|.*/
   enum State : uint32_t {
     /**
@@ -38,7 +38,7 @@
      * due to rfkill. wpa_supplicant refuses any new operations that would
      * use the radio until the interface has been enabled.
      */
-    INTERFACE_DISABLED = 1,
+    IFACE_DISABLED = 1,
     /**
      * This state is entered if there are no enabled networks in the
      * configuration. wpa_supplicant is not trying to associate with a new
diff --git a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
new file mode 100644
index 0000000..ce23932
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
@@ -0,0 +1,711 @@
+/*
+ * Copyright 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.wifi.supplicant@1.0;
+
+import ISupplicantNetwork;
+import ISupplicantStaNetworkCallback;
+
+/**
+ * Interface exposed by wpa_supplicant for each station mode network
+ * configuration it controls.
+ */
+interface ISupplicantStaNetwork extends ISupplicantNetwork {
+  /**
+   * Size limits for some of the params used in this interface.
+   */
+  enum ParamSizeLimits : uint32_t {
+    /** Max length of SSID param. */
+    SSID_MAX_LEN_IN_BYTES = 32,
+
+    /** Min length of PSK passphrase param. */
+    PSK_PASSPHRASE_MIN_LEN_IN_BYTES = 8,
+
+    /** Max length of PSK passphrase param. */
+    PSK_PASSPHRASE_MAX_LEN_IN_BYTES = 63,
+
+    /** Max number of WEP keys param. */
+    WEP_KEYS_MAX_NUM = 4,
+
+    /** Length of each WEP40 keys param. */
+    WEP40_KEY_LEN_IN_BYTES = 5,
+    /** Length of each WEP104 keys param. */
+    WEP104_KEY_LEN_IN_BYTES = 13,
+  };
+
+  /** Possble mask of values for KeyMgmt param. */
+  enum KeyMgmtMask : uint32_t {
+    WPA_EAP = 1 << 0,
+    WPA_PSK = 1 << 1,
+    NONE = 1 << 2,
+    IEEE8021X = 1 << 3
+  };
+
+  /** Possble mask of values for Proto param. */
+  enum ProtoMask : uint32_t {
+    WPA = 1 << 0,
+    RSN = 1 << 1,
+    /** Unused 1 << 2 */
+    OSEN = 1 << 3
+  };
+
+  /** Possble mask of values for AuthAlg param. */
+  enum AuthAlgMask : uint32_t {
+    OPEN = 1 << 0,
+    SHARED = 1 << 1,
+    LEAP = 1 << 2
+  };
+
+  /** Possble mask of values for GroupCipher param. */
+  enum GroupCipherMask : uint32_t {
+    WEP40 = 1 << 1,
+    WEP104 = 1 << 2,
+    TKIP = 1 << 3,
+    CCMP = 1 << 4
+  };
+
+  /** Possble mask of values for PairwiseCipher param. */
+  enum PairwiseCipherMask : uint32_t {
+    NONE = 1 << 0,
+    TKIP = 1 << 3,
+    CCMP = 1 << 4
+  };
+
+  /** Possble values for EapMethod param. */
+  enum EapMethod : uint32_t {
+    PEAP = 0,
+    TLS = 1,
+    TTLS = 2,
+    PWD = 3,
+    SIM = 4,
+    AKA = 5,
+    AKA_PRIME = 6,
+    WFA_UNAUTH_TLS = 7
+  };
+
+  /** Possble values for Phase2Method param. */
+  enum EapPhase2Method : uint32_t {
+    NONE = 0,
+    PAP = 1,
+    MSPAP = 2,
+    MSPAPV2 = 3,
+    GTC = 4
+  };
+
+  /** Params of |sendNetworkEapSimGsmAuthResponse| request. (Refer RFC 4186) */
+  struct NetworkResponseEapSimGsmAuthParams {
+    uint8_t[8] kc;
+    uint8_t[4] sres;
+  };
+
+  /** Params of |sendNetworkEapSimUmtsAuthResponse| request. (Refer RFC 4187) */
+  struct NetworkResponseEapSimUmtsAuthParams {
+    vec<uint8_t> res;
+    uint8_t[16] ik;
+    uint8_t[16] ck;
+  };
+
+  /**
+   * Register for callbacks from this network.
+   *
+   * These callbacks are invoked for events that are specific to this network.
+   * Registration of multiple callback objects is supported. These objects must
+   * be automatically deleted when the corresponding client process is dead or
+   * if this network is removed.
+   *
+   * @param callback An instance of the |ISupplicantStaNetworkCallback| HIDL
+   *        interface object.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  registerCallback(ISupplicantStaNetworkCallback callback)
+      generates (SupplicantStatus status);
+
+  /**
+   * Setters for the various network params.
+   * These correspond to elements of |wpa_sssid| struct used internally by
+   * wpa_supplicant to represent each network.
+   */
+  /**
+   * Set SSID for this network.
+   *
+   * @param ssid value to set.
+   *        Max length of |ParamSizeLimits.SSID_MAX_LEN_IN_BYTES|.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setSsid(Ssid ssid) generates (SupplicantStatus status);
+
+  /**
+   * Set the network to only connect to an AP with provided BSSID.
+   *
+   * @param bssid value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setBssid(Bssid bssid) generates (SupplicantStatus status);
+
+  /**
+   * Set whether to send probe requests for this network (hidden).
+   *
+   * @param enable true to set, false otherwise.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setScanSsid(bool enable) generates (SupplicantStatus status);
+
+  /**
+   * Set key management mask for the network.
+   *
+   * @param keyMgmtMask value to set.
+   *        Combination of |KeyMgmtMask| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setKeyMgmt(uint32_t keyMgmtMask) generates (SupplicantStatus status);
+
+  /**
+   * Set proto mask for the network.
+   *
+   * @param protoMask value to set.
+   *        Combination of |ProtoMask| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setProto(uint32_t protoMask) generates (SupplicantStatus status);
+
+  /**
+   * Set auth alg mask for the network.
+   *
+   * @param authAlgMask value to set.
+   *        Combination of |ProtoMask| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setAuthAlg(uint32_t authAlgMask) generates (SupplicantStatus status);
+
+  /**
+   * Set group cipher mask for the network.
+   *
+   * @param groupCipherMask value to set.
+   *        Combination of |ProtoMask| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setGroupCipher(uint32_t groupCipherMask)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set pairwise cipher mask for the network.
+   *
+   * @param pairwiseCipherMask value to set.
+   *        Combination of |ProtoMask| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setPairwiseCipher(uint32_t pairwiseCipherMask)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set passphrase for WPA_PSK network.
+   *
+   * @param psk value to set.
+   *        Length of value must be between
+   *        |ParamSizeLimits.PSK_PASSPHRASE_MIN_LEN_IN_BYTES| and
+   *        |ParamSizeLimits.PSK_PASSPHRASE_MAX_LEN_IN_BYTES|.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setPskPassphrase(string psk) generates (SupplicantStatus status);
+
+  /**
+   * Set WEP key for WEP network.
+   *
+   * @param keyIdx Index of wep key to set.
+   *        Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
+   * @param wepKey value to set.
+   *        Length of each key must be either
+   *        |ParamSizeLimits.WEP40_KEY_LEN_IN_BYTES| or
+   *        |ParamSizeLimits.WEP104_KEY_LEN_IN_BYTES|.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setWepKey(uint32_t keyIdx, vec<uint8_t> wepKey)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set default Tx key index for WEP network.
+   *
+   * @param KeyIdx value to set.
+   *        Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setWepTxKeyIdx(uint32_t keyIdx)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set whether RequirePmf is enabled for this network.
+   *
+   * @param enable true to set, false otherwise.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setRequirePmf(bool enable) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Method for this network.
+   *
+   * @param method value to be set.
+   *        Must be one of |EapMethod| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapMethod(EapMethod method)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Phase2 Method for this network.
+   *
+   * @param method value to set.
+   *        Must be one of |EapPhase2Method| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapPhase2Method(EapPhase2Method method)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Identity for this network.
+   *
+   * @param identity value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapIdentity(vec<uint8_t> identity)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Anonymous Identity for this network.
+   *
+   * @param identity value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapAnonymousIdentity(vec<uint8_t> identity)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Password for this network.
+   *
+   * @param password value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapPassword(vec<uint8_t> password)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set EAP CA certificate file path for this network.
+   *
+   * @param path value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapCACert(string path) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP CA certificate directory path for this network.
+   *
+   * @param path value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapCAPath(string path) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Client certificate file path for this network.
+   *
+   * @param path value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapClientCert(string path) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP private key file path for this network.
+   *
+   * @param path value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapPrivateKey(string path) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP subject match for this network.
+   *
+   * @param match value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapSubjectMatch(string match) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Altsubject match for this network.
+   *
+   * @param match value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapAltSubjectMatch(string match)
+      generates (SupplicantStatus status);
+
+  /**
+   * Enable EAP Open SSL Engine for this network.
+   *
+   * @param enable true to set, false otherwise.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapEngine(bool enable) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Open SSL Engine ID for this network.
+   *
+   * @param id value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapEngineID(string id) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Domain suffix match for this network.
+   *
+   * @param match value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapDomainSuffixMatch(string match)
+      generates (SupplicantStatus status);
+
+  /**
+   * Getters for the various network params.
+   */
+  /**
+   * Get SSID for this network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return ssid value set.
+   */
+  getSsid() generates (SupplicantStatus status, Ssid ssid);
+
+  /**
+   * Get the BSSID set for this network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return bssid value set.
+   */
+  getBssid() generates (SupplicantStatus status, Bssid bssid);
+
+  /**
+   * Get whether Probe Requests are being sent for this network (hidden).
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return enabled true if set, false otherwise.
+   */
+  getScanSsid() generates (SupplicantStatus status, bool enabled);
+
+  /**
+   * Get the key mgmt mask set for the network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return keyMgmtMask Combination of |KeyMgmtMask| values.
+   */
+  getKeyMgmt()
+      generates (SupplicantStatus status, uint32_t keyMgmtMask);
+
+  /**
+   * Get the proto mask set for the network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return protoMask Combination of |ProtoMask| values.
+   */
+  getProto() generates (SupplicantStatus status, uint32_t protoMask);
+
+  /**
+   * Get the auth alg mask set for the network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return authAlgMask Combination of |AuthAlgMask| values.
+   */
+  getAuthAlg()
+      generates (SupplicantStatus status, uint32_t authAlgMask);
+
+  /**
+   * Get the group cipher mask set for the network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return groupCipherMask Combination of |GroupCipherMask| values.
+   */
+  getGroupCipher()
+      generates (SupplicantStatus status, uint32_t groupCipherMask);
+
+  /**
+   * Get the pairwise cipher mask set for the network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
+   */
+  getPairwiseCipher()
+      generates (SupplicantStatus status, uint32_t pairwiseCipherMask);
+
+  /**
+   * Get passphrase for WPA_PSK network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return psk value set.
+   */
+  getPskPassphrase() generates (SupplicantStatus status, string psk);
+
+  /**
+   * Get WEP key for WEP network.
+   *
+   * @param keyIdx Index of wep key to be fetched.
+   *        Max of |WEP_KEYS_MAX_NUM|.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return wepKey value set.
+   */
+  getWepKey(uint32_t keyIdx)
+      generates (SupplicantStatus status, vec<uint8_t> wepKey);
+
+  /**
+   * Get default Tx key index for WEP network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return keyIdx value set.
+   */
+  getWepTxKeyIdx()
+      generates (SupplicantStatus status, uint32_t keyIdx);
+
+  /**
+   * Get whether RequirePmf is enabled for this network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return enabled true if set, false otherwise.
+   */
+  getRequirePmf() generates (SupplicantStatus status, bool enabled);
+
+  /**
+   * Enable the network for connection purposes.
+   *
+   * This must trigger a connection to the network if:
+   * a) |noConnect| is false, and
+   * b) This is the only network configured, and
+   * c) Is visible in the current scan results.
+   *
+   * @param noConnect Only enable the network, dont trigger a connect.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  enable(bool noConnect) generates (SupplicantStatus status);
+
+  /**
+   * Disable the network for connection purposes.
+   *
+   * This must trigger a disconnection from the network, if currently
+   * connected to this one.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  disable() generates (SupplicantStatus status);
+
+  /**
+   * Initiate connection to this network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  select() generates (SupplicantStatus status);
+
+  /**
+   * Used to send a response to the
+   * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request.
+   *
+   * @param params Params to be used for EAP GSM authentication.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  sendNetworkEapSimGsmAuthResponse(NetworkResponseEapSimGsmAuthParams params)
+      generates (SupplicantStatus status);
+
+  /**
+   * Used to send a response to the
+   * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
+   *
+   * @param params Params to be used for EAP UMTS authentication.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  sendNetworkEapSimUmtsAuthResponse(NetworkResponseEapSimUmtsAuthParams params)
+      generates (SupplicantStatus status);
+
+  /**
+   * Used to send a response to the
+   * |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request.
+   *
+   * @param identity Identity to be used for the network.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  sendNetworkEapIdentityResponse(vec<uint8_t> identity)
+      generates (SupplicantStatus status);
+};
diff --git a/wifi/supplicant/1.0/ISupplicantNetworkCallback.hal b/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.hal
similarity index 93%
rename from wifi/supplicant/1.0/ISupplicantNetworkCallback.hal
rename to wifi/supplicant/1.0/ISupplicantStaNetworkCallback.hal
index 9a5ddd5..2419dcc 100644
--- a/wifi/supplicant/1.0/ISupplicantNetworkCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.hal
@@ -18,13 +18,13 @@
 
 /**
  * Callback Interface exposed by the wpa_supplicant service
- * for each network (ISupplicantNetwork).
+ * for each network (ISupplicantStaNetwork).
  *
  * Clients need to host an instance of this HIDL interface object and
  * pass a reference of the object to wpa_supplicant via the
- * corresponding |ISupplicantNetwork.registerCallback| method.
+ * corresponding |ISupplicantStaNetwork.registerCallback| method.
  */
-interface ISupplicantNetworkCallback {
+interface ISupplicantStaNetworkCallback {
   /** Params of |onNetworkEapSimGsmAuthRequest| request. (Refer RFC 4186) */
   typedef uint8_t[16] GsmRand;
   struct NetworkRequestEapSimGsmAuthParams {
diff --git a/wifi/supplicant/1.0/types.hal b/wifi/supplicant/1.0/types.hal
index e9426a6..16a8d15 100644
--- a/wifi/supplicant/1.0/types.hal
+++ b/wifi/supplicant/1.0/types.hal
@@ -65,3 +65,11 @@
 
 /** Supplicant network ID type. */
 typedef uint32_t SupplicantNetworkId;
+
+/**
+ * List of Iface types supported.
+ */
+enum IfaceType : uint32_t {
+  STA,
+  P2P
+};