wifi(interface): Move all StaIface types to types.hal

Some of these structs are used in the debug framework and hence needs to
live in types.hal. Add a |Sta| prefix to differentiate them from other
types similar to what is done for Nan and Rtt types.

Bug: 31991459
Test: ./hardware/interfaces/update-makefiles.sh
Change-Id: Idc49b28447609c4334b0a086481c404c06a63fea
diff --git a/wifi/1.0/Android.mk b/wifi/1.0/Android.mk
index 291212d..bfd32d5 100644
--- a/wifi/1.0/Android.mk
+++ b/wifi/1.0/Android.mk
@@ -1288,6 +1288,227 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (StaApfPacketFilterCapabilities)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaApfPacketFilterCapabilities.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaApfPacketFilterCapabilities
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaBackgroundScanBand)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaBackgroundScanBand.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaBackgroundScanBand
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaBackgroundScanBucketEventReportSchemeMask)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaBackgroundScanBucketEventReportSchemeMask.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaBackgroundScanBucketEventReportSchemeMask
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaBackgroundScanBucketParameters)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaBackgroundScanBucketParameters.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaBackgroundScanBucketParameters
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaBackgroundScanCapabilities)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaBackgroundScanCapabilities.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaBackgroundScanCapabilities
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaBackgroundScanParameters)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaBackgroundScanParameters.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaBackgroundScanParameters
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaLinkLayerIfacePacketStats)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaLinkLayerIfacePacketStats.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaLinkLayerIfacePacketStats
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaLinkLayerIfaceStats)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaLinkLayerIfaceStats.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaLinkLayerIfaceStats
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaLinkLayerRadioStats)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaLinkLayerRadioStats.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaLinkLayerRadioStats
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaLinkLayerStats)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaLinkLayerStats.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaLinkLayerStats
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaScanData)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaScanData.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaScanData
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaScanDataFlagMask)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaScanDataFlagMask.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaScanDataFlagMask
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaScanResult)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaScanResult.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaScanResult
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (WifiChannelInfo)
 #
 GEN := $(intermediates)/android/hardware/wifi/1.0/WifiChannelInfo.java
@@ -2988,6 +3209,227 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (StaApfPacketFilterCapabilities)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaApfPacketFilterCapabilities.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaApfPacketFilterCapabilities
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaBackgroundScanBand)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaBackgroundScanBand.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaBackgroundScanBand
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaBackgroundScanBucketEventReportSchemeMask)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaBackgroundScanBucketEventReportSchemeMask.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaBackgroundScanBucketEventReportSchemeMask
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaBackgroundScanBucketParameters)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaBackgroundScanBucketParameters.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaBackgroundScanBucketParameters
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaBackgroundScanCapabilities)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaBackgroundScanCapabilities.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaBackgroundScanCapabilities
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaBackgroundScanParameters)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaBackgroundScanParameters.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaBackgroundScanParameters
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaLinkLayerIfacePacketStats)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaLinkLayerIfacePacketStats.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaLinkLayerIfacePacketStats
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaLinkLayerIfaceStats)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaLinkLayerIfaceStats.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaLinkLayerIfaceStats
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaLinkLayerRadioStats)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaLinkLayerRadioStats.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaLinkLayerRadioStats
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaLinkLayerStats)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaLinkLayerStats.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaLinkLayerStats
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaScanData)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaScanData.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaScanData
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaScanDataFlagMask)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaScanDataFlagMask.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaScanDataFlagMask
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (StaScanResult)
+#
+GEN := $(intermediates)/android/hardware/wifi/1.0/StaScanResult.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi@1.0::types.StaScanResult
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (WifiChannelInfo)
 #
 GEN := $(intermediates)/android/hardware/wifi/1.0/WifiChannelInfo.java
diff --git a/wifi/1.0/IWifiStaIface.hal b/wifi/1.0/IWifiStaIface.hal
index 5cf1413..3ca9b7d 100644
--- a/wifi/1.0/IWifiStaIface.hal
+++ b/wifi/1.0/IWifiStaIface.hal
@@ -43,263 +43,7 @@
     /**
      * If set indicates that the link layer stats APIs are supported.
      */
-    LINK_LAYER_STATS = 1 << 2
-  };
-
-  /**
-   * Parameters to specify the APF capability of this iface.
-   */
-  struct ApfPacketFilterCapabilities {
-    /**
-     * Version of the packet filter interpreter supported
-     */
-    uint32_t version;
-    /**
-     * Maximum size of the filter bytecodes in bytes for an iface.
-     */
-    uint32_t maxLength;
-  };
-
-  /**
-   * Parameters to specify the Background Scan capability of this iface.
-   */
-  struct BackgroundScanCapabilities {
-    /**
-     * Maximum number of bytes available for cached scan results
-     */
-    uint32_t maxCacheSize;
-    /**
-     * Maximum number of buckets that can be supplied for a scan
-     */
-    uint32_t maxBuckets;
-    /**
-     * Maximum number of APs that must be stored for each scan.
-     */
-    uint32_t maxApCachePerScan;
-    /**
-     * Max reporting number of scans threshold that can be specified in the scan
-     * parameters.
-     */
-    int32_t maxReportingThreshold;
-  };
-
-  /**
-   * Bands that can be specified in Background scan requests.
-   */
-  enum BackgroundScanBand : uint32_t {
-    BAND_UNSPECIFIED,
-    /**
-     * 2.4 GHz.
-     */
-    BAND_24GHZ = 1,
-    /**
-     * 5 GHz without DFS.
-     */
-    BAND_5GHZ = 2,
-    /**
-     * 5 GHz DFS only.
-     */
-    BAND_5GHZ_DFS = 4,
-    /**
-     * 5 GHz with DFS.
-     */
-    BAND_5GHZ_WITH_DFS = 6,
-    /**
-     * 2.4 GHz + 5 GHz; no DFS.
-     */
-    BAND_24GHZ_5GHZ = 3,
-    /**
-     * 2.4 GHz + 5 GHz with DFS
-     */
-    BAND_24GHZ_5GHZ_WITH_DFS = 7
-  };
-
-  /**
-   * Mask of event reporting schemes that can be specified in background scan
-   * requests.
-   */
-  enum BackgroundScanBucketEventReportSchemeMask : uint32_t {
-    /**
-     * Report a scan completion event after scan. If this is not set then scan
-     * completion events must be reported if report_threshold_percent or
-     * report_threshold_num_scans is reached.
-     */
-    EACH_SCAN = 1 << 0,
-    /**
-     * Forward scan results (beacons/probe responses + IEs) in real time to HAL,
-     * in addition to completion events.
-     * Note: To keep backward compatibility, fire completion events regardless
-     * of REPORT_EVENTS_EACH_SCAN.
-     */
-    FULL_RESULTS = 1 << 1,
-    /**
-     * Controls if scans for this bucket must be placed in the results buffer.
-     */
-    NO_BATCH = 1 << 2,
-  };
-
-  /**
-   * Background Scan parameters per bucket that can be specified in background
-   * scan requests.
-   */
-  struct BackgroundScanBucketParameters {
-    /**
-     * Bands to scan or 0 if frequencies list must be used instead.
-     */
-    BackgroundScanBand band;
-    /**
-     * Channel frequencies (in Mhz) to scan if |band| is set to
-     * |UNSPECIFIED|.
-     */
-    vec<WifiChannelInMhz> frequencies;
-    /**
-     * Period at which this bucket must be scanned (in milliseconds). Must be an integer
-     * multiple of the |basePeriodInMs| specified in the BackgroundScanParameters.
-     */
-    uint32_t periodInMs;
-    /**
-     * Bitset of |BackgroundScanBucketEventReportSchemeMask| values controlling
-     * when events for this bucket must be reported.
-     */
-    uint32_t eventReportScheme;
-    /**
-     * For exponential back off. If |exponentialMaxPeriodInMs| is non zero or
-     * different than period, then this bucket is an exponential backoff bucket
-     * and the scan period must grow exponentially as per formula:
-     *   actual_period(N) = period * (base ^ (N/step_count))
-     * to this maximum period (in milliseconds).
-     */
-    uint32_t exponentialMaxPeriodInMs;
-    /**
-     * For exponential back off. multiplier: new_period=old_period * base
-     */
-    uint32_t exponentialBase;
-    /**
-     * For exponential back off. Number of scans to perform for a given
-     * period.
-     */
-    uint32_t exponentialStepCount;
-  };
-
-  /**
-   * Background Scan parameters that can be specified in background scan
-   * requests.
-   */
-  struct BackgroundScanParameters {
-    /**
-     * GCD of all bucket periods (in milliseconds).
-     */
-    uint32_t basePeriodInMs;
-    /**
-     * Maximum number of APs that must be stored for each scan. If the maximum
-     * is reached the highest RSSI results must be returned.
-     */
-    uint32_t maxApPerScan;
-    /**
-     * % cache buffer filled threshold at which the host must be notified of
-     * batched scan results.
-     */
-    uint32_t reportThresholdPercent;
-    /**
-     * Threshold at which the AP must be woken up, in number of scans.
-     */
-    uint32_t reportThresholdNumScans;
-    /**
-     * List of buckets to be scheduled.
-     */
-    vec<BackgroundScanBucketParameters> buckets;
-  };
-
-  /**
-   * Packet stats for different traffic categories.
-   */
-  struct LinkLayerIfacePacketStats {
-    /**
-     * Number of received unicast data packets.
-     */
-    uint64_t rxMpdu;
-    /**
-     * Number of successfully transmitted unicast data pkts (ACK rcvd).
-     */
-    uint64_t txMpdu;
-    /**
-     * Number of transmitted unicast data pkt losses (no ACK).
-     */
-    uint64_t lostMpdu;
-    /**
-     * Number of transmitted unicast data retry pkts.
-     */
-    uint64_t retries;
-  };
-
-  /**
-   * Iface statistics for the current connection.
-   */
-  struct LinkLayerIfaceStats {
-    /**
-     * Number beacons received from the connected AP.
-     */
-    uint32_t beaconRx;
-    /**
-     * Access Point Beacon and Management frames RSSI (averaged).
-     */
-    int32_t avgRssiMgmt;
-    /**
-     * WME Best Effort Access Category packet counters.
-     */
-     LinkLayerIfacePacketStats wmeBePktStats;
-    /**
-     * WME Background Access Category packet counters.
-     */
-    LinkLayerIfacePacketStats wmeBkPktStats;
-    /**
-     * WME Video Access Category packet counters.
-     */
-    LinkLayerIfacePacketStats wmeViPktStats;
-    /**
-     * WME Voice Access Category packet counters.
-     */
-    LinkLayerIfacePacketStats wmeVoPktStats;
-  };
-
-  /**
-   * Cumulative radio statistics since collection was enabled.
-   */
-  struct LinkLayerRadioStats {
-    /**
-     * Time for which the radio is awake.
-     */
-    uint32_t onTimeInMs;
-    /**
-     * Total time for which the radio is in active transmission.
-     */
-    uint32_t txTimeInMs;
-    /**
-     * Time for which the radio is in active tranmission per tx level.
-     */
-    vec<uint32_t> txTimeInMsPerLevel;
-    /**
-     * Time for which the radio is in active receive.
-     */
-    uint32_t rxTimeInMs;
-    /**
-     *  Total time for which the radio is awake due to scan.
-     */
-    uint32_t onTimeInMsForScan;
-  };
-
-  /**
-   * Link layer stats retrieved via |getLinkLayerStats|.
-   */
-  struct LinkLayerStats {
-    LinkLayerIfaceStats iface;
-    LinkLayerRadioStats radio;
-    /**
-     * TimeStamp for each stats sample.
-     * This is the absolute milliseconds from boot when these stats were
-     * sampled.
-     */
-    TimeStampInMs timeStampInMs;
+    LINK_LAYER_STATS = 1 << 2,
   };
 
   /**
@@ -328,7 +72,7 @@
    *         |WifiStatusCode.ERROR_UNKNOWN|
    * @return capabilities Bitset of |StaIfaceCapabilityMask| values.
    */
-  getCapabilities() generates (WifiStatus status, uint64_t capabilities);
+  getCapabilities() generates (WifiStatus status, uint32_t capabilities);
 
   /**
    * Used to query additional information about the chip's APF capabilities.
@@ -341,10 +85,10 @@
    *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
    *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
    *         |WifiStatusCode.ERROR_UNKNOWN|
-   * @return capabilities Instance of |ApfPacketFilterCapabilities|.
+   * @return capabilities Instance of |StaApfPacketFilterCapabilities|.
    */
   getApfPacketFilterCapabilities()
-      generates (WifiStatus status, ApfPacketFilterCapabilities capabilities);
+      generates (WifiStatus status, StaApfPacketFilterCapabilities capabilities);
 
   /**
    * Installs an APF program on this iface, replacing an existing
@@ -376,10 +120,10 @@
    *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
    *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
    *         |WifiStatusCode.ERROR_UNKNOWN|
-   * @return capabilities Instance of |BackgroundScanCapabilities|.
+   * @return capabilities Instance of |StaBackgroundScanCapabilities|.
    */
   getBackgroundScanCapabilities()
-      generates (WifiStatus status, BackgroundScanCapabilities capabilities);
+      generates (WifiStatus status, StaBackgroundScanCapabilities capabilities);
 
   /**
    * Used to query the list of valid frequencies (depending on country code set)
@@ -388,6 +132,7 @@
    * request.
    * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
    *
+   * @param band Band for which the frequency list is being generated.
    * @return status WifiStatus of the operation.
    *         Possible status codes:
    *         |WifiStatusCode.SUCCESS|,
@@ -397,7 +142,7 @@
    *         |WifiStatusCode.ERROR_UNKNOWN|
    * @return frequencies vector of valid frequencies for the provided band.
    */
-  getValidFrequenciesForBackgroundScan(BackgroundScanBand band)
+  getValidFrequenciesForBackgroundScan(StaBackgroundScanBand band)
       generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
 
   /**
@@ -437,7 +182,7 @@
    *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
    *         |WifiStatusCode.ERROR_UNKNOWN|
    */
-  startBackgroundScan(CommandId cmdId, BackgroundScanParameters params)
+  startBackgroundScan(CommandId cmdId, StaBackgroundScanParameters params)
       generates (WifiStatus status);
 
   /**
@@ -504,5 +249,5 @@
    *         |WifiStatusCode.ERROR_UNKNOWN|
    * @return stats Instance of |LinkLayerStats|.
    */
-  getLinkLayerStats() generates (WifiStatus status, LinkLayerStats stats);
+  getLinkLayerStats() generates (WifiStatus status, StaLinkLayerStats stats);
 };
diff --git a/wifi/1.0/IWifiStaIfaceEventCallback.hal b/wifi/1.0/IWifiStaIfaceEventCallback.hal
index 6bffc7d..d47d40c 100644
--- a/wifi/1.0/IWifiStaIfaceEventCallback.hal
+++ b/wifi/1.0/IWifiStaIfaceEventCallback.hal
@@ -18,52 +18,6 @@
 
 interface IWifiStaIfaceEventCallback {
   /**
-   * Structure describing all the information about a single access point seen
-   * during the scan.
-   */
-  struct ScanResult {
-    TimeStampInUs timeStampInUs;
-    vec<uint8_t> ssid;
-    Bssid bssid;
-    Rssi rssi;
-    WifiChannelInMhz frequency;
-    uint16_t beaconPeriodInMs;
-    uint16_t capability;
-    vec<WifiInformationElement> informationElements;
-  };
-
-  /**
-   * Mask of flags set in the |ScanData| instance.
-   */
-  enum ScanDataFlagMask {
-    /**
-     * Indicates that a scan was interrupted/did not occur so results may be
-     * incomplete.
-     */
-    WIFI_SCAN_FLAG_INTERRUPTED = 1 << 0,
-  };
-
-  /**
-   * Structure describing all the information about all the access points seen during
-   * the scan.
-   */
-  struct ScanData {
-    /**
-     * Bitset containing |ScanDataFlagMask| values.
-     */
-    uint32_t flags;
-    /**
-     * Bitset where each bit indicates if the bucket with that index was
-     * scanned.
-     */
-    uint32_t bucketsScanned;
-    /**
-     * List of scan results.
-     */
-    vec<ScanResult> results;
-  };
-
-  /**
    * Callback indicating that an ongoing background scan request has failed.
    * The background scan needs to be restarted to continue scanning.
    */
@@ -72,15 +26,15 @@
   /**
    * Called for each received beacon/probe response for a scan with the
    * |REPORT_EVENTS_FULL_RESULTS| flag set in
-   * |BackgroundScanBucketParameters.eventReportScheme|.
+   * |StaBackgroundScanBucketParameters.eventReportScheme|.
    *
    * @param cmdId command Id corresponding to the request.
    * @parm result Full scan result for an AP.
    */
-  oneway onBackgroundFullScanResult(CommandId cmdId, ScanResult result);
+  oneway onBackgroundFullScanResult(CommandId cmdId, StaScanResult result);
 
   /**
-   * Called when the |BackgroundScanBucketParameters.eventReportScheme| flags
+   * Called when the |StaBackgroundScanBucketParameters.eventReportScheme| flags
    * for at least one bucket that was just scanned was
    * |REPORT_EVENTS_EACH_SCAN| or one of the configured thresholds was
    * breached.
@@ -88,5 +42,5 @@
    * @param cmdId command Id corresponding to the request.
    * @parm scanDatas List of scan result for all AP's seen since last callback.
    */
-  oneway onBackgroundScanResults(CommandId cmdId, vec<ScanData> scanDatas);
+  oneway onBackgroundScanResults(CommandId cmdId, vec<StaScanData> scanDatas);
 };
diff --git a/wifi/1.0/types.hal b/wifi/1.0/types.hal
index 02d2353..e7af6ee 100644
--- a/wifi/1.0/types.hal
+++ b/wifi/1.0/types.hal
@@ -203,6 +203,312 @@
 };
 
 /**
+ * STA specific types.
+ * TODO(b/32159498): Move to a separate nan_types.hal.
+ */
+/**
+ * Parameters to specify the APF capability of this iface.
+ */
+struct StaApfPacketFilterCapabilities {
+  /**
+   * Version of the packet filter interpreter supported
+   */
+  uint32_t version;
+  /**
+   * Maximum size of the filter bytecodes in byte for an iface.
+   */
+  uint32_t maxLength;
+};
+
+/**
+ * Parameters to specify the Background Scan capability of this iface.
+ */
+struct StaBackgroundScanCapabilities {
+  /**
+   * Maximum number of byte available for cached scan results
+   */
+  uint32_t maxCacheSize;
+  /**
+   * Maximum number of buckets that can be supplied for a scan
+   */
+  uint32_t maxBuckets;
+  /**
+   * Maximum number of APs that must be stored for each scan.
+   */
+  uint32_t maxApCachePerScan;
+  /**
+   * Max reporting number of scans threshold that can be specified in the scan
+   * parameters.
+   */
+  int32_t maxReportingThreshold;
+};
+
+/**
+ * Bands that can be specified in Background scan requests.
+ */
+enum StaBackgroundScanBand : uint32_t {
+  BAND_UNSPECIFIED,
+  /**
+   * 2.4 GHz.
+   */
+  BAND_24GHZ = 1,
+  /**
+   * 5 GHz without DFS.
+   */
+  BAND_5GHZ = 2,
+  /**
+   * 5 GHz DFS only.
+   */
+  BAND_5GHZ_DFS = 4,
+  /**
+   * 5 GHz with DFS.
+   */
+  BAND_5GHZ_WITH_DFS = 6,
+  /**
+   * 2.4 GHz + 5 GHz; no DFS.
+   */
+  BAND_24GHZ_5GHZ = 3,
+  /**
+   * 2.4 GHz + 5 GHz with DFS
+   */
+  BAND_24GHZ_5GHZ_WITH_DFS = 7
+};
+
+/**
+ * Mask of event reporting schemes that can be specified in background scan
+ * requests.
+ */
+enum StaBackgroundScanBucketEventReportSchemeMask : uint32_t {
+  /**
+   * Report a scan completion event after scan. If this is not set then scan
+   * completion events must be reported if report_threshold_percent or
+   * report_threshold_num_scans is reached.
+   */
+  EACH_SCAN = 1 << 0,
+  /**
+   * Forward scan results (beacons/probe responses + IEs) in real time to HAL,
+   * in addition to completion events.
+   * Note: To keep backward compatibility, fire completion events regardless
+   * of REPORT_EVENTS_EACH_SCAN.
+   */
+  FULL_RESULTS = 1 << 1,
+  /**
+   * Controls if scans for this bucket must be placed in the results buffer.
+   */
+  NO_BATCH = 1 << 2,
+};
+
+/**
+ * Background Scan parameters per bucket that can be specified in background
+ * scan requests.
+ */
+struct StaBackgroundScanBucketParameters {
+  /**
+   * Bands to scan or 0 if frequencies list must be used instead.
+   */
+  StaBackgroundScanBand band;
+  /**
+   * Channel frequencies (in Mhz) to scan if |band| is set to
+   * |UNSPECIFIED|.
+   */
+  vec<WifiChannelInMhz> frequencies;
+  /**
+   * Period at which this bucket must be scanned (in milliseconds). Must be an integer
+   * multiple of the |basePeriodInMs| specified in the BackgroundScanParameters.
+   */
+  uint32_t periodInMs;
+  /**
+   * Bitset of |BackgroundScanBucketEventReportSchemeMask| values controlling
+   * when events for this bucket must be reported.
+   */
+  uint32_t eventReportScheme;
+  /**
+   * For exponential back off. If |exponentialMaxPeriodInMs| is non zero or
+   * different than period, then this bucket is an exponential backoff bucket
+   * and the scan period must grow exponentially as per formula:
+   *   actual_period(N) = period * (base ^ (N/step_count))
+   * to this maximum period (in milliseconds).
+   */
+  uint32_t exponentialMaxPeriodInMs;
+  /**
+   * For exponential back off. multiplier: new_period=old_period * base
+   */
+  uint32_t exponentialBase;
+  /**
+   * For exponential back off. Number of scans to perform for a given
+   * period.
+   */
+  uint32_t exponentialStepCount;
+};
+
+/**
+ * Background Scan parameters that can be specified in background scan
+ * requests.
+ */
+struct StaBackgroundScanParameters {
+  /**
+   * GCD of all bucket periods (in milliseconds).
+   */
+  uint32_t basePeriodInMs;
+  /**
+   * Maximum number of APs that must be stored for each scan. If the maximum
+   * is reached the highest RSSI results must be returned.
+   */
+  uint32_t maxApPerScan;
+  /**
+   * % cache buffer filled threshold at which the host must be notified of
+   * batched scan results.
+   */
+  uint32_t reportThresholdPercent;
+  /**
+   * Threshold at which the AP must be woken up, in number of scans.
+   */
+  uint32_t reportThresholdNumScans;
+  /**
+   * List of buckets to be scheduled.
+   */
+  vec<StaBackgroundScanBucketParameters> buckets;
+};
+
+/**
+ * Packet stats for different traffic categories.
+ */
+struct StaLinkLayerIfacePacketStats {
+  /**
+   * Number of received unicast data packets.
+   */
+  uint64_t rxMpdu;
+  /**
+   * Number of successfully transmitted unicast data pkts (ACK rcvd).
+   */
+  uint64_t txMpdu;
+  /**
+   * Number of transmitted unicast data pkt losses (no ACK).
+   */
+  uint64_t lostMpdu;
+  /**
+   * Number of transmitted unicast data retry pkts.
+   */
+  uint64_t retries;
+};
+
+/**
+ * Iface statistics for the current connection.
+ */
+struct StaLinkLayerIfaceStats {
+  /**
+   * Number beacons received from the connected AP.
+   */
+  uint32_t beaconRx;
+  /**
+   * Access Point Beacon and Management frames RSSI (averaged).
+   */
+  int32_t avgRssiMgmt;
+  /**
+   * WME Best Effort Access Category packet counters.
+   */
+  StaLinkLayerIfacePacketStats wmeBePktStats;
+  /**
+   * WME Background Access Category packet counters.
+   */
+  StaLinkLayerIfacePacketStats wmeBkPktStats;
+  /**
+   * WME Video Access Category packet counters.
+   */
+  StaLinkLayerIfacePacketStats wmeViPktStats;
+  /**
+   * WME Voice Access Category packet counters.
+   */
+  StaLinkLayerIfacePacketStats wmeVoPktStats;
+};
+
+/**
+ * Cumulative radio statistics since collection was enabled.
+ */
+struct StaLinkLayerRadioStats {
+  /**
+   * Time for which the radio is awake.
+   */
+  uint32_t onTimeInMs;
+  /**
+   * Total time for which the radio is in active transmission.
+   */
+  uint32_t txTimeInMs;
+  /**
+   * Time for which the radio is in active tranmission per tx level.
+   */
+  vec<uint32_t> txTimeInMsPerLevel;
+  /**
+   * Time for which the radio is in active receive.
+   */
+  uint32_t rxTimeInMs;
+  /**
+   *  Total time for which the radio is awake due to scan.
+   */
+  uint32_t onTimeInMsForScan;
+};
+
+/**
+ * Link layer stats retrieved via |getLinkLayerStats|.
+ */
+struct StaLinkLayerStats {
+  StaLinkLayerIfaceStats iface;
+  StaLinkLayerRadioStats radio;
+  /**
+   * TimeStamp for each stats sample.
+   * This is the absolute milliseconds from boot when these stats were
+   * sampled.
+   */
+  TimeStampInMs timeStampInMs;
+};
+
+/**
+ * Structure describing all the information about a single access point seen
+ * during the scan.
+ */
+struct StaScanResult {
+  TimeStampInUs timeStampInUs;
+  vec<uint8_t> ssid;
+  Bssid bssid;
+  Rssi rssi;
+  WifiChannelInMhz frequency;
+  uint16_t beaconPeriodInMs;
+  uint16_t capability;
+  vec<WifiInformationElement> informationElements;
+};
+
+/**
+ * Mask of flags set in the |ScanData| instance.
+ */
+enum StaScanDataFlagMask {
+  /**
+   * Indicates that a scan was interrupted/did not occur so results may be
+   * incomplete.
+   */
+  WIFI_SCAN_FLAG_INTERRUPTED = 1 << 0,
+};
+
+/**
+ * Structure describing all the information about all the access points seen during
+ * the scan.
+ */
+struct StaScanData {
+  /**
+   * Bitset containing |ScanDataFlagMask| values.
+   */
+  uint32_t flags;
+  /**
+   * Bitset where each bit indicates if the bucket with that index was
+   * scanned.
+   */
+  uint32_t bucketsScanned;
+  /**
+   * List of scan results.
+   */
+  vec<StaScanResult> results;
+};
+
+/**
  * NAN specific types.
  * TODO(b/32159498): Move to a separate nan_types.hal.
  */