From 5eed9297d3fc181dd3e7f24b25d2b9751699b8f4 Mon Sep 17 00:00:00 2001 From: Piotr Gawlowicz Date: Wed, 30 Nov 2022 16:04:59 +0100 Subject: [PATCH] fix: correctly skip resource allocation if ul_disabled --- srsenb/src/stack/mac/schedulers/sched_time_pf.cc | 7 +++++-- srsenb/src/stack/mac/schedulers/sched_time_rr.cc | 10 +++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/srsenb/src/stack/mac/schedulers/sched_time_pf.cc b/srsenb/src/stack/mac/schedulers/sched_time_pf.cc index de1103f96..4e418db61 100644 --- a/srsenb/src/stack/mac/schedulers/sched_time_pf.cc +++ b/srsenb/src/stack/mac/schedulers/sched_time_pf.cc @@ -62,8 +62,11 @@ void sched_time_pf::new_tti(sched_ue_list& ue_db, sf_sched* tti_sched) } if (it->second.ul_h != nullptr) { // Allocate only if UL carrier is enabled - if (!u.second->get_ue_cfg().supported_cc_list[cc_cfg->enb_cc_idx].ul_disabled) { - ul_queue.push(&it->second); + for (auto& i : u.second->get_ue_cfg().supported_cc_list) { + if (i.enb_cc_idx == cc_cfg->enb_cc_idx and not i.ul_disabled) { + ul_queue.push(&it->second); + break; + } } } } diff --git a/srsenb/src/stack/mac/schedulers/sched_time_rr.cc b/srsenb/src/stack/mac/schedulers/sched_time_rr.cc index 6637b2630..9a5de4875 100644 --- a/srsenb/src/stack/mac/schedulers/sched_time_rr.cc +++ b/srsenb/src/stack/mac/schedulers/sched_time_rr.cc @@ -122,9 +122,17 @@ void sched_time_rr::sched_ul_newtxs(sched_ue_list& ue_db, sf_sched* tti_sched, s } sched_ue& user = *iter->second; // Allocate only if UL carrier is enabled - if (user.get_ue_cfg().supported_cc_list[cc_cfg->enb_cc_idx].ul_disabled) { + bool ul_disabled = false; + for (auto& i : user.get_ue_cfg().supported_cc_list) { + if (i.enb_cc_idx == cc_cfg->enb_cc_idx) { + ul_disabled = i.ul_disabled; + break; + } + } + if (ul_disabled) { continue; } + const ul_harq_proc* h = get_ul_newtx_harq(user, tti_sched); // Check if there is a empty harq if (h == nullptr) {