Fix a logical error that sends obsolete buffer erroneously on UL and causes crash in gNB.
This commit is contained in:
@@ -184,14 +184,17 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
|||||||
|
|
||||||
ulsch0->f_pusch = pusch_config_pdu->absolute_delta_PUSCH;
|
ulsch0->f_pusch = pusch_config_pdu->absolute_delta_PUSCH;
|
||||||
|
|
||||||
if (scheduled_response->tx_request){
|
if (scheduled_response->tx_request && scheduled_response->tx_request->number_of_pdus) {
|
||||||
fapi_nr_tx_request_body_t *tx_req_body = &scheduled_response->tx_request->tx_request_body[i];
|
for (int j=0; j<scheduled_response->tx_request->number_of_pdus; j++) {
|
||||||
LOG_D(PHY,"%d.%d Copying %d bytes to harq_process_ul_ue->a (harq_pid %d)\n",scheduled_response->frame,slot,tx_req_body->pdu_length,current_harq_pid);
|
fapi_nr_tx_request_body_t *tx_req_body = &scheduled_response->tx_request->tx_request_body[j];
|
||||||
memcpy(harq_process_ul_ue->a, tx_req_body->pdu, tx_req_body->pdu_length);
|
if (tx_req_body->pdu_index == i) {
|
||||||
|
LOG_D(PHY,"%d.%d Copying %d bytes to harq_process_ul_ue->a (harq_pid %d)\n",scheduled_response->frame,slot,tx_req_body->pdu_length,current_harq_pid);
|
||||||
harq_process_ul_ue->status = ACTIVE;
|
memcpy(harq_process_ul_ue->a, tx_req_body->pdu, tx_req_body->pdu_length);
|
||||||
|
harq_process_ul_ue->status = ACTIVE;
|
||||||
scheduled_response->tx_request->number_of_pdus = 0;
|
scheduled_response->tx_request->number_of_pdus--;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user