diff --git a/srsenb/hdr/stack/mac/scheduler_ue.h b/srsenb/hdr/stack/mac/scheduler_ue.h index 045930b91..eee2cf8b9 100644 --- a/srsenb/hdr/stack/mac/scheduler_ue.h +++ b/srsenb/hdr/stack/mac/scheduler_ue.h @@ -243,7 +243,7 @@ public: sched_dci_cce_t* get_locations(uint32_t enb_cc_idx, uint32_t current_cfi, uint32_t sf_idx); cc_sched_ue* find_ue_carrier(uint32_t enb_cc_idx); - size_t nof_carriers() const { return carriers.size(); } + size_t nof_carriers_configured() const { return carriers.size(); } std::bitset scell_activation_mask() const; int find_enb_cc_idx(uint32_t enb_cc_idx) const; diff --git a/srsenb/src/stack/mac/scheduler_grid.cc b/srsenb/src/stack/mac/scheduler_grid.cc index 0383d08cb..20e94e8c5 100644 --- a/srsenb/src/stack/mac/scheduler_grid.cc +++ b/srsenb/src/stack/mac/scheduler_grid.cc @@ -784,14 +784,15 @@ alloc_outcome_t sf_sched::alloc_dl_user(sched_ue* user, const rbgmask_t& user_ma // Check if there is space in the PUCCH for HARQ ACKs const sched_interface::ue_cfg_t& ue_cfg = user->get_ue_cfg(); std::bitset scells = user->scell_activation_mask(); - if (scells.any() and (ue_cc_idx == 0 or scells[ue_cc_idx]) and is_periodic_cqi_expected(ue_cfg, get_tti_tx_ul())) { + if (user->nof_carriers_configured() > 1 and (ue_cc_idx == 0 or scells[ue_cc_idx]) and + is_periodic_cqi_expected(ue_cfg, get_tti_tx_ul())) { bool has_pusch_grant = is_ul_alloc(user->get_rnti()) or cc_results->is_ul_alloc(user->get_rnti()); if (not has_pusch_grant) { // Try to allocate small PUSCH grant, if there are no allocated PUSCH grants for this TTI yet prb_interval alloc = {}; uint32_t L = user->get_required_prb_ul(ue_cc_idx, srslte::ceil_div(SRSLTE_UCI_CQI_CODED_PUCCH_B + 2, 8)); tti_alloc.find_ul_alloc(L, &alloc); - bool ul_alloc_success = alloc.length() > 0 or alloc_ul_user(user, alloc); + bool ul_alloc_success = alloc.length() > 0 and alloc_ul_user(user, alloc); if (ue_cc_idx != 0 and not ul_alloc_success) { // For SCells, if we can't allocate small PUSCH grant, abort DL allocation return alloc_outcome_t::PUCCH_COLLISION;