Commit 577c6d09 authored by Guido Casati's avatar Guido Casati

Moved nr_reconfigure_sdap_entity to SDAP module

- improves code readability and maintainability
parent 14f0327c
......@@ -1130,7 +1130,7 @@ void nr_pdcp_reconfigure_srb(ue_id_t ue_id, int srb_id, long t_Reordering)
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
}
void nr_pdcp_reconfigure_drb(ue_id_t ue_id, int drb_id, NR_PDCP_Config_t *pdcp_config, NR_SDAP_Config_t *sdap_config)
void nr_pdcp_reconfigure_drb(ue_id_t ue_id, int drb_id, NR_PDCP_Config_t *pdcp_config)
{
// The enabling/disabling of ciphering or integrity protection
// can be changed only by releasing and adding the DRB
......@@ -1166,10 +1166,6 @@ void nr_pdcp_reconfigure_drb(ue_id_t ue_id, int drb_id, NR_PDCP_Config_t *pdcp_c
}
}
}
/* SDAP entity reconfiguration */
if (sdap_config)
nr_reconfigure_sdap_entity(sdap_config, ue_id, sdap_config->pdu_Session, drb_id);
nr_pdcp_manager_unlock(nr_pdcp_ue_manager);
}
......
......@@ -67,7 +67,7 @@ void nr_pdcp_reestablishment(ue_id_t ue_id, int rb_id, bool srb_flag);
void nr_pdcp_suspend_srb(ue_id_t ue_id, int srb_id);
void nr_pdcp_suspend_drb(ue_id_t ue_id, int drb_id);
void nr_pdcp_reconfigure_srb(ue_id_t ue_id, int srb_id, long t_Reordering);
void nr_pdcp_reconfigure_drb(ue_id_t ue_id, int drb_id, NR_PDCP_Config_t *pdcp_config, NR_SDAP_Config_t *sdap_config);
void nr_pdcp_reconfigure_drb(ue_id_t ue_id, int drb_id, NR_PDCP_Config_t *pdcp_config);
void nr_pdcp_release_srb(ue_id_t ue_id, int srb_id);
void nr_pdcp_release_drb(ue_id_t ue_id, int drb_id);
......
......@@ -70,6 +70,7 @@
#include "SIMULATION/TOOLS/sim.h" // for taus
#include "nr_nas_msg_sim.h"
#include "openair2/SDAP/nr_sdap/nr_sdap_entity.h"
static NR_UE_RRC_INST_t *NR_UE_rrc_inst;
/* NAS Attach request with IMSI */
......@@ -1237,8 +1238,11 @@ static void nr_rrc_ue_process_RadioBearerConfig(NR_UE_RRC_INST_t *ue_rrc,
/* sdap-Config is included (SA mode) */
NR_SDAP_Config_t *sdap_Config = drb->cnAssociation ? drb->cnAssociation->choice.sdap_Config : NULL;
/* PDCP and SDAP reconfiguration */
if (drb->pdcp_Config || sdap_Config)
nr_pdcp_reconfigure_drb(ue_rrc->ue_id, DRB_id, drb->pdcp_Config, sdap_Config);
if (drb->pdcp_Config)
nr_pdcp_reconfigure_drb(ue_rrc->ue_id, DRB_id, drb->pdcp_Config);
/* SDAP entity reconfiguration */
if (sdap_Config)
nr_reconfigure_sdap_entity(sdap_Config, ue_rrc->ue_id, sdap_Config->pdu_Session, DRB_id);
} else {
rrcNB->status_DRBs[DRB_id] = RB_ESTABLISHED;
add_drb(false,
......
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