From 9d6d437ba5504b3072cc9a54440123b0c8c80cd1 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Tue, 13 Jul 2021 00:32:55 +0200 Subject: [PATCH] mac_nr,ue: don't decode RAR PDU that couldn't be decoded ignore RAR PDU when PDSCH wasn't OK --- srsue/src/stack/mac_nr/mac_nr.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srsue/src/stack/mac_nr/mac_nr.cc b/srsue/src/stack/mac_nr/mac_nr.cc index 22c023906..07191e613 100644 --- a/srsue/src/stack/mac_nr/mac_nr.cc +++ b/srsue/src/stack/mac_nr/mac_nr.cc @@ -297,7 +297,9 @@ void mac_nr::tb_decoded(const uint32_t cc_idx, const mac_nr_grant_dl_t& grant, t write_pcap(cc_idx, grant, result); if (proc_ra.has_rar_rnti() && grant.rnti == proc_ra.get_rar_rnti()) { - proc_ra.handle_rar_pdu(result); + if (result.ack && result.payload != nullptr) { + proc_ra.handle_rar_pdu(result); + } } else { // Assert HARQ entity if (dl_harq.at(cc_idx) == nullptr) {