From 4923f0a07b859befcc5bf30420047cd468397417 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 12 Jan 2022 18:16:21 +0100 Subject: [PATCH] gnb,mac: schedule CON_RES CE when handling CCCH this avoids implicit CON_RES scheduling in the scheduler --- srsgnb/src/stack/mac/mac_nr.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/srsgnb/src/stack/mac/mac_nr.cc b/srsgnb/src/stack/mac/mac_nr.cc index 38c768742..ea387964f 100644 --- a/srsgnb/src/stack/mac/mac_nr.cc +++ b/srsgnb/src/stack/mac/mac_nr.cc @@ -104,12 +104,17 @@ private: case srsran::mac_sch_subpdu_nr::nr_lcid_sch_t::CCCH_SIZE_64: { srsran::mac_sch_subpdu_nr& ccch_subpdu = const_cast(subpdu); rlc->write_pdu(rnti, 0, ccch_subpdu.get_sdu(), ccch_subpdu.get_sdu_length()); - // store content for ConRes CE + // store content for ConRes CE and schedule CE accordingly mac.store_msg3(rnti, srsran::make_byte_buffer(ccch_subpdu.get_sdu(), ccch_subpdu.get_sdu_length(), __FUNCTION__)); + sched->dl_mac_ce(rnti, srsran::mac_sch_subpdu_nr::CON_RES_ID); } break; case srsran::mac_sch_subpdu_nr::nr_lcid_sch_t::CRNTI: { uint16_t ce_crnti = subpdu.get_c_rnti(); + if (ce_crnti == SRSRAN_INVALID_RNTI) { + logger.error("Malformed C-RNTI CE detected. C-RNTI can't be 0x0.", subpdu.get_lcid()); + return SRSRAN_ERROR; + } uint16_t prev_rnti = rnti; rnti = ce_crnti; rrc->update_user(prev_rnti, rnti);