From d561cc3391c3683fc3801d074877ec9ade0b6169 Mon Sep 17 00:00:00 2001 From: Sooraj Sasindran Date: Tue, 11 Jan 2022 09:42:21 -0800 Subject: [PATCH] add slicingConfigChanged api add slicing config changed api to be sent by modem whenever there is a slice config change Test: build, vts tracked using bug 214043323 Bug: 194332512 Change-Id: I86e8ab8ac5aa782b099434f1a04ce314631b7f4e --- .../hardware/radio/data/IRadioDataIndication.aidl | 1 + .../hardware/radio/data/IRadioDataIndication.aidl | 14 ++++++++++++++ .../libradiocompat/data/RadioIndication-data.cpp | 7 +++++++ .../include/libradiocompat/RadioIndication.h | 2 ++ radio/aidl/vts/radio_data_indication.cpp | 5 +++++ radio/aidl/vts/radio_data_utils.h | 2 ++ 6 files changed, 31 insertions(+) diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl index b0cc1eb189..0ffa1f7ddf 100644 --- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl +++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl @@ -38,4 +38,5 @@ interface IRadioDataIndication { oneway void keepaliveStatus(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.data.KeepaliveStatus status); oneway void pcoData(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.data.PcoDataInfo pco); oneway void unthrottleApn(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.data.DataProfileInfo dataProfileInfo); + oneway void slicingConfigChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.data.SlicingConfig slicingConfig); } diff --git a/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl b/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl index 1772c8859f..938c695fd4 100644 --- a/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl +++ b/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl @@ -21,6 +21,7 @@ import android.hardware.radio.data.DataProfileInfo; import android.hardware.radio.data.KeepaliveStatus; import android.hardware.radio.data.PcoDataInfo; import android.hardware.radio.data.SetupDataCallResult; +import android.hardware.radio.data.SlicingConfig; /** * Interface declaring unsolicited radio indications for data APIs. @@ -72,4 +73,17 @@ oneway interface IRadioDataIndication { * @param dataProfileInfo Data profile info. */ void unthrottleApn(in RadioIndicationType type, in DataProfileInfo dataProfileInfo); + + /** + * Indicates the current slicing configuration including URSP rules and NSSAIs + * (configured, allowed and rejected). URSP stands for UE route selection policy and is defined + * in 3GPP TS 24.526 Section 4.2. An NSSAI is a collection of network slices. Each network slice + * is identified by an S-NSSAI and is represented by the struct SliceInfo. NSSAI and S-NSSAI + * are defined in 3GPP TS 24.501. + * + * @param type Type of radio indication + * @param slicingConfig Current slicing configuration + * + */ + void slicingConfigChanged(in RadioIndicationType type, in SlicingConfig slicingConfig); } diff --git a/radio/aidl/compat/libradiocompat/data/RadioIndication-data.cpp b/radio/aidl/compat/libradiocompat/data/RadioIndication-data.cpp index 1d367d2025..602bb39390 100644 --- a/radio/aidl/compat/libradiocompat/data/RadioIndication-data.cpp +++ b/radio/aidl/compat/libradiocompat/data/RadioIndication-data.cpp @@ -85,4 +85,11 @@ Return RadioIndication::unthrottleApn(V1_0::RadioIndicationType type, return {}; } +Return RadioIndication::slicingConfigChanged(V1_0::RadioIndicationType type, + const V1_6::SlicingConfig& slicingConfig) { + LOG_CALL << type; + dataCb()->slicingConfigChanged(toAidl(type), toAidl(slicingConfig)); + return {}; +} + } // namespace android::hardware::radio::compat diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h index c668af5dce..6cfd59c6a3 100644 --- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h +++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioIndication.h @@ -186,6 +186,8 @@ class RadioIndication : public V1_6::IRadioIndication { V1_0::RadioIndicationType type, const hidl_vec& dcList) override; Return unthrottleApn(V1_0::RadioIndicationType type, const hidl_string& apn) override; + Return slicingConfigChanged(V1_0::RadioIndicationType type, + const V1_6::SlicingConfig& slicingConfig); Return currentLinkCapacityEstimate_1_6(V1_0::RadioIndicationType type, const V1_6::LinkCapacityEstimate& lce) override; Return currentSignalStrength_1_6(V1_0::RadioIndicationType type, diff --git a/radio/aidl/vts/radio_data_indication.cpp b/radio/aidl/vts/radio_data_indication.cpp index 4d3c539d91..61e079e532 100644 --- a/radio/aidl/vts/radio_data_indication.cpp +++ b/radio/aidl/vts/radio_data_indication.cpp @@ -37,3 +37,8 @@ ndk::ScopedAStatus RadioDataIndication::unthrottleApn(RadioIndicationType /*type const DataProfileInfo& /*dataProfileInfo*/) { return ndk::ScopedAStatus::ok(); } + +ndk::ScopedAStatus RadioDataIndication::slicingConfigChanged( + RadioIndicationType /*type*/, const SlicingConfig& /*slicingConfig*/) { + return ndk::ScopedAStatus::ok(); +} diff --git a/radio/aidl/vts/radio_data_utils.h b/radio/aidl/vts/radio_data_utils.h index 50c7878a2c..fb91ef61d5 100644 --- a/radio/aidl/vts/radio_data_utils.h +++ b/radio/aidl/vts/radio_data_utils.h @@ -95,6 +95,8 @@ class RadioDataIndication : public BnRadioDataIndication { virtual ndk::ScopedAStatus unthrottleApn(RadioIndicationType type, const DataProfileInfo& dataProfile) override; + virtual ndk::ScopedAStatus slicingConfigChanged(RadioIndicationType type, + const SlicingConfig& slicingConfig) override; }; // The main test class for Radio AIDL Data.