From cfb654e77f7f4b8176f0e9f3a0042d39ece53e5a Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Mon, 1 Sep 2025 14:00:35 +0200 Subject: [PATCH] HO Preparation: add alloc_ho_ctx to rrc_gNB_mobility lib --- openair2/RRC/NR/rrc_gNB_mobility.c | 3 +-- openair2/RRC/NR/rrc_gNB_mobility.h | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/NR/rrc_gNB_mobility.c b/openair2/RRC/NR/rrc_gNB_mobility.c index 7324399d0c..fbccc637a7 100644 --- a/openair2/RRC/NR/rrc_gNB_mobility.c +++ b/openair2/RRC/NR/rrc_gNB_mobility.c @@ -42,8 +42,7 @@ #include "openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc_extern.h" #endif -typedef enum { HO_CTX_BOTH, HO_CTX_SOURCE, HO_CTX_TARGET } ho_ctx_type_t; -static nr_handover_context_t *alloc_ho_ctx(ho_ctx_type_t type) +nr_handover_context_t *alloc_ho_ctx(ho_ctx_type_t type) { nr_handover_context_t *ho_ctx = calloc_or_fail(1, sizeof(*ho_ctx)); if (type == HO_CTX_SOURCE || type == HO_CTX_BOTH) { diff --git a/openair2/RRC/NR/rrc_gNB_mobility.h b/openair2/RRC/NR/rrc_gNB_mobility.h index 6e9bcbcfe6..a907b3c472 100644 --- a/openair2/RRC/NR/rrc_gNB_mobility.h +++ b/openair2/RRC/NR/rrc_gNB_mobility.h @@ -72,6 +72,9 @@ typedef struct nr_handover_context_s { nr_ho_target_cu_t *target; } nr_handover_context_t; +typedef enum { HO_CTX_BOTH, HO_CTX_SOURCE, HO_CTX_TARGET } ho_ctx_type_t; +nr_handover_context_t *alloc_ho_ctx(ho_ctx_type_t type); + void nr_rrc_trigger_f1_ho(gNB_RRC_INST *rrc, gNB_RRC_UE_t *ue, nr_rrc_du_container_t *source_du, nr_rrc_du_container_t *target_du); void nr_rrc_finalize_ho(gNB_RRC_UE_t *ue);