AssertFatal((ue->ulsch[i]=new_nr_ue_ulsch(ue->frame_parms.N_RB_UL,NR_MAX_ULSCH_HARQ_PROCESSES,&ue->frame_parms))!=NULL,"Can't get ue ulsch structures\n");
@@ -257,11 +135,10 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u
}
/* 38.321 5.4.2.1 2> if the uplink grant was received on PDCCH for the C-RNTI and the HARQ buffer of the identified process is empty */
if((ulsch->harq_processes[harq_pid]->first_tx==1)&&(rnti_type==_C_RNTI_)){/* no transmission yet on this process so consider its harq buffer as empty */
ulsch->harq_processes[harq_pid]->first_tx=0;
ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator=ndi;/* store first value of ndi */
if((harq_processes[harq_pid].first_tx==1)&&(rnti_type==_C_RNTI_)){/* no transmission yet on this process so consider its harq buffer as empty */
harq_processes[harq_pid].first_tx=0;
harq_processes[harq_pid].ndi=ndi;/* store first value of ndi */
harq_processes[harq_pid].round=0;
result_harq=NEW_TRANSMISSION_HARQ;
...
...
@@ -269,10 +146,9 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u
}
/* 38.321 5.4.2.1 2> if the received grant was not addressed to a Temporary C-RNTI on PDCCH, and the NDI provided in the associated HARQ */
/* information has been toggled compared to the value in the previous transmission of this TB of this HARQ process */
elseif((ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator!=ndi)&&(rnti_type!=_TC_RNTI_)){/* is ndi toogled so this is a new grant ? */
ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator=ndi;/* store first value of ndi */