diff --git a/executables/nr-ue.c b/executables/nr-ue.c index cfb8636b82..09c138fdb9 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -27,6 +27,7 @@ #include "SCHED_NR_UE/phy_frame_config_nr.h" #include "SCHED_NR_UE/defs.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" +#include "LAYER2/nr_pdcp/nr_pdcp_entity.h" /* * NR SLOT PROCESSING SEQUENCE @@ -318,6 +319,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) else if (nr_prach == 2) { LOG_I(NR_PHY, "In %s: [UE %d] RA completed, setting UE mode to PUSCH\n", __FUNCTION__, mod_id); + nr_DRB_preconfiguration(mac->crnti); } else if(nr_prach == 3) { diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 6eaf13ff60..dcdf626bae 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -466,10 +466,9 @@ void init_pdcp(int ue_id) { if (IS_SOFTMODEM_NOKRNMOD) pdcp_initmask = pdcp_initmask | UE_NAS_USE_TUN_BIT; - /*if (rlc_module_init() != 0) { + if (rlc_module_init(0) != 0) { LOG_I(RLC, "Problem at RLC initiation \n"); } - nr_DRB_preconfiguration();*/ pdcp_layer_init(); nr_pdcp_module_init(pdcp_initmask, ue_id); pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 8cfc51cdd4..8eb4888aac 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -1930,7 +1930,7 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, LOG_T(MAC, "\n"); #endif - if (IS_SOFTMODEM_NOS1){ + if (IS_SOFTMODEM_NOS1 || get_softmodem_params()->nsa){ if (rx_lcid < NB_RB_MAX && rx_lcid >= DL_SCH_LCID_DTCH) { mac_rlc_data_ind(module_idP, diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index ad78279518..b795b8c7a8 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -897,7 +897,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in uint16_t TBS_bytes = ulcfg_pdu->pusch_config_pdu.pusch_data.tb_size; // Push data from MAC to PHY only when NDI toggles - if (IS_SOFTMODEM_NOS1 && (mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator)){ + if ((mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator)){ // Getting IP traffic to be transmitted data_existing = nr_ue_get_sdu(mod_id, cc_id, diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index c1a35b8a75..9616a4bd81 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -1196,7 +1196,7 @@ pdcp_run ( // IP/NAS -> PDCP traffic : TX, read the pkt from the upper layer buffer // if (LINK_ENB_PDCP_TO_GTPV1U && ctxt_pP->enb_flag == ENB_FLAG_NO) { - if (!EPC_MODE_ENABLED || ctxt_pP->enb_flag == ENB_FLAG_NO ) { + if (!get_softmodem_params()->nsa) { pdcp_fifo_read_input_sdus(ctxt_pP); } @@ -1206,8 +1206,9 @@ pdcp_run ( } else { start_meas(&UE_pdcp_stats[ctxt_pP->module_id].pdcp_ip); } - - pdcp_fifo_flush_sdus(ctxt_pP); + if(!get_softmodem_params()->nsa) { + pdcp_fifo_flush_sdus(ctxt_pP); + } if (ctxt_pP->enb_flag) { stop_meas(&eNB_pdcp_stats[ctxt_pP->module_id].pdcp_ip); diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 6a60dc4db2..b71dc1fc4b 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -412,7 +412,7 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity, int rb_id; int i; - if(IS_SOFTMODEM_NOS1){ + if(IS_SOFTMODEM_NOS1 || get_softmodem_params()->nsa){ len = write(nas_sock_fd[0], buf, size); if (len != size) { LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);