discard pdu if TBS is null
This commit is contained in:
@@ -707,6 +707,11 @@ static int nr_ue_process_dci_dl_10(module_id_t module_id,
|
||||
|
||||
dlsch_pdu->ldpcBaseGraph = get_BG(dlsch_pdu->TBS, dlsch_pdu->targetCodeRate);
|
||||
|
||||
if (dlsch_pdu->TBS == 0) {
|
||||
LOG_E(MAC, "Invalid TBS = 0. Probably caused by missed detection of DCI\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int bw_tbslbrm = current_DL_BWP ? mac->sc_info.dl_bw_tbslbrm : dlsch_pdu->BWPSize;
|
||||
dlsch_pdu->tbslbrm = nr_compute_tbslbrm(dlsch_pdu->mcs_table, bw_tbslbrm, 1);
|
||||
|
||||
@@ -1136,6 +1141,11 @@ static int nr_ue_process_dci_dl_11(module_id_t module_id,
|
||||
|
||||
dlsch_pdu->ldpcBaseGraph = get_BG(dlsch_pdu->TBS, dlsch_pdu->targetCodeRate);
|
||||
|
||||
if (dlsch_pdu->TBS == 0) {
|
||||
LOG_E(MAC, "Invalid TBS = 0. Probably caused by missed detection of DCI\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
// TBS_LBRM according to section 5.4.2.1 of 38.212
|
||||
AssertFatal(sc_info->maxMIMO_Layers_PDSCH != NULL, "Option with max MIMO layers not configured is not supported\n");
|
||||
int nl_tbslbrm = *sc_info->maxMIMO_Layers_PDSCH < 4 ? *sc_info->maxMIMO_Layers_PDSCH : 4;
|
||||
|
||||
@@ -739,7 +739,14 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
|
||||
pusch_config_pdu->target_code_rate = mac->ul_harq_info[pid].R;
|
||||
pusch_config_pdu->pusch_data.tb_size = mac->ul_harq_info[pid].TBS;
|
||||
}
|
||||
|
||||
pusch_config_pdu->ldpcBaseGraph = get_BG(pusch_config_pdu->pusch_data.tb_size << 3, pusch_config_pdu->target_code_rate);
|
||||
|
||||
if (pusch_config_pdu->pusch_data.tb_size == 0) {
|
||||
LOG_E(MAC, "Invalid TBS = 0. Probably caused by missed detection of DCI\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user