Add HAL for pdu session id support am: 15cc34ae2c am: 53c36cff08 am: 638431ece7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1480418
Change-Id: I91c193ae189ca933292959da9a967d28d8bab899
diff --git a/radio/1.6/IRadio.hal b/radio/1.6/IRadio.hal
index 66007b4..eb20542 100644
--- a/radio/1.6/IRadio.hal
+++ b/radio/1.6/IRadio.hal
@@ -242,4 +242,67 @@
* Response callback is IRadioResponse.isNRDualConnectivityEnabledResponse()
*/
oneway isNrDualConnectivityEnabled(int32_t serial);
+
+ /**
+ * Reserves an unallocated pdu session id from the pool of ids.
+ *
+ * The allocated id is returned in the response.
+ *
+ * When the id is no longer needed, call releasePduSessionId to
+ * return it to the pool.
+ *
+ * Reference: 3GPP TS 24.007 section 11.2.3.1b
+ *
+ * @param serial Serial number of request.
+ *
+ * Response function is IRadioResponse.allocatePduSessionIdResponse()
+ */
+ oneway allocatePduSessionId(int32_t serial);
+
+ /**
+ * Releases a pdu session id that was previously allocated using
+ * allocatePduSessionId.
+ *
+ * Reference: 3GPP TS 24.007 section 11.2.3.1b
+ * @param serial Serial number of request.
+ * @param id Pdu session id to release.
+ *
+ * Response function is IRadioResponse.releasePduSessionIdResponse()
+ */
+ oneway releasePduSessionId(int32_t serial, int32_t id);
+
+ /**
+ * Indicates that a handover to the IWLAN transport has begun.
+ *
+ * Any resources being transferred to the IWlan transport cannot be released while a
+ * handover is underway. For example, if a pdu session id needs to be
+ * transferred to IWlan, then, the modem should not release the id while
+ * the handover is in progress.
+ *
+ * If a handover was unsuccessful, then the framework calls IRadio::cancelHandover.
+ * The modem retains ownership over any of the resources being transferred to IWlan.
+ *
+ * If a handover was successful, the framework calls IRadio::deactivateDataCall with reason
+ * HANDOVER. The IWlan transport now owns the transferred resources and is responsible for
+ * releasing them.
+ *
+ * @param serial Serial number of request.
+ * @param id callId The identifier of the data call which is provided in SetupDataCallResult
+ *
+ * Response function is IRadioResponse.beginHandoverResponse()
+ */
+ oneway beginHandover(int32_t serial, int32_t callId);
+
+ /**
+ * Indicates that a handover was cancelled after a call to IRadio::beginHandover.
+ *
+ * Since the handover was unsuccessful, the modem retains ownership over any of the resources
+ * being transferred and is still responsible for releasing them.
+ *
+ * @param serial Serial number of request.
+ * @param id callId The identifier of the data call which is provided in SetupDataCallResult
+ *
+ * Response function is IRadioResponse.cancelHandoverResponse()
+ */
+ oneway cancelHandover(int32_t serial, int32_t callId);
};
diff --git a/radio/1.6/IRadioResponse.hal b/radio/1.6/IRadioResponse.hal
index bc6db11..07322be 100644
--- a/radio/1.6/IRadioResponse.hal
+++ b/radio/1.6/IRadioResponse.hal
@@ -238,4 +238,56 @@
* RadioError:INTERNAL_ERR
*/
oneway isNrDualConnectivityEnabledResponse(RadioResponseInfo info, bool isEnabled);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ * @param id The allocated id. On an error, this is set to -1
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INTERNAL_ERR
+ * RadioError:NO_RESOURCES- Indicates that no pdu session ids are available
+ * RadioError:REQUEST_NOT_SUPPORTED
+ */
+ oneway allocatePduSessionIdResponse(RadioResponseInfo info, int32_t id);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INTERNAL_ERR
+ * RadioError:NO_RESOURCES
+ * RadioError:REQUEST_NOT_SUPPORTED
+ */
+ oneway releasePduSessionIdResponse(RadioResponseInfo info);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INTERNAL_ERR
+ * RadioError:NO_RESOURCES
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_CALL_ID
+ */
+ oneway beginHandoverResponse(RadioResponseInfo info);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ * @param dcResponse Attributes of data call
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INTERNAL_ERR
+ * RadioError:NO_RESOURCES
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_CALL_ID
+ */
+ oneway cancelHandoverResponse(RadioResponseInfo info);
};
diff --git a/radio/1.6/types.hal b/radio/1.6/types.hal
index 07b4977..a98cd1f 100644
--- a/radio/1.6/types.hal
+++ b/radio/1.6/types.hal
@@ -254,6 +254,14 @@
/** Specifies the fallback mode on an IWLAN handover failure. */
HandoverFailureMode handoverFailureMode;
+
+ /**
+ * The allocated pdu session id for this data call.
+ * A value of -1 means no pdu session id was attached to this call.
+ *
+ * Reference: 3GPP TS 24.007 section 11.2.3.1b
+ */
+ int32_t pduSessionId;
};
/**
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 553e5b7..850425d 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
@@ -80,6 +80,9 @@
bool enableModemResponseToggle;
bool isNRDualConnectivityEnabled;
+ // Pdu Session Id and Handover
+ int32_t allocatedPduSessionId;
+
::android::hardware::hidl_bitfield<::android::hardware::radio::V1_4::RadioAccessFamily>
networkTypeBitmapResponse;
@@ -774,6 +777,18 @@
const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
Return<void> isNrDualConnectivityEnabledResponse(
const ::android::hardware::radio::V1_6::RadioResponseInfo& info, bool isEnabled);
+
+ Return<void> allocatePduSessionIdResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info, int32_t id);
+
+ Return<void> releasePduSessionIdResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
+
+ Return<void> beginHandoverResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
+
+ Return<void> cancelHandoverResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
};
/* Callback class for radio indication */
diff --git a/radio/1.6/vts/functional/radio_response.cpp b/radio/1.6/vts/functional/radio_response.cpp
index c684584..fc56947 100644
--- a/radio/1.6/vts/functional/radio_response.cpp
+++ b/radio/1.6/vts/functional/radio_response.cpp
@@ -1120,3 +1120,32 @@
parent_v1_6.notify(info.serial);
return Void();
}
+
+Return<void> RadioResponse_v1_6::allocatePduSessionIdResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info, int32_t id) {
+ rspInfo = info;
+ allocatedPduSessionId = id;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}
+
+Return<void> RadioResponse_v1_6::releasePduSessionIdResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}
+
+Return<void> RadioResponse_v1_6::beginHandoverResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}
+
+Return<void> RadioResponse_v1_6::cancelHandoverResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}