From bf4d0121dddd761356c8d81c17e12c4b5e04ff8f Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 14 Apr 2021 11:57:38 +0200 Subject: [PATCH] cc_worker,proc_ra: set RNTI type for UL grant contained in RAR needed for HARQ to correctly pick up the Msg3 Tx --- srsue/src/phy/nr/cc_worker.cc | 1 + srsue/src/stack/mac_nr/proc_ra_nr.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/srsue/src/phy/nr/cc_worker.cc b/srsue/src/phy/nr/cc_worker.cc index cd33dabec..41e7a28f1 100644 --- a/srsue/src/phy/nr/cc_worker.cc +++ b/srsue/src/phy/nr/cc_worker.cc @@ -369,6 +369,7 @@ bool cc_worker::work_ul() mac_ul_grant.tbs = pusch_cfg.grant.tb[0].tbs / 8; mac_ul_grant.ndi = pusch_cfg.grant.tb[0].ndi; mac_ul_grant.rv = pusch_cfg.grant.tb[0].rv; + mac_ul_grant.is_rar_grant = (pusch_cfg.grant.rnti_type == srsran_rnti_type_ra); phy->stack->new_grant_ul(0, mac_ul_grant, &ul_action); // Don't process further if MAC can't provide PDU diff --git a/srsue/src/stack/mac_nr/proc_ra_nr.cc b/srsue/src/stack/mac_nr/proc_ra_nr.cc index b70b0d1f7..9a39d3c76 100644 --- a/srsue/src/stack/mac_nr/proc_ra_nr.cc +++ b/srsue/src/stack/mac_nr/proc_ra_nr.cc @@ -205,7 +205,7 @@ void proc_ra_nr::ra_response_reception(const mac_interface_phy_nr::mac_nr_grant_ temp_crnti = subpdu.get_temp_crnti(); // Set Temporary-C-RNTI if provided, otherwise C-RNTI is ok - phy->set_ul_grant(subpdu.get_ul_grant(), temp_crnti, srsran_rnti_type_c); + phy->set_ul_grant(subpdu.get_ul_grant(), temp_crnti, srsran_rnti_type_ra); // reset all parameters that are used before rar rar_rnti = SRSRAN_INVALID_RNTI;