Commit f4ff6c75 authored by francescomani's avatar francescomani

add a check for rlc-Config presence (even if it should be mandatory at setup)

parent c47ddc57
...@@ -329,7 +329,7 @@ static int handle_ue_context_drbs_setup(NR_UE_info_t *UE, ...@@ -329,7 +329,7 @@ static int handle_ue_context_drbs_setup(NR_UE_info_t *UE,
*rlc_BearerConfig->rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = NR_SN_FieldLengthAM_size12; *rlc_BearerConfig->rlc_Config->choice.am->dl_AM_RLC.sn_FieldLength = NR_SN_FieldLengthAM_size12;
*rlc_BearerConfig->rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = NR_SN_FieldLengthAM_size12; *rlc_BearerConfig->rlc_Config->choice.am->ul_AM_RLC.sn_FieldLength = NR_SN_FieldLengthAM_size12;
} }
AssertFatal(rlc_BearerConfig->rlc_Config, "We expect rlc-Config to be always present when we configure a DRB\n");
nr_rlc_add_drb(UE->rnti, drb->id, rlc_BearerConfig); nr_rlc_add_drb(UE->rnti, drb->id, rlc_BearerConfig);
nr_lc_config_t c = {.lcid = rlc_BearerConfig->logicalChannelIdentity, .nssai = drb->nr.nssai}; nr_lc_config_t c = {.lcid = rlc_BearerConfig->logicalChannelIdentity, .nssai = drb->nr.nssai};
......
...@@ -672,7 +672,7 @@ void nr_rlc_reconfigure_entity(int ue_id, int lc_id, NR_RLC_Config_t *rlc_Config ...@@ -672,7 +672,7 @@ void nr_rlc_reconfigure_entity(int ue_id, int lc_id, NR_RLC_Config_t *rlc_Config
void nr_rlc_add_srb(int ue_id, int srb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig) void nr_rlc_add_srb(int ue_id, int srb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig)
{ {
struct NR_RLC_Config *r = rlc_BearerConfig->rlc_Config; NR_RLC_Config_t *r = rlc_BearerConfig->rlc_Config;
int t_status_prohibit; int t_status_prohibit;
int t_poll_retransmit; int t_poll_retransmit;
int poll_pdu; int poll_pdu;
...@@ -682,8 +682,7 @@ void nr_rlc_add_srb(int ue_id, int srb_id, const NR_RLC_BearerConfig_t *rlc_Bear ...@@ -682,8 +682,7 @@ void nr_rlc_add_srb(int ue_id, int srb_id, const NR_RLC_BearerConfig_t *rlc_Bear
int sn_field_length; int sn_field_length;
LOG_D(RLC, "Trying to add SRB %d\n", srb_id); LOG_D(RLC, "Trying to add SRB %d\n", srb_id);
AssertFatal(srb_id > 0 && srb_id < 4, AssertFatal(srb_id > 0 && srb_id < 4, "Invalid srb id %d\n", srb_id);
"Invalid srb id %d\n", srb_id);
if (r && r->present == NR_RLC_Config_PR_am) { if (r && r->present == NR_RLC_Config_PR_am) {
struct NR_RLC_Config__am *am; struct NR_RLC_Config__am *am;
......
...@@ -1684,12 +1684,17 @@ static void nr_rrc_manage_rlc_bearers(NR_UE_RRC_INST_t *rrc, const NR_CellGroupC ...@@ -1684,12 +1684,17 @@ static void nr_rrc_manage_rlc_bearers(NR_UE_RRC_INST_t *rrc, const NR_CellGroupC
nr_rlc_set_rlf_handler(rrc->ue_id, nr_rrc_signal_maxrtxindication); nr_rlc_set_rlf_handler(rrc->ue_id, nr_rrc_signal_maxrtxindication);
} else { // DRB } else { // DRB
NR_DRB_Identity_t drb_id = rlc_bearer->servedRadioBearer->choice.drb_Identity; NR_DRB_Identity_t drb_id = rlc_bearer->servedRadioBearer->choice.drb_Identity;
if (!rlc_bearer->rlc_Config) {
LOG_E(RLC, "RLC-Config not present but is mandatory for setup\n");
rrc->active_RLC_entity[lcid] = false;
} else {
nr_rlc_add_drb(rrc->ue_id, drb_id, rlc_bearer); nr_rlc_add_drb(rrc->ue_id, drb_id, rlc_bearer);
nr_rlc_set_rlf_handler(rrc->ue_id, nr_rrc_signal_maxrtxindication); nr_rlc_set_rlf_handler(rrc->ue_id, nr_rrc_signal_maxrtxindication);
} }
} }
} }
} }
}
} }
static void nr_rrc_process_reconfigurationWithSync(NR_UE_RRC_INST_t *rrc, static void nr_rrc_process_reconfigurationWithSync(NR_UE_RRC_INST_t *rrc,
......
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