Merge "Convert NAN enums that are used as bitmaps to an int." into udc-dev
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl
index bb44679..a30893a 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanCapabilities.aidl
@@ -47,7 +47,7 @@
int maxAppInfoLen;
int maxQueuedTransmitFollowupMsgs;
int maxSubscribeInterfaceAddresses;
- android.hardware.wifi.NanCipherSuiteType supportedCipherSuites;
+ int supportedCipherSuites;
boolean instantCommunicationModeSupportFlag;
boolean supports6g;
boolean supportsHe;
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
index e84cabf..96d940a 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
@@ -51,7 +51,7 @@
android.hardware.wifi.NanDataPathSecurityConfig securityConfig;
boolean rangingRequired;
int rangingIntervalMs;
- android.hardware.wifi.NanRangingIndication configRangingIndications;
+ int configRangingIndications;
char distanceIngressCm;
char distanceEgressCm;
boolean enableSessionSuspendability;
diff --git a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanMatchInd.aidl b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanMatchInd.aidl
index 6757bec..317489f 100644
--- a/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanMatchInd.aidl
+++ b/wifi/aidl/aidl_api/android.hardware.wifi/current/android/hardware/wifi/NanMatchInd.aidl
@@ -47,7 +47,7 @@
boolean peerRequiresSecurityEnabledInNdp;
boolean peerRequiresRanging;
int rangingMeasurementInMm;
- android.hardware.wifi.NanRangingIndication rangingIndicationType;
+ int rangingIndicationType;
byte[] scid;
android.hardware.wifi.NanPairingConfig peerPairingConfig;
android.hardware.wifi.NanIdentityResolutionAttribute peerNira;
diff --git a/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl b/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl
index c1d6201..f581c5e 100644
--- a/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanCapabilities.aidl
@@ -16,8 +16,6 @@
package android.hardware.wifi;
-import android.hardware.wifi.NanCipherSuiteType;
-
/**
* NDP Capabilities response.
*/
@@ -78,9 +76,9 @@
*/
int maxSubscribeInterfaceAddresses;
/**
- * The set of supported Cipher suites. The |NanCipherSuiteType| bit fields are used.
+ * Bitmap of |NanCipherSuiteType| values indicating the set of supported cipher suites.
*/
- NanCipherSuiteType supportedCipherSuites;
+ int supportedCipherSuites;
/**
* Flag to indicate if instant communication mode is supported.
*/
diff --git a/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl b/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
index e98658b..58777c5 100644
--- a/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanDiscoveryCommonConfig.aidl
@@ -18,7 +18,6 @@
import android.hardware.wifi.NanDataPathSecurityConfig;
import android.hardware.wifi.NanMatchAlg;
-import android.hardware.wifi.NanRangingIndication;
/**
* Configurations of NAN discovery sessions. Common to publish and subscribe discovery.
@@ -143,10 +142,11 @@
*/
int rangingIntervalMs;
/**
- * The type of ranging feedback to be provided by discovery session matches
- * |IWifiNanIfaceEventCallback.eventMatch|. Only relevant if |rangingRequired| is true.
+ * Bitmap of |NanRangingIndication| values indicating the type of ranging feedback
+ * to be provided by discovery session matches in |IWifiNanIfaceEventCallback.eventMatch|.
+ * Only relevant if |rangingRequired| is true.
*/
- NanRangingIndication configRangingIndications;
+ int configRangingIndications;
/**
* 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)
diff --git a/wifi/aidl/android/hardware/wifi/NanMatchInd.aidl b/wifi/aidl/android/hardware/wifi/NanMatchInd.aidl
index 314d599..5a04376 100644
--- a/wifi/aidl/android/hardware/wifi/NanMatchInd.aidl
+++ b/wifi/aidl/android/hardware/wifi/NanMatchInd.aidl
@@ -19,7 +19,6 @@
import android.hardware.wifi.NanCipherSuiteType;
import android.hardware.wifi.NanIdentityResolutionAttribute;
import android.hardware.wifi.NanPairingConfig;
-import android.hardware.wifi.NanRangingIndication;
/**
* Match indication structure.
@@ -81,8 +80,9 @@
*/
byte rssiValue;
/**
- * Cipher type for data-paths constructed in the context of this discovery session. Valid if
- * |peerRequiresSecurityEnabledInNdp| is true.
+ * One of |NanCipherSuiteType| indicating the cipher type for data-paths constructed
+ * in the context of this discovery session.
+ * Valid if |peerRequiresSecurityEnabledInNdp| is true.
*/
NanCipherSuiteType peerCipherType;
/**
@@ -117,10 +117,11 @@
*/
int rangingMeasurementInMm;
/**
- * The ranging event(s) which triggered the ranging. e.g. can indicate that continuous ranging
- * was requested, or else that an ingress event occurred.
+ * Bitmap of |NanRangingIndication| values indicating the ranging event(s) which triggered the
+ * ranging. e.g. can indicate that continuous ranging was requested, or else that an ingress
+ * event occurred.
*/
- NanRangingIndication rangingIndicationType;
+ int rangingIndicationType;
/**
* Security Context Identifier attribute contains PMKID. Shall be included in NDP setup and
* response messages. Security Context Identifier identifies the Security Context. For NAN
diff --git a/wifi/aidl/default/aidl_struct_util.cpp b/wifi/aidl/default/aidl_struct_util.cpp
index dfa08a1..4acdd2f 100644
--- a/wifi/aidl/default/aidl_struct_util.cpp
+++ b/wifi/aidl/default/aidl_struct_util.cpp
@@ -1787,7 +1787,7 @@
: legacy_hal::NAN_RANGING_DISABLE;
legacy_request->ranging_cfg.ranging_interval_msec = aidl_request.baseConfigs.rangingIntervalMs;
legacy_request->ranging_cfg.config_ranging_indications =
- static_cast<uint32_t>(aidl_request.baseConfigs.configRangingIndications);
+ aidl_request.baseConfigs.configRangingIndications;
legacy_request->ranging_cfg.distance_ingress_mm =
aidl_request.baseConfigs.distanceIngressCm * 10;
legacy_request->ranging_cfg.distance_egress_mm = aidl_request.baseConfigs.distanceEgressCm * 10;
@@ -1919,7 +1919,7 @@
: legacy_hal::NAN_RANGING_DISABLE;
legacy_request->ranging_cfg.ranging_interval_msec = aidl_request.baseConfigs.rangingIntervalMs;
legacy_request->ranging_cfg.config_ranging_indications =
- static_cast<uint32_t>(aidl_request.baseConfigs.configRangingIndications);
+ aidl_request.baseConfigs.configRangingIndications;
legacy_request->ranging_cfg.distance_ingress_mm =
aidl_request.baseConfigs.distanceIngressCm * 10;
legacy_request->ranging_cfg.distance_egress_mm = aidl_request.baseConfigs.distanceEgressCm * 10;
@@ -2202,8 +2202,7 @@
aidl_response->maxQueuedTransmitFollowupMsgs =
legacy_response.max_queued_transmit_followup_msgs;
aidl_response->maxSubscribeInterfaceAddresses = legacy_response.max_subscribe_address;
- aidl_response->supportedCipherSuites =
- static_cast<NanCipherSuiteType>(legacy_response.cipher_suites_supported);
+ aidl_response->supportedCipherSuites = legacy_response.cipher_suites_supported;
aidl_response->instantCommunicationModeSupportFlag = legacy_response.is_instant_mode_supported;
aidl_response->supports6g = legacy_response.is_6g_supported;
aidl_response->supportsHe = legacy_response.is_he_supported;
@@ -2244,8 +2243,7 @@
aidl_ind->peerRequiresRanging =
legacy_ind.peer_sdea_params.ranging_state == legacy_hal::NAN_RANGING_ENABLE;
aidl_ind->rangingMeasurementInMm = legacy_ind.range_info.range_measurement_mm;
- aidl_ind->rangingIndicationType =
- static_cast<NanRangingIndication>(legacy_ind.range_info.ranging_event_type);
+ aidl_ind->rangingIndicationType = legacy_ind.range_info.ranging_event_type;
aidl_ind->scid = std::vector<uint8_t>(legacy_ind.scid, legacy_ind.scid + legacy_ind.scid_len);
if (!convertLegacyNiraToAidl(legacy_ind.nira, &aidl_ind->peerNira)) {