Add checks more checks for UL grants

master
Ismael Gomez 5 years ago committed by Xavier Arteaga
parent dcb3bc0135
commit 171e26ee68

@ -307,6 +307,11 @@ int srslte_ra_ul_dci_to_grant(srslte_cell_t* cell,
grant->n_prb_tilde[i] = grant->n_prb[i];
}
if (grant->nof_symb == 0 || grant->nof_re == 0) {
ERROR("Converting ul_dci to grant, nof_symb=%d, nof_re=%d\n", grant->nof_symb, grant->nof_re);
return SRSLTE_ERROR;
}
return SRSLTE_SUCCESS;
} else {
return SRSLTE_ERROR;

@ -928,6 +928,10 @@ static void ulsch_interleave(uint8_t* g_bits,
uint32_t nof_ri_bits,
uint8_t* ri_present)
{
if (N_pusch_symbs == 0 || Qm == 0 || H_prime_total == 0 || H_prime_total < N_pusch_symbs) {
ERROR("Invalid input: N_pusch_symbs=%d, Qm=%d, H_prime_total=%d, N_pusch_symbs=%d\n", N_pusch_symbs, Qm, H_prime_total, N_pusch_symbs);
return;
}
const uint32_t nof_bits = H_prime_total * Qm;
uint32_t rows = H_prime_total / N_pusch_symbs;

@ -654,8 +654,8 @@ bool cc_worker::work_ul(srslte_uci_data_t* uci_data)
// Generate PHY grant
if (srslte_ue_ul_dci_to_pusch_grant(&ue_ul, &sf_cfg_ul, &ue_ul_cfg, &dci_ul, &ue_ul_cfg.ul_cfg.pusch.grant)) {
Error("Converting DCI message to UL dci\n");
}
ul_grant_available = false;
} else {
// Save TBS info for next retx
phy->last_ul_tb[pid][cc_idx] = ue_ul_cfg.ul_cfg.pusch.grant.tb;
@ -668,6 +668,7 @@ bool cc_worker::work_ul(srslte_uci_data_t* uci_data)
ue_ul_cfg.ul_cfg.hopping.current_tx_nb = ul_action.current_tx_nb;
srslte_ue_ul_pusch_hopping(&ue_ul, &sf_cfg_ul, &ue_ul_cfg, &ue_ul_cfg.ul_cfg.pusch.grant);
}
}
// Set UL RNTI
if (ul_grant_available || ul_mac_grant.phich_available) {

Loading…
Cancel
Save