From 55c83b00f92ee9937604cfd98da3f23487f43d32 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Wed, 31 Aug 2016 11:26:16 +0200
Subject: [PATCH] hotfix: bug in rx_pucch

This hotfix does not change the processing at all.
At this point, stat_re == 0, so the behavior is the
same as before. But the code was wrong. There should
have been no test, it's a NACK, period.
---
 openair1/PHY/LTE_TRANSPORT/pucch.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c
index 88ce57b930..82ad9ab00f 100644
--- a/openair1/PHY/LTE_TRANSPORT/pucch.c
+++ b/openair1/PHY/LTE_TRANSPORT/pucch.c
@@ -1052,12 +1052,11 @@ uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
       if (fmt==pucch_format1b)
         *(1+payload) = (stat_im<0) ? 1 : 0;
     } else { // insufficient energy on PUCCH so NAK
-      *payload = 0;
       ((int16_t*)&phy_vars_eNB->pucch1ab_stats[UE_id][(subframe<<10) + (phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re);
       ((int16_t*)&phy_vars_eNB->pucch1ab_stats[UE_id][(subframe<<10) + (phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im);
       phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe] = (phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023;
 
-      *payload = (stat_re<0) ? 1 : 0;
+      *payload = 0;
 
       if (fmt==pucch_format1b)
         *(1+payload) = 0;
-- 
GitLab