From 43e5220d237dc523aa37c3554579cfb144d0398b Mon Sep 17 00:00:00 2001 From: Sooraj Sasindran Date: Thu, 22 Oct 2020 15:24:14 -0700 Subject: [PATCH] Provide secondary link capacity estimation Provide intrface to get secondary link capacity estimation Bug: 162373679 Test: build merged-In: I371f1f8ad820f8b20c972c3310ebe82b3790a577 Change-Id: I371f1f8ad820f8b20c972c3310ebe82b3790a577 --- radio/1.6/IRadioIndication.hal | 14 ++++++ radio/1.6/types.hal | 44 +++++++++++++++++++ .../functional/radio_hidl_hal_utils_v1_6.h | 4 ++ radio/1.6/vts/functional/radio_indication.cpp | 6 +++ 4 files changed, 68 insertions(+) diff --git a/radio/1.6/IRadioIndication.hal b/radio/1.6/IRadioIndication.hal index c135090947..f195c0e665 100644 --- a/radio/1.6/IRadioIndication.hal +++ b/radio/1.6/IRadioIndication.hal @@ -18,6 +18,8 @@ package android.hardware.radio@1.6; import @1.0::RadioIndicationType; import @1.5::IRadioIndication; +import @1.6::SetupDataCallResult; +import @1.6::LinkCapacityEstimate; /** * Interface declaring unsolicited radio indications. @@ -53,4 +55,16 @@ interface IRadioIndication extends @1.5::IRadioIndication { * @param apn Apn to unthrottle */ oneway unthrottleApn(RadioIndicationType type, string apn); + + /** + * Indicates current link capacity estimate. + * This replaces @1.2::IRadioIndication.currentLinkCapacityEstimate(). + * This indication is sent whenever the reporting criteria, as set by + * @1.2::IRadio.setLinkCapacityReportingCriteria, are met and the indication is not + * suppressed by @1.2::IRadio.setIndicationFilter_1_2(). + * + * @param type Type of radio indication + * @param lce LinkCapacityEstimate + */ + oneway currentLinkCapacityEstimate_1_6(RadioIndicationType type, LinkCapacityEstimate lce); }; diff --git a/radio/1.6/types.hal b/radio/1.6/types.hal index a98cd1ff83..32da2955d1 100644 --- a/radio/1.6/types.hal +++ b/radio/1.6/types.hal @@ -284,3 +284,47 @@ enum NrDualConnectivityState: int32_t { */ DISABLE_IMMEDIATE= 3, }; + +/** + * Overwritten from @1.2::LinkCapacityEstimate to update LinkCapacityEstimate to 1.6 version. + */ +struct LinkCapacityEstimate { + + /** + * Estimated downlink capacity in kbps. In case of a dual connected network, + * this includes capacity of both primary and secondary. This bandwidth estimate shall be + * the estimated maximum sustainable link bandwidth (as would be measured + * at the Upper PDCP or SNDCP SAP). If the DL Aggregate Maximum Bit Rate is known, + * this value shall not exceed the DL-AMBR for the Internet PDN connection. + * This must be filled with -1 if network is not connected. + */ + uint32_t downlinkCapacityKbps; + + /** + * Estimated uplink capacity in kbps. In case of a dual connected network, + * this includes capacity of both primary and secondary. This bandwidth estimate shall be the + * estimated maximum sustainable link bandwidth (as would be measured at the + * Upper PDCP or SNDCP SAP). If the UL Aggregate Maximum Bit Rate is known, + * this value shall not exceed the UL-AMBR for the Internet PDN connection. + * This must be filled with -1 if network is not connected. + */ + uint32_t uplinkCapacityKbps; + + /** + * Estimated downlink capacity of secondary carrier in a dual connected NR mode in kbps. + * This bandwidth estimate shall be the estimated maximum sustainable link bandwidth + * (as would be measured at the Upper PDCP or SNDCP SAP). This is valid only + * in if device is connected to both primary and secodary in dual connected + * mode. This must be filled with -1 if secondary is not connected. + */ + uint32_t secondaryDownlinkCapacityKbps; + + /** + * Estimated uplink capacity secondary carrier in a dual connected NR mode in kbps. + * This bandwidth estimate shall be the estimated + * maximum sustainable link bandwidth (as would be measured at the Upper PDCP or SNDCP SAP). + * This is valid only in if device is connected to both primary and secodary in dual connected + * mode.This must be filled with -1 if secondary is not connected. + */ + uint32_t secondaryUplinkCapacityKbps; +}; diff --git a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h index 989ba6db96..6189be6add 100644 --- a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h +++ b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h @@ -865,6 +865,10 @@ class RadioIndication_v1_6 : public ::android::hardware::radio::V1_6::IRadioIndi RadioIndicationType type, const ::android::hardware::radio::V1_2::LinkCapacityEstimate& lce); + Return currentLinkCapacityEstimate_1_6( + RadioIndicationType type, + const ::android::hardware::radio::V1_6::LinkCapacityEstimate& lce); + Return currentPhysicalChannelConfigs( RadioIndicationType type, const ::android::hardware::hidl_vec< diff --git a/radio/1.6/vts/functional/radio_indication.cpp b/radio/1.6/vts/functional/radio_indication.cpp index b353c821d8..afde291a47 100644 --- a/radio/1.6/vts/functional/radio_indication.cpp +++ b/radio/1.6/vts/functional/radio_indication.cpp @@ -124,6 +124,12 @@ Return RadioIndication_v1_6::currentLinkCapacityEstimate( return Void(); } +Return RadioIndication_v1_6::currentLinkCapacityEstimate_1_6( + RadioIndicationType /*type*/, + const ::android::hardware::radio::V1_6::LinkCapacityEstimate& /*lce*/) { + return Void(); +} + Return RadioIndication_v1_6::currentPhysicalChannelConfigs( RadioIndicationType /*type*/, const ::android::hardware::hidl_vec<