Added SSC mode 3 support
Added flags, deprecated time, and expired time field to the IP
address. This will allow baseband vendor to mark an IP address
as deprecated and inform upper layer when the IP address will
become deprecated and expired.
Test: Telephony sanity tests
Bug: 135717900
Merged-In: Ia00827f5ff1201d36439f5b2219312b3fd2f0d24
Change-Id: Ia00827f5ff1201d36439f5b2219312b3fd2f0d24
(cherry picked from commit 246fc142c9bebc941b80c559e315b101da92fbeb)
diff --git a/radio/1.5/IRadio.hal b/radio/1.5/IRadio.hal
index 62a2c61..09be37a 100644
--- a/radio/1.5/IRadio.hal
+++ b/radio/1.5/IRadio.hal
@@ -18,8 +18,10 @@
import @1.2::DataRequestReason;
import @1.4::IRadio;
+import @1.4::DataProfileInfo;
import @1.5::AccessNetwork;
import @1.5::DataProfileInfo;
+import @1.5::LinkAddress;
import @1.5::NetworkScanRequest;
import @1.5::RadioAccessSpecifier;
import @1.5::SignalThresholdInfo;
@@ -149,11 +151,7 @@
* @param reason The request reason. Must be DataRequestReason.NORMAL or
* DataRequestReason.HANDOVER.
* @param addresses If the reason is DataRequestReason.HANDOVER, this indicates the list of link
- * addresses of the existing data connection. The format is IP address with optional "/"
- * prefix length (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
- * "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
- * the prefix length is absent, then the addresses are assumed to be point to point with
- * IPv4 with prefix length 32 or IPv6 with prefix length 128. This parameter must be ignored
+ * addresses of the existing data connection. This parameter must be ignored
* unless reason is DataRequestReason.HANDOVER.
* @param dnses If the reason is DataRequestReason.HANDOVER, this indicates the list of DNS
* addresses of the existing data connection. The format is defined in RFC-4291 section
@@ -167,7 +165,7 @@
*/
oneway setupDataCall_1_5(int32_t serial, AccessNetwork accessNetwork,
DataProfileInfo dataProfileInfo, bool roamingAllowed,
- DataRequestReason reason, vec<string> addresses, vec<string> dnses);
+ DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses);
/**
* Set an apn to initial attach network
@@ -191,7 +189,7 @@
* Response callback is IRadioResponse.setDataProfileResponse_1_5()
*
* Note this API is the same as the 1.4 version except using the 1.5 DataProfileInfo
- * as the input param.
+ * and LinkAddress as the input param.
*/
oneway setDataProfile_1_5(int32_t serial, vec<DataProfileInfo> profiles);
diff --git a/radio/1.5/IRadioResponse.hal b/radio/1.5/IRadioResponse.hal
index 7a0bc57..968948b 100644
--- a/radio/1.5/IRadioResponse.hal
+++ b/radio/1.5/IRadioResponse.hal
@@ -18,7 +18,7 @@
import @1.0::RadioResponseInfo;
import @1.4::IRadioResponse;
-import @1.4::SetupDataCallResult;
+import @1.5::SetupDataCallResult;
/**
* Interface declaring response functions to solicited radio requests.
diff --git a/radio/1.5/types.hal b/radio/1.5/types.hal
index 5795f7b..750114a 100644
--- a/radio/1.5/types.hal
+++ b/radio/1.5/types.hal
@@ -25,7 +25,10 @@
import @1.2::NetworkScanRequest;
import @1.4::AccessNetwork;
import @1.4::ApnTypes;
+import @1.4::DataCallFailCause;
+import @1.4::DataConnActiveStatus;
import @1.4::DataProfileInfo;
+import @1.4::PdpProtocolType;
/**
* Defining signal strength type.
@@ -289,3 +292,105 @@
/** Supported APN types bitmap. See ApnTypes for the value of each bit. */
bitfield<ApnTypes> supportedApnTypesBitmap;
};
+
+/**
+ * The properties of the link address. This enum reflects the definition in
+ * if_addr.h in Linux kernel.
+ */
+enum AddressProperty : int32_t {
+ NONE = 0,
+
+ /** Indicates this address is deprecated */
+ DEPRECATED = 0x20,
+};
+
+struct LinkAddress {
+ /**
+ * The format is IP address with optional "/"
+ * prefix length (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
+ * "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
+ * the prefix length is absent, then the addresses are assumed to be point to point with
+ * IPv4 with prefix length 32 or IPv6 with prefix length 128.
+ */
+ string address;
+
+ /**
+ * The properties of the link address
+ */
+ bitfield<AddressProperty> properties;
+
+ /**
+ * The UTC time that this link address will be deprecated. 0 indicates this information is not
+ * available.
+ */
+ uint64_t deprecatedTime;
+
+ /**
+ * The UTC time that this link address will expire and no longer valid. 0 indicates this
+ * information is not available.
+ */
+ uint64_t expiredTime;
+};
+
+/**
+ * Overwritten from @1.4::SetupDataCallResult in order to update the addresses to 1.5
+ * version.
+ */
+struct SetupDataCallResult {
+ /** Data call fail cause. DataCallFailCause.NONE if no error. */
+ DataCallFailCause cause;
+
+ /**
+ * If status != DataCallFailCause.NONE, this field indicates the suggested retry back-off timer
+ * value RIL wants to override the one pre-configured in FW. The unit is milliseconds.
+ * The value < 0 means no value is suggested.
+ * The value 0 means retry must be done ASAP.
+ * The value of INT_MAX(0x7fffffff) means no retry.
+ */
+ int32_t suggestedRetryTime;
+
+ /** Context ID, uniquely identifies this call. */
+ int32_t cid;
+
+ /** Data connection active status. */
+ DataConnActiveStatus active;
+
+ /**
+ * PDP_type values. If cause is DataCallFailCause.ONLY_SINGLE_BEARER_ALLOWED, this is the type
+ * supported such as "IP" or "IPV6".
+ */
+ PdpProtocolType type;
+
+ /** The network interface name. */
+ string ifname;
+
+ /**
+ * List of link address.
+ */
+ vec<LinkAddress> addresses;
+
+ /**
+ * List of DNS server addresses, e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1". Empty if no dns
+ * server addresses returned.
+ */
+ vec<string> dnses;
+
+ /**
+ * List of default gateway addresses, e.g., "192.0.1.3" or "192.0.1.11 2001:db8::1".
+ * When empty, the addresses represent point to point connections.
+ */
+ vec<string> gateways;
+
+ /**
+ * List of P-CSCF(Proxy Call State Control Function) addresses via PCO(Protocol Configuration
+ * Option), e.g., "2001:db8::1 2001:db8::2 2001:db8::3". Empty if not IMS client.
+ */
+ vec<string> pcscf;
+
+ /**
+ * MTU received from network. Value <= 0 means network has either not sent a value or sent an
+ * invalid value.
+ */
+ int32_t mtu;
+};
+
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
index d05d2cb..77d9a02 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
@@ -853,10 +853,11 @@
bool roamingAllowed = false;
+ std::vector<::android::hardware::radio::V1_5::LinkAddress> addresses = {};
+ std::vector<hidl_string> dnses = {};
+
::android::hardware::radio::V1_2::DataRequestReason reason =
::android::hardware::radio::V1_2::DataRequestReason::NORMAL;
- std::vector<hidl_string> addresses = {""};
- std::vector<hidl_string> dnses = {""};
Return<void> res = radio_v1_5->setupDataCall_1_5(serial, accessNetwork, dataProfileInfo,
roamingAllowed, reason, addresses, dnses);
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
index c2ee94e..ba11257 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
+++ b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
@@ -544,7 +544,7 @@
Return<void> setupDataCallResponse_1_5(
const RadioResponseInfo& info,
- const android::hardware::radio::V1_4::SetupDataCallResult& dcResponse);
+ const android::hardware::radio::V1_5::SetupDataCallResult& dcResponse);
Return<void> setInitialAttachApnResponse_1_5(const RadioResponseInfo& info);
diff --git a/radio/1.5/vts/functional/radio_response.cpp b/radio/1.5/vts/functional/radio_response.cpp
index 8932a64..a0b3d5f 100644
--- a/radio/1.5/vts/functional/radio_response.cpp
+++ b/radio/1.5/vts/functional/radio_response.cpp
@@ -931,7 +931,7 @@
Return<void> RadioResponse_v1_5::setupDataCallResponse_1_5(
const RadioResponseInfo& info,
- const android::hardware::radio::V1_4::SetupDataCallResult& /* dcResponse */) {
+ const android::hardware::radio::V1_5::SetupDataCallResult& /* dcResponse */) {
rspInfo = info;
parent_v1_5.notify(info.serial);
return Void();