gnb,rrc: make it possible to use default configs when SRB configs are not present.

master
Pedro Alvarez 3 years ago
parent 3ae6aae230
commit ece3c69d45

@ -1409,13 +1409,24 @@ int rrc_nr::ue::update_rlc_bearers(const asn1::rrc_nr::cell_group_cfg_s& cell_gr
// Add/Mod RLC radio bearers // Add/Mod RLC radio bearers
for (const rlc_bearer_cfg_s& rb : cell_group_diff.rlc_bearer_to_add_mod_list) { for (const rlc_bearer_cfg_s& rb : cell_group_diff.rlc_bearer_to_add_mod_list) {
srsran::rlc_config_t rlc_cfg; srsran::rlc_config_t rlc_cfg;
uint8_t rb_id = rb.served_radio_bearer.type().value == rlc_bearer_cfg_s::served_radio_bearer_c_::types_opts::drb_id uint8_t rb_id = 0;
? rb.served_radio_bearer.drb_id() if (rb.served_radio_bearer.type().value == rlc_bearer_cfg_s::served_radio_bearer_c_::types_opts::srb_id) {
: rb.served_radio_bearer.srb_id(); rb_id = rb.served_radio_bearer.srb_id();
if (srsran::make_rlc_config_t(rb.rlc_cfg, rb_id, &rlc_cfg) != SRSRAN_SUCCESS) { if (not rb.rlc_cfg_present) {
logger.error("Failed to build RLC config"); rlc_cfg = srsran::rlc_config_t::default_rlc_am_nr_config();
// TODO: HANDLE }
return SRSRAN_ERROR; } else {
rb_id = rb.served_radio_bearer.drb_id();
if (not rb.rlc_cfg_present) {
logger.error("No RLC config for DRB");
// TODO: HANDLE
return SRSRAN_ERROR;
}
if (srsran::make_rlc_config_t(rb.rlc_cfg, rb_id, &rlc_cfg) != SRSRAN_SUCCESS) {
logger.error("Failed to build RLC config");
// TODO: HANDLE
return SRSRAN_ERROR;
}
} }
parent->rlc->add_bearer(rnti, rb.lc_ch_id, rlc_cfg); parent->rlc->add_bearer(rnti, rb.lc_ch_id, rlc_cfg);
} }

@ -1061,6 +1061,9 @@ bool rrc_nr::apply_rlc_add_mod(const rlc_bearer_cfg_s& rlc_bearer_cfg)
logger.error("Failed to build RLC config"); logger.error("Failed to build RLC config");
return false; return false;
} }
} else if (not is_drb) {
logger.error("Using default RLC configs for SRB%d", srb_id);
rlc_cfg = rlc_config_t::default_rlc_am_nr_config();
} else { } else {
logger.error("In RLC bearer cfg does not contain rlc cfg"); logger.error("In RLC bearer cfg does not contain rlc cfg");
return false; return false;

Loading…
Cancel
Save