diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c index 3bc5d7a7af..3add62a338 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -821,7 +821,9 @@ void ue_context_modification_request(const f1ap_ue_context_mod_req_t *req) update_cellGroupConfig(new_CellGroup, UE->uid, UE->capability, &mac->radio_config, scc); } - if (req->srbs_len > 0 || req->drbs_len > 0 || req->drbs_rel_len > 0 || ue_cap != NULL) { + // 3GPP TS 38.473 Clause 8.3.4: If gNB-DU Configuration Query is present, include CellGroupConfig + if (req->gNB_DU_Configuration_Query != NULL && *req->gNB_DU_Configuration_Query) { + LOG_I(NR_MAC, "UE %04x: gNB-DU Configuration Query received, will include CellGroupConfig in response\n", UE->rnti); resp.du_to_cu_rrc_info = calloc_or_fail(1, sizeof(du_to_cu_rrc_information_t)); resp.du_to_cu_rrc_info->cell_group_config = encode_cellgroup_config(new_CellGroup); diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 32ddaadecf..3323261c91 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -1027,6 +1027,10 @@ static void rrc_gNB_send_f1_drb_release_request(gNB_RRC_INST *rrc, gNB_RRC_UE_t req.drbs_rel_len = n_drb_to_release; memcpy(req.drbs_rel, drb_to_release, n_drb_to_release * sizeof(int)); + // Request CellGroupConfig from DU in the response + req.gNB_DU_Configuration_Query = calloc_or_fail(1, sizeof(*req.gNB_DU_Configuration_Query)); + *req.gNB_DU_Configuration_Query = true; + /* send UE Context Modification to DU without attaching any RRC container */ rrc->mac_rrc.ue_context_modification_request(ue_data.du_assoc_id, &req); LOG_I(NR_RRC, "UE %d: send F1 UE Context Modification Request with DRB release (%d DRBs)\n", ue_p->rrc_ue_id, req.drbs_rel_len); @@ -3662,6 +3666,10 @@ void rrc_gNB_generate_UeContextModificationRequest(const gNB_RRC_INST *rrc, .drbs_rel = (f1ap_drb_to_release_t *)rel_drbs, .cu_to_du_rrc_info = cu2du, }; + + // Request CellGroupConfig from DU in the response + ue_context_modif_req.gNB_DU_Configuration_Query = calloc_or_fail(1, sizeof(*ue_context_modif_req.gNB_DU_Configuration_Query)); + *ue_context_modif_req.gNB_DU_Configuration_Query = true; rrc->mac_rrc.ue_context_modification_request(ue_data.du_assoc_id, &ue_context_modif_req); // avoid attempt to release rel_drbs ue_context_modif_req.drbs_rel_len = 0;