nr_fill_ulsch(): gracefully handle case of no ulsch found
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
||||
|
||||
NR_gNB_ULSCH_t *find_nr_ulsch(PHY_VARS_gNB *gNB, uint16_t rnti, int pid)
|
||||
static NR_gNB_ULSCH_t *find_nr_ulsch(PHY_VARS_gNB *gNB, uint16_t rnti, int pid)
|
||||
{
|
||||
int16_t first_free_index = -1;
|
||||
AssertFatal(gNB != NULL, "gNB is null\n");
|
||||
@@ -62,7 +62,10 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_pusch_pdu_t
|
||||
{
|
||||
int harq_pid = ulsch_pdu->pusch_data.harq_process_id;
|
||||
NR_gNB_ULSCH_t *ulsch = find_nr_ulsch(gNB, ulsch_pdu->rnti, harq_pid);
|
||||
AssertFatal(ulsch, "No ulsch_id found for rnti %04x\n", ulsch_pdu->rnti);
|
||||
if (ulsch == NULL) {
|
||||
LOG_E(NR_PHY, "No ulsch_id found for rnti %04x\n", ulsch_pdu->rnti);
|
||||
return;
|
||||
}
|
||||
|
||||
ulsch->rnti = ulsch_pdu->rnti;
|
||||
ulsch->harq_pid = harq_pid;
|
||||
|
||||
@@ -73,8 +73,6 @@ void nr_ulsch_unscrambling(int16_t* llr, uint32_t size, uint32_t Nid, uint32_t n
|
||||
|
||||
void nr_ulsch_layer_demapping(int16_t *llr_cw, uint8_t Nl, uint8_t mod_order, uint32_t length, int16_t **llr_layers);
|
||||
|
||||
NR_gNB_ULSCH_t *find_nr_ulsch(PHY_VARS_gNB *gNB, uint16_t rnti, int pid);
|
||||
|
||||
void dump_pusch_stats(FILE *fd,PHY_VARS_gNB *gNB);
|
||||
|
||||
void dump_nr_I0_stats(FILE *fd,PHY_VARS_gNB *gNB);
|
||||
|
||||
Reference in New Issue
Block a user