Update HAL 1.6 for 5G Slicing am: 55487e1e79
am: 6bd59033fb
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1579885 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I98d47835a985676a0d108078491d2fc62acd4553
This commit is contained in:
commit
af42a972dd
5 changed files with 170 additions and 3 deletions
|
@ -123,6 +123,18 @@ interface IRadio extends @1.5::IRadio {
|
|||
* @param sliceInfo SliceInfo to be used for the data connection when a handover occurs from
|
||||
* EPDG to 5G. It is valid only when accessNetwork is AccessNetwork:NGRAN. If the slice
|
||||
* passed from EPDG is rejected, then the data failure cause must be DataCallFailCause:SLICE_REJECTED.
|
||||
* @param trafficDescriptor TrafficDescriptor for which data connection needs to be
|
||||
* established. It is used for URSP traffic matching as described in TS 24.526
|
||||
* Section 4.2.2. It includes an optional DNN which, if present, must be used for traffic
|
||||
* matching -- it does not specify the end point to be used for the data call. The end
|
||||
* point is specified by DataProfileInfo.apn; DataProfileInfo.apn must be used as the end
|
||||
* point if one is not specified through URSP rules.
|
||||
* @param matchAllRuleAllowed bool to indicate if using default match-all URSP rule for this
|
||||
* request is allowed. If false, this request must not use the match-all URSP rule and if
|
||||
* a non-match-all rule is not found (or if URSP rules are not available) it should return
|
||||
* failure with cause DataCallFailCause:MATCH_ALL_RULE_NOT_ALLOWED. This is needed as some
|
||||
* requests need to have a hard failure if the intention cannot be met, for example, a
|
||||
* zero-rating slice.
|
||||
*
|
||||
* Response function is IRadioResponse.setupDataCallResponse_1_6()
|
||||
*
|
||||
|
@ -131,7 +143,8 @@ interface IRadio extends @1.5::IRadio {
|
|||
oneway setupDataCall_1_6(int32_t serial, AccessNetwork accessNetwork,
|
||||
DataProfileInfo dataProfileInfo, bool roamingAllowed,
|
||||
DataRequestReason reason, vec<LinkAddress> addresses, vec<string> dnses,
|
||||
int32_t pduSessionId, OptionalSliceInfo sliceInfo);
|
||||
int32_t pduSessionId, OptionalSliceInfo sliceInfo,
|
||||
OptionalTrafficDescriptor trafficDescriptor, bool matchAllRuleAllowed);
|
||||
|
||||
/**
|
||||
* Send an SMS message
|
||||
|
|
|
@ -366,6 +366,13 @@ struct SetupDataCallResult {
|
|||
* AccessNetwork:NGRAN.
|
||||
*/
|
||||
OptionalSliceInfo sliceInfo;
|
||||
|
||||
/**
|
||||
* TrafficDescriptors for which this data call must be used. It only includes
|
||||
* the TDs for which a data call has been requested so far; it is not an
|
||||
* exhaustive list.
|
||||
*/
|
||||
vec<TrafficDescriptor> trafficDescriptors;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -900,6 +907,70 @@ enum DataCallFailCause : @1.4::DataCallFailCause {
|
|||
* Data call fail due to the slice not being allowed for the data call.
|
||||
*/
|
||||
SLICE_REJECTED = 0x8CC,
|
||||
|
||||
/**
|
||||
* No matching rule available for the request, and match-all rule is not allowed for it.
|
||||
*/
|
||||
MATCH_ALL_RULE_NOT_ALLOWED = 0x8CD,
|
||||
|
||||
/**
|
||||
* If connection failed for all matching URSP rules
|
||||
*/
|
||||
ALL_MATCHING_RULES_FAILED = 0x8CE,
|
||||
};
|
||||
|
||||
/**
|
||||
* This safe_union represents an optional DNN. DNN stands for Data Network Name
|
||||
* and represents an APN as defined in 3GPP TS 23.003.
|
||||
*/
|
||||
safe_union OptionalDNN {
|
||||
Monostate noinit;
|
||||
string value;
|
||||
};
|
||||
|
||||
/**
|
||||
* This safe_union represents an optional OSAppId.
|
||||
*/
|
||||
safe_union OptionalOSAppId {
|
||||
Monostate noinit;
|
||||
OSAppId value;
|
||||
};
|
||||
|
||||
/**
|
||||
* This safe_union represents an optional TrafficDescriptor.
|
||||
*/
|
||||
safe_union OptionalTrafficDescriptor {
|
||||
Monostate noinit;
|
||||
TrafficDescriptor value;
|
||||
};
|
||||
|
||||
/**
|
||||
* This struct represents a traffic descriptor. A valid struct must have at least
|
||||
* one of the optional values present. This is based on the definition of traffic
|
||||
* descriptor in TS 24.526 Section 5.2.
|
||||
*/
|
||||
struct TrafficDescriptor {
|
||||
/**
|
||||
* DNN stands for Data Network Name and represents an APN as defined in
|
||||
* 3GPP TS 23.003.
|
||||
*/
|
||||
OptionalDNN dnn;
|
||||
/**
|
||||
* Indicates the OSId + OSAppId (used as category in Android).
|
||||
*/
|
||||
OptionalOSAppId osAppId;
|
||||
};
|
||||
|
||||
/**
|
||||
* This struct represents the OSId + OSAppId as defined in TS 24.526 Section 5.2
|
||||
*/
|
||||
struct OSAppId {
|
||||
/**
|
||||
* Byte array representing OSId + OSAppId. The minimum length of the array is
|
||||
* 18 and maximum length is 272 (16 bytes for OSId + 1 byte for OSAppId length
|
||||
* + up to 255 bytes for OSAppId).
|
||||
*/
|
||||
vec<uint8_t> osAppId;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -59,9 +59,15 @@ TEST_P(RadioHidlTest_v1_6, setupDataCall_1_6) {
|
|||
::android::hardware::radio::V1_6::OptionalSliceInfo optionalSliceInfo;
|
||||
memset(&optionalSliceInfo, 0, sizeof(optionalSliceInfo));
|
||||
|
||||
::android::hardware::radio::V1_6::OptionalTrafficDescriptor optionalTrafficDescriptor;
|
||||
memset(&optionalTrafficDescriptor, 0, sizeof(optionalTrafficDescriptor));
|
||||
|
||||
bool matchAllRuleAllowed = true;
|
||||
|
||||
Return<void> res =
|
||||
radio_v1_6->setupDataCall_1_6(serial, accessNetwork, dataProfileInfo, roamingAllowed,
|
||||
reason, addresses, dnses, -1, optionalSliceInfo);
|
||||
reason, addresses, dnses, -1, optionalSliceInfo,
|
||||
optionalTrafficDescriptor, matchAllRuleAllowed);
|
||||
ASSERT_OK(res);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
|
@ -82,6 +88,81 @@ TEST_P(RadioHidlTest_v1_6, setupDataCall_1_6) {
|
|||
}
|
||||
}
|
||||
|
||||
TEST_P(RadioHidlTest_v1_6, setupDataCall_1_6_osAppId) {
|
||||
serial = GetRandomSerialNumber();
|
||||
|
||||
::android::hardware::radio::V1_5::AccessNetwork accessNetwork =
|
||||
::android::hardware::radio::V1_5::AccessNetwork::EUTRAN;
|
||||
|
||||
android::hardware::radio::V1_5::DataProfileInfo dataProfileInfo;
|
||||
memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
|
||||
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.bearerBitmap = 161543;
|
||||
dataProfileInfo.mtuV4 = 0;
|
||||
dataProfileInfo.mtuV6 = 0;
|
||||
dataProfileInfo.preferred = true;
|
||||
dataProfileInfo.persistent = false;
|
||||
|
||||
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;
|
||||
|
||||
::android::hardware::radio::V1_6::OptionalSliceInfo optionalSliceInfo;
|
||||
memset(&optionalSliceInfo, 0, sizeof(optionalSliceInfo));
|
||||
|
||||
::android::hardware::radio::V1_6::OptionalTrafficDescriptor optionalTrafficDescriptor;
|
||||
memset(&optionalTrafficDescriptor, 0, sizeof(optionalTrafficDescriptor));
|
||||
|
||||
::android::hardware::radio::V1_6::TrafficDescriptor trafficDescriptor;
|
||||
::android::hardware::radio::V1_6::OSAppId osAppId;
|
||||
osAppId.osAppId = 1;
|
||||
trafficDescriptor.osAppId.value(osAppId);
|
||||
optionalTrafficDescriptor.value(trafficDescriptor);
|
||||
|
||||
bool matchAllRuleAllowed = true;
|
||||
|
||||
Return<void> res =
|
||||
radio_v1_6->setupDataCall_1_6(serial, accessNetwork, dataProfileInfo, roamingAllowed,
|
||||
reason, addresses, dnses, -1, optionalSliceInfo,
|
||||
optionalTrafficDescriptor, matchAllRuleAllowed);
|
||||
ASSERT_OK(res);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
|
||||
if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_6->rspInfo.error,
|
||||
{::android::hardware::radio::V1_6::RadioError::SIM_ABSENT,
|
||||
::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE,
|
||||
::android::hardware::radio::V1_6::RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW}));
|
||||
} else if (cardStatus.base.base.base.cardState == CardState::PRESENT) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_6->rspInfo.error,
|
||||
{::android::hardware::radio::V1_6::RadioError::NONE,
|
||||
::android::hardware::radio::V1_6::RadioError::RADIO_NOT_AVAILABLE,
|
||||
::android::hardware::radio::V1_6::RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW}));
|
||||
EXPECT_EQ(optionalTrafficDescriptor.value().osAppId.value().osAppId,
|
||||
radioRsp_v1_6->setupDataCallResult.trafficDescriptors[0].osAppId.value().osAppId);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Test IRadio_1_6.sendSms() for the response returned.
|
||||
*/
|
||||
|
|
|
@ -89,6 +89,7 @@ class RadioResponse_v1_6 : public ::android::hardware::radio::V1_6::IRadioRespon
|
|||
|
||||
// Data
|
||||
::android::hardware::radio::V1_4::DataRegStateResult dataRegResp;
|
||||
::android::hardware::radio::V1_6::SetupDataCallResult setupDataCallResult;
|
||||
|
||||
// SimLock status
|
||||
::android::hardware::radio::V1_4::CarrierRestrictionsWithPriority carrierRestrictionsResp;
|
||||
|
|
|
@ -1053,8 +1053,9 @@ Return<void> RadioResponse_v1_6::setRadioPowerResponse_1_6(
|
|||
|
||||
Return<void> RadioResponse_v1_6::setupDataCallResponse_1_6(
|
||||
const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
|
||||
const android::hardware::radio::V1_6::SetupDataCallResult& /* dcResponse */) {
|
||||
const android::hardware::radio::V1_6::SetupDataCallResult& dcResponse) {
|
||||
rspInfo = info;
|
||||
setupDataCallResult = dcResponse;
|
||||
parent_v1_6.notify(info.serial);
|
||||
return Void();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue