From fdec451a9de39b235a4818260811863bc9b526d2 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Sat, 14 Nov 2020 15:24:02 +0000 Subject: [PATCH] disable mcs>20 if eNB supports UL 64QAM but UE doesn't --- lib/include/srslte/interfaces/sched_interface.h | 1 + srsenb/src/stack/mac/scheduler_ue.cc | 7 ++++--- srsenb/src/stack/rrc/rrc.cc | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/include/srslte/interfaces/sched_interface.h b/lib/include/srslte/interfaces/sched_interface.h index 737ef245d..d258542da 100644 --- a/lib/include/srslte/interfaces/sched_interface.h +++ b/lib/include/srslte/interfaces/sched_interface.h @@ -84,6 +84,7 @@ public: uint32_t maxharq_msg3tx; uint32_t n1pucch_an; uint32_t delta_pucch_shift; + bool enable_64qam; // If non-negative, statically allocate N prbs at the edges of the uplink for PUCCH int nrb_pucch; diff --git a/srsenb/src/stack/mac/scheduler_ue.cc b/srsenb/src/stack/mac/scheduler_ue.cc index 6ad84cef6..5caf7dad0 100644 --- a/srsenb/src/stack/mac/scheduler_ue.cc +++ b/srsenb/src/stack/mac/scheduler_ue.cc @@ -1242,9 +1242,10 @@ int cc_sched_ue::cqi_to_tbs(uint32_t nof_prb, uint32_t nof_re, bool use_tbs_inde uint32_t cqi, max_mcs, max_Qm; float max_coderate; if (is_ul) { - cqi = ul_cqi; - max_mcs = cfg->support_ul_64qam ? max_mcs_ul : std::min(max_mcs_ul, 20u); - max_Qm = cfg->support_ul_64qam ? 6 : 4; + cqi = ul_cqi; + // if cell supports UL 64QAM but the UE does not support it, cap the mcs to avoid Qm == 6 + max_mcs = (not cfg->support_ul_64qam and cell_params->cfg.enable_64qam) ? std::min(max_mcs_ul, 20u) : max_mcs_ul; + max_Qm = cfg->support_ul_64qam ? 6 : 4; max_coderate = srslte_cqi_to_coderate(std::min(cqi + 1u, 15u), false); } else { cqi = dl_cqi; diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index 9080b3db1..c5a249424 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -597,6 +597,7 @@ void rrc::config_mac() cfg.sibs[1].sib2().rr_cfg_common.rach_cfg_common.ra_supervision_info.ra_resp_win_size.to_number(); item.prach_freq_offset = cfg.sibs[1].sib2().rr_cfg_common.prach_cfg.prach_cfg_info.prach_freq_offset; item.maxharq_msg3tx = cfg.sibs[1].sib2().rr_cfg_common.rach_cfg_common.max_harq_msg3_tx; + item.enable_64qam = cfg.sibs[1].sib2().rr_cfg_common.pusch_cfg_common.pusch_cfg_basic.enable64_qam; item.initial_dl_cqi = cfg.cell_list[ccidx].initial_dl_cqi; item.nrb_pucch = SRSLTE_MAX(cfg.sr_cfg.nof_prb, cfg.cqi_cfg.nof_prb);