DCI formats 11 and 01 assume the presence of an active BWP, if not present return with an error to prevent segfault
This commit is contained in:
@@ -3232,6 +3232,10 @@ uint16_t nr_dci_size(const NR_UE_DL_BWP_t *DL_BWP,
|
||||
break;
|
||||
|
||||
case NR_UL_DCI_FORMAT_0_1:
|
||||
if (!UL_BWP) {
|
||||
LOG_E(NR_MAC, "Error! Not possible to configure DCI format 01 without UL BWP.\n");
|
||||
return 0;
|
||||
}
|
||||
/// fixed: Format identifier 1, MCS 5, NDI 1, RV 2, HARQ PID 4, PUSCH TPC 2, ULSCH indicator 1 --16
|
||||
size += 16;
|
||||
// Carrier indicator
|
||||
@@ -3385,6 +3389,10 @@ uint16_t nr_dci_size(const NR_UE_DL_BWP_t *DL_BWP,
|
||||
|
||||
case NR_DL_DCI_FORMAT_1_1:
|
||||
LOG_D(NR_MAC, "DCI_FORMAT 1_1 : pdsch_Config %p, pucch_Config %p\n", pdsch_Config, pucch_Config);
|
||||
if (!DL_BWP) {
|
||||
LOG_E(NR_MAC, "Error! Not possible to configure DCI format 11 without DL BWP.\n");
|
||||
return 0;
|
||||
}
|
||||
// General note: 0 bits condition is ignored as default nbits is 0.
|
||||
// Format identifier
|
||||
size = 1;
|
||||
|
||||
@@ -217,18 +217,21 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac,
|
||||
0);
|
||||
}
|
||||
|
||||
rel15->dci_length_options[i] = nr_dci_size(current_DL_BWP,
|
||||
current_UL_BWP,
|
||||
sc_info,
|
||||
mac->pdsch_HARQ_ACK_Codebook,
|
||||
&mac->def_dci_pdu_rel15[dl_config->slot][dci_format],
|
||||
dci_format,
|
||||
rnti_type,
|
||||
coreset,
|
||||
dl_bwp_id,
|
||||
ss->searchSpaceType->present,
|
||||
mac->type0_PDCCH_CSS_config.num_rbs,
|
||||
alt_size);
|
||||
uint16_t dci_size = nr_dci_size(current_DL_BWP,
|
||||
current_UL_BWP,
|
||||
sc_info,
|
||||
mac->pdsch_HARQ_ACK_Codebook,
|
||||
&mac->def_dci_pdu_rel15[dl_config->slot][dci_format],
|
||||
dci_format,
|
||||
rnti_type,
|
||||
coreset,
|
||||
dl_bwp_id,
|
||||
ss->searchSpaceType->present,
|
||||
mac->type0_PDCCH_CSS_config.num_rbs,
|
||||
alt_size);
|
||||
if (dci_size == 0)
|
||||
return;
|
||||
rel15->dci_length_options[i] = dci_size;
|
||||
}
|
||||
|
||||
rel15->BWPStart = coreset_id == 0 ? mac->type0_PDCCH_CSS_config.cset_start_rb : current_DL_BWP->BWPStart;
|
||||
|
||||
@@ -1236,6 +1236,8 @@ void fill_dci_pdu_rel15(const NR_UE_ServingCell_Info_t *servingCellInfo,
|
||||
ss->searchSpaceType->present,
|
||||
cset0_bwp_size,
|
||||
alt_size);
|
||||
if (dci_size == 0)
|
||||
return;
|
||||
pdcch_dci_pdu->PayloadSizeBits = dci_size;
|
||||
AssertFatal(dci_size <= 64, "DCI sizes above 64 bits not yet supported");
|
||||
if (dci_format == NR_DL_DCI_FORMAT_1_1 || dci_format == NR_UL_DCI_FORMAT_0_1)
|
||||
|
||||
Reference in New Issue
Block a user