mac: fixing pdcch order bug, dont send if rnti is not in ue_db

This commit is contained in:
yagoda 2022-03-11 00:04:11 +01:00 committed by Andre Puschmann
parent fec6871309
commit 5181d07c8a
1 changed files with 13 additions and 10 deletions

View File

@ -776,17 +776,20 @@ int mac::get_dl_sched(uint32_t tti_tx_dl, dl_sched_list_t& dl_sched_res_list)
// Copy PDCCH order grants
for (uint32_t i = 0; i < sched_result.po.size(); i++) {
// Copy dci info
dl_sched_res->pdsch[n].dci = sched_result.po[i].dci;
if (pcap) {
pcap->write_dl_pch(dl_sched_res->pdsch[n].data[0], sched_result.po[i].tbs, true, tti_tx_dl, enb_cc_idx);
uint16_t rnti = sched_result.po[i].dci.rnti;
if (ue_db.contains(rnti)) {
// Copy dci info
dl_sched_res->pdsch[n].dci = sched_result.po[i].dci;
if (pcap) {
pcap->write_dl_pch(dl_sched_res->pdsch[n].data[0], sched_result.po[i].tbs, true, tti_tx_dl, enb_cc_idx);
}
if (pcap_net) {
pcap_net->write_dl_pch(dl_sched_res->pdsch[n].data[0], sched_result.po[i].tbs, true, tti_tx_dl, enb_cc_idx);
}
n++;
} else {
logger.warning("Invalid PDCCH order scheduling result. User 0x%x does not exist", rnti);
}
if (pcap_net) {
pcap_net->write_dl_pch(dl_sched_res->pdsch[n].data[0], sched_result.po[i].tbs, true, tti_tx_dl, enb_cc_idx);
}
n++;
}
dl_sched_res->nof_grants = n;