fix regression in scell activation during intraenb handover

This commit is contained in:
Francisco 2021-04-16 10:50:44 +01:00 committed by Francisco Paisana
parent e1752c0878
commit 791b8d24ce
3 changed files with 13 additions and 13 deletions

View File

@ -268,15 +268,15 @@ std::array<int, SRSRAN_MAX_CARRIERS> sched::get_enb_ue_cc_map(uint16_t rnti)
std::array<bool, SRSRAN_MAX_CARRIERS> sched::get_scell_activation_mask(uint16_t rnti)
{
std::array<int, SRSRAN_MAX_CARRIERS> enb_ue_cc_map = get_enb_ue_cc_map(rnti);
std::array<bool, SRSRAN_MAX_CARRIERS> scell_mask = {};
for (int ue_cc : enb_ue_cc_map) {
if (ue_cc <= 0) {
// inactive or PCell
continue;
std::array<bool, SRSRAN_MAX_CARRIERS> scell_mask = {};
ue_db_access_locked(rnti, [this, &scell_mask](sched_ue& ue) {
for (size_t enb_cc_idx = 0; enb_cc_idx < carrier_schedulers.size(); ++enb_cc_idx) {
const sched_ue_cell* cc_ue = ue.find_ue_carrier(enb_cc_idx);
if (cc_ue != nullptr and (cc_ue->cc_state() == cc_st::active or cc_ue->cc_state() == cc_st::activating)) {
scell_mask[cc_ue->get_ue_cc_idx()] = true;
}
}
scell_mask[ue_cc] = true;
}
});
return scell_mask;
}

View File

@ -77,10 +77,12 @@ void sched_ue::set_cfg(const ue_cfg_t& cfg_)
scell_activation_state_changed |=
c.is_scell() and (c.cc_state() == cc_st::activating or c.cc_state() == cc_st::deactivating);
}
if (prev_supported_cc_list.empty() or prev_supported_cc_list[0].enb_cc_idx != cfg.supported_cc_list[0].enb_cc_idx) {
bool is_handover = not prev_supported_cc_list.empty() and
prev_supported_cc_list[0].enb_cc_idx != cfg.supported_cc_list[0].enb_cc_idx;
if (prev_supported_cc_list.empty() or is_handover) {
logger.info("SCHED: rnti=0x%x PCell is now enb_cc_idx=%d", rnti, cfg.supported_cc_list[0].enb_cc_idx);
}
if (scell_activation_state_changed) {
if (scell_activation_state_changed and not is_handover) {
lch_handler.pending_ces.emplace_back(srsran::dl_sch_lcid::SCELL_ACTIVATION);
logger.info("SCHED: Enqueueing SCell Activation CMD for rnti=0x%x", rnti);
}

View File

@ -127,9 +127,7 @@ int mac_controller::handle_crnti_ce(uint32_t temp_crnti)
current_sched_ue_cfg = next_sched_ue_cfg;
// Disable SCells, until RRCReconfComplete is received, otherwise the SCell Act MAC CE is sent too early
for (uint32_t i = 1; i < current_sched_ue_cfg.supported_cc_list.size(); ++i) {
current_sched_ue_cfg.supported_cc_list[i].active = false;
}
set_scell_activation({0});
// keep DRBs disabled until RRCReconfComplete is received
set_drb_activation(false);