enb,rrc: fix bearer re-activation after max KO

this patch makes sure that if RBs have been deactivated after
max KO on either the DL or the UL, they are reactivated if either
of them is working again.

UL/DL are always activated together, even if just one of them
recovers. The KO counter (or timer), however, is not stopped implicitly.
This commit is contained in:
Andre Puschmann 2021-05-20 15:47:30 +02:00 committed by Ismael Gomez
parent 59db527481
commit fbb151af2d
3 changed files with 9 additions and 7 deletions

View File

@ -55,7 +55,7 @@ public:
const srsran::rrc_ue_capabilities_t& uecaps);
void handle_ho_prep(const asn1::rrc::ho_prep_info_r8_ies_s& ho_prep);
void handle_max_retx();
void set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::direction_t dir);
const ue_cfg_t& get_ue_sched_cfg() const { return current_sched_ue_cfg; }
bool is_crnti_set() const { return crnti_set; }

View File

@ -297,10 +297,10 @@ void mac_controller::handle_ho_prep(const asn1::rrc::ho_prep_info_r8_ies_s& ho_p
}
}
void mac_controller::handle_max_retx()
void mac_controller::set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::direction_t dir)
{
for (auto& ue_bearer : current_sched_ue_cfg.ue_bearers) {
ue_bearer.direction = sched_interface::ue_bearer_cfg_t::IDLE;
ue_bearer.direction = dir;
}
update_mac(config_tx);
}

View File

@ -122,6 +122,7 @@ void rrc::ue::set_radiolink_dl_state(bool crc_res)
parent->logger.info(
"DL RLF timer stopped for rnti=0x%x (time elapsed=%dms)", rnti, phy_dl_rlf_timer.time_elapsed());
phy_dl_rlf_timer.stop();
mac_ctrl.set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::BOTH);
}
return;
}
@ -136,7 +137,7 @@ void rrc::ue::set_radiolink_dl_state(bool crc_res)
consecutive_kos_dl++;
if (consecutive_kos_dl > parent->cfg.max_mac_dl_kos) {
parent->logger.info("Max KOs in DL reached, starting RLF timer rnti=0x%x", rnti);
mac_ctrl.handle_max_retx();
mac_ctrl.set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::IDLE);
phy_dl_rlf_timer.run();
}
}
@ -153,6 +154,7 @@ void rrc::ue::set_radiolink_ul_state(bool crc_res)
parent->logger.info(
"UL RLF timer stopped for rnti=0x%x (time elapsed=%dms)", rnti, phy_ul_rlf_timer.time_elapsed());
phy_ul_rlf_timer.stop();
mac_ctrl.set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::BOTH);
}
return;
}
@ -167,7 +169,7 @@ void rrc::ue::set_radiolink_ul_state(bool crc_res)
consecutive_kos_ul++;
if (consecutive_kos_ul > parent->cfg.max_mac_ul_kos) {
parent->logger.info("Max KOs in UL reached, starting RLF timer rnti=0x%x", rnti);
mac_ctrl.handle_max_retx();
mac_ctrl.set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::IDLE);
phy_ul_rlf_timer.run();
}
}
@ -222,9 +224,9 @@ void rrc::ue::max_rlc_retx_reached()
{
parent->logger.info("Max RLC retx reached for rnti=0x%x", rnti);
// Turn off DRB scheduling but give UE chance to start re-establishment
// Turn off scheduling but give UE chance to start re-establishment
mac_ctrl.set_radio_bearer_state(sched_interface::ue_bearer_cfg_t::IDLE);
rlc_rlf_timer.run();
mac_ctrl.handle_max_retx();
}
void rrc::ue::set_activity_timeout(const activity_timeout_type_t type)