Commit b5e89544 authored by Melissa Elkadi's avatar Melissa Elkadi

Changed logic in MAC layer to allow RLC data read

Also changed logic in the NR UE schedule to read
IP traffic. Also, configured the RLC layer in the
NR UE softmodem and the DRBs with the cRNTI once
the RACH procedure is complete in the NR UE.
parent 97a648e3
......@@ -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)
{
......
......@@ -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);
......
......@@ -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,
......
......@@ -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,
......
......@@ -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);
}
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);
......
......@@ -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__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment