Corrected bug in RA

master
Xavier Arteaga 7 years ago
parent 02680ed2aa
commit a570e63c5b

@ -103,9 +103,7 @@ typedef struct SRSLTE_API {
bool prb_idx[2][SRSLTE_MAX_PRB];
uint32_t nof_prb;
uint32_t Qm[SRSLTE_MAX_CODEWORDS];
uint32_t Qm2[SRSLTE_MAX_CODEWORDS];
srslte_ra_mcs_t mcs[SRSLTE_MAX_CODEWORDS];
srslte_ra_mcs_t mcs2[SRSLTE_MAX_CODEWORDS];
uint32_t nof_tb;
srslte_sf_t sf_type;
bool tb_en[SRSLTE_MAX_CODEWORDS];

@ -549,7 +549,7 @@ static int dl_dci_to_grant_mcs(srslte_ra_dl_dci_t *dci, srslte_ra_dl_grant_t *gr
}
grant->pinfo = dci->pinfo;
if (tbs < 0) {
if (grant->mcs[0].tbs < 0 || grant->mcs[1].tbs < 0) {
return SRSLTE_ERROR;
} else {
return SRSLTE_SUCCESS;
@ -585,9 +585,11 @@ int srslte_ra_dl_dci_to_grant(srslte_ra_dl_dci_t *dci,
crc_is_crnti = true;
}
// Compute PRB allocation
if (!srslte_ra_dl_dci_to_grant_prb_allocation(dci, grant, nof_prb)) {
int ret =srslte_ra_dl_dci_to_grant_prb_allocation(dci, grant, nof_prb);
if (!ret) {
// Compute MCS
if (!dl_dci_to_grant_mcs(dci, grant, crc_is_crnti)) {
ret = dl_dci_to_grant_mcs(dci, grant, crc_is_crnti);
if (ret == SRSLTE_SUCCESS) {
// Apply Section 7.1.7.3. If RA-RNTI and Format1C rv_idx=0
if (msg_rnti >= SRSLTE_RARNTI_START && msg_rnti <= SRSLTE_RARNTI_END &&
dci->dci_is_1c)

Loading…
Cancel
Save