From de8b7d6c48673ba39c59f51b09e0b6585eef562b Mon Sep 17 00:00:00 2001 From: yagoda Date: Fri, 11 Mar 2022 00:05:13 +0100 Subject: [PATCH] mac,phy: fixing pdcch order bug, do not process PDSCH if grant is pdcch order --- srsue/src/phy/lte/cc_worker.cc | 3 +++ srsue/src/stack/mac/mac.cc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/srsue/src/phy/lte/cc_worker.cc b/srsue/src/phy/lte/cc_worker.cc index 26880884d..f7087c00d 100644 --- a/srsue/src/phy/lte/cc_worker.cc +++ b/srsue/src/phy/lte/cc_worker.cc @@ -275,6 +275,9 @@ bool cc_worker::work_dl_regular() // Set RNTI ue_dl_cfg.cfg.pdsch.rnti = dci_dl.rnti; + } else { + ue_dl_cfg.cfg.pdsch.rnti = dci_dl.rnti; + ue_dl_cfg.cfg.pdsch.grant.tb[0].tbs = 0; } // Generate MAC grant mac_interface_phy_lte::mac_grant_dl_t mac_grant = {}; diff --git a/srsue/src/stack/mac/mac.cc b/srsue/src/stack/mac/mac.cc index d3da40a0f..4f2edcd7f 100644 --- a/srsue/src/stack/mac/mac.cc +++ b/srsue/src/stack/mac/mac.cc @@ -433,6 +433,9 @@ void mac::new_grant_dl(uint32_t cc_idx, action->tb[0].rv = grant.tb[0].rv; srsran_softbuffer_rx_reset_cb(&pch_softbuffer, 1); } + } else if (grant.is_pdcch_order) { + // if the grant is a PDCCH order then there is no associated PDSCH + action->tb[0].enabled = false; } else if (!(grant.rnti == SRSRAN_SIRNTI && cc_idx != 0)) { // If PDCCH for C-RNTI and RA procedure in Contention Resolution, notify it if (grant.rnti == uernti.get_crnti() && ra_procedure.is_contention_resolution()) {