Commit 4843960f authored by Cedric Roux's avatar Cedric Roux

bugfix: fix ack/nack

parent 42667d6a
......@@ -2405,7 +2405,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
*payload = (stat_re<0) ? 1 : 2; // 1 == ACK, 2 == NAK
if (fmt==pucch_format1b)
*(1+payload) = (stat_im<0) ? 1 : 0;
*(1+payload) = (stat_im<0) ? 1 : 2;
} else { // insufficient energy on PUCCH so NAK
LOG_D(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
*payload = 4; // DTX
......@@ -2414,7 +2414,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
eNB->pucch1ab_stats_cnt[UE_id][subframe] = (eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023;
if (fmt==pucch_format1b)
*(1+payload) = 6;
*(1+payload) = 4;
}
} else {
LOG_E(PHY,"[eNB] PUCCH fmt2/2a/2b not supported\n");
......
......@@ -3094,14 +3094,15 @@ void extract_harq(module_id_t mod_idP,int CC_idP,int UE_id,frame_t frameP,sub_fr
// single ACK/NAK bit
AssertFatal(num_ack_nak==1,"num_ack_nak %d > 1 for 1 CC and single-layer transmission\n",num_ack_nak);
AssertFatal(sched_ctl->round[CC_idP][harq_pid]<8,"Got ACK/NAK for inactive harq_pid %d for UE %d/%x\n",harq_pid,UE_id,rnti);
AssertFatal(pdu[0] == 1 || pdu[0] == 2, "Received ACK/NAK %d which is not 1 or 2 for harq_pid %d from UE %d/%x\n",pdu[0],harq_pid,UE_id,rnti);
AssertFatal(pdu[0] == 1 || pdu[0] == 2 || pdu[0] == 4,
"Received ACK/NAK %d which is not 1 or 2 for harq_pid %d from UE %d/%x\n",pdu[0],harq_pid,UE_id,rnti);
LOG_D(MAC,"Received %d for harq_pid %d\n",pdu[0],harq_pid);
if (pdu[0] == 1) { // ACK
sched_ctl->round[CC_idP][harq_pid]=8; // release HARQ process
sched_ctl->tbcnt[CC_idP][harq_pid]=0;
}
else if (pdu[0] == 2) // NAK
else if (pdu[0] == 2 || pdu[0] == 4) // NAK (treat DTX as NAK)
sched_ctl->round[CC_idP][harq_pid]++; // increment round
}
else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment