Merge "Support IPv6 MTU in IRadio 1.5"
This commit is contained in:
commit
87d84d1346
3 changed files with 130 additions and 55 deletions
|
@ -666,7 +666,7 @@ def77c7db95d374f11a111bfc4ed60f92451303642a43276c4e291988fcee625 android.hardwar
|
|||
##
|
||||
# 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
|
||||
|
|
|
@ -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 @@ enum ApnTypes : @1.4::ApnTypes {
|
|||
};
|
||||
|
||||
/**
|
||||
* 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 @@ struct LinkAddress {
|
|||
|
||||
/**
|
||||
* 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 @@ struct SetupDataCallResult {
|
|||
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 {
|
||||
|
|
|
@ -833,23 +833,24 @@ TEST_F(RadioHidlTest_v1_5, setupDataCall_1_5) {
|
|||
|
||||
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 @@ TEST_F(RadioHidlTest_v1_5, setInitialAttachApn_1_5) {
|
|||
// 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 @@ TEST_F(RadioHidlTest_v1_5, setDataProfile_1_5) {
|
|||
// 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>
|
||||
|
|
Loading…
Reference in a new issue