From dfb389d68f606430c8999fb27f6bf85c65587160 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Fri, 6 Nov 2020 17:11:07 +0100 Subject: [PATCH] srsenb: Use MCS from new grant when doing adaptive retx --- srsenb/src/phy/cc_worker.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/srsenb/src/phy/cc_worker.cc b/srsenb/src/phy/cc_worker.cc index 01e425df4..e3ebfe502 100644 --- a/srsenb/src/phy/cc_worker.cc +++ b/srsenb/src/phy/cc_worker.cc @@ -317,8 +317,15 @@ void cc_worker::decode_pusch_rnti(stack_interface_phy_lte::ul_sched_grant_t& ul_ // Handle Format0 adaptive retx // Use last TBS for this TB in case of mcs>28 if (ul_grant.dci.tb.mcs_idx > 28) { + int rv_idx = grant.tb.rv; grant.tb = phy->ue_db.get_last_ul_tb(rnti, cc_idx, ul_pid); - Info("RETX: mcs=%d, old_tbs=%d pid=%d\n", ul_grant.dci.tb.mcs_idx, grant.tb.tbs, ul_pid); + grant.tb.rv = rv_idx; + Info("Adaptive retx: rnti=0x%x, pid=%d, rv_idx=%d, mcs=%d, old_tbs=%d\n", + rnti, + ul_pid, + grant.tb.rv, + ul_grant.dci.tb.mcs_idx, + grant.tb.tbs / 8); } phy->ue_db.set_last_ul_tb(rnti, cc_idx, ul_pid, grant.tb);