Removed bug in dl_harq for multiple TB

master
Xavier Arteaga 7 years ago committed by Ismael Gomez
parent 1ac7f325df
commit 4b00908abb

@ -166,10 +166,19 @@ private:
} }
void new_grant_dl(Tgrant grant, Taction *action) { void new_grant_dl(Tgrant grant, Taction *action) {
for (uint32_t tb = 0; tb < grant.phy_grant.dl.nof_tb; tb++) { /* Fill action structure */
bzero(action, sizeof(Taction));
action->default_ack = false;
action->generate_ack = true;
action->decode_enabled = false;
/* For each subprocess... */
for (uint32_t tb = 0; tb < SRSLTE_MAX_TB; tb++) {
if (grant.tb_en[tb]) {
subproc[tb].new_grant_dl(grant, action); subproc[tb].new_grant_dl(grant, action);
} }
} }
}
int get_current_tbs(uint32_t tb_idx) { return subproc[tb_idx].get_current_tbs(); } int get_current_tbs(uint32_t tb_idx) { return subproc[tb_idx].get_current_tbs(); }
@ -241,12 +250,6 @@ private:
grant.last_tti = cur_grant.tti; grant.last_tti = cur_grant.tti;
memcpy(&cur_grant, &grant, sizeof(Tgrant)); memcpy(&cur_grant, &grant, sizeof(Tgrant));
// Fill action structure
bzero(action, sizeof(Taction));
action->default_ack = ack;
action->generate_ack = true;
action->decode_enabled = false;
// If data has not yet been successfully decoded // If data has not yet been successfully decoded
if (!ack) { if (!ack) {
@ -268,6 +271,7 @@ private:
} else { } else {
Warning("DL PID %d: Received duplicate TB. Discarting and retransmitting ACK\n", pid); Warning("DL PID %d: Received duplicate TB. Discarting and retransmitting ACK\n", pid);
action->phy_grant.dl.tb_en[tid] = false;
} }
if (pid == HARQ_BCCH_PID || harq_entity->timers_db->get(TIME_ALIGNMENT)->is_expired()) { if (pid == HARQ_BCCH_PID || harq_entity->timers_db->get(TIME_ALIGNMENT)->is_expired()) {

Loading…
Cancel
Save