@@ -255,12 +255,10 @@ bool cell_harq_repository<IsDl>::handle_new_retx(harq_type& h, slot_point sl_tx,
255255 // Remove HARQ from pending Retx list.
256256 harq_pending_retx_list.pop (&h);
257257
258- h.status = harq_state_t ::waiting_ack;
259- h.slot_tx = sl_tx;
260- h.slot_ack = sl_ack;
261- h.ndi = !h.ndi ;
262- h.ack_on_timeout = false ;
263- h.retxs_cancelled = false ;
258+ h.status = harq_state_t ::waiting_ack;
259+ h.slot_tx = sl_tx;
260+ h.slot_ack = sl_ack;
261+ h.ack_on_timeout = false ;
264262 h.nof_retxs ++;
265263
266264 // Add HARQ to the timeout list.
@@ -487,6 +485,8 @@ void dl_harq_process_handle::save_grant_params(const dl_harq_sched_context& ctx,
487485{
488486 srsran_assert (pdsch.codewords .size () == 1 , " Only one codeword supported" );
489487 dl_harq_process_impl& impl = fetch_impl ();
488+ srsran_sanity_check (pdsch.rnti == impl.rnti , " RNTI mismatch" );
489+ srsran_sanity_check (pdsch.harq_id == impl.h_id , " HARQ-id mismatch" );
490490 srsran_assert (impl.status == harq_utils::harq_state_t ::waiting_ack,
491491 " Setting allocation parameters for DL HARQ process id={} in invalid state" ,
492492 id ());
@@ -497,8 +497,11 @@ void dl_harq_process_handle::save_grant_params(const dl_harq_sched_context& ctx,
497497 if (impl.nof_retxs == 0 ) {
498498 prev_params.tbs_bytes = cw.tb_size_bytes ;
499499 prev_params.dci_cfg_type = ctx.dci_cfg_type ;
500+ prev_params.nof_layers = pdsch.nof_layers ;
500501 prev_params.olla_mcs = ctx.olla_mcs ;
501502 prev_params.slice_id = ctx.slice_id ;
503+ prev_params.cqi = ctx.cqi .has_value () ? ctx.cqi .value () : cqi_value{1 };
504+ prev_params.is_fallback = ctx.is_fallback ;
502505 } else {
503506 srsran_assert (ctx.dci_cfg_type == prev_params.dci_cfg_type ,
504507 " DCI format and RNTI type cannot change during DL HARQ retxs" );
@@ -510,6 +513,8 @@ void dl_harq_process_handle::save_grant_params(const dl_harq_sched_context& ctx,
510513 prev_params.rbs ,
511514 cw.mcs_index ,
512515 pdsch.rbs );
516+ srsran_assert (prev_params.nof_layers == pdsch.nof_layers , " Number of layers cannot change during HARQ retxs" );
517+ srsran_assert (prev_params.is_fallback == ctx.is_fallback , " Fallback state cannot change across DL HARQ retxs" );
513518 }
514519 prev_params.mcs_table = cw.mcs_table ;
515520 prev_params.mcs = cw.mcs_index ;
@@ -539,6 +544,8 @@ int ul_harq_process_handle::ul_crc_info(bool ack)
539544void ul_harq_process_handle::save_grant_params (const ul_harq_sched_context& ctx, const pusch_information& pusch)
540545{
541546 ul_harq_process_impl& impl = fetch_impl ();
547+ srsran_sanity_check (pusch.rnti == impl.rnti , " RNTI mismatch" );
548+ srsran_sanity_check (pusch.harq_id == impl.h_id , " HARQ-id mismatch" );
542549 srsran_assert (impl.status == harq_utils::harq_state_t ::waiting_ack,
543550 " Setting allocation parameters for DL HARQ process id={} in invalid state" ,
544551 id ());
0 commit comments