bugfix: fix ack/nack
This commit is contained in:
@@ -2405,7 +2405,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
|||||||
*payload = (stat_re<0) ? 1 : 2; // 1 == ACK, 2 == NAK
|
*payload = (stat_re<0) ? 1 : 2; // 1 == ACK, 2 == NAK
|
||||||
|
|
||||||
if (fmt==pucch_format1b)
|
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
|
} 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);
|
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
|
*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;
|
eNB->pucch1ab_stats_cnt[UE_id][subframe] = (eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023;
|
||||||
|
|
||||||
if (fmt==pucch_format1b)
|
if (fmt==pucch_format1b)
|
||||||
*(1+payload) = 6;
|
*(1+payload) = 4;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
LOG_E(PHY,"[eNB] PUCCH fmt2/2a/2b not supported\n");
|
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
|
// 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(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(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);
|
LOG_D(MAC,"Received %d for harq_pid %d\n",pdu[0],harq_pid);
|
||||||
|
|
||||||
if (pdu[0] == 1) { // ACK
|
if (pdu[0] == 1) { // ACK
|
||||||
sched_ctl->round[CC_idP][harq_pid]=8; // release HARQ process
|
sched_ctl->round[CC_idP][harq_pid]=8; // release HARQ process
|
||||||
sched_ctl->tbcnt[CC_idP][harq_pid]=0;
|
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
|
sched_ctl->round[CC_idP][harq_pid]++; // increment round
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user