diff --git a/lib/include/srslte/interfaces/enb_interfaces.h b/lib/include/srslte/interfaces/enb_interfaces.h index c4dd8e335..04e2a29df 100644 --- a/lib/include/srslte/interfaces/enb_interfaces.h +++ b/lib/include/srslte/interfaces/enb_interfaces.h @@ -67,6 +67,7 @@ public: */ typedef struct { srslte_dci_ul_t dci; + uint32_t pid; uint32_t current_tx_nb; uint8_t* data; bool needs_pdcch; diff --git a/srsenb/src/phy/lte/cc_worker.cc b/srsenb/src/phy/lte/cc_worker.cc index da18d02f2..23a28843a 100644 --- a/srsenb/src/phy/lte/cc_worker.cc +++ b/srsenb/src/phy/lte/cc_worker.cc @@ -299,22 +299,20 @@ void cc_worker::decode_pusch_rnti(stack_interface_phy_lte::ul_sched_grant_t& ul_ return; } - uint32_t ul_pid = TTI_RX(ul_sf.tti) % SRSLTE_FDD_NOF_HARQ; - // Handle Format0 adaptive retx // Use last TBS for this TB in case of mcs>28 if (ul_grant.dci.tb.mcs_idx > 28) { int rv_idx = grant.tb.rv; - grant.tb = phy->ue_db.get_last_ul_tb(rnti, cc_idx, ul_pid); + grant.tb = phy->ue_db.get_last_ul_tb(rnti, cc_idx, ul_grant.pid); grant.tb.rv = rv_idx; Info("Adaptive retx: rnti=0x%x, pid=%d, rv_idx=%d, mcs=%d, old_tbs=%d", rnti, - ul_pid, + ul_grant.pid, grant.tb.rv, ul_grant.dci.tb.mcs_idx, grant.tb.tbs / 8); } - phy->ue_db.set_last_ul_tb(rnti, cc_idx, ul_pid, grant.tb); + phy->ue_db.set_last_ul_tb(rnti, cc_idx, ul_grant.pid, grant.tb); // Run PUSCH decoder ul_cfg.pusch.softbuffers.rx = ul_grant.softbuffer_rx; diff --git a/srsenb/src/stack/mac/mac.cc b/srsenb/src/stack/mac/mac.cc index f16ea0ccb..7fd748930 100644 --- a/srsenb/src/stack/mac/mac.cc +++ b/srsenb/src/stack/mac/mac.cc @@ -906,6 +906,7 @@ int mac::get_ul_sched(uint32_t tti_tx_ul, ul_sched_list_t& ul_sched_res_list) if (ue_db.count(rnti)) { // Copy grant info phy_ul_sched_res->pusch[n].current_tx_nb = sched_result.pusch[i].current_tx_nb; + phy_ul_sched_res->pusch[n].pid = TTI_RX(tti_tx_ul) % SRSLTE_FDD_NOF_HARQ; phy_ul_sched_res->pusch[n].needs_pdcch = sched_result.pusch[i].needs_pdcch; phy_ul_sched_res->pusch[n].dci = sched_result.pusch[i].dci; phy_ul_sched_res->pusch[n].softbuffer_rx =