Fix 11az non-TB measurment time unit

Bug: 295619650
Test: m
Change-Id: I8a0cc8d59db939cfc5adfd6e3ce5d6817db0a2f8
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/RttConfig.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/RttConfig.aidl
index 16a14ea..b53ff9b 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/RttConfig.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/RttConfig.aidl
@@ -48,6 +48,6 @@
   int burstDuration;
   android.hardware.wifi.RttPreamble preamble;
   android.hardware.wifi.RttBw bw;
-  int ntbMinMeasurementTimeMillis;
-  int ntbMaxMeasurementTimeMillis;
+  long ntbMinMeasurementTime;
+  long ntbMaxMeasurementTime;
 }
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/RttResult.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/RttResult.aidl
index 93a04ac..9c6ad26 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/RttResult.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/RttResult.aidl
@@ -61,6 +61,6 @@
   android.hardware.wifi.RttBw packetBw;
   byte i2rTxLtfRepetitionCount;
   byte r2iTxLtfRepetitionCount;
-  int ntbMinMeasurementTimeMillis;
-  int ntbMaxMeasurementTimeMillis;
+  long ntbMinMeasurementTime;
+  long ntbMaxMeasurementTime;
 }
diff --git a/wifi/aidl/android/hardware/wifi/RttConfig.aidl b/wifi/aidl/android/hardware/wifi/RttConfig.aidl
index 97b3acf..7b18708 100644
--- a/wifi/aidl/android/hardware/wifi/RttConfig.aidl
+++ b/wifi/aidl/android/hardware/wifi/RttConfig.aidl
@@ -121,11 +121,17 @@
      */
     RttBw bw;
     /**
-     * IEEE 802.11az Non-Trigger-based (non-TB) minimum measurement time in milliseconds.
+     * IEEE 802.11az Non-Trigger-based (non-TB) minimum measurement time in units of 100
+     * microseconds.
+     *
+     * Reference: IEEE Std 802.11az-2022 spec, section 9.4.2.298 Ranging Parameters element.
      */
-    int ntbMinMeasurementTimeMillis;
+    long ntbMinMeasurementTime;
     /**
-     * IEEE 802.11az Non-Trigger-based (non-TB) maximum measurement time in milliseconds.
+     * IEEE 802.11az Non-Trigger-based (non-TB) maximum measurement time in units of 10
+     * milliseconds.
+     *
+     * Reference: IEEE Std 802.11az-2022 spec, section 9.4.2.298 Ranging Parameters element.
      */
-    int ntbMaxMeasurementTimeMillis;
+    long ntbMaxMeasurementTime;
 }
diff --git a/wifi/aidl/android/hardware/wifi/RttResult.aidl b/wifi/aidl/android/hardware/wifi/RttResult.aidl
index 034b0da..ab9abb5 100644
--- a/wifi/aidl/android/hardware/wifi/RttResult.aidl
+++ b/wifi/aidl/android/hardware/wifi/RttResult.aidl
@@ -156,8 +156,8 @@
      */
     byte r2iTxLtfRepetitionCount;
     /**
-     * Minimum non-trigger based (non-TB) dynamic measurement time in milliseconds assigned by the
-     * IEEE 802.11az responder.
+     * Minimum non-trigger based (non-TB) dynamic measurement time in units of 100 microseconds
+     * assigned by the IEEE 802.11az responder.
      *
      * After initial non-TB negotiation, if the next ranging request for this peer comes in between
      * [ntbMinMeasurementTime, ntbMaxMeasurementTime], vendor software shall do the NDPA sounding
@@ -166,11 +166,13 @@
      * If the ranging request for this peer comes sooner than minimum measurement time, vendor
      * software shall return the cached result of the last measurement including the time stamp
      * |RttResult.timestamp|.
+     *
+     * Reference: IEEE Std 802.11az-2022 spec, section 9.4.2.298 Ranging Parameters element.
      */
-    int ntbMinMeasurementTimeMillis;
+    long ntbMinMeasurementTime;
     /**
-     * Maximum non-trigger based (non-TB) dynamic measurement time in milliseconds assigned by the
-     * IEEE 802.11az responder.
+     * Maximum non-trigger based (non-TB) dynamic measurement time in units of 10 milliseconds
+     * assigned by the IEEE 802.11az responder.
      *
      * After initial non-TB negotiation, if the next ranging request for this peer comes in between
      * [ntbMinMeasurementTime, ntbMaxMeasurementTime], vendor software shall do the NDPA sounding
@@ -179,6 +181,8 @@
      * If the ranging request for this peer comes later than the maximum measurement time, vendor
      * software shall clean up any existing IEEE 802.11ax non-TB ranging session and re-do the
      * non-TB ranging negotiation.
+     *
+     * Reference: IEEE Std 802.11az-2022 spec, section 9.4.2.298 Ranging Parameters element.
      */
-    int ntbMaxMeasurementTimeMillis;
+    long ntbMaxMeasurementTime;
 }
diff --git a/wifi/aidl/default/aidl_struct_util.cpp b/wifi/aidl/default/aidl_struct_util.cpp
index 42f484b..7e7929d 100644
--- a/wifi/aidl/default/aidl_struct_util.cpp
+++ b/wifi/aidl/default/aidl_struct_util.cpp
@@ -2741,8 +2741,8 @@
     if (!convertAidlRttConfigToLegacy(aidl_config, &(legacy_config->rtt_config))) {
         return false;
     }
-    legacy_config->ntb_min_measurement_time_millis = aidl_config.ntbMinMeasurementTimeMillis;
-    legacy_config->ntb_max_measurement_time_millis = aidl_config.ntbMaxMeasurementTimeMillis;
+    legacy_config->ntb_min_measurement_time = aidl_config.ntbMinMeasurementTime;
+    legacy_config->ntb_max_measurement_time = aidl_config.ntbMaxMeasurementTime;
     return true;
 }
 
@@ -2993,8 +2993,8 @@
         aidl_result.packetBw = RttBw::BW_UNSPECIFIED;
         aidl_result.i2rTxLtfRepetitionCount = 0;
         aidl_result.r2iTxLtfRepetitionCount = 0;
-        aidl_result.ntbMinMeasurementTimeMillis = 0;
-        aidl_result.ntbMaxMeasurementTimeMillis = 0;
+        aidl_result.ntbMinMeasurementTime = 0;
+        aidl_result.ntbMaxMeasurementTime = 0;
         aidl_results->push_back(aidl_result);
     }
     return true;
@@ -3017,8 +3017,8 @@
         aidl_result.packetBw = convertLegacyRttBwToAidl(legacy_result->packet_bw);
         aidl_result.i2rTxLtfRepetitionCount = 0;
         aidl_result.r2iTxLtfRepetitionCount = 0;
-        aidl_result.ntbMinMeasurementTimeMillis = 0;
-        aidl_result.ntbMaxMeasurementTimeMillis = 0;
+        aidl_result.ntbMinMeasurementTime = 0;
+        aidl_result.ntbMaxMeasurementTime = 0;
         aidl_results->push_back(aidl_result);
     }
     return true;
@@ -3042,8 +3042,8 @@
         aidl_result.packetBw = convertLegacyRttBwToAidl(legacy_result->rtt_result.packet_bw);
         aidl_result.i2rTxLtfRepetitionCount = legacy_result->i2r_tx_ltf_repetition_count;
         aidl_result.r2iTxLtfRepetitionCount = legacy_result->r2i_tx_ltf_repetition_count;
-        aidl_result.ntbMinMeasurementTimeMillis = legacy_result->ntb_min_measurement_time_millis;
-        aidl_result.ntbMaxMeasurementTimeMillis = legacy_result->ntb_max_measurement_time_millis;
+        aidl_result.ntbMinMeasurementTime = legacy_result->ntb_min_measurement_time;
+        aidl_result.ntbMaxMeasurementTime = legacy_result->ntb_max_measurement_time;
         aidl_results->push_back(aidl_result);
     }
     return true;