Support IPv6 MTU in IRadio 1.5
Change mtu->mtuV4 and add mtuV6 for DataProfileInfo and
SetupDataCallResult
Test: mm and build
Bug: 146668814
Change-Id: I33320281730fdb91d2b07d11cd24a95d0834c9dd
diff --git a/current.txt b/current.txt
index 09759b9..e7b1e88 100644
--- a/current.txt
+++ b/current.txt
@@ -666,7 +666,7 @@
##
# BEGIN Radio HAL Merge Conflict Avoidance Buffer - STOPSHIP if present
##
-696f9000adf181682a49510baf93127e2ca62cfc84173b36afd164c797bc5771 android.hardware.radio@1.5::types
+70cbe7cbeb51834f124a8b5940336dc9ec158a17487ab8b905ae9cf62f66f476 android.hardware.radio@1.5::types
996f98ffe508a2f6f1755c1511b50067f7883f7c445dea9f3e931385f020b7ab android.hardware.radio@1.5::IRadio
20d52e66fd548f89bcb98cda42749a591ce8f439a2a7148617adac0c967ad937 android.hardware.radio@1.5::IRadioIndication
1512f6e1198e1aa0ebcbdb1694d0ed500a3e7791d6f305327866112331d82b66 android.hardware.radio@1.5::IRadioResponse
diff --git a/radio/1.5/types.hal b/radio/1.5/types.hal
index d629a3f..efd2e35 100644
--- a/radio/1.5/types.hal
+++ b/radio/1.5/types.hal
@@ -16,6 +16,10 @@
package android.hardware.radio@1.5;
+import @1.0::ApnAuthType;
+import @1.0::DataProfileId;
+import @1.0::DataProfileInfoType;
+import @1.0::RadioAccessFamily;
import @1.1::EutranBands;
import @1.1::GeranBands;
import @1.1::RadioAccessNetworks;
@@ -303,13 +307,74 @@
};
/**
- * Extended from @1.4::DataProfileInfo to update ApnTypes to 1.5 version
+ * Extended from @1.4::DataProfileInfo to update ApnTypes to 1.5 version and replace mtu with
+ * mtuV4 and mtuV6. In the future, this must be extended instead of overwritten.
*/
struct DataProfileInfo {
- @1.4::DataProfileInfo base;
+
+ /** ID of the data profile. */
+ DataProfileId profileId;
+
+ /** The APN name. */
+ string apn;
+
+ /** PDP_type values. */
+ PdpProtocolType protocol;
+
+ /** PDP_type values used on roaming network. */
+ PdpProtocolType roamingProtocol;
+
+ /** APN authentication type. */
+ ApnAuthType authType;
+
+ /** The username for APN, or empty string. */
+ string user;
+
+ /** The password for APN, or empty string. */
+ string password;
+
+ /** Data profile technology type. */
+ DataProfileInfoType type;
+
+ /** The period in seconds to limit the maximum connections. */
+ int32_t maxConnsTime;
+
+ /** The maximum connections during maxConnsTime. */
+ int32_t maxConns;
+
+ /**
+ * The required wait time in seconds after a successful UE initiated disconnect of a given PDN
+ * connection before the device can send a new PDN connection request for that given PDN.
+ */
+ int32_t waitTime;
+
+ /** True to enable the profile, false to disable. */
+ bool enabled;
/** Supported APN types bitmap. See ApnTypes for the value of each bit. */
bitfield<ApnTypes> supportedApnTypesBitmap;
+
+ /** The bearer bitmap. See RadioAccessFamily for the value of each bit. */
+ bitfield<RadioAccessFamily> bearerBitmap;
+
+ /** Maximum transmission unit (MTU) size in bytes for IPv4. */
+ int32_t mtuV4;
+
+ /** Maximum transmission unit (MTU) size in bytes for IPv6. */
+ int32_t mtuV6;
+
+ /**
+ * True if this data profile was used to bring up the last default (i.e internet) data
+ * connection successfully.
+ */
+ bool preferred;
+
+ /**
+ * If true, modem must persist this data profile and profileId must not be
+ * set to DataProfileId.INVALID. If the same data profile exists, this data profile must
+ * overwrite it.
+ */
+ bool persistent;
};
/**
@@ -356,7 +421,8 @@
/**
* Overwritten from @1.4::SetupDataCallResult in order to update the addresses to 1.5
- * version. In 1.5 the type of addresses changes to vector of LinkAddress.
+ * version. In 1.5 the type of addresses changes to vector of LinkAddress, and mtu is replaced by
+ * mtuV4 and mtuV6.
*/
struct SetupDataCallResult {
/** Data call fail cause. DataCallFailCause.NONE if no error. */
@@ -410,10 +476,16 @@
vec<string> pcscf;
/**
- * MTU received from network. Value <= 0 means network has either not sent a value or sent an
- * invalid value.
+ * MTU received from network for IPv4.
+ * Value <= 0 means network has either not sent a value or sent an invalid value.
*/
- int32_t mtu;
+ int32_t mtuV4;
+
+ /**
+ * MTU received from network for IPv6.
+ * Value <= 0 means network has either not sent a value or sent an invalid value.
+ */
+ int32_t mtuV6;
};
enum Domain : int32_t {
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 77d9a02..01258cf 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
@@ -833,23 +833,24 @@
android::hardware::radio::V1_5::DataProfileInfo dataProfileInfo;
memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
- dataProfileInfo.base.profileId = DataProfileId::DEFAULT;
- dataProfileInfo.base.apn = hidl_string("internet");
- dataProfileInfo.base.protocol = PdpProtocolType::IP;
- dataProfileInfo.base.roamingProtocol = PdpProtocolType::IP;
- dataProfileInfo.base.authType = ApnAuthType::NO_PAP_NO_CHAP;
- dataProfileInfo.base.user = hidl_string("username");
- dataProfileInfo.base.password = hidl_string("password");
- dataProfileInfo.base.type = DataProfileInfoType::THREE_GPP;
- dataProfileInfo.base.maxConnsTime = 300;
- dataProfileInfo.base.maxConns = 20;
- dataProfileInfo.base.waitTime = 0;
- dataProfileInfo.base.enabled = true;
+ dataProfileInfo.profileId = DataProfileId::DEFAULT;
+ dataProfileInfo.apn = hidl_string("internet");
+ dataProfileInfo.protocol = PdpProtocolType::IP;
+ dataProfileInfo.roamingProtocol = PdpProtocolType::IP;
+ dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP;
+ dataProfileInfo.user = hidl_string("username");
+ dataProfileInfo.password = hidl_string("password");
+ dataProfileInfo.type = DataProfileInfoType::THREE_GPP;
+ dataProfileInfo.maxConnsTime = 300;
+ dataProfileInfo.maxConns = 20;
+ dataProfileInfo.waitTime = 0;
+ dataProfileInfo.enabled = true;
dataProfileInfo.supportedApnTypesBitmap = 320;
- dataProfileInfo.base.bearerBitmap = 161543;
- dataProfileInfo.base.mtu = 0;
- dataProfileInfo.base.preferred = true;
- dataProfileInfo.base.persistent = false;
+ dataProfileInfo.bearerBitmap = 161543;
+ dataProfileInfo.mtuV4 = 0;
+ dataProfileInfo.mtuV6 = 0;
+ dataProfileInfo.preferred = true;
+ dataProfileInfo.persistent = false;
bool roamingAllowed = false;
@@ -884,23 +885,24 @@
// Create a dataProfileInfo
android::hardware::radio::V1_5::DataProfileInfo dataProfileInfo;
memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
- dataProfileInfo.base.profileId = DataProfileId::DEFAULT;
- dataProfileInfo.base.apn = hidl_string("internet");
- dataProfileInfo.base.protocol = PdpProtocolType::IPV4V6;
- dataProfileInfo.base.roamingProtocol = PdpProtocolType::IPV4V6;
- dataProfileInfo.base.authType = ApnAuthType::NO_PAP_NO_CHAP;
- dataProfileInfo.base.user = hidl_string("username");
- dataProfileInfo.base.password = hidl_string("password");
- dataProfileInfo.base.type = DataProfileInfoType::THREE_GPP;
- dataProfileInfo.base.maxConnsTime = 300;
- dataProfileInfo.base.maxConns = 20;
- dataProfileInfo.base.waitTime = 0;
- dataProfileInfo.base.enabled = true;
+ dataProfileInfo.profileId = DataProfileId::DEFAULT;
+ dataProfileInfo.apn = hidl_string("internet");
+ dataProfileInfo.protocol = PdpProtocolType::IPV4V6;
+ dataProfileInfo.roamingProtocol = PdpProtocolType::IPV4V6;
+ dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP;
+ dataProfileInfo.user = hidl_string("username");
+ dataProfileInfo.password = hidl_string("password");
+ dataProfileInfo.type = DataProfileInfoType::THREE_GPP;
+ dataProfileInfo.maxConnsTime = 300;
+ dataProfileInfo.maxConns = 20;
+ dataProfileInfo.waitTime = 0;
+ dataProfileInfo.enabled = true;
dataProfileInfo.supportedApnTypesBitmap = 320;
- dataProfileInfo.base.bearerBitmap = 161543;
- dataProfileInfo.base.mtu = 0;
- dataProfileInfo.base.preferred = true;
- dataProfileInfo.base.persistent = false;
+ dataProfileInfo.bearerBitmap = 161543;
+ dataProfileInfo.mtuV4 = 0;
+ dataProfileInfo.mtuV6 = 0;
+ dataProfileInfo.preferred = true;
+ dataProfileInfo.persistent = false;
radio_v1_5->setInitialAttachApn_1_5(serial, dataProfileInfo);
@@ -923,23 +925,24 @@
// Create a dataProfileInfo
android::hardware::radio::V1_5::DataProfileInfo dataProfileInfo;
memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
- dataProfileInfo.base.profileId = DataProfileId::DEFAULT;
- dataProfileInfo.base.apn = hidl_string("internet");
- dataProfileInfo.base.protocol = PdpProtocolType::IPV4V6;
- dataProfileInfo.base.roamingProtocol = PdpProtocolType::IPV4V6;
- dataProfileInfo.base.authType = ApnAuthType::NO_PAP_NO_CHAP;
- dataProfileInfo.base.user = hidl_string("username");
- dataProfileInfo.base.password = hidl_string("password");
- dataProfileInfo.base.type = DataProfileInfoType::THREE_GPP;
- dataProfileInfo.base.maxConnsTime = 300;
- dataProfileInfo.base.maxConns = 20;
- dataProfileInfo.base.waitTime = 0;
- dataProfileInfo.base.enabled = true;
+ dataProfileInfo.profileId = DataProfileId::DEFAULT;
+ dataProfileInfo.apn = hidl_string("internet");
+ dataProfileInfo.protocol = PdpProtocolType::IPV4V6;
+ dataProfileInfo.roamingProtocol = PdpProtocolType::IPV4V6;
+ dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP;
+ dataProfileInfo.user = hidl_string("username");
+ dataProfileInfo.password = hidl_string("password");
+ dataProfileInfo.type = DataProfileInfoType::THREE_GPP;
+ dataProfileInfo.maxConnsTime = 300;
+ dataProfileInfo.maxConns = 20;
+ dataProfileInfo.waitTime = 0;
+ dataProfileInfo.enabled = true;
dataProfileInfo.supportedApnTypesBitmap = 320;
- dataProfileInfo.base.bearerBitmap = 161543;
- dataProfileInfo.base.mtu = 0;
- dataProfileInfo.base.preferred = true;
- dataProfileInfo.base.persistent = true;
+ dataProfileInfo.bearerBitmap = 161543;
+ dataProfileInfo.mtuV4 = 0;
+ dataProfileInfo.mtuV6 = 0;
+ dataProfileInfo.preferred = true;
+ dataProfileInfo.persistent = true;
// Create a dataProfileInfoList
android::hardware::hidl_vec<android::hardware::radio::V1_5::DataProfileInfo>