Merge "Remove --coverage in Android.bp"
diff --git a/CleanSpec.mk b/CleanSpec.mk
new file mode 100644
index 0000000..962f6cd
--- /dev/null
+++ b/CleanSpec.mk
@@ -0,0 +1,50 @@
+# Copyright 2017 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.
+#
+
+# If you don't need to do a full clean build but would like to touch
+# a file or delete some intermediate files, add a clean step to the end
+# of the list.  These steps will only be run once, if they haven't been
+# run before.
+#
+# E.g.:
+#     $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
+#     $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
+#
+# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
+# files that are missing or have been moved.
+#
+# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
+# Use $(OUT_DIR) to refer to the "out" directory.
+#
+# If you need to re-do something that's already mentioned, just copy
+# the command and add it to the bottom of the list.  E.g., if a change
+# that you made last week required touching a file and a change you
+# made today requires touching the same file, just copy the old
+# touch step and add it to the end of the list.
+#
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+# For example:
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
+#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
+#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
+
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/hw/android.hardware*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware*)
diff --git a/bluetooth/1.0/default/vendor_interface.cc b/bluetooth/1.0/default/vendor_interface.cc
index 7f14e68..7737dd2 100644
--- a/bluetooth/1.0/default/vendor_interface.cc
+++ b/bluetooth/1.0/default/vendor_interface.cc
@@ -414,6 +414,7 @@
                hci_packet_.data() + preamble_size_for_type[hci_packet_type_] +
                    hci_packet_bytes_read_,
                hci_packet_bytes_remaining_));
+      CHECK(bytes_read > 0);
       hci_packet_bytes_remaining_ -= bytes_read;
       hci_packet_bytes_read_ += bytes_read;
       if (hci_packet_bytes_remaining_ == 0) {
diff --git a/bluetooth/1.0/vts/BluetoothHci.vts b/bluetooth/1.0/vts/BluetoothHci.vts
index 1112371..348c0ab 100644
--- a/bluetooth/1.0/vts/BluetoothHci.vts
+++ b/bluetooth/1.0/vts/BluetoothHci.vts
@@ -6,18 +6,23 @@
 
 import: "android.hardware.bluetooth@1.0::IBluetoothHciCallbacks"
 import: "android.hardware.bluetooth@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
         name: "initialize"
-        return_type_hidl: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::bluetooth::V1_0::Status"
-        }
         arg: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IBluetoothHciCallbacks"
-            is_callback: false
+            predefined_type: "::android::hardware::bluetooth::V1_0::IBluetoothHciCallbacks"
+        }
+        callflow: {
+            entry: true
+        }
+        callflow: {
+            next: "sendHciCommand"
+            next: "sendAclData"
+            next: "sendScoData"
+            next: "close"
         }
     }
 
@@ -30,6 +35,12 @@
                 scalar_type: "uint8_t"
             }
         }
+        callflow: {
+            next: "sendHciCommand"
+            next: "sendAclData"
+            next: "sendScoData"
+            next: "close"
+        }
     }
 
     api: {
@@ -41,6 +52,12 @@
                 scalar_type: "uint8_t"
             }
         }
+        callflow: {
+            next: "sendHciCommand"
+            next: "sendAclData"
+            next: "sendScoData"
+            next: "close"
+        }
     }
 
     api: {
@@ -52,10 +69,19 @@
                 scalar_type: "uint8_t"
             }
         }
+        callflow: {
+            next: "sendHciCommand"
+            next: "sendAclData"
+            next: "sendScoData"
+            next: "close"
+        }
     }
 
     api: {
         name: "close"
+        callflow: {
+            exit: true
+        }
     }
 
 }
diff --git a/bluetooth/1.0/vts/BluetoothHciCallbacks.vts b/bluetooth/1.0/vts/BluetoothHciCallbacks.vts
index f2df5b4..6b3dfd4 100644
--- a/bluetooth/1.0/vts/BluetoothHciCallbacks.vts
+++ b/bluetooth/1.0/vts/BluetoothHciCallbacks.vts
@@ -5,9 +5,18 @@
 package: "android.hardware.bluetooth"
 
 import: "android.hardware.bluetooth@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
+        name: "initializationComplete"
+        arg: {
+            type: TYPE_ENUM
+            predefined_type: "::android::hardware::bluetooth::V1_0::Status"
+        }
+    }
+
+    api: {
         name: "hciEventReceived"
         arg: {
             type: TYPE_VECTOR
diff --git a/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp b/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp
index 683029e..eb1cdc1 100644
--- a/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp
+++ b/bluetooth/1.0/vts/functional/bluetooth_hidl_hal_test.cpp
@@ -122,9 +122,9 @@
   virtual void SetUp() override {
     // currently test passthrough mode only
     bluetooth = IBluetoothHci::getService();
+    ASSERT_NE(bluetooth, nullptr);
     ALOGW("%s: getService() for bluetooth is %s", __func__,
           bluetooth->isRemote() ? "remote" : "local");
-    ASSERT_NE(bluetooth, nullptr);
 
     bluetooth_cb = new BluetoothHciCallbacks(*this);
     ASSERT_NE(bluetooth_cb, nullptr);
diff --git a/boot/1.0/default/Android.mk b/boot/1.0/default/Android.mk
index be67779..99a6cf9 100644
--- a/boot/1.0/default/Android.mk
+++ b/boot/1.0/default/Android.mk
@@ -3,6 +3,7 @@
 include $(CLEAR_VARS)
 LOCAL_MODULE := android.hardware.boot@1.0-impl
 LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
 LOCAL_SRC_FILES := \
     BootControl.cpp \
 
@@ -19,6 +20,7 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
 LOCAL_MODULE := android.hardware.boot@1.0-service
 LOCAL_INIT_RC := android.hardware.boot@1.0-service.rc
 LOCAL_SRC_FILES := \
diff --git a/boot/1.0/default/android.hardware.boot@1.0-service.rc b/boot/1.0/default/android.hardware.boot@1.0-service.rc
index 67d400b..ef5dd91 100644
--- a/boot/1.0/default/android.hardware.boot@1.0-service.rc
+++ b/boot/1.0/default/android.hardware.boot@1.0-service.rc
@@ -1,4 +1,4 @@
-service boot-hal-1-0 /system/bin/hw/android.hardware.boot@1.0-service
+service boot-hal-1-0 /vendor/bin/hw/android.hardware.boot@1.0-service
     class hal
     user root
     group root
diff --git a/ir/1.0/default/Android.bp b/ir/1.0/default/Android.bp
index 7c441da..ed0b807 100644
--- a/ir/1.0/default/Android.bp
+++ b/ir/1.0/default/Android.bp
@@ -15,6 +15,7 @@
 cc_library_shared {
     name: "android.hardware.ir@1.0-impl",
     relative_install_path: "hw",
+    proprietary: true,
     srcs: ["ConsumerIr.cpp"],
     shared_libs: [
         "libhidlbase",
@@ -30,6 +31,7 @@
 cc_binary {
     relative_install_path: "hw",
     name: "android.hardware.ir@1.0-service",
+    proprietary: true,
     init_rc: ["android.hardware.ir@1.0-service.rc"],
     srcs: ["service.cpp"],
 
diff --git a/ir/1.0/default/android.hardware.ir@1.0-service.rc b/ir/1.0/default/android.hardware.ir@1.0-service.rc
index 5b05ba2..47f34fe 100644
--- a/ir/1.0/default/android.hardware.ir@1.0-service.rc
+++ b/ir/1.0/default/android.hardware.ir@1.0-service.rc
@@ -1,4 +1,4 @@
-service ir-hal-1-0 /system/bin/hw/android.hardware.ir@1.0-service
+service ir-hal-1-0 /vendor/bin/hw/android.hardware.ir@1.0-service
     class hal
     user system
     group system
\ No newline at end of file
diff --git a/ir/1.0/vts/ConsumerIr.vts b/ir/1.0/vts/ConsumerIr.vts
index bebc6cf..c31331e 100644
--- a/ir/1.0/vts/ConsumerIr.vts
+++ b/ir/1.0/vts/ConsumerIr.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.ir"
 
 import: "android.hardware.ir@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
diff --git a/ir/1.0/vts/types.vts b/ir/1.0/vts/types.vts
index d308b1f..f1e9cbe 100644
--- a/ir/1.0/vts/types.vts
+++ b/ir/1.0/vts/types.vts
@@ -18,4 +18,5 @@
         type: TYPE_SCALAR
         scalar_type: "uint32_t"
     }
-}
\ No newline at end of file
+}
+
diff --git a/nfc/1.0/default/Android.bp b/nfc/1.0/default/Android.bp
index b484ba6..02f5664 100644
--- a/nfc/1.0/default/Android.bp
+++ b/nfc/1.0/default/Android.bp
@@ -1,6 +1,7 @@
 cc_library_shared {
     name: "android.hardware.nfc@1.0-impl",
     relative_install_path: "hw",
+    proprietary: true,
     srcs: ["Nfc.cpp"],
     shared_libs: [
         "liblog",
diff --git a/nfc/1.0/default/Android.mk b/nfc/1.0/default/Android.mk
index a6c7d5c..fbb340f 100644
--- a/nfc/1.0/default/Android.mk
+++ b/nfc/1.0/default/Android.mk
@@ -2,6 +2,7 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
 LOCAL_MODULE := android.hardware.nfc@1.0-service
 LOCAL_INIT_RC := android.hardware.nfc@1.0-service.rc
 LOCAL_SRC_FILES := \
@@ -22,4 +23,5 @@
 	libhidltransport \
 	android.hardware.nfc@1.0 \
 
+
 include $(BUILD_EXECUTABLE)
diff --git a/nfc/1.0/default/android.hardware.nfc@1.0-service.rc b/nfc/1.0/default/android.hardware.nfc@1.0-service.rc
index 7b67577..c9b8014 100644
--- a/nfc/1.0/default/android.hardware.nfc@1.0-service.rc
+++ b/nfc/1.0/default/android.hardware.nfc@1.0-service.rc
@@ -1,4 +1,4 @@
-service nfc_hal_service /system/bin/hw/android.hardware.nfc@1.0-service
+service nfc_hal_service /vendor/bin/hw/android.hardware.nfc@1.0-service
     class hal
     user nfc
     group nfc
diff --git a/nfc/1.0/vts/Nfc.vts b/nfc/1.0/vts/Nfc.vts
index 9261a60..48b2750 100644
--- a/nfc/1.0/vts/Nfc.vts
+++ b/nfc/1.0/vts/Nfc.vts
@@ -6,6 +6,7 @@
 
 import: "android.hardware.nfc@1.0::INfcClientCallback"
 import: "android.hardware.nfc@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
@@ -16,8 +17,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "INfcClientCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::nfc::V1_0::INfcClientCallback"
         }
         callflow: {
             entry: true
@@ -87,13 +87,6 @@
             next: "powerCycle"
             next: "controlGranted"
         }
-        callflow: {
-            next: "write"
-            next: "close"
-            next: "coreInitialized"
-            next: "powerCycle"
-            next: "controlGranted"
-        }
     }
 
     api: {
@@ -105,9 +98,6 @@
         callflow: {
             exit: true
         }
-        callflow: {
-            exit: true
-        }
     }
 
     api: {
@@ -123,13 +113,6 @@
             next: "coreInitialized"
             next: "powerCycle"
         }
-        callflow: {
-            next: "write"
-            next: "close"
-            next: "prediscover"
-            next: "coreInitialized"
-            next: "powerCycle"
-        }
     }
 
     api: {
@@ -145,13 +128,6 @@
             next: "controlGranted"
             next: "close"
         }
-        callflow: {
-            next: "write"
-            next: "coreInitialized"
-            next: "prediscover"
-            next: "controlGranted"
-            next: "close"
-        }
     }
 
 }
diff --git a/nfc/1.0/vts/NfcClientCallback.vts b/nfc/1.0/vts/NfcClientCallback.vts
index e39ea7c..b06f12b 100644
--- a/nfc/1.0/vts/NfcClientCallback.vts
+++ b/nfc/1.0/vts/NfcClientCallback.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.nfc"
 
 import: "android.hardware.nfc@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
diff --git a/radio/1.0/IRadioResponse.hal b/radio/1.0/IRadioResponse.hal
index 538c06d..dafd264 100644
--- a/radio/1.0/IRadioResponse.hal
+++ b/radio/1.0/IRadioResponse.hal
@@ -1562,6 +1562,16 @@
 
     /*
      * @param info Response info struct containing response type, serial no. and error
+     *
+     * Valid errors returned:
+     *   RadioError:NONE
+     *   RadioError:RADIO_NOT_AVAILABLE
+     *   RadioError:GENERIC_FAILURE
+     */
+    oneway reportStkServiceIsRunningResponse(RadioResponseInfo info);
+
+    /*
+     * @param info Response info struct containing response type, serial no. and error
      * @param source CDMA subscription source
      *
      * Valid errors returned:
diff --git a/radio/1.0/vts/Radio.vts b/radio/1.0/vts/Radio.vts
index c3d998a..74bdb8d 100644
--- a/radio/1.0/vts/Radio.vts
+++ b/radio/1.0/vts/Radio.vts
@@ -7,19 +7,18 @@
 import: "android.hardware.radio@1.0::IRadioIndication"
 import: "android.hardware.radio@1.0::IRadioResponse"
 import: "android.hardware.radio@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
         name: "setResponseFunctions"
         arg: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IRadioResponse"
-            is_callback: false
+            predefined_type: "::android::hardware::radio::V1_0::IRadioResponse"
         }
         arg: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IRadioIndication"
-            is_callback: false
+            predefined_type: "::android::hardware::radio::V1_0::IRadioIndication"
         }
     }
 
@@ -315,28 +314,20 @@
             scalar_type: "int32_t"
         }
         arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "int32_t"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
             type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::ApnAuthType"
+            predefined_type: "::android::hardware::radio::V1_0::RadioTechnology"
         }
         arg: {
-            type: TYPE_STRING
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::radio::V1_0::DataProfileInfo"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
         }
     }
 
@@ -1198,20 +1189,12 @@
             scalar_type: "int32_t"
         }
         arg: {
-            type: TYPE_STRING
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::radio::V1_0::DataProfileInfo"
         }
         arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_ENUM
-            predefined_type: "::android::hardware::radio::V1_0::ApnAuthType"
-        }
-        arg: {
-            type: TYPE_STRING
-        }
-        arg: {
-            type: TYPE_STRING
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
         }
     }
 
@@ -1491,6 +1474,35 @@
     }
 
     api: {
+        name: "sendDeviceState"
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "int32_t"
+        }
+        arg: {
+            type: TYPE_ENUM
+            predefined_type: "::android::hardware::radio::V1_0::DeviceStateType"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
+        }
+    }
+
+    api: {
+        name: "setIndicationFilter"
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "int32_t"
+        }
+        arg: {
+            type: TYPE_MASK
+            scalar_type: "int32_t"
+            predefined_type: "::android::hardware::radio::V1_0::IndicationFilter"
+        }
+    }
+
+    api: {
         name: "responseAcknowledgement"
     }
 
diff --git a/radio/1.0/vts/RadioIndication.vts b/radio/1.0/vts/RadioIndication.vts
index fac73a9..cce8ada 100644
--- a/radio/1.0/vts/RadioIndication.vts
+++ b/radio/1.0/vts/RadioIndication.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.radio"
 
 import: "android.hardware.radio@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
@@ -28,7 +29,7 @@
     }
 
     api: {
-        name: "voiceNetworkStateChanged"
+        name: "networkStateChanged"
         arg: {
             type: TYPE_ENUM
             predefined_type: "::android::hardware::radio::V1_0::RadioIndicationType"
diff --git a/radio/1.0/vts/RadioResponse.vts b/radio/1.0/vts/RadioResponse.vts
index 2884d30..99c953c 100644
--- a/radio/1.0/vts/RadioResponse.vts
+++ b/radio/1.0/vts/RadioResponse.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.radio"
 
 import: "android.hardware.radio@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
@@ -1372,6 +1373,22 @@
     }
 
     api: {
+        name: "sendDeviceStateResponse"
+        arg: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
+        }
+    }
+
+    api: {
+        name: "setIndicationFilterResponse"
+        arg: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
+        }
+    }
+
+    api: {
         name: "acknowledgeRequest"
         arg: {
             type: TYPE_SCALAR
diff --git a/radio/1.0/vts/Sap.vts b/radio/1.0/vts/Sap.vts
index 23205d0..b4983da 100644
--- a/radio/1.0/vts/Sap.vts
+++ b/radio/1.0/vts/Sap.vts
@@ -6,14 +6,14 @@
 
 import: "android.hardware.radio@1.0::ISapCallback"
 import: "android.hardware.radio@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
         name: "setCallback"
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "ISapCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::radio::V1_0::ISapCallback"
         }
     }
 
diff --git a/radio/1.0/vts/SapCallback.vts b/radio/1.0/vts/SapCallback.vts
index 2e61ce6..3a33dba 100644
--- a/radio/1.0/vts/SapCallback.vts
+++ b/radio/1.0/vts/SapCallback.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.radio"
 
 import: "android.hardware.radio@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
diff --git a/radio/1.0/vts/types.vts b/radio/1.0/vts/types.vts
index cec9b6d..6d42016 100644
--- a/radio/1.0/vts/types.vts
+++ b/radio/1.0/vts/types.vts
@@ -1817,7 +1817,7 @@
 }
 
 attribute: {
-    name: "::android::hardware::radio::V1_0::DataProfile"
+    name: "::android::hardware::radio::V1_0::DataProfileId"
     type: TYPE_ENUM
     enum_value: {
         scalar_type: "int32_t"
@@ -1859,7 +1859,7 @@
     enum_value: {
         scalar_type: "int32_t"
 
-        enumerator: "MEMORY_CAPAPCITY_EXCEEDED"
+        enumerator: "MEMORY_CAPACITY_EXCEEDED"
         scalar_value: {
             int32_t: 211
         }
@@ -1913,7 +1913,7 @@
         scalar_value: {
             int32_t: 1
         }
-        enumerator: "UNKOWN"
+        enumerator: "UNKNOWN"
         scalar_value: {
             int32_t: 2
         }
@@ -2406,7 +2406,7 @@
         scalar_value: {
             int32_t: 1
         }
-        enumerator: "FACORY_RESET"
+        enumerator: "FACTORY_RESET"
         scalar_value: {
             int32_t: 2
         }
@@ -2730,23 +2730,23 @@
 
         enumerator: "GSM"
         scalar_value: {
-            int32_t: 0
+            int32_t: 1
         }
         enumerator: "CDMA"
         scalar_value: {
-            int32_t: 1
+            int32_t: 2
         }
         enumerator: "LTE"
         scalar_value: {
-            int32_t: 2
+            int32_t: 3
         }
         enumerator: "WCDMA"
         scalar_value: {
-            int32_t: 3
+            int32_t: 4
         }
         enumerator: "TD_SCDMA"
         scalar_value: {
-            int32_t: 4
+            int32_t: 5
         }
     }
 }
@@ -3551,6 +3551,138 @@
 }
 
 attribute: {
+    name: "::android::hardware::radio::V1_0::ApnTypes"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "DEFAULT"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "MMS"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "SUPL"
+        scalar_value: {
+            int32_t: 4
+        }
+        enumerator: "DUN"
+        scalar_value: {
+            int32_t: 8
+        }
+        enumerator: "HIPRI"
+        scalar_value: {
+            int32_t: 16
+        }
+        enumerator: "FOTA"
+        scalar_value: {
+            int32_t: 32
+        }
+        enumerator: "IMS"
+        scalar_value: {
+            int32_t: 64
+        }
+        enumerator: "CBS"
+        scalar_value: {
+            int32_t: 128
+        }
+        enumerator: "IA"
+        scalar_value: {
+            int32_t: 256
+        }
+        enumerator: "EMERGENCY"
+        scalar_value: {
+            int32_t: 512
+        }
+        enumerator: "ALL"
+        scalar_value: {
+            int32_t: 1023
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::radio::V1_0::IndicationFilter"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "SIGNAL_STRENGTH"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "FULL_NETWORK_STATE"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "DATA_CALL_DORMANCY_CHANGED"
+        scalar_value: {
+            int32_t: 4
+        }
+        enumerator: "ALL"
+        scalar_value: {
+            int32_t: 7
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::radio::V1_0::MvnoType"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "NONE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "IMSI"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "GID"
+        scalar_value: {
+            int32_t: 2
+        }
+        enumerator: "SPN"
+        scalar_value: {
+            int32_t: 3
+        }
+    }
+}
+
+attribute: {
+    name: "::android::hardware::radio::V1_0::DeviceStateType"
+    type: TYPE_ENUM
+    enum_value: {
+        scalar_type: "int32_t"
+
+        enumerator: "POWER_SAVE_MODE"
+        scalar_value: {
+            int32_t: 0
+        }
+        enumerator: "CHARGING_STATE"
+        scalar_value: {
+            int32_t: 1
+        }
+        enumerator: "LOW_DATA_EXPECTED"
+        scalar_value: {
+            int32_t: 2
+        }
+    }
+}
+
+attribute: {
     name: "::android::hardware::radio::V1_0::RadioResponseInfo"
     type: TYPE_STRUCT
     struct_value: {
@@ -4528,7 +4660,7 @@
         scalar_type: "int32_t"
     }
     struct_value: {
-        name: "basestationId"
+        name: "baseStationId"
         type: TYPE_SCALAR
         scalar_type: "int32_t"
     }
@@ -4956,8 +5088,8 @@
     type: TYPE_STRUCT
     struct_value: {
         name: "profileId"
-        type: TYPE_SCALAR
-        scalar_type: "int32_t"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::radio::V1_0::DataProfileId"
     }
     struct_value: {
         name: "apn"
@@ -4968,6 +5100,10 @@
         type: TYPE_STRING
     }
     struct_value: {
+        name: "roamingProtocol"
+        type: TYPE_STRING
+    }
+    struct_value: {
         name: "authType"
         type: TYPE_ENUM
         predefined_type: "::android::hardware::radio::V1_0::ApnAuthType"
@@ -5005,6 +5141,32 @@
         type: TYPE_SCALAR
         scalar_type: "bool_t"
     }
+    struct_value: {
+        name: "supportedApnTypesBitmap"
+        type: TYPE_MASK
+        scalar_type: "int32_t"
+        predefined_type: "::android::hardware::radio::V1_0::ApnTypes"
+    }
+    struct_value: {
+        name: "bearerBitmap"
+        type: TYPE_MASK
+        scalar_type: "int32_t"
+        predefined_type: "::android::hardware::radio::V1_0::RadioAccessFamily"
+    }
+    struct_value: {
+        name: "mtu"
+        type: TYPE_SCALAR
+        scalar_type: "int32_t"
+    }
+    struct_value: {
+        name: "mvnoType"
+        type: TYPE_ENUM
+        predefined_type: "::android::hardware::radio::V1_0::MvnoType"
+    }
+    struct_value: {
+        name: "mvnoMatchData"
+        type: TYPE_STRING
+    }
 }
 
 attribute: {
@@ -5022,7 +5184,8 @@
     }
     struct_value: {
         name: "raf"
-        type: TYPE_ENUM
+        type: TYPE_MASK
+        scalar_type: "int32_t"
         predefined_type: "::android::hardware::radio::V1_0::RadioAccessFamily"
     }
     struct_value: {
@@ -5087,8 +5250,8 @@
     struct_value: {
         name: "txmModetimeMs"
         type: TYPE_ARRAY
+        vector_size: 5
         vector_value: {
-            vector_size: 5
             type: TYPE_SCALAR
             scalar_type: "uint32_t"
         }
@@ -5238,7 +5401,7 @@
         predefined_type: "::android::hardware::radio::V1_0::CdmaSignalInfoRecord"
     }
     struct_value: {
-        name: "numbertype"
+        name: "numberType"
         type: TYPE_ENUM
         predefined_type: "::android::hardware::radio::V1_0::CdmaCallWaitingNumberType"
     }
@@ -5477,7 +5640,8 @@
     }
     struct_value: {
         name: "serviceClass"
-        type: TYPE_ENUM
+        type: TYPE_MASK
+        scalar_type: "int32_t"
         predefined_type: "::android::hardware::radio::V1_0::SuppServiceClass"
     }
     struct_value: {
diff --git a/tests/Android.bp b/tests/Android.bp
index 8b3e8b1..337e4f4 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -17,4 +17,7 @@
     "pointer/1.0",
     "pointer/1.0/default",
     "pointer/1.0/default/lib",
+    "versioning/1.0",
+    "versioning/2.2",
+    "versioning/2.3",
 ]
diff --git a/tests/bar/1.0/default/Android.bp b/tests/bar/1.0/default/Android.bp
index 7e349c2..2c79357 100644
--- a/tests/bar/1.0/default/Android.bp
+++ b/tests/bar/1.0/default/Android.bp
@@ -3,6 +3,7 @@
 cc_library_shared {
     name: "android.hardware.tests.bar@1.0-impl",
     relative_install_path: "hw",
+    proprietary: true,
     srcs: [
         "Bar.cpp",
         "ImportTypes.cpp",
diff --git a/tests/foo/1.0/default/Android.bp b/tests/foo/1.0/default/Android.bp
index 952f25d..f4a80d5 100644
--- a/tests/foo/1.0/default/Android.bp
+++ b/tests/foo/1.0/default/Android.bp
@@ -3,6 +3,7 @@
 cc_library_shared {
     name: "android.hardware.tests.foo@1.0-impl",
     relative_install_path: "hw",
+    proprietary: true,
     srcs: [
         "Foo.cpp",
     ],
diff --git a/tests/inheritance/1.0/default/Android.bp b/tests/inheritance/1.0/default/Android.bp
index 638d3a4..090c36e 100644
--- a/tests/inheritance/1.0/default/Android.bp
+++ b/tests/inheritance/1.0/default/Android.bp
@@ -3,6 +3,7 @@
 cc_library_shared {
     name: "android.hardware.tests.inheritance@1.0-impl",
     relative_install_path: "hw",
+    proprietary: true,
     srcs: [
         "Fetcher.cpp",
         "Parent.cpp",
diff --git a/tests/libhwbinder/1.0/default/Android.bp b/tests/libhwbinder/1.0/default/Android.bp
index 73dcc61..0edabfc 100644
--- a/tests/libhwbinder/1.0/default/Android.bp
+++ b/tests/libhwbinder/1.0/default/Android.bp
@@ -1,6 +1,7 @@
 cc_library_shared {
     name: "android.hardware.tests.libhwbinder@1.0-impl",
     relative_install_path: "hw",
+    proprietary: true,
     srcs: [
         "Benchmark.cpp",
     ],
diff --git a/tests/memory/1.0/default/Android.bp b/tests/memory/1.0/default/Android.bp
index bde7c03..14dc08d 100644
--- a/tests/memory/1.0/default/Android.bp
+++ b/tests/memory/1.0/default/Android.bp
@@ -14,6 +14,7 @@
 
 cc_library_shared {
     name: "android.hardware.tests.memory@1.0-impl",
+    proprietary: true,
     relative_install_path: "hw",
     srcs: [
         "MemoryTest.cpp",
diff --git a/tests/pointer/1.0/default/Android.bp b/tests/pointer/1.0/default/Android.bp
index f7180f1..ab7f8fa 100644
--- a/tests/pointer/1.0/default/Android.bp
+++ b/tests/pointer/1.0/default/Android.bp
@@ -3,6 +3,7 @@
 cc_library_shared {
     name: "android.hardware.tests.pointer@1.0-impl",
     relative_install_path: "hw",
+    proprietary: true,
     srcs: [
         "Graph.cpp",
         "Pointer.cpp",
diff --git a/tests/versioning/1.0/Android.bp b/tests/versioning/1.0/Android.bp
new file mode 100644
index 0000000..fd331f2
--- /dev/null
+++ b/tests/versioning/1.0/Android.bp
@@ -0,0 +1,59 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hardware.tests.versioning@1.0_hal",
+    srcs: [
+        "IFoo.hal",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tests.versioning@1.0_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.versioning@1.0",
+    srcs: [
+        "IFoo.hal",
+    ],
+    out: [
+        "android/hardware/tests/versioning/1.0/FooAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tests.versioning@1.0_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.versioning@1.0",
+    srcs: [
+        "IFoo.hal",
+    ],
+    out: [
+        "android/hardware/tests/versioning/1.0/IFoo.h",
+        "android/hardware/tests/versioning/1.0/IHwFoo.h",
+        "android/hardware/tests/versioning/1.0/BnHwFoo.h",
+        "android/hardware/tests/versioning/1.0/BpHwFoo.h",
+        "android/hardware/tests/versioning/1.0/BsFoo.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.tests.versioning@1.0",
+    generated_sources: ["android.hardware.tests.versioning@1.0_genc++"],
+    generated_headers: ["android.hardware.tests.versioning@1.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.tests.versioning@1.0_genc++_headers"],
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "android.hidl.base@1.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hidl.base@1.0",
+    ],
+}
diff --git a/tests/versioning/1.0/Android.mk b/tests/versioning/1.0/Android.mk
new file mode 100644
index 0000000..753ad0c
--- /dev/null
+++ b/tests/versioning/1.0/Android.mk
@@ -0,0 +1,76 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tests.versioning@1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+    android.hidl.base@1.0-java \
+
+
+#
+# Build IFoo.hal
+#
+GEN := $(intermediates)/android/hardware/tests/versioning/V1_0/IFoo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IFoo.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.versioning@1.0::IFoo
+
+$(GEN): $(LOCAL_PATH)/IFoo.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tests.versioning@1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android.hidl.base@1.0-java-static \
+
+
+#
+# Build IFoo.hal
+#
+GEN := $(intermediates)/android/hardware/tests/versioning/V1_0/IFoo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IFoo.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.versioning@1.0::IFoo
+
+$(GEN): $(LOCAL_PATH)/IFoo.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/versioning/1.0/IFoo.hal b/tests/versioning/1.0/IFoo.hal
new file mode 100644
index 0000000..0571eff
--- /dev/null
+++ b/tests/versioning/1.0/IFoo.hal
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 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.tests.versioning@1.0;
+
+interface IFoo {
+};
diff --git a/tests/versioning/2.2/Android.bp b/tests/versioning/2.2/Android.bp
new file mode 100644
index 0000000..5e90105
--- /dev/null
+++ b/tests/versioning/2.2/Android.bp
@@ -0,0 +1,68 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hardware.tests.versioning@2.2_hal",
+    srcs: [
+        "IBar.hal",
+        "IFoo.hal",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tests.versioning@2.2_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.versioning@2.2",
+    srcs: [
+        "IBar.hal",
+        "IFoo.hal",
+    ],
+    out: [
+        "android/hardware/tests/versioning/2.2/BarAll.cpp",
+        "android/hardware/tests/versioning/2.2/FooAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tests.versioning@2.2_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.versioning@2.2",
+    srcs: [
+        "IBar.hal",
+        "IFoo.hal",
+    ],
+    out: [
+        "android/hardware/tests/versioning/2.2/IBar.h",
+        "android/hardware/tests/versioning/2.2/IHwBar.h",
+        "android/hardware/tests/versioning/2.2/BnHwBar.h",
+        "android/hardware/tests/versioning/2.2/BpHwBar.h",
+        "android/hardware/tests/versioning/2.2/BsBar.h",
+        "android/hardware/tests/versioning/2.2/IFoo.h",
+        "android/hardware/tests/versioning/2.2/IHwFoo.h",
+        "android/hardware/tests/versioning/2.2/BnHwFoo.h",
+        "android/hardware/tests/versioning/2.2/BpHwFoo.h",
+        "android/hardware/tests/versioning/2.2/BsFoo.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.tests.versioning@2.2",
+    generated_sources: ["android.hardware.tests.versioning@2.2_genc++"],
+    generated_headers: ["android.hardware.tests.versioning@2.2_genc++_headers"],
+    export_generated_headers: ["android.hardware.tests.versioning@2.2_genc++_headers"],
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "android.hidl.base@1.0",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hidl.base@1.0",
+    ],
+}
diff --git a/tests/versioning/2.2/Android.mk b/tests/versioning/2.2/Android.mk
new file mode 100644
index 0000000..6376652
--- /dev/null
+++ b/tests/versioning/2.2/Android.mk
@@ -0,0 +1,114 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tests.versioning@2.2-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+    android.hidl.base@1.0-java \
+
+
+#
+# Build IBar.hal
+#
+GEN := $(intermediates)/android/hardware/tests/versioning/V2_2/IBar.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBar.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.versioning@2.2::IBar
+
+$(GEN): $(LOCAL_PATH)/IBar.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IFoo.hal
+#
+GEN := $(intermediates)/android/hardware/tests/versioning/V2_2/IFoo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IFoo.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.versioning@2.2::IFoo
+
+$(GEN): $(LOCAL_PATH)/IFoo.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tests.versioning@2.2-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android.hidl.base@1.0-java-static \
+
+
+#
+# Build IBar.hal
+#
+GEN := $(intermediates)/android/hardware/tests/versioning/V2_2/IBar.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBar.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.versioning@2.2::IBar
+
+$(GEN): $(LOCAL_PATH)/IBar.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IFoo.hal
+#
+GEN := $(intermediates)/android/hardware/tests/versioning/V2_2/IFoo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IFoo.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.versioning@2.2::IFoo
+
+$(GEN): $(LOCAL_PATH)/IFoo.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/versioning/2.2/IBar.hal b/tests/versioning/2.2/IBar.hal
new file mode 100644
index 0000000..e28ce19
--- /dev/null
+++ b/tests/versioning/2.2/IBar.hal
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 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.tests.versioning@2.2;
+
+interface IBar {
+
+};
diff --git a/tests/versioning/2.2/IFoo.hal b/tests/versioning/2.2/IFoo.hal
new file mode 100644
index 0000000..d6b8782
--- /dev/null
+++ b/tests/versioning/2.2/IFoo.hal
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 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.tests.versioning@2.2;
+
+interface IFoo {
+
+};
diff --git a/tests/versioning/2.3/Android.bp b/tests/versioning/2.3/Android.bp
new file mode 100644
index 0000000..1489539
--- /dev/null
+++ b/tests/versioning/2.3/Android.bp
@@ -0,0 +1,68 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+    name: "android.hardware.tests.versioning@2.3_hal",
+    srcs: [
+        "IBar.hal",
+        "IFoo.hal",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tests.versioning@2.3_genc++",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.versioning@2.3",
+    srcs: [
+        "IBar.hal",
+        "IFoo.hal",
+    ],
+    out: [
+        "android/hardware/tests/versioning/2.3/BarAll.cpp",
+        "android/hardware/tests/versioning/2.3/FooAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tests.versioning@2.3_genc++_headers",
+    tools: ["hidl-gen"],
+    cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.tests.versioning@2.3",
+    srcs: [
+        "IBar.hal",
+        "IFoo.hal",
+    ],
+    out: [
+        "android/hardware/tests/versioning/2.3/IBar.h",
+        "android/hardware/tests/versioning/2.3/IHwBar.h",
+        "android/hardware/tests/versioning/2.3/BnHwBar.h",
+        "android/hardware/tests/versioning/2.3/BpHwBar.h",
+        "android/hardware/tests/versioning/2.3/BsBar.h",
+        "android/hardware/tests/versioning/2.3/IFoo.h",
+        "android/hardware/tests/versioning/2.3/IHwFoo.h",
+        "android/hardware/tests/versioning/2.3/BnHwFoo.h",
+        "android/hardware/tests/versioning/2.3/BpHwFoo.h",
+        "android/hardware/tests/versioning/2.3/BsFoo.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.tests.versioning@2.3",
+    generated_sources: ["android.hardware.tests.versioning@2.3_genc++"],
+    generated_headers: ["android.hardware.tests.versioning@2.3_genc++_headers"],
+    export_generated_headers: ["android.hardware.tests.versioning@2.3_genc++_headers"],
+    shared_libs: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "liblog",
+        "libutils",
+        "libcutils",
+        "android.hardware.tests.versioning@2.2",
+    ],
+    export_shared_lib_headers: [
+        "libhidlbase",
+        "libhidltransport",
+        "libhwbinder",
+        "libutils",
+        "android.hardware.tests.versioning@2.2",
+    ],
+}
diff --git a/tests/versioning/2.3/Android.mk b/tests/versioning/2.3/Android.mk
new file mode 100644
index 0000000..5b05152
--- /dev/null
+++ b/tests/versioning/2.3/Android.mk
@@ -0,0 +1,116 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tests.versioning@2.3-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+    android.hardware.tests.versioning@2.2-java \
+    android.hidl.base@1.0-java \
+
+
+#
+# Build IBar.hal
+#
+GEN := $(intermediates)/android/hardware/tests/versioning/V2_3/IBar.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBar.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.versioning@2.3::IBar
+
+$(GEN): $(LOCAL_PATH)/IBar.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IFoo.hal
+#
+GEN := $(intermediates)/android/hardware/tests/versioning/V2_3/IFoo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IFoo.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.versioning@2.3::IFoo
+
+$(GEN): $(LOCAL_PATH)/IFoo.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tests.versioning@2.3-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+    android.hardware.tests.versioning@2.2-java-static \
+    android.hidl.base@1.0-java-static \
+
+
+#
+# Build IBar.hal
+#
+GEN := $(intermediates)/android/hardware/tests/versioning/V2_3/IBar.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IBar.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.versioning@2.3::IBar
+
+$(GEN): $(LOCAL_PATH)/IBar.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IFoo.hal
+#
+GEN := $(intermediates)/android/hardware/tests/versioning/V2_3/IFoo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IFoo.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.tests.versioning@2.3::IFoo
+
+$(GEN): $(LOCAL_PATH)/IFoo.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/versioning/2.3/IBar.hal b/tests/versioning/2.3/IBar.hal
new file mode 100644
index 0000000..946d42e
--- /dev/null
+++ b/tests/versioning/2.3/IBar.hal
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 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.tests.versioning@2.3;
+
+import @2.2::IBar;
+
+// Must extend @2.3::IBar.
+interface IBar extends @2.2::IBar {
+
+};
diff --git a/tests/versioning/2.3/IFoo.hal b/tests/versioning/2.3/IFoo.hal
new file mode 100644
index 0000000..c450dd2
--- /dev/null
+++ b/tests/versioning/2.3/IFoo.hal
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 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.tests.versioning@2.3;
+
+import @2.2::IFoo;
+
+// Must extend @2.3::IFoo.
+interface IFoo extends @2.2::IFoo {
+
+};
diff --git a/wifi/1.0/IWifiNanIface.hal b/wifi/1.0/IWifiNanIface.hal
index 450fba0..d1d4ca5 100644
--- a/wifi/1.0/IWifiNanIface.hal
+++ b/wifi/1.0/IWifiNanIface.hal
@@ -21,6 +21,9 @@
 
 /**
  * Interface used to represent a single NAN(Neighbour Aware Network) iface.
+ *
+ * References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness
+ * Networking (NAN) Technical Specification".
  */
 interface IWifiNanIface extends IWifiIface {
   /**
@@ -39,7 +42,8 @@
       generates (WifiStatus status);
 
   /**
-   * Get NAN capabilities.
+   * Get NAN capabilities. Asynchronous response is with
+   * |IWifiNanIfaceEventCallback.notifyCapabilitiesResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @return status WifiStatus of the operation.
@@ -53,8 +57,9 @@
   /**
    * Enable NAN: configures and activates NAN clustering (does not start
    * a discovery session or set up data-interfaces or data-paths). Use the
-   * |configureRequest| method to change the configuration of an already enabled
+   * |IWifiNanIface.configureRequest| method to change the configuration of an already enabled
    * NAN interface.
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyEnableResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @param msg Instance of |NanEnableRequest|.
@@ -70,7 +75,8 @@
 
   /**
    * Configure NAN: configures an existing NAN functionality (i.e. assumes
-   * |enableRequest| already submitted and succeeded).
+   * |IWifiNanIface.enableRequest| already submitted and succeeded).
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyConfigResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @param msg Instance of |NanConfigRequest|.
@@ -86,6 +92,7 @@
 
   /**
    * Disable NAN functionality.
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyDisableResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @return status WifiStatus of the operation.
@@ -98,6 +105,7 @@
 
   /**
    * Publish request to start advertising a discovery service.
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStartPublishResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @param msg Instance of |NanPublishRequest|.
@@ -113,6 +121,7 @@
 
   /**
    * Stop publishing a discovery service.
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStopPublishResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @param sessionId ID of the publish discovery session to be stopped.
@@ -127,6 +136,7 @@
 
   /**
    * Subscribe request to start searching for a discovery service.
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStartSubscribeResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @param msg Instance of |NanSubscribeRequest|.
@@ -142,6 +152,7 @@
 
   /**
    * Stop subscribing to a discovery service.
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyStopSubscribeResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @param sessionId ID of the subscribe discovery session to be stopped.
@@ -156,6 +167,7 @@
 
   /**
    * NAN transmit follow up message request.
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyTransmitFollowupResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @param msg Instance of |NanTransmitFollowupRequest|.
@@ -171,6 +183,7 @@
 
   /**
    * Create a NAN Data Interface.
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyCreateDataInterfaceResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @return status WifiStatus of the operation.
@@ -184,6 +197,7 @@
 
   /**
    * Delete a NAN Data Interface.
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyDeleteDataInterfaceResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @return status WifiStatus of the operation.
@@ -197,6 +211,7 @@
 
   /**
    * Initiate a data-path (NDP) setup operation: Initiator.
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyInitiateDataPathResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @param msg Instance of |NanInitiateDataPathRequest|.
@@ -213,6 +228,8 @@
   /**
    * Respond to a received data indication as part of a data-path (NDP) setup operation. An
    * indication is received by the Responder from the Initiator.
+   * Asynchronous response is with
+   * |IWifiNanIfaceEventCallback.notifyRespondToDataPathIndicationResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @param msg Instance of |NanRespondToDataPathIndicationRequest|.
@@ -229,6 +246,7 @@
 
   /**
    * Data-path (NDP) termination request: executed by either Initiator or Responder.
+   * Asynchronous response is with |IWifiNanIfaceEventCallback.notifyTerminateDataPathResponse|.
    *
    * @param cmdId command Id to use for this invocation.
    * @param ndpInstanceId Data-path instance ID to be terminated.
diff --git a/wifi/1.0/IWifiNanIfaceEventCallback.hal b/wifi/1.0/IWifiNanIfaceEventCallback.hal
index c9fea8f..80d67ce 100644
--- a/wifi/1.0/IWifiNanIfaceEventCallback.hal
+++ b/wifi/1.0/IWifiNanIfaceEventCallback.hal
@@ -18,10 +18,19 @@
 
 /**
  * NAN Response and Asynchronous Event Callbacks.
+ *
+ * References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness
+ * Networking (NAN) Technical Specification".
  */
 interface IWifiNanIfaceEventCallback {
   /**
-   * Callback invoked in response to a capability request |getCapabilitiesRequest|.
+   * Notify callbacks are asynchronous callbacks - but in response to |IWifiNanIface| method calls.
+   * Each method will receive a notify callback to return results (on success) or failure status.
+   */
+
+  /**
+   * Asynchronous callback invoked in response to a capability request
+   * |IWifiNanIface.getCapabilitiesRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -32,7 +41,7 @@
                                     NanCapabilities capabilities);
 
   /**
-   * Callback invoked in response to an enable request |enableRequest|.
+   * Asynchronous callback invoked in response to an enable request |IWifiNanIface.enableRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -46,7 +55,7 @@
   oneway notifyEnableResponse(CommandIdShort id, WifiNanStatus status);
 
   /**
-   * Callback invoked in response to a config request |configRequest|.
+   * Asynchronous callback invoked in response to a config request |IWifiNanIface.configRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -58,7 +67,7 @@
   oneway notifyConfigResponse(CommandIdShort id, WifiNanStatus status);
 
   /**
-   * Callback invoked in response to a disable request |disableRequest|.
+   * Asynchronous callback invoked in response to a disable request |IWifiNanIface.disableRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -68,7 +77,8 @@
   oneway notifyDisableResponse(CommandIdShort id, WifiNanStatus status);
 
   /**
-   * Callback invoked to notify the status of the start publish request |startPublishRequest|.
+   * Asynchronous callback invoked to notify the status of the start publish request
+   * |IWifiNanIface.startPublishRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -82,7 +92,8 @@
   oneway notifyStartPublishResponse(CommandIdShort id, WifiNanStatus status, uint8_t sessionId);
 
   /**
-   * Callback invoked in response to a stop publish request |stopPublishRequest|.
+   * Asynchronous callback invoked in response to a stop publish request
+   * |IWifiNanIface.stopPublishRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -93,7 +104,8 @@
   oneway notifyStopPublishResponse(CommandIdShort id, WifiNanStatus status);
 
   /**
-   * Callback invoked to notify the status of the start subscribe request |startSubscribeRequest|.
+   * Asynchronous callback invoked to notify the status of the start subscribe request
+   * |IWifiNanIface.startSubscribeRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -107,7 +119,8 @@
   oneway notifyStartSubscribeResponse(CommandIdShort id, WifiNanStatus status, uint8_t sessionId);
 
   /**
-   * Callback invoked in response to a stop subscribe request |stopSubscribeRequest|.
+   * Asynchronous callback invoked in response to a stop subscribe request
+   * |IWifiNanIface.stopSubscribeRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -118,7 +131,8 @@
   oneway notifyStopSubscribeResponse(CommandIdShort id, WifiNanStatus status);
 
   /**
-   * Callback invoked in response to a transmit followup request |transmitFollowupRequest|.
+   * Asynchronous callback invoked in response to a transmit followup request
+   * |IWifiNanIface.transmitFollowupRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -131,7 +145,8 @@
   oneway notifyTransmitFollowupResponse(CommandIdShort id, WifiNanStatus status);
 
   /**
-   * Callback invoked in response to a create data interface request |createDataInterfaceRequest|.
+   * Asynchronous callback invoked in response to a create data interface request
+   * |IWifiNanIface.createDataInterfaceRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -142,7 +157,8 @@
   oneway notifyCreateDataInterfaceResponse(CommandIdShort id, WifiNanStatus status);
 
   /**
-   * Callback invoked in response to a delete data interface request |deleteDataInterfaceRequest|.
+   * Asynchronous callback invoked in response to a delete data interface request
+   * |IWifiNanIface.deleteDataInterfaceRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -153,7 +169,8 @@
   oneway notifyDeleteDataInterfaceResponse(CommandIdShort id, WifiNanStatus status);
 
   /**
-   * Callback invoked in response to an initiate data path request |initiateDataPathRequest|.
+   * Asynchronous callback invoked in response to an initiate data path request
+   * |IWifiNanIface.initiateDataPathRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -168,8 +185,8 @@
         uint32_t ndpInstanceId );
 
   /**
-   * Callback invoked in response to a respond to data path indication request
-   * |respondToDataPathIndicationRequest|.
+   * Asynchronous callback invoked in response to a respond to data path indication request
+   * |IWifiNanIface.respondToDataPathIndicationRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
@@ -182,7 +199,8 @@
   oneway notifyRespondToDataPathIndicationResponse(CommandIdShort id, WifiNanStatus status);
 
   /**
-   * Callback invoked in response to a terminate data path request |terminateDataPathRequest|.
+   * Asynchronous callback invoked in response to a terminate data path request
+   * |IWifiNanIface.terminateDataPathRequest|.
    *
    * @param cmdId command Id corresponding to the original request.
    * @param status WifiNanStatus of the operation. Possible status codes are:
diff --git a/wifi/1.0/default/Android.mk b/wifi/1.0/default/Android.mk
index 144c067..2d2d898 100644
--- a/wifi/1.0/default/Android.mk
+++ b/wifi/1.0/default/Android.mk
@@ -16,9 +16,11 @@
 include $(CLEAR_VARS)
 LOCAL_MODULE := android.hardware.wifi@1.0-service
 LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
 LOCAL_CPPFLAGS := -Wall -Werror -Wextra
 LOCAL_SRC_FILES := \
     hidl_struct_util.cpp \
+    hidl_sync_util.cpp \
     service.cpp \
     wifi.cpp \
     wifi_ap_iface.cpp \
diff --git a/wifi/1.0/default/THREADING.README b/wifi/1.0/default/THREADING.README
new file mode 100644
index 0000000..8366ca0
--- /dev/null
+++ b/wifi/1.0/default/THREADING.README
@@ -0,0 +1,35 @@
+Vendor HAL Threading Model
+==========================
+The vendor HAL service has two threads:
+1. HIDL thread: This is the main thread which processes all the incoming HIDL
+RPC's.
+2. Legacy HAL event loop thread: This is the thread forked off for processing
+the legacy HAL event loop (wifi_event_loop()). This thread is used to process
+any asynchronous netlink events posted by the driver. Any asynchronous
+callbacks passed to the legacy HAL API's are invoked on this thread.
+
+Synchronization Concerns
+========================
+wifi_legacy_hal.cpp has a bunch of global "C" style functions to handle the
+legacy callbacks. Each of these "C" style function invokes a corresponding
+"std::function" version of the callback which does the actual processing.
+The variables holding these "std::function" callbacks are reset from the HIDL
+thread when they are no longer used. For example: stopGscan() will reset the
+corresponding "on_gscan_*" callback variables which were set when startGscan()
+was invoked. This is not thread safe since these callback variables are
+accesed from the legacy hal event loop thread as well.
+
+Synchronization Solution
+========================
+Adding a global lock seems to be the most trivial solution to the problem.
+a) All of the asynchronous "C" style callbacks will acquire the global lock
+before invoking the corresponding "std::function" callback variables.
+b) All of the HIDL methods will also acquire the global lock before processing
+(in hidl_return_util::validateAndCall()).
+
+Note: It's important that we only acquire the global lock for asynchronous
+callbacks, because there is no guarantee (or documentation to clarify) that the
+synchronous callbacks are invoked on the same invocation thread. If that is not
+the case in some implementation, we will end up deadlocking the system since the
+HIDL thread would have acquired the global lock which is needed by the
+synchronous callback executed on the legacy hal event loop thread.
diff --git a/wifi/1.0/default/android.hardware.wifi@1.0-service.rc b/wifi/1.0/default/android.hardware.wifi@1.0-service.rc
index 9d09347..c0ae4d4 100644
--- a/wifi/1.0/default/android.hardware.wifi@1.0-service.rc
+++ b/wifi/1.0/default/android.hardware.wifi@1.0-service.rc
@@ -1,4 +1,4 @@
-service wifi_hal_legacy /system/bin/hw/android.hardware.wifi@1.0-service
+service wifi_hal_legacy /vendor/bin/hw/android.hardware.wifi@1.0-service
     class hal
     user wifi
     group wifi
diff --git a/wifi/1.0/default/hidl_return_util.h b/wifi/1.0/default/hidl_return_util.h
index 2986165..3f6364b 100644
--- a/wifi/1.0/default/hidl_return_util.h
+++ b/wifi/1.0/default/hidl_return_util.h
@@ -17,6 +17,7 @@
 #ifndef HIDL_RETURN_UTIL_H_
 #define HIDL_RETURN_UTIL_H_
 
+#include "hidl_sync_util.h"
 #include "wifi_status_util.h"
 
 namespace android {
@@ -44,6 +45,7 @@
     WorkFuncT&& work,
     const std::function<void(const WifiStatus&)>& hidl_cb,
     Args&&... args) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (obj->isValid()) {
     hidl_cb((obj->*work)(std::forward<Args>(args)...));
   } else {
@@ -61,6 +63,7 @@
     WorkFuncT&& work,
     const std::function<void(const WifiStatus&, ReturnT)>& hidl_cb,
     Args&&... args) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (obj->isValid()) {
     const auto& ret_pair = (obj->*work)(std::forward<Args>(args)...);
     const WifiStatus& status = std::get<0>(ret_pair);
@@ -86,6 +89,7 @@
     WorkFuncT&& work,
     const std::function<void(const WifiStatus&, ReturnT1, ReturnT2)>& hidl_cb,
     Args&&... args) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (obj->isValid()) {
     const auto& ret_tuple = (obj->*work)(std::forward<Args>(args)...);
     const WifiStatus& status = std::get<0>(ret_tuple);
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index 691f913..e57919d 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -780,12 +780,14 @@
   legacy_request->discovery_indication_cfg |=
         hidl_request.configParams.disableJoinedClusterIndication ? 0x4 : 0x0;
   legacy_request->config_sid_beacon = 1;
-  if (hidl_request.configParams.numberOfServiceIdsInBeacon > 127) {
-    LOG(ERROR) << "convertHidlNanEnableRequestToLegacy: numberOfServiceIdsInBeacon > 127";
+  if (hidl_request.configParams.numberOfPublishServiceIdsInBeacon > 127) {
+    LOG(ERROR) << "convertHidlNanEnableRequestToLegacy: numberOfPublishServiceIdsInBeacon > 127";
     return false;
   }
-  legacy_request->sid_beacon_val = (hidl_request.configParams.includeServiceIdsInBeacon ? 0x1 : 0x0)
-        | (hidl_request.configParams.numberOfServiceIdsInBeacon << 1);
+  legacy_request->sid_beacon_val =
+        (hidl_request.configParams.includePublishServiceIdsInBeacon ? 0x1 : 0x0)
+            | (hidl_request.configParams.numberOfPublishServiceIdsInBeacon << 1);
+  // TODO: b/35195516 connect SubscribeServiceIds to legacy HAL once implemented
   legacy_request->config_rssi_window_size = 1;
   legacy_request->rssi_window_size_val = hidl_request.configParams.rssiWindowSize;
   legacy_request->config_disc_mac_addr_randomization = 1;
@@ -809,7 +811,7 @@
   legacy_request->config_2dot4g_rssi_proximity = 1;
   legacy_request->rssi_proximity_2dot4g_val =
         hidl_request.configParams.bandSpecificConfig[
-            (size_t) NanBandIndex::NAN_BAND_24GHZ].rssiProximity;
+            (size_t) NanBandIndex::NAN_BAND_24GHZ].rssiCloseProximity;
   legacy_request->config_scan_params = 1;
   legacy_request->scan_params_val.dwell_time[legacy_hal::NAN_CHANNEL_24G_BAND] =
         hidl_request.configParams.bandSpecificConfig[
@@ -832,7 +834,7 @@
   legacy_request->config_5g_rssi_close_proximity = 1;
   legacy_request->rssi_close_proximity_5g_val =
         hidl_request.configParams.bandSpecificConfig[
-            (size_t) NanBandIndex::NAN_BAND_5GHZ].rssiProximity;
+            (size_t) NanBandIndex::NAN_BAND_5GHZ].rssiCloseProximity;
   legacy_request->scan_params_val.dwell_time[legacy_hal::NAN_CHANNEL_5G_BAND_LOW] =
         hidl_request.configParams.bandSpecificConfig[
             (size_t) NanBandIndex::NAN_BAND_5GHZ].dwellTimeMs;
@@ -850,8 +852,8 @@
   legacy_request->config_dw.dw_5g_interval_val = hidl_request.configParams
         .bandSpecificConfig[(size_t) NanBandIndex::NAN_BAND_5GHZ].discoveryWindowIntervalVal;
   if (hidl_request.debugConfigs.validClusterIdVals) {
-    legacy_request->cluster_low = hidl_request.debugConfigs.clusterIdLowVal;
-    legacy_request->cluster_high = hidl_request.debugConfigs.clusterIdHighVal;
+    legacy_request->cluster_low = hidl_request.debugConfigs.clusterIdBottomRangeVal;
+    legacy_request->cluster_high = hidl_request.debugConfigs.clusterIdTopRangeVal;
   } else { // need 'else' since not configurable in legacy HAL
     legacy_request->cluster_low = 0x0000;
     legacy_request->cluster_high = 0xFFFF;
@@ -916,6 +918,7 @@
   memcpy(legacy_request->service_specific_info,
         hidl_request.baseConfigs.serviceSpecificInfo.data(),
         legacy_request->service_specific_info_len);
+  // TODO: b/35193423 add support for extended service specific info
   legacy_request->rx_match_filter_len = hidl_request.baseConfigs.rxMatchFilter.size();
   if (legacy_request->rx_match_filter_len > NAN_MAX_MATCH_FILTER_LEN) {
     LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: rx_match_filter_len too large";
@@ -994,6 +997,7 @@
   memcpy(legacy_request->service_specific_info,
         hidl_request.baseConfigs.serviceSpecificInfo.data(),
         legacy_request->service_specific_info_len);
+  // TODO: b/35193423 add support for extended service specific info
   legacy_request->rx_match_filter_len = hidl_request.baseConfigs.rxMatchFilter.size();
   if (legacy_request->rx_match_filter_len > NAN_MAX_MATCH_FILTER_LEN) {
     LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: rx_match_filter_len too large";
@@ -1072,14 +1076,15 @@
         legacy_hal::NAN_TX_PRIORITY_HIGH : legacy_hal::NAN_TX_PRIORITY_NORMAL;
   legacy_request->dw_or_faw = hidl_request.shouldUseDiscoveryWindow ?
         legacy_hal::NAN_TRANSMIT_IN_DW : legacy_hal::NAN_TRANSMIT_IN_FAW;
-  legacy_request->service_specific_info_len = hidl_request.message.size();
+  legacy_request->service_specific_info_len = hidl_request.serviceSpecificInfo.size();
   if (legacy_request->service_specific_info_len > NAN_MAX_SERVICE_SPECIFIC_INFO_LEN) {
     LOG(ERROR) << "convertHidlNanTransmitFollowupRequestToLegacy: service_specific_info_len too large";
     return false;
   }
   memcpy(legacy_request->service_specific_info,
-        hidl_request.message.data(),
+        hidl_request.serviceSpecificInfo.data(),
         legacy_request->service_specific_info_len);
+  // TODO: b/35193423 add support for extended service specific info
   legacy_request->recv_indication_cfg = hidl_request.disableFollowupResultIndication ? 0x1 : 0x0;
 
   return true;
@@ -1104,12 +1109,13 @@
   legacy_request->discovery_indication_cfg |=
         hidl_request.disableJoinedClusterIndication ? 0x4 : 0x0;
   legacy_request->config_sid_beacon = 1;
-  if (hidl_request.numberOfServiceIdsInBeacon > 127) {
-    LOG(ERROR) << "convertHidlNanConfigRequestToLegacy: numberOfServiceIdsInBeacon > 127";
+  if (hidl_request.numberOfPublishServiceIdsInBeacon > 127) {
+    LOG(ERROR) << "convertHidlNanConfigRequestToLegacy: numberOfPublishServiceIdsInBeacon > 127";
     return false;
   }
-  legacy_request->sid_beacon = (hidl_request.includeServiceIdsInBeacon ? 0x1 : 0x0)
-        | (hidl_request.numberOfServiceIdsInBeacon << 1);
+  legacy_request->sid_beacon = (hidl_request.includePublishServiceIdsInBeacon ? 0x1 : 0x0)
+        | (hidl_request.numberOfPublishServiceIdsInBeacon << 1);
+  // TODO: b/35195516 connect SubscribeServiceIds to legacy HAL once implemented
   legacy_request->config_rssi_window_size = 1;
   legacy_request->rssi_window_size_val = hidl_request.rssiWindowSize;
   legacy_request->config_disc_mac_addr_randomization = 1;
@@ -1130,7 +1136,7 @@
   legacy_request->config_2dot4g_rssi_proximity = 1;
   legacy_request->rssi_proximity_2dot4g_val =
         hidl_request.bandSpecificConfig[
-            (size_t) NanBandIndex::NAN_BAND_24GHZ].rssiProximity;
+            (size_t) NanBandIndex::NAN_BAND_24GHZ].rssiCloseProximity;
   */
   legacy_request->config_scan_params = 1;
   legacy_request->scan_params_val.dwell_time[legacy_hal::NAN_CHANNEL_24G_BAND] =
@@ -1156,7 +1162,7 @@
   legacy_request->config_5g_rssi_close_proximity = 1;
   legacy_request->rssi_close_proximity_5g_val =
         hidl_request.bandSpecificConfig[
-            (size_t) NanBandIndex::NAN_BAND_5GHZ].rssiProximity;
+            (size_t) NanBandIndex::NAN_BAND_5GHZ].rssiCloseProximity;
   legacy_request->scan_params_val.dwell_time[legacy_hal::NAN_CHANNEL_5G_BAND_LOW] =
         hidl_request.bandSpecificConfig[
             (size_t) NanBandIndex::NAN_BAND_5GHZ].dwellTimeMs;
@@ -1271,7 +1277,8 @@
   hidl_response->maxMatchFilterLen = legacy_response.max_match_filter_len;
   hidl_response->maxTotalMatchFilterLen = legacy_response.max_total_match_filter_len;
   hidl_response->maxServiceSpecificInfoLen = legacy_response.max_service_specific_info_len;
-  hidl_response->maxVsaDataLen = legacy_response.max_vsa_data_len;
+  // TODO: b/35193423 add support for extended service specific info
+  hidl_response->maxExtendedServiceSpecificInfoLen = 0;
   hidl_response->maxNdiInterfaces = legacy_response.max_ndi_interfaces;
   hidl_response->maxNdpSessions = legacy_response.max_ndp_sessions;
   hidl_response->maxAppInfoLen = legacy_response.max_app_info_len;
@@ -1295,6 +1302,7 @@
   hidl_ind->addr = hidl_array<uint8_t, 6>(legacy_ind.addr);
   hidl_ind->serviceSpecificInfo = std::vector<uint8_t>(legacy_ind.service_specific_info,
         legacy_ind.service_specific_info + legacy_ind.service_specific_info_len);
+  // TODO: b/35193423 add support for extended service specific info
   hidl_ind->matchFilter = std::vector<uint8_t>(legacy_ind.sdf_match_filter,
         legacy_ind.sdf_match_filter + legacy_ind.sdf_match_filter_len);
   hidl_ind->matchOccuredInBeaconFlag = legacy_ind.match_occured_flag == 1;
@@ -1322,7 +1330,7 @@
   hidl_ind->peerId = legacy_ind.requestor_instance_id;
   hidl_ind->addr = hidl_array<uint8_t, 6>(legacy_ind.addr);
   hidl_ind->receivedInFaw = legacy_ind.dw_or_faw == 1;
-  hidl_ind->message = std::vector<uint8_t>(legacy_ind.service_specific_info,
+  hidl_ind->serviceSpecificInfo = std::vector<uint8_t>(legacy_ind.service_specific_info,
         legacy_ind.service_specific_info + legacy_ind.service_specific_info_len);
 
   return true;
diff --git a/wifi/1.0/default/hidl_sync_util.cpp b/wifi/1.0/default/hidl_sync_util.cpp
new file mode 100644
index 0000000..7d47f2f
--- /dev/null
+++ b/wifi/1.0/default/hidl_sync_util.cpp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 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.
+ */
+
+#include "hidl_sync_util.h"
+
+namespace {
+std::recursive_mutex g_mutex;
+}  // namespace
+
+namespace android {
+namespace hardware {
+namespace wifi {
+namespace V1_0 {
+namespace implementation {
+namespace hidl_sync_util {
+
+std::unique_lock<std::recursive_mutex> acquireGlobalLock() {
+  return std::unique_lock<std::recursive_mutex>{g_mutex};
+}
+
+}  // namespace hidl_sync_util
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace wifi
+}  // namespace hardware
+}  // namespace android
diff --git a/wifi/1.0/default/hidl_sync_util.h b/wifi/1.0/default/hidl_sync_util.h
new file mode 100644
index 0000000..6631e55
--- /dev/null
+++ b/wifi/1.0/default/hidl_sync_util.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 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.
+ */
+
+#ifndef HIDL_SYNC_UTIL_H_
+#define HIDL_SYNC_UTIL_H_
+
+#include <mutex>
+
+// Utility that provides a global lock to synchronize access between
+// the HIDL thread and the legacy HAL's event loop.
+namespace android {
+namespace hardware {
+namespace wifi {
+namespace V1_0 {
+namespace implementation {
+namespace hidl_sync_util {
+std::unique_lock<std::recursive_mutex> acquireGlobalLock();
+}  // namespace hidl_sync_util
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace wifi
+}  // namespace hardware
+}  // namespace android
+#endif  // HIDL_SYNC_UTIL_H_
diff --git a/wifi/1.0/default/service.cpp b/wifi/1.0/default/service.cpp
index 96d5c6f..059304e 100644
--- a/wifi/1.0/default/service.cpp
+++ b/wifi/1.0/default/service.cpp
@@ -27,7 +27,7 @@
 int main(int /*argc*/, char** argv) {
   android::base::InitLogging(argv,
                              android::base::LogdLogger(android::base::SYSTEM));
-  LOG(INFO) << "wifi_hal_legacy is starting up...";
+  LOG(INFO) << "Wifi Hal is starting up...";
 
   configureRpcThreadpool(1, true /* callerWillJoin */);
 
@@ -39,6 +39,6 @@
 
   joinRpcThreadpool();
 
-  LOG(INFO) << "wifi_hal_legacy is terminating...";
+  LOG(INFO) << "Wifi Hal is terminating...";
   return 0;
 }
diff --git a/wifi/1.0/default/wifi_chip.cpp b/wifi/1.0/default/wifi_chip.cpp
index e15178d..0e2d54e 100644
--- a/wifi/1.0/default/wifi_chip.cpp
+++ b/wifi/1.0/default/wifi_chip.cpp
@@ -415,12 +415,16 @@
   WifiStatus status = handleChipConfiguration(mode_id);
   if (status.code != WifiStatusCode::SUCCESS) {
     for (const auto& callback : event_callbacks_) {
-      callback->onChipReconfigureFailure(status);
+      if (!callback->onChipReconfigureFailure(status).isOk()) {
+        LOG(ERROR) << "Failed to invoke onChipReconfigureFailure callback";
+      }
     }
     return status;
   }
   for (const auto& callback : event_callbacks_) {
-    callback->onChipReconfigured(mode_id);
+    if (!callback->onChipReconfigured(mode_id).isOk()) {
+      LOG(ERROR) << "Failed to invoke onChipReconfigured callback";
+    }
   }
   current_mode_id_ = mode_id;
   return status;
@@ -500,7 +504,9 @@
   std::string ifname = legacy_hal_.lock()->getApIfaceName();
   ap_iface_ = new WifiApIface(ifname, legacy_hal_);
   for (const auto& callback : event_callbacks_) {
-    callback->onIfaceAdded(IfaceType::AP, ifname);
+    if (!callback->onIfaceAdded(IfaceType::AP, ifname).isOk()) {
+      LOG(ERROR) << "Failed to invoke onIfaceAdded callback";
+    }
   }
   return {createWifiStatus(WifiStatusCode::SUCCESS), ap_iface_};
 }
@@ -528,7 +534,9 @@
   }
   invalidateAndClear(ap_iface_);
   for (const auto& callback : event_callbacks_) {
-    callback->onIfaceRemoved(IfaceType::AP, ifname);
+    if (!callback->onIfaceRemoved(IfaceType::AP, ifname).isOk()) {
+      LOG(ERROR) << "Failed to invoke onIfaceRemoved callback";
+    }
   }
   return createWifiStatus(WifiStatusCode::SUCCESS);
 }
@@ -542,7 +550,9 @@
   std::string ifname = legacy_hal_.lock()->getNanIfaceName();
   nan_iface_ = new WifiNanIface(ifname, legacy_hal_);
   for (const auto& callback : event_callbacks_) {
-    callback->onIfaceAdded(IfaceType::NAN, ifname);
+    if (!callback->onIfaceAdded(IfaceType::NAN, ifname).isOk()) {
+      LOG(ERROR) << "Failed to invoke onIfaceAdded callback";
+    }
   }
   return {createWifiStatus(WifiStatusCode::SUCCESS), nan_iface_};
 }
@@ -570,7 +580,9 @@
   }
   invalidateAndClear(nan_iface_);
   for (const auto& callback : event_callbacks_) {
-    callback->onIfaceRemoved(IfaceType::NAN, ifname);
+    if (!callback->onIfaceRemoved(IfaceType::NAN, ifname).isOk()) {
+      LOG(ERROR) << "Failed to invoke onIfaceAdded callback";
+    }
   }
   return createWifiStatus(WifiStatusCode::SUCCESS);
 }
@@ -584,7 +596,9 @@
   std::string ifname = legacy_hal_.lock()->getP2pIfaceName();
   p2p_iface_ = new WifiP2pIface(ifname, legacy_hal_);
   for (const auto& callback : event_callbacks_) {
-    callback->onIfaceAdded(IfaceType::P2P, ifname);
+    if (!callback->onIfaceAdded(IfaceType::P2P, ifname).isOk()) {
+      LOG(ERROR) << "Failed to invoke onIfaceAdded callback";
+    }
   }
   return {createWifiStatus(WifiStatusCode::SUCCESS), p2p_iface_};
 }
@@ -612,7 +626,9 @@
   }
   invalidateAndClear(p2p_iface_);
   for (const auto& callback : event_callbacks_) {
-    callback->onIfaceRemoved(IfaceType::P2P, ifname);
+    if (!callback->onIfaceRemoved(IfaceType::P2P, ifname).isOk()) {
+      LOG(ERROR) << "Failed to invoke onIfaceRemoved callback";
+    }
   }
   return createWifiStatus(WifiStatusCode::SUCCESS);
 }
@@ -624,7 +640,9 @@
   std::string ifname = legacy_hal_.lock()->getStaIfaceName();
   sta_iface_ = new WifiStaIface(ifname, legacy_hal_);
   for (const auto& callback : event_callbacks_) {
-    callback->onIfaceAdded(IfaceType::STA, ifname);
+    if (!callback->onIfaceAdded(IfaceType::STA, ifname).isOk()) {
+      LOG(ERROR) << "Failed to invoke onIfaceAdded callback";
+    }
   }
   return {createWifiStatus(WifiStatusCode::SUCCESS), sta_iface_};
 }
@@ -652,7 +670,9 @@
   }
   invalidateAndClear(sta_iface_);
   for (const auto& callback : event_callbacks_) {
-    callback->onIfaceRemoved(IfaceType::STA, ifname);
+    if (!callback->onIfaceRemoved(IfaceType::STA, ifname).isOk()) {
+      LOG(ERROR) << "Failed to invoke onIfaceRemoved callback";
+    }
   }
   return createWifiStatus(WifiStatusCode::SUCCESS);
 }
@@ -743,7 +763,9 @@
         return;
       }
       for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
-        callback->onDebugErrorAlert(error_code, debug_data);
+        if (!callback->onDebugErrorAlert(error_code, debug_data).isOk()) {
+          LOG(ERROR) << "Failed to invoke onDebugErrorAlert callback";
+        }
       }
     };
     legacy_status = legacy_hal_.lock()->registerErrorAlertCallbackHandler(
@@ -806,7 +828,10 @@
       return;
     }
     for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
-      callback->onDebugRingBufferDataAvailable(hidl_status, data);
+      if (!callback->onDebugRingBufferDataAvailable(hidl_status, data).isOk()) {
+        LOG(ERROR) << "Failed to invoke onDebugRingBufferDataAvailable"
+                   << " callback";
+      }
     }
   };
   legacy_hal::wifi_error legacy_status =
diff --git a/wifi/1.0/default/wifi_legacy_hal.cpp b/wifi/1.0/default/wifi_legacy_hal.cpp
index b0b0f96..cd89acc 100644
--- a/wifi/1.0/default/wifi_legacy_hal.cpp
+++ b/wifi/1.0/default/wifi_legacy_hal.cpp
@@ -19,6 +19,7 @@
 #include <android-base/logging.h>
 #include <cutils/properties.h>
 
+#include "hidl_sync_util.h"
 #include "wifi_legacy_hal.h"
 #include "wifi_legacy_hal_stubs.h"
 
@@ -54,7 +55,8 @@
 // std::function methods to be invoked.
 // Callback to be invoked once |stop| is complete.
 std::function<void(wifi_handle handle)> on_stop_complete_internal_callback;
-void onStopComplete(wifi_handle handle) {
+void onAsyncStopComplete(wifi_handle handle) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_stop_complete_internal_callback) {
     on_stop_complete_internal_callback(handle);
   }
@@ -62,7 +64,7 @@
 
 // Callback to be invoked for driver dump.
 std::function<void(char*, int)> on_driver_memory_dump_internal_callback;
-void onDriverMemoryDump(char* buffer, int buffer_size) {
+void onSyncDriverMemoryDump(char* buffer, int buffer_size) {
   if (on_driver_memory_dump_internal_callback) {
     on_driver_memory_dump_internal_callback(buffer, buffer_size);
   }
@@ -70,7 +72,7 @@
 
 // Callback to be invoked for firmware dump.
 std::function<void(char*, int)> on_firmware_memory_dump_internal_callback;
-void onFirmwareMemoryDump(char* buffer, int buffer_size) {
+void onSyncFirmwareMemoryDump(char* buffer, int buffer_size) {
   if (on_firmware_memory_dump_internal_callback) {
     on_firmware_memory_dump_internal_callback(buffer, buffer_size);
   }
@@ -79,7 +81,8 @@
 // Callback to be invoked for Gscan events.
 std::function<void(wifi_request_id, wifi_scan_event)>
     on_gscan_event_internal_callback;
-void onGscanEvent(wifi_request_id id, wifi_scan_event event) {
+void onAsyncGscanEvent(wifi_request_id id, wifi_scan_event event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_gscan_event_internal_callback) {
     on_gscan_event_internal_callback(id, event);
   }
@@ -88,9 +91,10 @@
 // Callback to be invoked for Gscan full results.
 std::function<void(wifi_request_id, wifi_scan_result*, uint32_t)>
     on_gscan_full_result_internal_callback;
-void onGscanFullResult(wifi_request_id id,
-                       wifi_scan_result* result,
-                       uint32_t buckets_scanned) {
+void onAsyncGscanFullResult(wifi_request_id id,
+                            wifi_scan_result* result,
+                            uint32_t buckets_scanned) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_gscan_full_result_internal_callback) {
     on_gscan_full_result_internal_callback(id, result, buckets_scanned);
   }
@@ -99,10 +103,10 @@
 // Callback to be invoked for link layer stats results.
 std::function<void((wifi_request_id, wifi_iface_stat*, int, wifi_radio_stat*))>
     on_link_layer_stats_result_internal_callback;
-void onLinkLayerStatsResult(wifi_request_id id,
-                            wifi_iface_stat* iface_stat,
-                            int num_radios,
-                            wifi_radio_stat* radio_stat) {
+void onSyncLinkLayerStatsResult(wifi_request_id id,
+                                wifi_iface_stat* iface_stat,
+                                int num_radios,
+                                wifi_radio_stat* radio_stat) {
   if (on_link_layer_stats_result_internal_callback) {
     on_link_layer_stats_result_internal_callback(
         id, iface_stat, num_radios, radio_stat);
@@ -112,7 +116,10 @@
 // Callback to be invoked for rssi threshold breach.
 std::function<void((wifi_request_id, uint8_t*, int8_t))>
     on_rssi_threshold_breached_internal_callback;
-void onRssiThresholdBreached(wifi_request_id id, uint8_t* bssid, int8_t rssi) {
+void onAsyncRssiThresholdBreached(wifi_request_id id,
+                                  uint8_t* bssid,
+                                  int8_t rssi) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_rssi_threshold_breached_internal_callback) {
     on_rssi_threshold_breached_internal_callback(id, bssid, rssi);
   }
@@ -121,10 +128,11 @@
 // Callback to be invoked for ring buffer data indication.
 std::function<void(char*, char*, int, wifi_ring_buffer_status*)>
     on_ring_buffer_data_internal_callback;
-void onRingBufferData(char* ring_name,
-                      char* buffer,
-                      int buffer_size,
-                      wifi_ring_buffer_status* status) {
+void onAsyncRingBufferData(char* ring_name,
+                           char* buffer,
+                           int buffer_size,
+                           wifi_ring_buffer_status* status) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_ring_buffer_data_internal_callback) {
     on_ring_buffer_data_internal_callback(
         ring_name, buffer, buffer_size, status);
@@ -134,10 +142,11 @@
 // Callback to be invoked for error alert indication.
 std::function<void(wifi_request_id, char*, int, int)>
     on_error_alert_internal_callback;
-void onErrorAlert(wifi_request_id id,
-                  char* buffer,
-                  int buffer_size,
-                  int err_code) {
+void onAsyncErrorAlert(wifi_request_id id,
+                       char* buffer,
+                       int buffer_size,
+                       int err_code) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_error_alert_internal_callback) {
     on_error_alert_internal_callback(id, buffer, buffer_size, err_code);
   }
@@ -147,9 +156,10 @@
 std::function<void(
     wifi_request_id, unsigned num_results, wifi_rtt_result* rtt_results[])>
     on_rtt_results_internal_callback;
-void onRttResults(wifi_request_id id,
-                  unsigned num_results,
-                  wifi_rtt_result* rtt_results[]) {
+void onAsyncRttResults(wifi_request_id id,
+                       unsigned num_results,
+                       wifi_rtt_result* rtt_results[]) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_rtt_results_internal_callback) {
     on_rtt_results_internal_callback(id, num_results, rtt_results);
   }
@@ -161,7 +171,8 @@
 // So, handle all of them here directly to avoid adding an unnecessary layer.
 std::function<void(transaction_id, const NanResponseMsg&)>
     on_nan_notify_response_user_callback;
-void onNanNotifyResponse(transaction_id id, NanResponseMsg* msg) {
+void onAysncNanNotifyResponse(transaction_id id, NanResponseMsg* msg) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_notify_response_user_callback && msg) {
     on_nan_notify_response_user_callback(id, *msg);
   }
@@ -169,14 +180,16 @@
 
 std::function<void(const NanPublishTerminatedInd&)>
     on_nan_event_publish_terminated_user_callback;
-void onNanEventPublishTerminated(NanPublishTerminatedInd* event) {
+void onAysncNanEventPublishTerminated(NanPublishTerminatedInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_publish_terminated_user_callback && event) {
     on_nan_event_publish_terminated_user_callback(*event);
   }
 }
 
 std::function<void(const NanMatchInd&)> on_nan_event_match_user_callback;
-void onNanEventMatch(NanMatchInd* event) {
+void onAysncNanEventMatch(NanMatchInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_match_user_callback && event) {
     on_nan_event_match_user_callback(*event);
   }
@@ -184,7 +197,8 @@
 
 std::function<void(const NanMatchExpiredInd&)>
     on_nan_event_match_expired_user_callback;
-void onNanEventMatchExpired(NanMatchExpiredInd* event) {
+void onAysncNanEventMatchExpired(NanMatchExpiredInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_match_expired_user_callback && event) {
     on_nan_event_match_expired_user_callback(*event);
   }
@@ -192,14 +206,16 @@
 
 std::function<void(const NanSubscribeTerminatedInd&)>
     on_nan_event_subscribe_terminated_user_callback;
-void onNanEventSubscribeTerminated(NanSubscribeTerminatedInd* event) {
+void onAysncNanEventSubscribeTerminated(NanSubscribeTerminatedInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_subscribe_terminated_user_callback && event) {
     on_nan_event_subscribe_terminated_user_callback(*event);
   }
 }
 
 std::function<void(const NanFollowupInd&)> on_nan_event_followup_user_callback;
-void onNanEventFollowup(NanFollowupInd* event) {
+void onAysncNanEventFollowup(NanFollowupInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_followup_user_callback && event) {
     on_nan_event_followup_user_callback(*event);
   }
@@ -207,21 +223,24 @@
 
 std::function<void(const NanDiscEngEventInd&)>
     on_nan_event_disc_eng_event_user_callback;
-void onNanEventDiscEngEvent(NanDiscEngEventInd* event) {
+void onAysncNanEventDiscEngEvent(NanDiscEngEventInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_disc_eng_event_user_callback && event) {
     on_nan_event_disc_eng_event_user_callback(*event);
   }
 }
 
 std::function<void(const NanDisabledInd&)> on_nan_event_disabled_user_callback;
-void onNanEventDisabled(NanDisabledInd* event) {
+void onAysncNanEventDisabled(NanDisabledInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_disabled_user_callback && event) {
     on_nan_event_disabled_user_callback(*event);
   }
 }
 
 std::function<void(const NanTCAInd&)> on_nan_event_tca_user_callback;
-void onNanEventTca(NanTCAInd* event) {
+void onAysncNanEventTca(NanTCAInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_tca_user_callback && event) {
     on_nan_event_tca_user_callback(*event);
   }
@@ -229,7 +248,8 @@
 
 std::function<void(const NanBeaconSdfPayloadInd&)>
     on_nan_event_beacon_sdf_payload_user_callback;
-void onNanEventBeaconSdfPayload(NanBeaconSdfPayloadInd* event) {
+void onAysncNanEventBeaconSdfPayload(NanBeaconSdfPayloadInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_beacon_sdf_payload_user_callback && event) {
     on_nan_event_beacon_sdf_payload_user_callback(*event);
   }
@@ -237,14 +257,16 @@
 
 std::function<void(const NanDataPathRequestInd&)>
     on_nan_event_data_path_request_user_callback;
-void onNanEventDataPathRequest(NanDataPathRequestInd* event) {
+void onAysncNanEventDataPathRequest(NanDataPathRequestInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_data_path_request_user_callback && event) {
     on_nan_event_data_path_request_user_callback(*event);
   }
 }
 std::function<void(const NanDataPathConfirmInd&)>
     on_nan_event_data_path_confirm_user_callback;
-void onNanEventDataPathConfirm(NanDataPathConfirmInd* event) {
+void onAysncNanEventDataPathConfirm(NanDataPathConfirmInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_data_path_confirm_user_callback && event) {
     on_nan_event_data_path_confirm_user_callback(*event);
   }
@@ -252,7 +274,8 @@
 
 std::function<void(const NanDataPathEndInd&)>
     on_nan_event_data_path_end_user_callback;
-void onNanEventDataPathEnd(NanDataPathEndInd* event) {
+void onAysncNanEventDataPathEnd(NanDataPathEndInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_data_path_end_user_callback && event) {
     on_nan_event_data_path_end_user_callback(*event);
   }
@@ -260,7 +283,8 @@
 
 std::function<void(const NanTransmitFollowupInd&)>
     on_nan_event_transmit_follow_up_user_callback;
-void onNanEventTransmitFollowUp(NanTransmitFollowupInd* event) {
+void onAysncNanEventTransmitFollowUp(NanTransmitFollowupInd* event) {
+  const auto lock = hidl_sync_util::acquireGlobalLock();
   if (on_nan_event_transmit_follow_up_user_callback && event) {
     on_nan_event_transmit_follow_up_user_callback(*event);
   }
@@ -326,7 +350,8 @@
     return WIFI_SUCCESS;
   }
   LOG(DEBUG) << "Stopping legacy HAL";
-  on_stop_complete_internal_callback = [&](wifi_handle handle) {
+  on_stop_complete_internal_callback = [on_stop_complete_user_callback,
+                                        this](wifi_handle handle) {
     CHECK_EQ(global_handle_, handle) << "Handle mismatch";
     // Invalidate all the internal pointers now that the HAL is
     // stopped.
@@ -335,7 +360,7 @@
     on_stop_complete_user_callback();
   };
   awaiting_event_loop_termination_ = true;
-  global_func_table_.wifi_cleanup(global_handle_, onStopComplete);
+  global_func_table_.wifi_cleanup(global_handle_, onAsyncStopComplete);
   LOG(DEBUG) << "Legacy HAL stop complete";
   is_started_ = false;
   return WIFI_SUCCESS;
@@ -391,7 +416,7 @@
                        reinterpret_cast<uint8_t*>(buffer) + buffer_size);
   };
   wifi_error status = global_func_table_.wifi_get_driver_memory_dump(
-      wlan_interface_handle_, {onDriverMemoryDump});
+      wlan_interface_handle_, {onSyncDriverMemoryDump});
   on_driver_memory_dump_internal_callback = nullptr;
   return {status, std::move(driver_dump)};
 }
@@ -406,7 +431,7 @@
                          reinterpret_cast<uint8_t*>(buffer) + buffer_size);
   };
   wifi_error status = global_func_table_.wifi_get_firmware_memory_dump(
-      wlan_interface_handle_, {onFirmwareMemoryDump});
+      wlan_interface_handle_, {onSyncFirmwareMemoryDump});
   on_firmware_memory_dump_internal_callback = nullptr;
   return {status, std::move(firmware_dump)};
 }
@@ -488,7 +513,8 @@
     }
   };
 
-  wifi_scan_result_handler handler = {onGscanFullResult, onGscanEvent};
+  wifi_scan_result_handler handler = {onAsyncGscanFullResult,
+                                      onAsyncGscanEvent};
   wifi_error status = global_func_table_.wifi_start_gscan(
       id, wlan_interface_handle_, params, handler);
   if (status != WIFI_SUCCESS) {
@@ -584,7 +610,7 @@
   };
 
   wifi_error status = global_func_table_.wifi_get_link_stats(
-      0, wlan_interface_handle_, {onLinkLayerStatsResult});
+      0, wlan_interface_handle_, {onSyncLinkLayerStatsResult});
   on_link_layer_stats_result_internal_callback = nullptr;
   return {status, link_stats};
 }
@@ -609,12 +635,12 @@
         std::copy(bssid_ptr, bssid_ptr + 6, std::begin(bssid_arr));
         on_threshold_breached_user_callback(id, bssid_arr, rssi);
       };
-  wifi_error status =
-      global_func_table_.wifi_start_rssi_monitoring(id,
-                                                    wlan_interface_handle_,
-                                                    max_rssi,
-                                                    min_rssi,
-                                                    {onRssiThresholdBreached});
+  wifi_error status = global_func_table_.wifi_start_rssi_monitoring(
+      id,
+      wlan_interface_handle_,
+      max_rssi,
+      min_rssi,
+      {onAsyncRssiThresholdBreached});
   if (status != WIFI_SUCCESS) {
     on_rssi_threshold_breached_internal_callback = nullptr;
   }
@@ -789,7 +815,7 @@
     }
   };
   wifi_error status = global_func_table_.wifi_set_log_handler(
-      0, wlan_interface_handle_, {onRingBufferData});
+      0, wlan_interface_handle_, {onAsyncRingBufferData});
   if (status != WIFI_SUCCESS) {
     on_ring_buffer_data_internal_callback = nullptr;
   }
@@ -850,7 +876,7 @@
     }
   };
   wifi_error status = global_func_table_.wifi_set_alert_handler(
-      0, wlan_interface_handle_, {onErrorAlert});
+      0, wlan_interface_handle_, {onAsyncErrorAlert});
   if (status != WIFI_SUCCESS) {
     on_error_alert_internal_callback = nullptr;
   }
@@ -896,7 +922,7 @@
                                                 wlan_interface_handle_,
                                                 rtt_configs.size(),
                                                 rtt_configs_internal.data(),
-                                                {onRttResults});
+                                                {onAsyncRttResults});
   if (status != WIFI_SUCCESS) {
     on_rtt_results_internal_callback = nullptr;
   }
@@ -1000,20 +1026,20 @@
 
   return global_func_table_.wifi_nan_register_handler(
       wlan_interface_handle_,
-      {onNanNotifyResponse,
-       onNanEventPublishTerminated,
-       onNanEventMatch,
-       onNanEventMatchExpired,
-       onNanEventSubscribeTerminated,
-       onNanEventFollowup,
-       onNanEventDiscEngEvent,
-       onNanEventDisabled,
-       onNanEventTca,
-       onNanEventBeaconSdfPayload,
-       onNanEventDataPathRequest,
-       onNanEventDataPathConfirm,
-       onNanEventDataPathEnd,
-       onNanEventTransmitFollowUp});
+      {onAysncNanNotifyResponse,
+       onAysncNanEventPublishTerminated,
+       onAysncNanEventMatch,
+       onAysncNanEventMatchExpired,
+       onAysncNanEventSubscribeTerminated,
+       onAysncNanEventFollowup,
+       onAysncNanEventDiscEngEvent,
+       onAysncNanEventDisabled,
+       onAysncNanEventTca,
+       onAysncNanEventBeaconSdfPayload,
+       onAysncNanEventDataPathRequest,
+       onAysncNanEventDataPathConfirm,
+       onAysncNanEventDataPathEnd,
+       onAysncNanEventTransmitFollowUp});
 }
 
 wifi_error WifiLegacyHal::nanEnableRequest(transaction_id id,
diff --git a/wifi/1.0/default/wifi_legacy_hal.h b/wifi/1.0/default/wifi_legacy_hal.h
index dce4ed4..e65b79b 100644
--- a/wifi/1.0/default/wifi_legacy_hal.h
+++ b/wifi/1.0/default/wifi_legacy_hal.h
@@ -124,6 +124,9 @@
 /**
  * Class that encapsulates all legacy HAL interactions.
  * This class manages the lifetime of the event loop thread used by legacy HAL.
+ *
+ * Note: aThere will only be a single instance of this class created in the Wifi
+ * object and will be valid for the lifetime of the process.
  */
 class WifiLegacyHal {
  public:
diff --git a/wifi/1.0/default/wifi_sta_iface.cpp b/wifi/1.0/default/wifi_sta_iface.cpp
index 6cc41db..6100334 100644
--- a/wifi/1.0/default/wifi_sta_iface.cpp
+++ b/wifi/1.0/default/wifi_sta_iface.cpp
@@ -389,7 +389,9 @@
           return;
         }
         for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
-          callback->onBackgroundScanFailure(id);
+          if (!callback->onBackgroundScanFailure(id).isOk()) {
+            LOG(ERROR) << "Failed to invoke onBackgroundScanFailure callback";
+          }
         }
       };
   const auto& on_results_callback = [weak_ptr_this](
@@ -407,7 +409,9 @@
       return;
     }
     for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
-      callback->onBackgroundScanResults(id, hidl_scan_datas);
+      if (!callback->onBackgroundScanResults(id, hidl_scan_datas).isOk()) {
+        LOG(ERROR) << "Failed to invoke onBackgroundScanResults callback";
+      }
     }
   };
   const auto& on_full_result_callback = [weak_ptr_this](
@@ -426,7 +430,9 @@
       return;
     }
     for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
-      callback->onBackgroundFullScanResult(id, hidl_scan_result);
+      if (!callback->onBackgroundFullScanResult(id, hidl_scan_result).isOk()) {
+        LOG(ERROR) << "Failed to invoke onBackgroundFullScanResult callback";
+      }
     }
   };
   legacy_hal::wifi_error legacy_status =
@@ -486,7 +492,9 @@
       return;
     }
     for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
-      callback->onRssiThresholdBreached(id, bssid, rssi);
+      if (!callback->onRssiThresholdBreached(id, bssid, rssi).isOk()) {
+        LOG(ERROR) << "Failed to invoke onRssiThresholdBreached callback";
+      }
     }
   };
   legacy_hal::wifi_error legacy_status =
diff --git a/wifi/1.0/types.hal b/wifi/1.0/types.hal
index c4bdc23..f777207 100644
--- a/wifi/1.0/types.hal
+++ b/wifi/1.0/types.hal
@@ -211,7 +211,7 @@
 
 /**
  * STA specific types.
- * TODO(b/32159498): Move to a separate nan_types.hal.
+ * TODO(b/32159498): Move to a separate sta_types.hal.
  */
 /**
  * Parameters to specify the APF capabilities of this iface.
@@ -562,6 +562,9 @@
 /**
  * NAN specific types.
  * TODO(b/32159498): Move to a separate nan_types.hal.
+ *
+ * References to "NAN Spec" are to the Wi-Fi Alliance "Wi-Fi Neighbor Awareness
+ * Networking (NAN) Technical Specification".
  */
 
 /**
@@ -624,55 +627,59 @@
 };
 
 /**
- * NAN Match indication type.
+ * NAN Match indication type: control how often to trigger |IWifiNanIfaceEventCallback.eventMatch|
+ * for a single discovery session - i.e. continuously discovering the same publisher with no new
+ * data.
  */
 enum NanMatchAlg : uint32_t {
-  MATCH_ONCE = 0,
-  MATCH_CONTINUOUS,
-  MATCH_NEVER,
+  MATCH_ONCE = 0,   // Only trigger |IWifiNanIfaceEventCallback.eventMatch| once
+  MATCH_CONTINUOUS, // Trigger |IWifiNanIfaceEventCallback.eventMatch| every time
+  MATCH_NEVER,      // Never trigger |IWifiNanIfaceEventCallback.eventMatch|
 };
 
 /**
  * NAN publish discovery session types.
  */
 enum NanPublishType : uint32_t {
-  UNSOLICITED = 0,
-  SOLICITED,
-  UNSOLICITED_SOLICITED,
+  UNSOLICITED = 0,       // Publish session broadcasts discovery packets
+  SOLICITED,             // Publish session silent, responds to active subscribes queries
+  UNSOLICITED_SOLICITED, // Both
 };
 
 /**
  * NAN transmit type used in |NanPublishType.SOLICITED| or |NanPublishType.UNSOLICITED_SOLICITED|
- * publish discovery sessions.
+ * publish discovery sessions. Describes the addressing of the packet responding to an ACTIVE
+ * subscribe query.
  */
 enum NanTxType : uint32_t {
-  BROADCAST = 0,
-  UNICAST,
+  BROADCAST = 0, // Respond with a broadcast packet
+  UNICAST,       // Respond with a unicast packet
 };
 
 /**
- * NAN subscribe discovery session ypes.
+ * NAN subscribe discovery session types.
  */
 enum NanSubscribeType : uint32_t {
-  PASSIVE = 0,
-  ACTIVE,
+  PASSIVE = 0, // Subscribe session scans for |NanPublishType.UNSOLICITED| publish sessions.
+  ACTIVE,      // Subscribe session probes for |NanPublishType.SOLICITED| publish sessions.
 };
 
 /**
  * NAN Service Response Filter Attribute Bit.
  */
 enum NanSrfType : uint32_t {
-  BLOOM_FILTER = 0,
-  PARTIAL_MAC_ADDR,
+  BLOOM_FILTER = 0, // Use a Bloom filter.
+  PARTIAL_MAC_ADDR, // Use a list of MAC addresses.
 };
 
 /**
- * NAN DP channel config options.
+ * NAN DP (data-path) channel config options.
  */
 enum NanDataPathChannelCfg : uint32_t {
-  CHANNEL_NOT_REQUESTED = 0,
-  REQUEST_CHANNEL_SETUP,
-  FORCE_CHANNEL_SETUP,
+  CHANNEL_NOT_REQUESTED = 0, // No channel request is specified.
+  REQUEST_CHANNEL_SETUP,     // Channel request is specified - but may be overridden by firmware.
+  FORCE_CHANNEL_SETUP,       // Channel request is specified and must be respected. If the firmware
+                             // cannot honor the request then the data-path request is rejected.
 };
 
 /**
@@ -680,86 +687,100 @@
  */
 struct NanBandSpecificConfig {
   /**
-   * RSSI values controlling clustering behavior per spec.
+   * RSSI values controlling clustering behavior per spec. RSSI values are specified without a sign,
+   * e.g. a value of -65dBm would be specified as 65.
    */
-  uint8_t rssiClose;
-  uint8_t rssiMiddle;
+  uint8_t rssiClose;  // NAN Spec: RSSI_close
+  uint8_t rssiMiddle; // NAN Spec: RSSI_middle
   /**
-   * RSSI value determining whether discovery is near (used if enabled in discovery).
+   * RSSI value determining whether discovery is near (used if enabled in discovery by
+   * |NanDiscoveryCommonConfig.useRssiThreshold|).
+   * RSSI values are specified without a sign, e.g. a value of -65dBm would be specified as 65.
+   * NAN Spec: RSSI_close_proximity
    */
-  uint8_t rssiProximity;
+  uint8_t rssiCloseProximity;
   /**
-   * Dwell time of each discovery channel in milliseconds.
-   * If time set to 0 then the FW default time must be used.
+   * Dwell time of each discovery channel in milliseconds. If set to 0 then the firmware determines
+   * the dwell time to use.
    */
   uint8_t dwellTimeMs;
   /**
-   * Scan period of each discovery channel in seconds.
-   * If time set to 0 then the FW default time must be used.
+   * Scan period of each discovery channel in seconds. If set to 0 then the firmware determines
+   * the scan period to use.
    */
   uint16_t scanPeriodSec;
    /**
-    * Specifies the interval for Sync beacons and SDF's.
+    * Specifies the discovery window interval for Sync beacons and SDF's.
     * Valid values of DW Interval are: 1, 2, 3, 4 and 5 corresponding to 1, 2, 4, 8, and 16 DWs.
     * Value of 0:
     *  - reserved in 2.4GHz band
     *  - no wakeup at all in 5GHz band
     * The publish/subscribe period values don't override the device level configurations if
-    * specified (if 'valid' is true).
+    * specified.
+    * Configuration is only used only if |validDiscoveryWindowIntervalVal| is set to true.
+    * NAN Spec: Device Capability Attribute / 2.4 GHz DW, Device Capability Attribute / 5 GHz DW
     */
   bool validDiscoveryWindowIntervalVal;
   uint8_t discoveryWindowIntervalVal;
 };
 
 /**
- * Configuration parameters
+ * Debug configuration parameters. Many of these allow non-standard-compliant operation and are
+ * not intended for normal operational mode.
  */
 struct NanDebugConfig {
   /**
-   * The low and high values of the cluster ID: standard values are 0x0000 - 0xFFFF.
-   * A clusterLow == clusterHigh indicates a request to join or create a cluster with that ID.
-   * Used if 'valid' is true.
+   * Specification of the lower 2 bytes of the cluster ID. The cluster ID is 50-60-9a-01-00-00 to
+   * 50-60-9a-01-FF-FF. Configuration of the bottom and top values of the range (which defaults to
+   * 0x0000 and 0xFFFF respectively).
+   * Configuration is only used if |validClusterIdVals| is set to true.
    */
   bool validClusterIdVals;
-  uint16_t clusterIdLowVal;
-  uint16_t clusterIdHighVal;
+  uint16_t clusterIdBottomRangeVal;
+  uint16_t clusterIdTopRangeVal;
   /**
-   * NAN management interface address, If specified ('valid' is true) then overrides any other
-   * configuration (specifically the default randomization).
+   * NAN management interface address, if specified (|validIntfAddrVal| is true) then overrides any
+   * other configuration (specifically the default randomization configured by
+   * |NanConfigRequest.macAddressRandomizationIntervalSec|).
    */
   bool validIntfAddrVal;
   MacAddress intfAddrVal;
   /**
-   * The 24 bit Organizationally Unique ID + the 8 bit Network Id. Used if 'valid' is true.
+   * Combination of the 24 bit Organizationally Unique ID (OUI) and the 8 bit OUI Type.
+   * Used if |validOuiVal| is set to true.
    */
   bool validOuiVal;
   uint32_t ouiVal;
   /**
-   * Force the Random Factor to the specified value for all transmitted Sync/Discovery beacons
-   * if the 'valid' flag is true.
+   * Force the Random Factor to the specified value for all transmitted Sync/Discovery beacons.
+   * Used if |validRandomFactorForceVal| is set to true.
+   * NAN Spec: Master Indication Attribute / Random Factor
    */
   bool validRandomFactorForceVal;
   uint8_t randomFactorForceVal;
   /**
    * Forces the hop-count for all transmitted Sync and Discovery Beacons NO matter the real
-   * hop-count being received over the air. Used if the 'valid' flag is true.
+   * hop-count being received over the air. Used if the |validHopCountForceVal}| flag is set to
+   * true.
+   * NAN Spec: Cluster Attribute / Anchor Master Information / Hop Count to Anchor Master
    */
   bool validHopCountForceVal;
   uint8_t hopCountForceVal;
   /**
    * Frequency in MHz to of the discovery channel in the specified band. Indexed by |NanBandIndex|.
+   * Used if the |validDiscoveryChannelVal| is set to true.
    */
   bool validDiscoveryChannelVal;
   WifiChannelInMhz[2] discoveryChannelMhzVal;
   /**
    * Specifies whether sync/discovery beacons are transmitted in the specified band. Indexed by
-   * |NanBandIndex|.
+   * |NanBandIndex|. Used if the |validUseBeaconsInBandVal| is set to true.
    */
   bool validUseBeaconsInBandVal;
   bool[2] useBeaconsInBandVal;
   /**
-   * Specified whether SDF (service discovery frames) are transmitted in the specified band. Indexed
-   * by |NanBandIndex|.
+   * Specifies whether SDF (service discovery frames) are transmitted in the specified band. Indexed
+   * by |NanBandIndex|. Used if the |validUseSdfInBandVal| is set to true.
    */
   bool validUseSdfInBandVal;
   bool[2] useSdfInBandVal;
@@ -771,34 +792,48 @@
 struct NanConfigRequest {
   /**
    * Master preference of this device.
+   * NAN Spec: Master Indication Attribute / Master Preference
    */
   uint8_t masterPref;
   /**
    * Controls whether or not the |IWifiNanIfaceEventCallback.eventClusterEvent| will be delivered
-   * for DISCOVERY_MAC_ADDRESS_CHANGED.
+   * for |NanClusterEventType.DISCOVERY_MAC_ADDRESS_CHANGED|.
    */
   bool disableDiscoveryAddressChangeIndication;
   /**
    * Controls whether or not the |IWifiNanIfaceEventCallback.eventClusterEvent| will be delivered
-   * for STARTED_CLUSTER.
+   * for |NanClusterEventType.STARTED_CLUSTER|.
    */
   bool disableStartedClusterIndication;
   /**
    * Controls whether or not the |IWifiNanIfaceEventCallback.eventClusterEvent| will be delivered
-   * for JOINED_CLUSTER.
+   * for |NanClusterEventType.JOINED_CLUSTER|.
    */
   bool disableJoinedClusterIndication;
   /**
-   * Control whether service IDs are included in Sync/Discovery beacons.
+   * Control whether publish service IDs are included in Sync/Discovery beacons.
+   * NAN Spec: Service ID List Attribute
    */
-  bool includeServiceIdsInBeacon;
+  bool includePublishServiceIdsInBeacon;
   /**
-   * If |includeServiceIdInBeacon| is true then specifies the number of service IDs to include
-   * in the Sync/Discovery beacons:
+   * If |includePublishServiceIdsInBeacon| is true then specifies the number of publish service IDs
+   * to include in the Sync/Discovery beacons:
    *  Value = 0: include as many service IDs as will fit into the maximum allowed beacon frame size.
    *  Value must fit within 7 bits - i.e. <= 127.
    */
-  uint8_t numberOfServiceIdsInBeacon;
+  uint8_t numberOfPublishServiceIdsInBeacon;
+  /**
+   * Control whether subscribe service IDs are included in Sync/Discovery beacons.
+   * Spec: Subscribe Service ID List Attribute
+   */
+  bool includeSubscribeServiceIdsInBeacon;
+  /**
+   * If |includeSubscribeServiceIdsInBeacon| is true then specifies the number of subscribe service
+   * IDs to include in the Sync/Discovery beacons:
+   *  Value = 0: include as many service IDs as will fit into the maximum allowed beacon frame size.
+   *  Value must fit within 7 bits - i.e. <= 127.
+   */
+  uint8_t numberOfSubscribeServiceIdsInBeacon;
   /**
    * Number of samples used to calculate RSSI.
    */
@@ -820,7 +855,7 @@
 };
 
 /**
- * Enable requests for NAN: start-up configuration.
+ * Enable requests for NAN: start-up configuration |IWifiNanIface.enableRequest|.
  */
 struct NanEnableRequest {
   /**
@@ -833,30 +868,31 @@
   uint8_t hopCountMax;
   /**
    * Configurations of NAN cluster operation. Can also be modified at run-time using
-   * |configRequest|.
+   * |IWifiNanIface.configRequest|.
    */
   NanConfigRequest configParams;
   /**
-   * Non-standard configurations of NAN cluster operation - useful for debugging opeations.
+   * Non-standard configurations of NAN cluster operation - useful for debugging operations.
    */
   NanDebugConfig debugConfigs;
 };
 
 /**
- * Cipher suite flags - to be used as a bitmask.
+ * Cipher suite flags.
  */
 enum NanCipherSuiteType : uint32_t {
-  SHARED_KEY_128_MASK = 1 << 0,
-  SHARED_KEY_256_MASK = 1 << 1
+  SHARED_KEY_128_MASK = 1 << 0, // NCS-SK-128
+  SHARED_KEY_256_MASK = 1 << 1  // NCS-SK-256
 };
 
 /**
- * Ranging in the context of discovery sessions indication controls - to be used as a bitmask.
+ * Ranging in the context of discovery sessions indication controls. Controls the frequency of
+ * ranging-driven |IWifiNanIfaceEventCallback.eventMatch|.
  */
 enum NanRangingIndication : uint32_t {
-  CONTINUOUS_INDICATION_MASK = 1 << 0,
-  INGRESS_MET_MASK = 1 << 1,
-  EGRESS_MET_MASK = 1 << 2
+  CONTINUOUS_INDICATION_MASK = 1 << 0, // trigger event on every RTT measurement
+  INGRESS_MET_MASK = 1 << 1,           // trigger event only when ingress conditions met
+  EGRESS_MET_MASK = 1 << 2             // trigger event only when egress conditions met
 };
 
 /**
@@ -865,58 +901,82 @@
 struct NanDiscoveryCommonConfig {
   /**
    * The ID of the discovery session being configured. A value of 0 specifies a request to create
-   * a new discovery session.
+   * a new discovery session. The new discovery session ID is returned with
+   * |IWifiNanIfaceEventCallback.notifyStartPublishResponse| or
+   * |IWifiNanIfaceEventCallback.notifyStartSubscribeResponse|.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Instance ID
    */
   uint8_t sessionId;
   /**
    * The lifetime of the discovery session in seconds. A value of 0 means run forever or until
-   * canceled.
+   * canceled using |IWifiIface.stopPublishRequest| or |IWifiIface.stopSubscribeRequest|.
    */
   uint16_t ttlSec;
   /**
    * Indicates the interval between two Discovery Windows in which the device supporting the
-   * service is awake to transmit or receive the Service Discovery frames.
-   * Valid values of Awake DW Interval are: 1, 2, 4, 8 and 16. A value of 0 will default to 1.
+   * service is awake to transmit or receive the Service Discovery frames. Valid values of Awake
+   * DW Interval are: 1, 2, 4, 8 and 16. A value of 0 will default to 1. Overrides any
+   * |NanBandSpecificConfig.discoveryWindowIntervalVal| configurations.
    */
   uint16_t discoveryWindowPeriod;
   /**
-   * Number of other-air-air operations (i.e. active transmissions), 0 means forever or until
-   * canceled.
+   * The lifetime of the discovery session in number of transmitted SDF discovery packets. A value
+   * of 0 means forever or until canceled using |IWifiIface.stopPublishRequest| or
+   * |IWifiIface.stopSubscribeRequest|.
    */
   uint8_t discoveryCount;
   /**
    * UTF-8 encoded string identifying the service.
    * Max length: |NanCapabilities.maxServiceNameLen|.
+   * NAN Spec: The only acceptable single-byte UTF-8 symbols for a Service Name are alphanumeric
+   * values (A-Z, a-z, 0-9), the hyphen ('-'), and the period ('.'). All valid multi-byte UTF-8
+   * characters are acceptable in a Service Name.
    */
   vec<uint8_t> serviceName;
   /**
-   * Specifies the matching indication to host: once, continuous, or never.
+   * Specifies how often to trigger |IWifiNanIfaceEventCallback.eventMatch| when continuously
+   * discovering the same discovery session (with no changes).
    */
   NanMatchAlg discoveryMatchIndicator;
   /**
-   * Arbitrary information communicated as part of discovery.
+   * Arbitrary information communicated in discovery packets - there is no semantic meaning to these
+   * bytes. They are passed-through from publisher to subscriber as-is with no parsing.
    * Max length: |NanCapabilities.maxServiceSpecificInfoLen|.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Service Info
    */
   vec<uint8_t> serviceSpecificInfo;
   /**
-   * Ordered sequence of <length, value> pairs (length uses 1 byte) which specify further match
-   * criteria (beyond the service name).
+   * Arbitrary information communicated in discovery packets - there is no semantic meaning to these
+   * bytes. They are passed-through from publisher to subscriber as-is with no parsing.
+   * Max length: |NanCapabilities.maxExtendedServiceSpecificInfoLen|.
+   * Spec: Service Descriptor Extension Attribute (SDEA) / Service Info
+   */
+  vec<uint8_t> extendedServiceSpecificInfo;
+  /**
+   * Ordered sequence of <length, value> pairs (|length| uses 1 byte and contains the number of
+   * bytes in the |value| field) which specify further match criteria (beyond the service name).
+   * The match behavior is specified in details in the NAN spec.
    * Publisher: used in SOLICITED or SOLICITED_UNSOLICITED sessions.
    * Subscriber: used in ACTIVE or PASSIVE sessions.
    * Max length: |NanCapabilities.maxMatchFilterLen|.
+   * NAN Spec: matching_filter_rx
    */
   vec<uint8_t> rxMatchFilter;
   /**
-   * Ordered sequence of <length, value> pairs (length uses 1 byte) which specify further match
-   * criteria (beyond the service name).
+   * Ordered sequence of <length, value> pairs (|length| uses 1 byte and contains the number of
+   * bytes in the |value| field) which specify further match criteria (beyond the service name).
+   * The match behavior is specified in details in the NAN spec.
    * Publisher: used if provided.
-   * Subscriber: used in ACTIVE sessions.
+   * Subscriber: used (if provided) only in ACTIVE sessions.
    * Max length: |NanCapabilities.maxMatchFilterLen|.
+   * NAN Spec: matching_filter_tx and Service Descriptor Attribute (SDA) / Matching Filter
    */
   vec<uint8_t> txMatchFilter;
   /**
-   * Specifies whether or not the discovery session uses the |rssiProximity| value (configured
-   * in enable/configure requests) to filter out matched discovered peers.
+   * Specifies whether or not the discovery session uses the
+   * |NanBandSpecificConfig.rssiCloseProximity| value (configured in enable/configure requests) to
+   * filter out matched discovered peers.
+   * NAN Spec: Service Descriptor Attribute / Service Control / Discovery Range Limited.
    */
   bool useRssiThreshold;
   /**
@@ -935,45 +995,49 @@
    */
   bool disableFollowupReceivedIndication;
   /**
-   * Cipher types supported in data-paths constructed in the context of this discovery session. The
-   * |NanCipherSuiteType| bit fields are used to set this value.
+   * Cipher types supported in data-paths constructed in the context of this discovery session.
    */
   bitfield<NanCipherSuiteType> supportedCipherTypes;
   /**
-   * Optional PMK for data-paths constructed in the context of this discovery session. A PMK could
-   * also be provided during the actual construction of the data-path (which allows unique PMKs for
-   * each data-path).
+   * Optional Pairwise Master Key (PMK) for data-paths constructed in the context of this discovery
+   * session. A PMK can also be provided during the actual construction of the data-path (which
+   * allows for unique PMKs for each data-path).
    * Max length: 32
+   * Ref: IEEE 802.11i
    */
   vec<uint8_t> pmk;
   /**
    * Specifies whether or not security is enabled in any data-path (NDP) constructed in the context
    * of this discovery session.
+   * NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Security Required
    */
   bool securityEnabledInNdp;
   /**
    * Specifies whether or not there is a ranging requirement in this discovery session.
    * Note that ranging is only performed if all other match criteria with the peer are met.
+   * NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Ranging Require.
    */
   bool rangingRequired;
    /**
-    * Interval in msec between two ranging measurements.
-    * If the Awake DW interval in Enable/Config is larger than the ranging interval - priority is
-    * given to Awake DW interval.
+    * Interval in msec between two ranging measurements. Only relevant if |rangingRequired| is true.
+    * If the Awake DW interval specified either in |discoveryWindowPeriod| or in
+    * |NanBandSpecificConfig.discoveryWindowIntervalVal| is larger than the ranging interval then
+    * priority is given to Awake DW interval.
     */
   uint32_t rangingIntervalMsec;
   /**
-   * The type of ranging indication feedback to be provided by discovery session matches. Use
-   * bit-fields from |NanRangingIndication|.
+   * The type of ranging feedback to be provided by discovery session matches
+   * |IWifiNanIfaceEventCallback.eventMatch|. Only relevant if |rangingRequired| is true.
    */
    bitfield<NanRangingIndication> configRangingIndications;
    /**
-    * The ingress and egress distance in cm. If ranging is eanbled (|rangingEnabled| is true) then
-    * \configRangingIndications\ is used to determine whether ingress and/or egress (or neither)
+    * The ingress and egress distance in cm. If ranging is enabled (|rangingEnabled| is true) then
+    * |configRangingIndications| is used to determine whether ingress and/or egress (or neither)
     * are used to determine whether a match has occurred.
+    * NAN Spec: Service Discovery Extension Attribute (SDEA) / Ingress & Egress Range Limit
     */
-   uint32_t distanceIngressCm;
-   uint32_t distanceEgressCm;
+   uint16_t distanceIngressCm;
+   uint16_t distanceEgressCm;
 };
 
 /**
@@ -1009,27 +1073,35 @@
    */
   NanSubscribeType subscribeType;
   /**
-   * For Active subscribe discovery sessions specify how the Service Response Filter (SRF)
-   * attribute is populated.
+   * For |NanSubscribeType.ACTIVE| subscribe discovery sessions specify how the Service Response
+   * Filter (SRF) attribute is populated. Relevant only if |shouldUseSrf| is set to true.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Service Response Filter / SRF Control / SRF Type
    */
   NanSrfType srfType;
   /**
-   * Configure the requested response of the Service Response Filter (SRF).
+   * Configure whether inclusion of an address in |intfAddr| indicates that those devices should
+   * respond or the reverse. Relevant only if |shouldUseSrf| is set to true and |srfType| is set to
+   * |NanSrfType.PARTIAL_MAC_ADDR|.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Service Response Filter / SRF Control / Include
    */
   bool srfRespondIfInAddressSet;
   /**
-   * Control whether the Service Response Filter (SRF) is transmitted OTA.
+   * Control whether the Service Response Filter (SRF) is used.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Service Control /
+   *           Service Response Filter Present
    */
   bool shouldUseSrf;
   /**
-   * Control whether the Service Specific Info (SSI) is needed in the Publish message to trigger
-   * service discovery (a match).
+   * Control whether the presence of |NanDiscoveryCommonConfig.serviceSpecificInfo| data is needed
+   * in the publisher in order to trigger service discovery, i.e. a
+   * |IWifiNanIfaceEventCallback.eventMatch|. The test is for presence of data - not for the
+   * specific contents of the data.
    */
   bool isSsiRequiredForMatch;
   /**
-   * NAN Interface Address, conforming to the format as described in
-   * 8.2.4.3.2 of IEEE Std. 802.11-2012.
-   * Max length: |NanCapabilities.maxSubscribeInterfaceAddresses|.
+   * NAN Interface Addresses constituting the Service Response Filter (SRF).
+   * Max length (number of addresses): |NanCapabilities.maxSubscribeInterfaceAddresses|.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Service Response Filter / Address Set
    */
   vec<MacAddress> intfAddr;
 };
@@ -1041,15 +1113,17 @@
   /**
    * ID of an active publish or subscribe discovery session. Follow-up message is transmitted in the
    * context of the discovery session.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Instance ID
    */
   uint8_t discoverySessionId;
   /**
-   * ID of the peer. Obtained as part of an earlier |eventMatch| or |eventFollowupReceived|.
+   * ID of the peer. Obtained as part of an earlier |IWifiNanIfaceEventCallback.eventMatch| or
+   * |IWifiNanIfaceEventCallback.eventFollowupReceived|.
    */
   uint32_t peerId;
   /**
-   * MAC address of the peer. Obtained as part of an earlier |eventMatch| or
-   * |eventFollowupReceived|.
+   * MAC address of the peer. Obtained as part of an earlier |IWifiNanIfaceEventCallback.eventMatch|
+   * or |IWifiNanIfaceEventCallback.eventFollowupReceived|.
    */
   MacAddress addr;
   /**
@@ -1062,13 +1136,22 @@
    */
   bool shouldUseDiscoveryWindow;
   /**
-   * Message as a byte sequence.
+   * Arbitrary information communicated to the peer - there is no semantic meaning to these
+   * bytes. They are passed-through from sender to receiver as-is with no parsing.
    * Max length: |NanCapabilities.maxServiceSpecificInfoLen|.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Service Info
    */
-  vec<uint8_t> message;
+  vec<uint8_t> serviceSpecificInfo;
   /**
-   * Disable |eventTransmitFollowup| - i.e. do not get indication on whether the follow-up
-   * was transmitted and received successfully.
+   * Arbitrary information communicated in discovery packets - there is no semantic meaning to these
+   * bytes. They are passed-through from publisher to subscriber as-is with no parsing.
+   * Max length: |NanCapabilities.maxExtendedServiceSpecificInfoLen|.
+   * Spec: Service Descriptor Extension Attribute (SDEA) / Service Info
+   */
+  vec<uint8_t> extendedServiceSpecificInfo;
+  /**
+   * Disable |IWifiNanIfaceEventCallback.eventTransmitFollowup| - i.e. do not get indication on
+   * whether the follow-up was transmitted and received successfully.
    */
   bool disableFollowupResultIndication;
 };
@@ -1078,11 +1161,13 @@
  */
 struct NanInitiateDataPathRequest {
   /**
-   * ID of the peer. Obtained as part of an earlier |eventMatch| or |eventFollowupReceived|.
+   * ID of the peer. Obtained as part of an earlier |IWifiNanIfaceEventCallback.eventMatch| or
+   * |IWifiNanIfaceEventCallback.eventFollowupReceived|.
    */
   uint32_t peerId;
   /**
-   * NAN management interface MAC address of the peer.
+   * NAN management interface MAC address of the peer. Obtained as part of an earlier
+   * |IWifiNanIfaceEventCallback.eventMatch| or |IWifiNanIfaceEventCallback.eventFollowupReceived|.
    */
   MacAddress peerDiscMacAddr;
   /**
@@ -1090,31 +1175,36 @@
    */
   NanDataPathChannelCfg channelRequestType;
   /**
-   * Channel frequency in MHz to start data-path.
+   * Channel frequency in MHz to start data-path. Not relevant if |channelRequestType| is
+   * |NanDataPathChannelCfg.CHANNEL_NOT_REQUESTED|.
    */
   WifiChannelInMhz channel;
   /**
-   * NAN data interface name on which this data-path session is to be started.
-   * This must be an interface created using |createDataInterfaceRequest|.
+   * NAN data interface name on which this data-path session is to be initiated.
+   * This must be an interface created using |IWifiNanIface.createDataInterfaceRequest|.
    */
   string ifaceName;
   /**
    * Specifies whether or not security is required for the data-path being created.
+   * NAN Spec: Data Path Attributes / NDP Attribute / NDP Control / Security Present
    */
   bool securityRequired;
   /**
-   * Arbitrary token transmitted as part of the data-path negotiation (not encrypted).
+   * Arbitrary information communicated to the peer as part of the data-path setup process - there
+   * is no semantic meaning to these bytes. They are passed-through from sender to receiver as-is
+   * with no parsing.
    * Max length: |NanCapabilities.maxAppInfoLen|.
+   * NAN Spec: Data Path Attributes / NDP Attribute / NDP Specific Info
    */
   vec<uint8_t> appInfo;
   /**
-   * Cipher types supported in data-paths constructed in the context of this discovery session. The
-   * |NanCipherSuiteType| bit fields are used to set this value.
+   * Cipher types supported in data-paths constructed in the context of this discovery session.
    */
   bitfield<NanCipherSuiteType> supportedCipherTypes;
   /**
-   * PMK of the data-path being requested (if |securityRequired| is true).
+   * Pairwise Master Key (PMK) for the data-path being requested (if |securityRequired| is true).
    * Max length: 32
+   * Ref: IEEE 802.11i
    */
   vec<uint8_t> pmk;
 };
@@ -1125,34 +1215,38 @@
 struct NanRespondToDataPathIndicationRequest {
   /**
    * Accept (true) or reject (false) the request.
+   * NAN Spec: Data Path Attributes / NDP Attribute / Type and Status
    */
   bool acceptRequest;
   /**
    * ID of the data-path (NDP) for which we're responding - obtained as part of the request in
-   * |NanDataPathRequestInd|.
+   * |IWifiNanIfaceEventCallback.eventDataPathRequest|.
    */
   uint32_t ndpInstanceId;
   /**
    * NAN data interface name on which this data-path session is to be started.
-   * This must be an interface created using |createDataInterfaceRequest|.
+   * This must be an interface created using |IWifiNanIface.createDataInterfaceRequest|.
    */
   string ifaceName;
   /**
    * Specifies whether or not security is required for the data-path being created.
+   * NAN Spec: Data Path Attributes / NDP Attribute / NDP Control / Security Present
    */
   bool securityRequired;
   /**
-   * Arbitrary token transmitted as part of the data-path negotiation (not encrypted).
+   * Arbitrary information communicated to the peer as part of the data-path setup process - there
+   * is no semantic meaning to these bytes. They are passed-through from sender to receiver as-is
+   * with no parsing.
    * Max length: |NanCapabilities.maxAppInfoLen|.
+   * NAN Spec: Data Path Attributes / NDP Attribute / NDP Specific Info
    */
   vec<uint8_t> appInfo;
   /**
-   * Cipher types supported in data-paths constructed in the context of this discovery session. The
-   * |NanCipherSuiteType| bit fields are used to set this value.
+   * Cipher types supported in data-paths constructed in the context of this discovery session.
    */
   bitfield<NanCipherSuiteType> supportedCipherTypes;
   /**
-   * PMK of the data-path being requested (if |securityRequired| is true).
+   * Pairwise Master Key (PMK) for the data-path being negotiated (if |securityRequired| is true).
    * Max length: 32
    */
   vec<uint8_t> pmk;
@@ -1183,24 +1277,24 @@
    */
   uint32_t maxMatchFilterLen;
   /**
-   * Maximum length (in bytes) of aggregate match filters.
+   * Maximum length (in bytes) of aggregate match filters across all active sessions.
    */
   uint32_t maxTotalMatchFilterLen;
   /**
-   * Maximum length (in bytes) of the service specific info length or message length in follow-ups.
+   * Maximum length (in bytes) of the service specific info field.
    */
   uint32_t maxServiceSpecificInfoLen;
   /**
-   * Maximum length (in bytes) of vendor-specific (VSA) data.
+   * Maximum length (in bytes) of the extended service specific info field.
    */
-  uint32_t maxVsaDataLen;
+  uint32_t maxExtendedServiceSpecificInfoLen;
   /**
-   * Maximum number of data interfaces which can be created concurrently on the device.
+   * Maximum number of data interfaces (NDI) which can be created concurrently on the device.
    */
   uint32_t maxNdiInterfaces;
   /**
-   * Maximum number of data paths which can be created concurrently on each individual
-   * data interface.
+   * Maximum number of data paths (NDP) which can be created concurrently on each individual
+   * data interface (NDI).
    */
   uint32_t maxNdpSessions;
   /**
@@ -1214,7 +1308,7 @@
   /**
    * Maximum number MAC interface addresses which can be specified to a subscribe discovery session.
    */
-  uint32_t maxSubscribeInterfaceAddresses; // TODO: (hard-code to 42) get from HAL
+  uint32_t maxSubscribeInterfaceAddresses;
   /**
    * The set of supported Cipher suites. The |NanCipherSuiteType| bit fields are used.
    */
@@ -1227,10 +1321,12 @@
 struct NanMatchInd {
   /**
    * Publish or subscribe discovery session ID of an existing discovery session.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Instance ID
    */
   uint8_t discoverySessionId;
   /**
-   * A unique ID of the peer. Can be subsequently used in |transmitFollowupRequest|.
+   * A unique ID of the peer. Can be subsequently used in |IWifiNanIface.transmitFollowupRequest| or
+   * to set up a data-path.
    */
   uint32_t peerId;
   /**
@@ -1238,47 +1334,60 @@
    */
   MacAddress addr;
   /**
-   * The arbitrary information contained in the |serviceSpecificInfo| of the peer's discovery
-   * session.
+   * The arbitrary information contained in the |NanDiscoveryCommonConfig.serviceSpecificInfo| of
+   * the peer's discovery session configuration.
    * Max length: |NanCapabilities.maxServiceSpecificInfoLen|.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Service Info
    */
   vec<uint8_t> serviceSpecificInfo;
   /**
-   * Ordered sequence of <length, value> pairs (length uses 1 byte) of the peer's discovery session
-   * match filter.
+   * Arbitrary information communicated in discovery packets - there is no semantic meaning to these
+   * bytes. They are passed-through from publisher to subscriber as-is with no parsing.
+   * Max length: |NanCapabilities.maxExtendedServiceSpecificInfoLen|.
+   * Spec: Service Descriptor Extension Attribute (SDEA) / Service Info
+   */
+  vec<uint8_t> extendedServiceSpecificInfo;
+  /**
+   * The match filter from the discovery packet (publish or subscribe) which caused service
+   * discovery. Matches the peer's |NanDiscoveryCommonConfig.txMatchFilter|.
    * Max length: |NanCapabilities.maxMatchFilterLen|.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Matching Filter
    */
   vec<uint8_t> matchFilter;
   /**
-   * Indicates the type of discovery: Beacon if true, Service Discovery Frames (SDF) if false.
+   * Indicates the type of discovery: true if match occurred on a Beacon frame, false if the match
+   * occurred on a Service Discovery Frames (SDF).
    */
   bool matchOccuredInBeaconFlag;
   /**
-   * Flag to indicate FW is out of resource and that it can no longer
-   * track this Service Name.
+   * Flag to indicate firmware is out of resource and that it can no longer track this Service Name.
+   * Indicates that while |IWifiNanIfaceEventCallback.eventMatch| will be received, the
+   * |NanDiscoveryCommonConfig.discoveryMatchIndicator| configuration will not be honored.
    */
   bool outOfResourceFlag;
   /**
-   * If RSSI filtering was configured in discovery session setup then this
-   * field must contain the received RSSI value. It will contain 0 if RSSI filtering was not
-   * configured.
+   * If RSSI filtering was enabled using |NanDiscoveryCommonConfig.useRssiThreshold| in discovery
+   * session setup then this field contains the received RSSI value. It will contain 0 if RSSI
+   * filtering was not enabled.
    * RSSI values are returned without sign, e.g. -70dBm will be returned as 70.
    */
   uint8_t rssiValue;
   /**
    * Cipher types supported by the peer for data-paths constructed in the context of this discovery
-   * session. The |NanCipherSuiteType| bit fields are used to set this value.
+   * session.
    */
   bitfield<NanCipherSuiteType> peerSupportedCipherTypes;
   /**
    * Indicates whether or not the peer requires security enabled in any data-path (NDP) constructed
    * in the context of this discovery session.
+   * NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Security Required
    */
   bool peerRequiresSecurityEnabledInNdp;
   /**
-   * Indicates whether or not the peer requires (and hence allows) ranging in this discovery
-   * session.
+   * Indicates whether or not the peer requires (and hence allows) ranging in the context of this
+   * discovery session.
    * Note that ranging is only performed if all other match criteria with the peer are met.
+   * NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Ranging Require.
    */
   bool peerRequiresRanging;
   /**
@@ -1299,8 +1408,8 @@
    */
   uint32_t rangingMeasurementInCm;
   /**
-   * The ranging event(s) which triggered the ranging. Uses bit-fields from |NanRangingIndication|.
-   * E.g. can indicate that continuous ranging is required, or else that an ingress event occurred.
+   * The ranging event(s) which triggered the ranging. E.g. can indicate that continuous ranging was
+   * requested, or else that an ingress event occurred.
    */
    bitfield<NanRangingIndication> rangingIndicationType;
 };
@@ -1312,10 +1421,12 @@
   /**
    * Discovery session (publish or subscribe) ID of a previously created discovery session. The
    * message is received in the context of this discovery session.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Instance ID
    */
   uint8_t discoverySessionId;
   /**
-   * A unique ID of the peer. Can be subsequently used in |transmitFollowupRequest|.
+   * A unique ID of the peer. Can be subsequently used in |IWifiNanIface.transmitFollowupRequest| or
+   * to set up a data-path.
    */
   uint32_t peerId;
   /**
@@ -1328,10 +1439,19 @@
    */
   bool receivedInFaw;
   /**
-   * Received message as a byte sequence.
+   * Received message from the peer - there is no semantic meaning to these bytes. They are
+   * passed-through from sender to receiver as-is with no parsing.
    * Max length: |NanCapabilities.maxServiceSpecificInfoLen|.
+   * NAN Spec: Service Descriptor Attribute (SDA) / Service Info
    */
-  vec<uint8_t> message;
+  vec<uint8_t> serviceSpecificInfo;
+  /**
+   * Arbitrary information communicated in discovery packets - there is no semantic meaning to these
+   * bytes. They are passed-through from publisher to subscriber as-is with no parsing.
+   * Max length: |NanCapabilities.maxExtendedServiceSpecificInfoLen|.
+   * Spec: Service Descriptor Extension Attribute (SDEA) / Service Info
+   */
+  vec<uint8_t> extendedServiceSpecificInfo;
 };
 
 /**
@@ -1377,6 +1497,7 @@
   /**
    * ID of an active publish or subscribe discovery session - the data-path request is in the
    * context of this discovery session.
+   * NAN Spec: Data Path Attributes / NDP Attribute / Publish ID
    */
   uint8_t discoverySessionId;
   /**
@@ -1390,11 +1511,15 @@
   uint32_t ndpInstanceId;
   /**
    * Specifies whether or not security is required by the peer for the data-path being created.
+   * NAN Spec: Data Path Attributes / NDP Attribute / NDP Control / Security Present
    */
   bool securityRequired;
   /**
-   * Arbitrary token transmitted by the peer as part of the data-path negotiation (not encrypted).
+   * Arbitrary information communicated from the peer as part of the data-path setup process - there
+   * is no semantic meaning to these bytes. They are passed-through from sender to receiver as-is
+   * with no parsing.
    * Max length: |NanCapabilities.maxAppInfoLen|.
+   * NAN Spec: Data Path Attributes / NDP Attribute / NDP Specific Info
    */
   vec<uint8_t> appInfo;
 };
@@ -1418,8 +1543,11 @@
    */
   MacAddress peerNdiMacAddr;
   /**
-   * Arbitrary token transmitted by the peer as part of the data-path negotiation (not encrypted).
+   * Arbitrary information communicated from the peer as part of the data-path setup process - there
+   * is no semantic meaning to these bytes. They are passed-through from sender to receiver as-is
+   * with no parsing.
    * Max length: |NanCapabilities.maxAppInfoLen|.
+   * NAN Spec: Data Path Attributes / NDP Attribute / NDP Specific Info
    */
   vec<uint8_t> appInfo;
   /**
diff --git a/wifi/1.0/vts/Wifi.vts b/wifi/1.0/vts/Wifi.vts
index 608e012..3f567a4 100644
--- a/wifi/1.0/vts/Wifi.vts
+++ b/wifi/1.0/vts/Wifi.vts
@@ -4,9 +4,20 @@
 
 package: "android.hardware.wifi"
 
+import: "android.hardware.wifi@1.0::IWifiApIface"
 import: "android.hardware.wifi@1.0::IWifiChip"
+import: "android.hardware.wifi@1.0::IWifiChipEventCallback"
 import: "android.hardware.wifi@1.0::IWifiEventCallback"
+import: "android.hardware.wifi@1.0::IWifiIface"
+import: "android.hardware.wifi@1.0::IWifiNanIface"
+import: "android.hardware.wifi@1.0::IWifiNanIfaceEventCallback"
+import: "android.hardware.wifi@1.0::IWifiP2pIface"
+import: "android.hardware.wifi@1.0::IWifiRttController"
+import: "android.hardware.wifi@1.0::IWifiRttControllerEventCallback"
+import: "android.hardware.wifi@1.0::IWifiStaIface"
+import: "android.hardware.wifi@1.0::IWifiStaIfaceEventCallback"
 import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
@@ -17,8 +28,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "IWifiEventCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiEventCallback"
         }
         callflow: {
             entry: true
@@ -95,8 +105,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiChip"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiChip"
         }
         arg: {
             type: TYPE_SCALAR
diff --git a/wifi/1.0/vts/WifiApIface.vts b/wifi/1.0/vts/WifiApIface.vts
index c4f3640..6b58058 100644
--- a/wifi/1.0/vts/WifiApIface.vts
+++ b/wifi/1.0/vts/WifiApIface.vts
@@ -5,6 +5,8 @@
 package: "android.hardware.wifi"
 
 import: "android.hardware.wifi@1.0::IWifiIface"
+import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
@@ -30,4 +32,20 @@
         }
     }
 
+    api: {
+        name: "setCountryCode"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_size: 2
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "int8_t"
+            }
+        }
+    }
+
 }
diff --git a/wifi/1.0/vts/WifiChip.vts b/wifi/1.0/vts/WifiChip.vts
index 4b278c1..1208202 100644
--- a/wifi/1.0/vts/WifiChip.vts
+++ b/wifi/1.0/vts/WifiChip.vts
@@ -8,10 +8,14 @@
 import: "android.hardware.wifi@1.0::IWifiChipEventCallback"
 import: "android.hardware.wifi@1.0::IWifiIface"
 import: "android.hardware.wifi@1.0::IWifiNanIface"
+import: "android.hardware.wifi@1.0::IWifiNanIfaceEventCallback"
 import: "android.hardware.wifi@1.0::IWifiP2pIface"
 import: "android.hardware.wifi@1.0::IWifiRttController"
+import: "android.hardware.wifi@1.0::IWifiRttControllerEventCallback"
 import: "android.hardware.wifi@1.0::IWifiStaIface"
+import: "android.hardware.wifi@1.0::IWifiStaIfaceEventCallback"
 import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     attribute: {
@@ -137,8 +141,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "IWifiChipEventCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiChipEventCallback"
         }
     }
 
@@ -150,6 +153,7 @@
         }
         return_type_hidl: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::V1_0::IWifiChip::ChipCapabilityMask"
         }
     }
@@ -243,8 +247,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiApIface"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiApIface"
         }
     }
 
@@ -270,8 +273,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiApIface"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiApIface"
         }
         arg: {
             type: TYPE_STRING
@@ -297,8 +299,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiNanIface"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiNanIface"
         }
     }
 
@@ -324,8 +325,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiNanIface"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiNanIface"
         }
         arg: {
             type: TYPE_STRING
@@ -351,8 +351,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiP2pIface"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiP2pIface"
         }
     }
 
@@ -378,8 +377,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiP2pIface"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiP2pIface"
         }
         arg: {
             type: TYPE_STRING
@@ -405,8 +403,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiStaIface"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiStaIface"
         }
     }
 
@@ -432,8 +429,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiStaIface"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiStaIface"
         }
         arg: {
             type: TYPE_STRING
@@ -459,13 +455,11 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiRttController"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiRttController"
         }
         arg: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiIface"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiIface"
         }
     }
 
diff --git a/wifi/1.0/vts/WifiChipEventCallback.vts b/wifi/1.0/vts/WifiChipEventCallback.vts
index c755162..2246f82 100644
--- a/wifi/1.0/vts/WifiChipEventCallback.vts
+++ b/wifi/1.0/vts/WifiChipEventCallback.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.wifi"
 
 import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
diff --git a/wifi/1.0/vts/WifiEventCallback.vts b/wifi/1.0/vts/WifiEventCallback.vts
index a0cf667..60ec87c 100644
--- a/wifi/1.0/vts/WifiEventCallback.vts
+++ b/wifi/1.0/vts/WifiEventCallback.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.wifi"
 
 import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
diff --git a/wifi/1.0/vts/WifiIface.vts b/wifi/1.0/vts/WifiIface.vts
index 1434a3e..0de0f8d 100644
--- a/wifi/1.0/vts/WifiIface.vts
+++ b/wifi/1.0/vts/WifiIface.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.wifi"
 
 import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
diff --git a/wifi/1.0/vts/WifiNanIface.vts b/wifi/1.0/vts/WifiNanIface.vts
index c06f985..66c8755 100644
--- a/wifi/1.0/vts/WifiNanIface.vts
+++ b/wifi/1.0/vts/WifiNanIface.vts
@@ -7,6 +7,7 @@
 import: "android.hardware.wifi@1.0::IWifiIface"
 import: "android.hardware.wifi@1.0::IWifiNanIfaceEventCallback"
 import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
@@ -40,8 +41,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "IWifiNanIfaceEventCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiNanIfaceEventCallback"
         }
     }
 
@@ -129,7 +129,7 @@
         }
         arg: {
             type: TYPE_SCALAR
-            scalar_type: "uint16_t"
+            scalar_type: "uint8_t"
         }
     }
 
@@ -161,7 +161,7 @@
         }
         arg: {
             type: TYPE_SCALAR
-            scalar_type: "uint16_t"
+            scalar_type: "uint8_t"
         }
     }
 
diff --git a/wifi/1.0/vts/WifiNanIfaceEventCallback.vts b/wifi/1.0/vts/WifiNanIfaceEventCallback.vts
index 02d04ac..e3e82f7 100644
--- a/wifi/1.0/vts/WifiNanIfaceEventCallback.vts
+++ b/wifi/1.0/vts/WifiNanIfaceEventCallback.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.wifi"
 
 import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
@@ -71,7 +72,7 @@
         }
         arg: {
             type: TYPE_SCALAR
-            scalar_type: "uint16_t"
+            scalar_type: "uint8_t"
         }
     }
 
@@ -99,7 +100,7 @@
         }
         arg: {
             type: TYPE_SCALAR
-            scalar_type: "uint16_t"
+            scalar_type: "uint8_t"
         }
     }
 
@@ -161,6 +162,10 @@
             type: TYPE_STRUCT
             predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
         }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
     }
 
     api: {
@@ -173,10 +178,6 @@
             type: TYPE_STRUCT
             predefined_type: "::android::hardware::wifi::V1_0::WifiNanStatus"
         }
-        arg: {
-            type: TYPE_SCALAR
-            scalar_type: "uint32_t"
-        }
     }
 
     api: {
@@ -211,7 +212,7 @@
         name: "eventPublishTerminated"
         arg: {
             type: TYPE_SCALAR
-            scalar_type: "uint16_t"
+            scalar_type: "uint8_t"
         }
         arg: {
             type: TYPE_STRUCT
@@ -223,7 +224,7 @@
         name: "eventSubscribeTerminated"
         arg: {
             type: TYPE_SCALAR
-            scalar_type: "uint16_t"
+            scalar_type: "uint8_t"
         }
         arg: {
             type: TYPE_STRUCT
@@ -243,7 +244,7 @@
         name: "eventMatchExpired"
         arg: {
             type: TYPE_SCALAR
-            scalar_type: "uint16_t"
+            scalar_type: "uint8_t"
         }
         arg: {
             type: TYPE_SCALAR
diff --git a/wifi/1.0/vts/WifiP2pIface.vts b/wifi/1.0/vts/WifiP2pIface.vts
index b40c81e..220f332 100644
--- a/wifi/1.0/vts/WifiP2pIface.vts
+++ b/wifi/1.0/vts/WifiP2pIface.vts
@@ -5,6 +5,8 @@
 package: "android.hardware.wifi"
 
 import: "android.hardware.wifi@1.0::IWifiIface"
+import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
diff --git a/wifi/1.0/vts/WifiRttController.vts b/wifi/1.0/vts/WifiRttController.vts
index 0fd3626..45fb309 100644
--- a/wifi/1.0/vts/WifiRttController.vts
+++ b/wifi/1.0/vts/WifiRttController.vts
@@ -7,6 +7,7 @@
 import: "android.hardware.wifi@1.0::IWifiIface"
 import: "android.hardware.wifi@1.0::IWifiRttControllerEventCallback"
 import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
@@ -17,8 +18,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "IWifiIface"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiIface"
         }
     }
 
@@ -30,8 +30,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "IWifiRttControllerEventCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiRttControllerEventCallback"
         }
     }
 
@@ -68,8 +67,8 @@
             type: TYPE_VECTOR
             vector_value: {
                 type: TYPE_ARRAY
+                vector_size: 6
                 vector_value: {
-                    vector_size: 6
                     type: TYPE_SCALAR
                     scalar_type: "uint8_t"
                 }
diff --git a/wifi/1.0/vts/WifiRttControllerEventCallback.vts b/wifi/1.0/vts/WifiRttControllerEventCallback.vts
index 028fd03..e3c2651 100644
--- a/wifi/1.0/vts/WifiRttControllerEventCallback.vts
+++ b/wifi/1.0/vts/WifiRttControllerEventCallback.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.wifi"
 
 import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
diff --git a/wifi/1.0/vts/WifiStaIface.vts b/wifi/1.0/vts/WifiStaIface.vts
index 0cff792..1edf4db 100644
--- a/wifi/1.0/vts/WifiStaIface.vts
+++ b/wifi/1.0/vts/WifiStaIface.vts
@@ -7,6 +7,7 @@
 import: "android.hardware.wifi@1.0::IWifiIface"
 import: "android.hardware.wifi@1.0::IWifiStaIfaceEventCallback"
 import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     attribute: {
@@ -109,8 +110,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "IWifiStaIfaceEventCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::wifi::V1_0::IWifiStaIfaceEventCallback"
         }
     }
 
@@ -122,6 +122,7 @@
         }
         return_type_hidl: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::V1_0::IWifiStaIface::StaIfaceCapabilityMask"
         }
     }
@@ -351,16 +352,16 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -384,15 +385,23 @@
     }
 
     api: {
-        name: "startDebugPacketFateMonitoring"
+        name: "setScanningMacOui"
         return_type_hidl: {
             type: TYPE_STRUCT
             predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
         }
+        arg: {
+            type: TYPE_ARRAY
+            vector_size: 3
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
     }
 
     api: {
-        name: "stopDebugPacketFateMonitoring"
+        name: "startDebugPacketFateMonitoring"
         return_type_hidl: {
             type: TYPE_STRUCT
             predefined_type: "::android::hardware::wifi::V1_0::WifiStatus"
diff --git a/wifi/1.0/vts/WifiStaIfaceEventCallback.vts b/wifi/1.0/vts/WifiStaIfaceEventCallback.vts
index b04ad26..99bf03f 100644
--- a/wifi/1.0/vts/WifiStaIfaceEventCallback.vts
+++ b/wifi/1.0/vts/WifiStaIfaceEventCallback.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.wifi"
 
 import: "android.hardware.wifi@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
@@ -50,8 +51,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
diff --git a/wifi/1.0/vts/types.vts b/wifi/1.0/vts/types.vts
index fc52b69..388dbc3 100644
--- a/wifi/1.0/vts/types.vts
+++ b/wifi/1.0/vts/types.vts
@@ -383,6 +383,7 @@
     struct_value: {
         name: "eventReportScheme"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::wifi::V1_0::StaBackgroundScanBucketEventReportSchemeMask"
     }
     struct_value: {
@@ -567,8 +568,8 @@
     struct_value: {
         name: "bssid"
         type: TYPE_ARRAY
+        vector_size: 6
         vector_value: {
-            vector_size: 6
             type: TYPE_SCALAR
             scalar_type: "uint8_t"
         }
@@ -622,6 +623,7 @@
     struct_value: {
         name: "flags"
         type: TYPE_MASK
+        scalar_type: "int32_t"
         predefined_type: "::android::hardware::wifi::V1_0::StaScanDataFlagMask"
     }
     struct_value: {
@@ -662,8 +664,8 @@
         type: TYPE_VECTOR
         vector_value: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -674,8 +676,8 @@
         type: TYPE_VECTOR
         vector_value: {
             type: TYPE_ARRAY
+            vector_size: 32
             vector_value: {
-                vector_size: 32
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -689,11 +691,11 @@
     enum_value: {
         scalar_type: "uint8_t"
 
-        enumerator: "ENABLED"
+        enumerator: "DISABLED"
         scalar_value: {
             uint8_t: 0
         }
-        enumerator: "DISABLED"
+        enumerator: "ENABLED"
         scalar_value: {
             uint8_t: 1
         }
@@ -920,7 +922,7 @@
         scalar_type: "uint8_t"
     }
     struct_value: {
-        name: "rssiProximity"
+        name: "rssiCloseProximity"
         type: TYPE_SCALAR
         scalar_type: "uint8_t"
     }
@@ -955,12 +957,12 @@
         scalar_type: "bool_t"
     }
     struct_value: {
-        name: "clusterIdLowVal"
+        name: "clusterIdBottomRangeVal"
         type: TYPE_SCALAR
         scalar_type: "uint16_t"
     }
     struct_value: {
-        name: "clusterIdHighVal"
+        name: "clusterIdTopRangeVal"
         type: TYPE_SCALAR
         scalar_type: "uint16_t"
     }
@@ -972,8 +974,8 @@
     struct_value: {
         name: "intfAddrVal"
         type: TYPE_ARRAY
+        vector_size: 6
         vector_value: {
-            vector_size: 6
             type: TYPE_SCALAR
             scalar_type: "uint8_t"
         }
@@ -1015,7 +1017,8 @@
     }
     struct_value: {
         name: "discoveryChannelMhzVal"
-        type: TYPE_VECTOR
+        type: TYPE_ARRAY
+        vector_size: 2
         vector_value: {
             type: TYPE_SCALAR
             scalar_type: "uint32_t"
@@ -1028,7 +1031,8 @@
     }
     struct_value: {
         name: "useBeaconsInBandVal"
-        type: TYPE_VECTOR
+        type: TYPE_ARRAY
+        vector_size: 2
         vector_value: {
             type: TYPE_SCALAR
             scalar_type: "bool_t"
@@ -1041,7 +1045,8 @@
     }
     struct_value: {
         name: "useSdfInBandVal"
-        type: TYPE_VECTOR
+        type: TYPE_ARRAY
+        vector_size: 2
         vector_value: {
             type: TYPE_SCALAR
             scalar_type: "bool_t"
@@ -1073,12 +1078,22 @@
         scalar_type: "bool_t"
     }
     struct_value: {
-        name: "includeServiceIdsInBeacon"
+        name: "includePublishServiceIdsInBeacon"
         type: TYPE_SCALAR
         scalar_type: "bool_t"
     }
     struct_value: {
-        name: "numberOfServiceIdsInBeacon"
+        name: "numberOfPublishServiceIdsInBeacon"
+        type: TYPE_SCALAR
+        scalar_type: "uint8_t"
+    }
+    struct_value: {
+        name: "includeSubscribeServiceIdsInBeacon"
+        type: TYPE_SCALAR
+        scalar_type: "bool_t"
+    }
+    struct_value: {
+        name: "numberOfSubscribeServiceIdsInBeacon"
         type: TYPE_SCALAR
         scalar_type: "uint8_t"
     }
@@ -1099,10 +1114,46 @@
     }
     struct_value: {
         name: "bandSpecificConfig"
-        type: TYPE_VECTOR
+        type: TYPE_ARRAY
+        vector_size: 2
         vector_value: {
+            name: "::android::hardware::wifi::V1_0::NanBandSpecificConfig"
             type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::V1_0::NanBandSpecificConfig"
+            struct_value: {
+                name: "rssiClose"
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+            struct_value: {
+                name: "rssiMiddle"
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+            struct_value: {
+                name: "rssiCloseProximity"
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+            struct_value: {
+                name: "dwellTimeMs"
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+            struct_value: {
+                name: "scanPeriodSec"
+                type: TYPE_SCALAR
+                scalar_type: "uint16_t"
+            }
+            struct_value: {
+                name: "validDiscoveryWindowIntervalVal"
+                type: TYPE_SCALAR
+                scalar_type: "bool_t"
+            }
+            struct_value: {
+                name: "discoveryWindowIntervalVal"
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
         }
     }
 }
@@ -1112,7 +1163,8 @@
     type: TYPE_STRUCT
     struct_value: {
         name: "operateInBand"
-        type: TYPE_VECTOR
+        type: TYPE_ARRAY
+        vector_size: 2
         vector_value: {
             type: TYPE_SCALAR
             scalar_type: "bool_t"
@@ -1179,7 +1231,7 @@
     struct_value: {
         name: "sessionId"
         type: TYPE_SCALAR
-        scalar_type: "uint16_t"
+        scalar_type: "uint8_t"
     }
     struct_value: {
         name: "ttlSec"
@@ -1198,7 +1250,11 @@
     }
     struct_value: {
         name: "serviceName"
-        type: TYPE_STRING
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
     }
     struct_value: {
         name: "discoveryMatchIndicator"
@@ -1214,6 +1270,14 @@
         }
     }
     struct_value: {
+        name: "extendedServiceSpecificInfo"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+    }
+    struct_value: {
         name: "rxMatchFilter"
         type: TYPE_VECTOR
         vector_value: {
@@ -1252,6 +1316,7 @@
     struct_value: {
         name: "supportedCipherTypes"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::wifi::V1_0::NanCipherSuiteType"
     }
     struct_value: {
@@ -1280,17 +1345,18 @@
     struct_value: {
         name: "configRangingIndications"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::wifi::V1_0::NanRangingIndication"
     }
     struct_value: {
         name: "distanceIngressCm"
         type: TYPE_SCALAR
-        scalar_type: "uint32_t"
+        scalar_type: "uint16_t"
     }
     struct_value: {
         name: "distanceEgressCm"
         type: TYPE_SCALAR
-        scalar_type: "uint32_t"
+        scalar_type: "uint16_t"
     }
 }
 
@@ -1352,8 +1418,8 @@
         type: TYPE_VECTOR
         vector_value: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -1367,7 +1433,7 @@
     struct_value: {
         name: "discoverySessionId"
         type: TYPE_SCALAR
-        scalar_type: "uint16_t"
+        scalar_type: "uint8_t"
     }
     struct_value: {
         name: "peerId"
@@ -1377,8 +1443,8 @@
     struct_value: {
         name: "addr"
         type: TYPE_ARRAY
+        vector_size: 6
         vector_value: {
-            vector_size: 6
             type: TYPE_SCALAR
             scalar_type: "uint8_t"
         }
@@ -1394,7 +1460,15 @@
         scalar_type: "bool_t"
     }
     struct_value: {
-        name: "message"
+        name: "serviceSpecificInfo"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+    }
+    struct_value: {
+        name: "extendedServiceSpecificInfo"
         type: TYPE_VECTOR
         vector_value: {
             type: TYPE_SCALAR
@@ -1419,8 +1493,8 @@
     struct_value: {
         name: "peerDiscMacAddr"
         type: TYPE_ARRAY
+        vector_size: 6
         vector_value: {
-            vector_size: 6
             type: TYPE_SCALAR
             scalar_type: "uint8_t"
         }
@@ -1455,6 +1529,7 @@
     struct_value: {
         name: "supportedCipherTypes"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::wifi::V1_0::NanCipherSuiteType"
     }
     struct_value: {
@@ -1500,6 +1575,7 @@
     struct_value: {
         name: "supportedCipherTypes"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::wifi::V1_0::NanCipherSuiteType"
     }
     struct_value: {
@@ -1551,7 +1627,7 @@
         scalar_type: "uint32_t"
     }
     struct_value: {
-        name: "maxVsaDataLen"
+        name: "maxExtendedServiceSpecificInfoLen"
         type: TYPE_SCALAR
         scalar_type: "uint32_t"
     }
@@ -1583,6 +1659,7 @@
     struct_value: {
         name: "supportedCipherSuites"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::wifi::V1_0::NanCipherSuiteType"
     }
 }
@@ -1593,7 +1670,7 @@
     struct_value: {
         name: "discoverySessionId"
         type: TYPE_SCALAR
-        scalar_type: "uint16_t"
+        scalar_type: "uint8_t"
     }
     struct_value: {
         name: "peerId"
@@ -1603,8 +1680,8 @@
     struct_value: {
         name: "addr"
         type: TYPE_ARRAY
+        vector_size: 6
         vector_value: {
-            vector_size: 6
             type: TYPE_SCALAR
             scalar_type: "uint8_t"
         }
@@ -1618,6 +1695,14 @@
         }
     }
     struct_value: {
+        name: "extendedServiceSpecificInfo"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+    }
+    struct_value: {
         name: "matchFilter"
         type: TYPE_VECTOR
         vector_value: {
@@ -1643,6 +1728,7 @@
     struct_value: {
         name: "peerSupportedCipherTypes"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::wifi::V1_0::NanCipherSuiteType"
     }
     struct_value: {
@@ -1663,6 +1749,7 @@
     struct_value: {
         name: "rangingIndicationType"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::wifi::V1_0::NanRangingIndication"
     }
 }
@@ -1673,7 +1760,7 @@
     struct_value: {
         name: "discoverySessionId"
         type: TYPE_SCALAR
-        scalar_type: "uint16_t"
+        scalar_type: "uint8_t"
     }
     struct_value: {
         name: "peerId"
@@ -1683,8 +1770,8 @@
     struct_value: {
         name: "addr"
         type: TYPE_ARRAY
+        vector_size: 6
         vector_value: {
-            vector_size: 6
             type: TYPE_SCALAR
             scalar_type: "uint8_t"
         }
@@ -1695,7 +1782,15 @@
         scalar_type: "bool_t"
     }
     struct_value: {
-        name: "message"
+        name: "serviceSpecificInfo"
+        type: TYPE_VECTOR
+        vector_value: {
+            type: TYPE_SCALAR
+            scalar_type: "uint8_t"
+        }
+    }
+    struct_value: {
+        name: "extendedServiceSpecificInfo"
         type: TYPE_VECTOR
         vector_value: {
             type: TYPE_SCALAR
@@ -1736,8 +1831,8 @@
     struct_value: {
         name: "addr"
         type: TYPE_ARRAY
+        vector_size: 6
         vector_value: {
-            vector_size: 6
             type: TYPE_SCALAR
             scalar_type: "uint8_t"
         }
@@ -1745,39 +1840,18 @@
 }
 
 attribute: {
-    name: "::android::hardware::wifi::V1_0::NanVsaRxFrameMask"
-    type: TYPE_ENUM
-    enum_value: {
-        scalar_type: "uint32_t"
-
-        enumerator: "DISCOVERY_BEACON_MASK"
-        scalar_value: {
-            uint32_t: 1
-        }
-        enumerator: "SYNC_BEACON_MASK"
-        scalar_value: {
-            uint32_t: 2
-        }
-        enumerator: "SERVICE_DISCOVERY_MASK"
-        scalar_value: {
-            uint32_t: 4
-        }
-    }
-}
-
-attribute: {
     name: "::android::hardware::wifi::V1_0::NanDataPathRequestInd"
     type: TYPE_STRUCT
     struct_value: {
         name: "discoverySessionId"
         type: TYPE_SCALAR
-        scalar_type: "uint16_t"
+        scalar_type: "uint8_t"
     }
     struct_value: {
         name: "peerDiscMacAddr"
         type: TYPE_ARRAY
+        vector_size: 6
         vector_value: {
-            vector_size: 6
             type: TYPE_SCALAR
             scalar_type: "uint8_t"
         }
@@ -1818,8 +1892,8 @@
     struct_value: {
         name: "peerNdiMacAddr"
         type: TYPE_ARRAY
+        vector_size: 6
         vector_value: {
-            vector_size: 6
             type: TYPE_SCALAR
             scalar_type: "uint8_t"
         }
@@ -2018,8 +2092,8 @@
     struct_value: {
         name: "addr"
         type: TYPE_ARRAY
+        vector_size: 6
         vector_value: {
-            vector_size: 6
             type: TYPE_SCALAR
             scalar_type: "uint8_t"
         }
@@ -2097,8 +2171,8 @@
     struct_value: {
         name: "addr"
         type: TYPE_ARRAY
+        vector_size: 6
         vector_value: {
-            vector_size: 6
             type: TYPE_SCALAR
             scalar_type: "uint8_t"
         }
@@ -2246,11 +2320,13 @@
     struct_value: {
         name: "preambleSupport"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::wifi::V1_0::RttPreamble"
     }
     struct_value: {
         name: "bwSupport"
         type: TYPE_MASK
+        scalar_type: "uint32_t"
         predefined_type: "::android::hardware::wifi::V1_0::RttBw"
     }
     struct_value: {
@@ -2342,8 +2418,8 @@
     struct_value: {
         name: "countryCode"
         type: TYPE_ARRAY
+        vector_size: 2
         vector_value: {
-            vector_size: 2
             type: TYPE_SCALAR
             scalar_type: "int8_t"
         }
diff --git a/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal b/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal
index ad4290b..b6ee57f 100644
--- a/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal
@@ -195,43 +195,6 @@
   oneway onInvitationResult(Bssid bssid, P2pStatusCode status);
 
   /**
-   * Used to indicate a push-button request generated during provision discovery.
-   *
-   * @param p2pDeviceAddress P2P device address.
-   */
-  oneway onProvisionDiscoveryPbcRequest(MacAddress p2pDeviceAddress);
-
-  /**
-   * Used to indicate a push-button response generated during provision discovery.
-   *
-   * @param p2pDeviceAddress P2P device address.
-   */
-  oneway onProvisionDiscoveryPbcResponse(MacAddress p2pDeviceAddress);
-
-  /**
-   * Used to indicate the pin generated during provision discovery.
-   *
-   * @param p2pDeviceAddress P2P device address.
-   * @param generatedPin 8 digit pin generated.
-   */
-  oneway onProvisionDiscoveryShowPin(
-      MacAddress p2pDeviceAddress, string generatedPin);
-
-  /**
-   * Used to indicate that a pin needs to be entered during provision discovery.
-   *
-   * @param p2pDeviceAddress P2P device address.
-   */
-  oneway onProvisionDiscoveryEnterPin(MacAddress p2pDeviceAddress);
-
-  /**
-   * Used to indicate a provision discovery failure.
-   *
-   * @param p2pDeviceAddress P2P device address.
-   */
-  oneway onProvisionDiscoveryFailure(MacAddress p2pDeviceAddress);
-
-  /**
    * Used to indicate the completion of a P2P provision discovery request.
    *
    * @param p2pDeviceAddress P2P device address.
diff --git a/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
index c3ec060..34237f0 100644
--- a/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
@@ -257,13 +257,6 @@
                                     string url);
 
   /**
-   * Used to indicate the connection to a new network on this iface.
-   *
-   * @param bssid BSSID of the AP to which we connected.
-   */
-  oneway onConnected(Bssid bssid);
-
-  /**
    * Used to indicate the disconnection from the currently connected
    * network on this iface.
    *
@@ -277,13 +270,6 @@
           Bssid bssid, bool locallyGenerated, uint32_t reasonCode);
 
   /**
-   * Used to indicate the completion of association to an AP.
-   *
-   * @param bssid BSSID of the corresponding AP.
-   */
-  oneway onAssociationCompleted(Bssid bssid);
-
-  /**
    * Used to indicate an association rejection recieved from the AP
    * to which the connection is being attempted.
    *
diff --git a/wifi/supplicant/1.0/vts/Supplicant.vts b/wifi/supplicant/1.0/vts/Supplicant.vts
index 69fe209..534b1cf 100644
--- a/wifi/supplicant/1.0/vts/Supplicant.vts
+++ b/wifi/supplicant/1.0/vts/Supplicant.vts
@@ -6,7 +6,9 @@
 
 import: "android.hardware.wifi.supplicant@1.0::ISupplicantCallback"
 import: "android.hardware.wifi.supplicant@1.0::ISupplicantIface"
+import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
 import: "android.hardware.wifi.supplicant@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     attribute: {
@@ -64,8 +66,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "ISupplicantIface"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantIface"
         }
         arg: {
             type: TYPE_STRUCT
@@ -96,8 +97,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "ISupplicantCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantCallback"
         }
     }
 
diff --git a/wifi/supplicant/1.0/vts/SupplicantCallback.vts b/wifi/supplicant/1.0/vts/SupplicantCallback.vts
index e439bd6..2d9e991 100644
--- a/wifi/supplicant/1.0/vts/SupplicantCallback.vts
+++ b/wifi/supplicant/1.0/vts/SupplicantCallback.vts
@@ -4,6 +4,7 @@
 
 package: "android.hardware.wifi.supplicant"
 
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
diff --git a/wifi/supplicant/1.0/vts/SupplicantIface.vts b/wifi/supplicant/1.0/vts/SupplicantIface.vts
index 41c77f8..c703ec0 100644
--- a/wifi/supplicant/1.0/vts/SupplicantIface.vts
+++ b/wifi/supplicant/1.0/vts/SupplicantIface.vts
@@ -6,6 +6,7 @@
 
 import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
 import: "android.hardware.wifi.supplicant@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     attribute: {
@@ -68,8 +69,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "ISupplicantNetwork"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
         }
     }
 
@@ -93,8 +93,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "ISupplicantNetwork"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
         }
         arg: {
             type: TYPE_SCALAR
@@ -129,6 +128,22 @@
     }
 
     api: {
+        name: "setWpsDeviceType"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_size: 8
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
         name: "setWpsManufacturer"
         return_type_hidl: {
             type: TYPE_STRUCT
@@ -180,6 +195,7 @@
         }
         arg: {
             type: TYPE_MASK
+            scalar_type: "uint16_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
         }
     }
diff --git a/wifi/supplicant/1.0/vts/SupplicantNetwork.vts b/wifi/supplicant/1.0/vts/SupplicantNetwork.vts
index edcabce..c90f396 100644
--- a/wifi/supplicant/1.0/vts/SupplicantNetwork.vts
+++ b/wifi/supplicant/1.0/vts/SupplicantNetwork.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.wifi.supplicant"
 
 import: "android.hardware.wifi.supplicant@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
diff --git a/wifi/supplicant/1.0/vts/SupplicantP2pIface.vts b/wifi/supplicant/1.0/vts/SupplicantP2pIface.vts
index afa9a8c..2515b60 100644
--- a/wifi/supplicant/1.0/vts/SupplicantP2pIface.vts
+++ b/wifi/supplicant/1.0/vts/SupplicantP2pIface.vts
@@ -5,40 +5,13 @@
 package: "android.hardware.wifi.supplicant"
 
 import: "android.hardware.wifi.supplicant@1.0::ISupplicantIface"
+import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
 import: "android.hardware.wifi.supplicant@1.0::ISupplicantP2pIfaceCallback"
 import: "android.hardware.wifi.supplicant@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantIface::ParamSizeLimits"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "WPS_DEVICE_NAME_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "WPS_MANUFACTURER_MAX_LEN"
-            scalar_value: {
-                uint32_t: 64
-            }
-            enumerator: "WPS_MODEL_NAME_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "WPS_MODEL_NUMBER_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "WPS_SERIAL_NUMBER_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-        }
-    }
-
-    attribute: {
         name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIface::WpsProvisionMethod"
         type: TYPE_ENUM
         enum_value: {
@@ -126,8 +99,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "ISupplicantNetwork"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
         }
     }
 
@@ -151,8 +123,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "ISupplicantNetwork"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
         }
         arg: {
             type: TYPE_SCALAR
@@ -187,6 +158,22 @@
     }
 
     api: {
+        name: "setWpsDeviceType"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_size: 8
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
         name: "setWpsManufacturer"
         return_type_hidl: {
             type: TYPE_STRUCT
@@ -238,6 +225,7 @@
         }
         arg: {
             type: TYPE_MASK
+            scalar_type: "uint16_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
         }
     }
@@ -250,8 +238,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "ISupplicantP2pIfaceCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pIfaceCallback"
         }
     }
 
@@ -263,8 +250,8 @@
         }
         return_type_hidl: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -355,8 +342,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -398,8 +385,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -445,8 +432,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -464,16 +451,16 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -492,8 +479,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -562,8 +549,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -578,12 +565,13 @@
         }
         return_type_hidl: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::P2pGroupCapabilityMask"
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -677,8 +665,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -727,8 +715,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -763,8 +751,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -802,8 +790,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 8
             vector_value: {
-                vector_size: 8
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
diff --git a/wifi/supplicant/1.0/vts/SupplicantP2pIfaceCallback.vts b/wifi/supplicant/1.0/vts/SupplicantP2pIfaceCallback.vts
index 09fd779..b3cf05b 100644
--- a/wifi/supplicant/1.0/vts/SupplicantP2pIfaceCallback.vts
+++ b/wifi/supplicant/1.0/vts/SupplicantP2pIfaceCallback.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.wifi.supplicant"
 
 import: "android.hardware.wifi.supplicant@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     attribute: {
@@ -158,24 +159,24 @@
         name: "onDeviceFound"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 8
             vector_value: {
-                vector_size: 8
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -185,6 +186,7 @@
         }
         arg: {
             type: TYPE_MASK
+            scalar_type: "uint16_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
         }
         arg: {
@@ -193,12 +195,13 @@
         }
         arg: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::P2pGroupCapabilityMask"
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 8
             vector_value: {
-                vector_size: 8
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -209,8 +212,8 @@
         name: "onDeviceLost"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -225,8 +228,8 @@
         name: "onGoNegotiationRequest"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -278,8 +281,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 32
             vector_value: {
-                vector_size: 32
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -289,8 +292,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -316,24 +319,24 @@
         name: "onInvitationReceived"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -352,8 +355,8 @@
         name: "onInvitationResult"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -368,8 +371,8 @@
         name: "onProvisionDiscoveryPbcRequest"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -380,8 +383,8 @@
         name: "onProvisionDiscoveryPbcResponse"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -392,8 +395,8 @@
         name: "onProvisionDiscoveryShowPin"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -407,8 +410,8 @@
         name: "onProvisionDiscoveryEnterPin"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -419,8 +422,8 @@
         name: "onProvisionDiscoveryFailure"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -431,8 +434,8 @@
         name: "onProvisionDiscoveryCompleted"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -447,6 +450,7 @@
         }
         arg: {
             type: TYPE_MASK
+            scalar_type: "uint16_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
         }
         arg: {
@@ -458,8 +462,8 @@
         name: "onServiceDiscoveryResponse"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -481,16 +485,16 @@
         name: "onStaAuthorized"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -501,16 +505,16 @@
         name: "onStaDeauthorized"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
diff --git a/wifi/supplicant/1.0/vts/SupplicantP2pNetwork.vts b/wifi/supplicant/1.0/vts/SupplicantP2pNetwork.vts
index fddcca3..8d0b5a1 100644
--- a/wifi/supplicant/1.0/vts/SupplicantP2pNetwork.vts
+++ b/wifi/supplicant/1.0/vts/SupplicantP2pNetwork.vts
@@ -7,6 +7,7 @@
 import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
 import: "android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetworkCallback"
 import: "android.hardware.wifi.supplicant@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     api: {
@@ -52,8 +53,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "ISupplicantP2pNetworkCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantP2pNetworkCallback"
         }
     }
 
@@ -80,8 +80,8 @@
         }
         return_type_hidl: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
diff --git a/wifi/supplicant/1.0/vts/SupplicantP2pNetworkCallback.vts b/wifi/supplicant/1.0/vts/SupplicantP2pNetworkCallback.vts
index 0e9ccde..9493c5e 100644
--- a/wifi/supplicant/1.0/vts/SupplicantP2pNetworkCallback.vts
+++ b/wifi/supplicant/1.0/vts/SupplicantP2pNetworkCallback.vts
@@ -4,6 +4,7 @@
 
 package: "android.hardware.wifi.supplicant"
 
+import: "android.hidl.base@1.0::types"
 
 interface: {
 }
diff --git a/wifi/supplicant/1.0/vts/SupplicantStaIface.vts b/wifi/supplicant/1.0/vts/SupplicantStaIface.vts
index ceadb6c..cc52487 100644
--- a/wifi/supplicant/1.0/vts/SupplicantStaIface.vts
+++ b/wifi/supplicant/1.0/vts/SupplicantStaIface.vts
@@ -5,40 +5,13 @@
 package: "android.hardware.wifi.supplicant"
 
 import: "android.hardware.wifi.supplicant@1.0::ISupplicantIface"
+import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
 import: "android.hardware.wifi.supplicant@1.0::ISupplicantStaIfaceCallback"
 import: "android.hardware.wifi.supplicant@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     attribute: {
-        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantIface::ParamSizeLimits"
-        type: TYPE_ENUM
-        enum_value: {
-            scalar_type: "uint32_t"
-
-            enumerator: "WPS_DEVICE_NAME_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "WPS_MANUFACTURER_MAX_LEN"
-            scalar_value: {
-                uint32_t: 64
-            }
-            enumerator: "WPS_MODEL_NAME_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "WPS_MODEL_NUMBER_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-            enumerator: "WPS_SERIAL_NUMBER_MAX_LEN"
-            scalar_value: {
-                uint32_t: 32
-            }
-        }
-    }
-
-    attribute: {
         name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::AnqpInfoId"
         type: TYPE_ENUM
         enum_value: {
@@ -134,6 +107,19 @@
         }
     }
 
+    attribute: {
+        name: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIface::ExtRadioWorkDefaults"
+        type: TYPE_ENUM
+        enum_value: {
+            scalar_type: "uint32_t"
+
+            enumerator: "TIMEOUT_IN_SECS"
+            scalar_value: {
+                uint32_t: 10
+            }
+        }
+    }
+
     api: {
         name: "getName"
         return_type_hidl: {
@@ -165,8 +151,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "ISupplicantNetwork"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
         }
     }
 
@@ -190,8 +175,7 @@
         }
         return_type_hidl: {
             type: TYPE_HIDL_INTERFACE
-            predefined_type: "ISupplicantNetwork"
-            is_callback: false
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantNetwork"
         }
         arg: {
             type: TYPE_SCALAR
@@ -226,6 +210,22 @@
     }
 
     api: {
+        name: "setWpsDeviceType"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_size: 8
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
         name: "setWpsManufacturer"
         return_type_hidl: {
             type: TYPE_STRUCT
@@ -277,6 +277,7 @@
         }
         arg: {
             type: TYPE_MASK
+            scalar_type: "uint16_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::WpsConfigMethods"
         }
     }
@@ -289,8 +290,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "ISupplicantStaIfaceCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaIfaceCallback"
         }
     }
 
@@ -338,8 +338,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -354,8 +354,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -370,8 +370,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -386,8 +386,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -416,8 +416,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -435,8 +435,8 @@
         }
         return_type_hidl: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -527,8 +527,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 2
             vector_value: {
-                vector_size: 2
                 type: TYPE_SCALAR
                 scalar_type: "int8_t"
             }
@@ -543,8 +543,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -562,8 +562,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -592,8 +592,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -620,4 +620,39 @@
         }
     }
 
+    api: {
+        name: "addExtRadioWork"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
+        }
+        return_type_hidl: {
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        arg: {
+            type: TYPE_STRING
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+    }
+
+    api: {
+        name: "removeExtRadioWork"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+    }
+
 }
diff --git a/wifi/supplicant/1.0/vts/SupplicantStaIfaceCallback.vts b/wifi/supplicant/1.0/vts/SupplicantStaIfaceCallback.vts
index 88b1c3b..0a35848 100644
--- a/wifi/supplicant/1.0/vts/SupplicantStaIfaceCallback.vts
+++ b/wifi/supplicant/1.0/vts/SupplicantStaIfaceCallback.vts
@@ -5,6 +5,7 @@
 package: "android.hardware.wifi.supplicant"
 
 import: "android.hardware.wifi.supplicant@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     attribute: {
@@ -305,8 +306,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -328,8 +329,8 @@
         name: "onAnqpQueryDone"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -348,8 +349,8 @@
         name: "onHs20IconQueryDone"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -396,8 +397,8 @@
         name: "onConnected"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -408,8 +409,8 @@
         name: "onDisconnected"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -428,8 +429,8 @@
         name: "onAssociationCompleted"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -440,8 +441,8 @@
         name: "onAssociationRejected"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -456,8 +457,8 @@
         name: "onAuthenticationTimeout"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -476,8 +477,8 @@
         name: "onWpsEventFail"
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -496,4 +497,20 @@
         name: "onWpsEventPbcOverlap"
     }
 
+    api: {
+        name: "onExtRadioWorkStart"
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+    }
+
+    api: {
+        name: "onExtRadioWorkTimeout"
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+    }
+
 }
diff --git a/wifi/supplicant/1.0/vts/SupplicantStaNetwork.vts b/wifi/supplicant/1.0/vts/SupplicantStaNetwork.vts
index f493b3e..8ad72f1 100644
--- a/wifi/supplicant/1.0/vts/SupplicantStaNetwork.vts
+++ b/wifi/supplicant/1.0/vts/SupplicantStaNetwork.vts
@@ -7,6 +7,7 @@
 import: "android.hardware.wifi.supplicant@1.0::ISupplicantNetwork"
 import: "android.hardware.wifi.supplicant@1.0::ISupplicantStaNetworkCallback"
 import: "android.hardware.wifi.supplicant@1.0::types"
+import: "android.hidl.base@1.0::types"
 
 interface: {
     attribute: {
@@ -247,8 +248,8 @@
         struct_value: {
             name: "kc"
             type: TYPE_ARRAY
+            vector_size: 8
             vector_value: {
-                vector_size: 8
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -256,8 +257,8 @@
         struct_value: {
             name: "sres"
             type: TYPE_ARRAY
+            vector_size: 4
             vector_value: {
-                vector_size: 4
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -278,8 +279,8 @@
         struct_value: {
             name: "ik"
             type: TYPE_ARRAY
+            vector_size: 16
             vector_value: {
-                vector_size: 16
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -287,8 +288,8 @@
         struct_value: {
             name: "ck"
             type: TYPE_ARRAY
+            vector_size: 16
             vector_value: {
-                vector_size: 16
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -338,8 +339,7 @@
         }
         arg: {
             type: TYPE_HIDL_CALLBACK
-            predefined_type: "ISupplicantStaNetworkCallback"
-            is_callback: true
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetworkCallback"
         }
     }
 
@@ -366,8 +366,8 @@
         }
         arg: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -394,6 +394,7 @@
         }
         arg: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::KeyMgmtMask"
         }
     }
@@ -406,6 +407,7 @@
         }
         arg: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::ProtoMask"
         }
     }
@@ -418,6 +420,7 @@
         }
         arg: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::AuthAlgMask"
         }
     }
@@ -430,6 +433,7 @@
         }
         arg: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::GroupCipherMask"
         }
     }
@@ -442,6 +446,7 @@
         }
         arg: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::PairwiseCipherMask"
         }
     }
@@ -670,6 +675,18 @@
     }
 
     api: {
+        name: "setProactiveKeyCaching"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
+        }
+    }
+
+    api: {
         name: "setIdStr"
         return_type_hidl: {
             type: TYPE_STRUCT
@@ -681,6 +698,18 @@
     }
 
     api: {
+        name: "setUpdateIdentifier"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
+        }
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "uint32_t"
+        }
+    }
+
+    api: {
         name: "getSsid"
         return_type_hidl: {
             type: TYPE_STRUCT
@@ -703,8 +732,8 @@
         }
         return_type_hidl: {
             type: TYPE_ARRAY
+            vector_size: 6
             vector_value: {
-                vector_size: 6
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -731,6 +760,7 @@
         }
         return_type_hidl: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::KeyMgmtMask"
         }
     }
@@ -743,6 +773,7 @@
         }
         return_type_hidl: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::ProtoMask"
         }
     }
@@ -755,6 +786,7 @@
         }
         return_type_hidl: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::AuthAlgMask"
         }
     }
@@ -767,6 +799,7 @@
         }
         return_type_hidl: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::GroupCipherMask"
         }
     }
@@ -779,6 +812,7 @@
         }
         return_type_hidl: {
             type: TYPE_MASK
+            scalar_type: "uint32_t"
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::PairwiseCipherMask"
         }
     }
@@ -1052,8 +1086,19 @@
             predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
         }
         arg: {
+            type: TYPE_VECTOR
+            vector_value: {
+                type: TYPE_STRUCT
+                predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::NetworkResponseEapSimGsmAuthParams"
+            }
+        }
+    }
+
+    api: {
+        name: "sendNetworkEapSimGsmAuthFailure"
+        return_type_hidl: {
             type: TYPE_STRUCT
-            predefined_type: "::android::hardware::wifi::supplicant::V1_0::ISupplicantStaNetwork::NetworkResponseEapSimGsmAuthParams"
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
         }
     }
 
@@ -1070,6 +1115,30 @@
     }
 
     api: {
+        name: "sendNetworkEapSimUmtsAutsResponse"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
+        }
+        arg: {
+            type: TYPE_ARRAY
+            vector_size: 14
+            vector_value: {
+                type: TYPE_SCALAR
+                scalar_type: "uint8_t"
+            }
+        }
+    }
+
+    api: {
+        name: "sendNetworkEapSimUmtsAuthFailure"
+        return_type_hidl: {
+            type: TYPE_STRUCT
+            predefined_type: "::android::hardware::wifi::supplicant::V1_0::SupplicantStatus"
+        }
+    }
+
+    api: {
         name: "sendNetworkEapIdentityResponse"
         return_type_hidl: {
             type: TYPE_STRUCT
diff --git a/wifi/supplicant/1.0/vts/SupplicantStaNetworkCallback.vts b/wifi/supplicant/1.0/vts/SupplicantStaNetworkCallback.vts
index 3fe2da7..1c91d57 100644
--- a/wifi/supplicant/1.0/vts/SupplicantStaNetworkCallback.vts
+++ b/wifi/supplicant/1.0/vts/SupplicantStaNetworkCallback.vts
@@ -4,6 +4,7 @@
 
 package: "android.hardware.wifi.supplicant"
 
+import: "android.hidl.base@1.0::types"
 
 interface: {
     attribute: {
@@ -14,8 +15,8 @@
             type: TYPE_VECTOR
             vector_value: {
                 type: TYPE_ARRAY
+                vector_size: 16
                 vector_value: {
-                    vector_size: 16
                     type: TYPE_SCALAR
                     scalar_type: "uint8_t"
                 }
@@ -29,8 +30,8 @@
         struct_value: {
             name: "rand"
             type: TYPE_ARRAY
+            vector_size: 16
             vector_value: {
-                vector_size: 16
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }
@@ -38,8 +39,8 @@
         struct_value: {
             name: "autn"
             type: TYPE_ARRAY
+            vector_size: 16
             vector_value: {
-                vector_size: 16
                 type: TYPE_SCALAR
                 scalar_type: "uint8_t"
             }