From e2c37ad5133a4fe886220acabdadffcb42e7b7ef Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 4 Jun 2021 11:08:43 +0100 Subject: [PATCH] bugfix: missing early return in TPC derivation --- srsenb/hdr/stack/mac/sched_ue_ctrl/tpc.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/srsenb/hdr/stack/mac/sched_ue_ctrl/tpc.h b/srsenb/hdr/stack/mac/sched_ue_ctrl/tpc.h index 1ea15067b..fa3a9424c 100644 --- a/srsenb/hdr/stack/mac/sched_ue_ctrl/tpc.h +++ b/srsenb/hdr/stack/mac/sched_ue_ctrl/tpc.h @@ -171,7 +171,9 @@ private: } if (last_phr < 0) { // negative PHR - encode_tpc_delta(-1); + logger.info( + "TPC: rnti=0x%x, %s command=-1 due to PHR=%d < 0", rnti, cc == PUSCH_CODE ? "PUSCH" : "PUCCH", last_phr); + return encode_tpc_delta(-1); } if ((tti_count - ch_snr.last_tpc_tti_count) < min_tpc_tti_interval) { // more time required before sending next TPC