From 9d564f3691c33ae7e1fdfc3c0bb0266c7c713d88 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 12 Dec 2022 08:40:49 +0100 Subject: [PATCH] Hack: enable UL traffic in do-ra mode This commit enables UL traffic in do-ra mode by doing two changes: - configure SDAP to send traffic to TUN interface instead of GTP by abusing enb_flag=0 (i.e., setting UE mode for gNB SDAP) - manually enable RLC LCID in UE MAC, since nr_DRB_preconfiguration() statically enables one DRB bearer, without notifying MAC --- openair2/LAYER2/NR_MAC_UE/main_ue_nr.c | 1 + openair2/RRC/NR/rrc_gNB_nsa.c | 1 + 2 files changed, 2 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c index d7162d9bf1..1e254ded42 100644 --- a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c +++ b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c @@ -63,6 +63,7 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) { if (IS_SOFTMODEM_NOS1){ pdcp_layer_init(); nr_DRB_preconfiguration(nr_ue_mac_inst->crnti); + nr_ue_mac_inst->logicalChannelBearer_exist[0] = true; } // Allocate memory for ul_config_request in the mac instance. This is now a pointer and will // point to a list of structures (one for each UL slot) to store PUSCH scheduling parameters diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index 878a49c89d..b98dc2af40 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -374,6 +374,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ } PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_id_rnti, 0, 0, rrc->module_id); + if (get_softmodem_params()->do_ra) ctxt.enb_flag = 0; LOG_W(RRC, "Calling RRC PDCP/RLC ASN1 request functions for protocol context %p with module_id %d, rnti %x, frame %d, subframe %d eNB_index %d \n", &ctxt,